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

Add regexs for bad- and good-names to enable better white- or blacklisting #3186

Merged
merged 6 commits into from
Oct 30, 2019

Conversation

Germandrummer92
Copy link
Contributor

@Germandrummer92 Germandrummer92 commented Oct 12, 2019

Steps

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature or an important bug fix, add a What's New entry in doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Description

Adds two new config options: bad-names-rgxs and good-names-rgxs, to enable easier white/blacklisting of names.

Type of Changes

| ✓ | ✨ New feature |

Related Issue

Closes #3086

@coveralls
Copy link

coveralls commented Oct 12, 2019

Coverage Status

Coverage increased (+0.01%) to 89.853% when pulling a238c75 on Germandrummer92:master into 86d2811 on PyCQA:master.

Copy link
Contributor

@PCManticore PCManticore left a comment

Choose a reason for hiding this comment

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

Hey @Germandrummer92

Thank you for your PR! Overall looks good, but there are some things to improve before getting this in.

doc/whatsnew/2.4.rst Outdated Show resolved Hide resolved
ChangeLog Outdated Show resolved Hide resolved
pylint/checkers/base.py Outdated Show resolved Hide resolved
pylint/checkers/base.py Outdated Show resolved Hide resolved
pylint/checkers/base.py Outdated Show resolved Hide resolved
pylint/checkers/base.py Outdated Show resolved Hide resolved
@Germandrummer92
Copy link
Contributor Author

Hey @Germandrummer92

Thank you for your PR! Overall looks good, but there are some things to improve before getting this in.

@PCManticore Fixed all your comments, thanks! I was wondering: I personally think the config keys whitelisted-names whitelisted-names-rgxs blacklisted-names blacklisted-names-rgxs would be both clearer and make the naming in the code easier than the current good/bad-names*. But it would obviously be a breaking change for people already using the old config keys. Any way we could introduce the newer ones and give a deprecation warning if people use the old one? Or do you think the current names are fine?

@PCManticore
Copy link
Contributor

Hey @Germandrummer92 The current names are fine. While we could change them, we currently don't have a mechanism for deprecation of options like you mentioned (we do have for check messages though).

@PCManticore PCManticore merged commit 96b3892 into pylint-dev:master Oct 30, 2019
@PCManticore
Copy link
Contributor

Thanks a lot for the PR! 😄

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.

Feature request: allow regex for "good-names"
3 participants