Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ansible-lint to 6.20.2 and fix a report issue on excluded files #20

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

TamiTakamiya
Copy link
Contributor

For AAP-16692.

This PR contains three changes:

  • Upgrade ansible-lint from 6.20.1 to 6.20.2
  • Added the .coveragerc file not to include test case files in the code coverage calculation
  • Fix an issue in reporting (report.txt) on the list of excluded files, in the "Issues found by ansible-lint" section. While it should include the files excluded from the second ansible-lint execution, it included the files that contained lint errors in the second execution as well.

@@ -5,6 +5,7 @@
"""
import argparse
import contextlib
import copy # pylint: disable=preferred-module
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without # pylint: disable=preferred-module, pylint failed with

src/ansible_content_parser/__main__.py:8:0: W0407: Prefer importing 'pathlib' instead of 'py' (preferred-module)

I don't understand the message as it complains about the py module, not the copy module specified here.
So I just added the comment to disable the rule on this line.

Copy link

@gebhardtr gebhardtr Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears to be a regression: pylint-dev/pylint#8453

@TamiTakamiya TamiTakamiya marked this pull request as ready for review October 2, 2023 15:53
@TamiTakamiya TamiTakamiya merged commit 0bd6df7 into main Oct 2, 2023
1 check passed
@TamiTakamiya TamiTakamiya deleted the ttakamiy/AAP-16692/ansible-lint-6.20.2 branch October 2, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants