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

Created InvalidNameChecker #931

Merged
merged 6 commits into from
Jul 27, 2023

Conversation

sushimon
Copy link
Contributor

@sushimon sushimon commented Jul 21, 2023

Motivation and Context

Pylint's invalid-name error explains how a variable name violates conventions but does so using regular expressions. Since beginners are unlikely to know what regular expressions are, this PR aims to "extend" the behaviour of the invalid-name checker by providing more beginner-friendly error messages.

Your Changes

Description:

  • Created a new checker.
  • Created tests for this new checker.
  • Updated the CHANGELOG.md file.
  • Updated the documentation to include this new checker.
  • Created examples for this new checker.
  • Disabled invalid-name in the config file to avoid redundant checks.

Type of change (select all that apply):

  • New feature (non-breaking change which adds functionality)

Testing

  • Ran the test suite and verified they passed.
  • Ran the newly added tests and verified they passed.
  • Previewed the CHANGELOG.md and verified the newly added documentation is there.
  • Generated the documentation and verified that the newly added section on the checker is there (with the example).

Questions and Comments (if applicable)

  • The failing test on GitHub Actions passes locally. The appropriate message gets added properly locally.

Checklist

  • I have performed a self-review of my own code.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported on Coveralls.
  • I have added tests for my changes.
  • I have updated the CHANGELOG.md file.

@coveralls
Copy link
Collaborator

coveralls commented Jul 21, 2023

Pull Request Test Coverage Report for Build 5675839692

  • 199 of 199 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 94.443%

Totals Coverage Status
Change from base Build 5675300086: 0.3%
Covered Lines: 3263
Relevant Lines: 3455

💛 - Coveralls

docs/checkers/index.md Outdated Show resolved Hide resolved
python_ta/checkers/invalid_name_checker.py Show resolved Hide resolved
python_ta/checkers/invalid_name_checker.py Outdated Show resolved Hide resolved
python_ta/checkers/invalid_name_checker.py Outdated Show resolved Hide resolved
python_ta/checkers/invalid_name_checker.py Outdated Show resolved Hide resolved
docs/checkers/index.md Outdated Show resolved Hide resolved
python_ta/checkers/invalid_name_checker.py Outdated Show resolved Hide resolved
tests/test_custom_checkers/test_invalid_name_checker.py Outdated Show resolved Hide resolved
tests/test_custom_checkers/test_invalid_name_checker.py Outdated Show resolved Hide resolved
python_ta/reporters/core.py Outdated Show resolved Hide resolved
docs/checkers/index.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
python_ta/checkers/invalid_name_checker.py Outdated Show resolved Hide resolved
python_ta/checkers/invalid_name_checker.py Outdated Show resolved Hide resolved
@david-yz-liu david-yz-liu merged commit 2f6966a into pyta-uoft:master Jul 27, 2023
5 checks passed
@sushimon sushimon deleted the invalid-name-checker branch July 29, 2023 00:57
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.

3 participants