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

feat: enhanced error message #28

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

aj3sh
Copy link
Member

@aj3sh aj3sh commented Mar 13, 2024

Description

This is a very large PR. It includes changes for detailed validation to enhance the error message. The previous validation has been almost completely changed.

Below are the breakdown of the changes:

  • Removed old commitlint.py.
  • Added new module linter for linting and validation.
  • Added detailed validation on linter for message enhancement.
  • Added new error messages.
  • Added option --skip-detail for simple linting.
  • Moved old validation to simple linting.
  • Added pytest.ini for adding src as a Python path.
  • Updated test for both detailed and simple with the same test data.
  • Updated CI lint check: isort profile to black

Related Issue

Fixes #12

Type of Change

Please mark the appropriate option below to describe the type of change your pull request introduces:

  • Bug fix
  • New feature
  • Enhancement
  • Documentation update
  • Refactor
  • Other (please specify)

Checklist

  • My pull request has a clear title and description.
  • I have used semantic commit messages.
    Examples: "fix: Fixed foobar bug", "feat(accounts): Added foobar feature".
  • I have added/updated the necessary documentation on README.md.
  • I have added appropriate test cases (if applicable) to ensure the changes are functioning correctly.

Additional Notes

[Add any additional notes or context that you think the reviewers should know about.]

By submitting this pull request, I confirm that I have read and complied with the contribution guidelines of this project.

@aj3sh aj3sh added enhancement New feature or request tests labels Mar 13, 2024
@aj3sh aj3sh requested review from subashcs and sugat009 March 13, 2024 04:13
@aj3sh aj3sh force-pushed the message-enhancement branch 5 times, most recently from ea66ef4 to f572caa Compare March 15, 2024 09:28
src/commitlint/linter/_linter.py Outdated Show resolved Hide resolved
src/commitlint/linter/validators.py Outdated Show resolved Hide resolved
pytest.ini Show resolved Hide resolved
src/commitlint/cli.py Outdated Show resolved Hide resolved
src/commitlint/linter/validators.py Show resolved Hide resolved
tests/test_cli.py Outdated Show resolved Hide resolved
tests/test_linter/test__linter.py Outdated Show resolved Hide resolved
- Removed old `commitlint.py`.
- Added new module `linter` for linting and validation.
- Added detailed validation on `linter` for message enhancement.
- Added new error messages.
- Added option `--skip-detail` for simple linting.
- Moved old validation to simple linting.
- Added `pytest.ini` for adding src as a python path.
- Updated test for both detailed and simple with same test data.

Co-authored-by: Sugat Bajracharya <[email protected]>
@aj3sh aj3sh merged commit d6301f1 into opensource-nepal:main Apr 4, 2024
3 checks passed
@aj3sh aj3sh deleted the message-enhancement branch April 4, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display specific error type during conventional commit validation mismatched
3 participants