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

Make pre-commit hook regex more precise #285

Merged
merged 2 commits into from
May 21, 2024

Conversation

aureliojargas
Copy link
Contributor

In regular expressions, the dot . is a metachar that matches every char. To match the literal dot it must be escaped \..

Without the escape, that regex would match unintended filenames, such as poetry-lock, poetry_lock, poetryblock, poetryclock and other variations.

In regular expressions, the dot `.` is a metachar that matches every
char. To match the literal dot it must be escaped `\.`.

Without the escape, that regex would match unintended filenames, such as
`poetry-lock`, `poetry_lock`, `poetryblock`, `poetryclock` and other
variations.
.pre-commit-hooks.yaml Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented May 20, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@radoering radoering merged commit c5a8839 into python-poetry:main May 21, 2024
17 checks passed
@aureliojargas aureliojargas deleted the patch-1 branch May 21, 2024 21:08
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.

2 participants