Skip to content

Support globbing pattern for input specification #8312

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

Merged

Conversation

alexey-pelykh
Copy link
Contributor

Type of Changes

Type
✨ New feature

Description

Closes #8310

@alexey-pelykh
Copy link
Contributor Author

@Pierre-Sassoulas @DudeNr33 do we want to add this to 2.17 as well? The CI misbehaved here as well

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.

I closed/opened to launch the CI again, feel free to do that or to rebase on upstream/main and push force if you need to :)

Comment on lines 55 to 61
With globbing pattern
---------------------

It is also possible to specify both directories and files using globbing patterns::

pylint [options] packages/*/src

Copy link
Member

Choose a reason for hiding this comment

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

Imo this should be in the On module packages or directories paragraph

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yet it's also applicable to On files - it can't be in both paragraphs at the same time

Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO renaming the headline to Globbing support would be good, as it makes it a bit clearer that this section just informs you about the possibility to use glob patterns.

Copy link
Member

Choose a reason for hiding this comment

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

Globbing permits to handle file/module/package, the distinction could be removed entirely maybe ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMHO, that section of docs should be refactored, yet I don't have enough knowledge to do that confidently

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.17.0 milestone Feb 22, 2023
@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

Merging #8312 (a8865f4) into main (e64f043) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8312      +/-   ##
==========================================
+ Coverage   95.46%   95.56%   +0.09%     
==========================================
  Files         177      178       +1     
  Lines       18704    18765      +61     
==========================================
+ Hits        17856    17932      +76     
+ Misses        848      833      -15     
Impacted Files Coverage Δ
pylint/config/config_initialization.py 100.00% <100.00%> (ø)
pylint/checkers/base/name_checker/checker.py 98.58% <0.00%> (-0.66%) ⬇️
pylint/testutils/reporter_for_tests.py 93.02% <0.00%> (-0.32%) ⬇️
pylint/constants.py 100.00% <0.00%> (ø)
pylint/lint/pylinter.py 95.31% <0.00%> (ø)
pylint/reporters/text.py 87.05% <0.00%> (ø)
pylint/config/argument.py 100.00% <0.00%> (ø)
pylint/checkers/similar.py 96.27% <0.00%> (ø)
pylint/checkers/unicode.py 100.00% <0.00%> (ø)
pylint/lint/base_options.py 100.00% <0.00%> (ø)
... and 9 more

@github-actions

This comment has been minimized.

@DudeNr33
Copy link
Collaborator

To fix the spelling check you can add globbing to .pyenchant_pylint_custom_dict.txt.

@github-actions

This comment has been minimized.

Copy link
Collaborator

@DudeNr33 DudeNr33 left a comment

Choose a reason for hiding this comment

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

Only two minor remarks from my side. Logic looks good to me.

Comment on lines 55 to 61
With globbing pattern
---------------------

It is also possible to specify both directories and files using globbing patterns::

pylint [options] packages/*/src

Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO renaming the headline to Globbing support would be good, as it makes it a bit clearer that this section just informs you about the possibility to use glob patterns.

@github-actions

This comment has been minimized.

@Pierre-Sassoulas Pierre-Sassoulas mentioned this pull request Feb 26, 2023
3 tasks
@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 a8865f4

Copy link
Collaborator

@DudeNr33 DudeNr33 left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

LGTM, it makes 2.17.0 consistent (all the globbing added) and we can refactor the doc in #7496.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 9fe47a9 into pylint-dev:main Mar 1, 2023
@alexey-pelykh alexey-pelykh deleted the feature/input-globbing branch March 1, 2023 19:32
@ollie-iterators ollie-iterators mentioned this pull request Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support globbing pattern for input specification
3 participants