Skip to content

Comments

Make pre-commit hook regex more precise#285

Merged
radoering merged 2 commits intopython-poetry:mainfrom
aureliojargas:patch-1
May 21, 2024
Merged

Make pre-commit hook regex more precise#285
radoering merged 2 commits intopython-poetry:mainfrom
aureliojargas:patch-1

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.
@sonarqubecloud
Copy link

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
@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