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

Normalize path before checking if path should be ignored #7080

Merged

Conversation

matusvalo
Copy link
Collaborator

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

Path should be normalized before checking if it should be ignored. E.g. paths

  • ./some/path
  • some/path
  • some//path
    Are the same path. All paths are normalized before checking so creating ignore regex is more straightforward.

See https://docs.python.org/3/library/os.path.html#os.path.normpath for details.

Closes #6964

@Pierre-Sassoulas Pierre-Sassoulas added Bug πŸͺ² Configuration Related to configuration Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Jun 28, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.14.4 milestone Jun 28, 2022
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Thank you πŸ‘ Could you add a changelog for 2.14.4, please ?

pylint/lint/expand_modules.py Show resolved Hide resolved
tests/test_self.py Outdated Show resolved Hide resolved
@matusvalo
Copy link
Collaborator Author

Could you add a changelog for 2.14.4, please ?

Yes working on that :-)

matusvalo and others added 3 commits June 28, 2022 19:31
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@matusvalo
Copy link
Collaborator Author

Thank you @Pierre-Sassoulas for your review!

@coveralls
Copy link

coveralls commented Jun 28, 2022

Pull Request Test Coverage Report for Build 2578259595

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.0008%) to 95.325%

Totals Coverage Status
Change from base Build 2571502189: 0.0008%
Covered Lines: 16658
Relevant Lines: 17475

πŸ’› - Coveralls

@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit c744a53

@matusvalo matusvalo merged commit c74493b into pylint-dev:main Jun 28, 2022
@matusvalo matusvalo deleted the fix_ignore_path_recursive_current_dir branch June 28, 2022 21:10
@Pierre-Sassoulas Pierre-Sassoulas added Backported and removed Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Jun 29, 2022
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Jun 29, 2022
…7080)

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Pierre-Sassoulas added a commit that referenced this pull request Jun 29, 2022
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--recursive=y ignores ignore-paths
3 participants