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

Feature Request: Ignore URL/URIs by default? #3211

Open
buhtz opened this issue Nov 11, 2023 · 2 comments
Open

Feature Request: Ignore URL/URIs by default? #3211

buhtz opened this issue Nov 11, 2023 · 2 comments

Comments

@buhtz
Copy link

buhtz commented Nov 11, 2023

I am new to codespell. It might be against the concept.
But might it make sense to ignore URLs (and URIs by default to prevent false positive errors like this?

> * Fix bug: polkit CheckAuthorization: race condition in privilege authorization (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7572)
                                                                                               ^^^^^
./CHANGES:123: mitre ==> miter
@buhtz
Copy link
Author

buhtz commented Nov 11, 2023

For my specific example this would help

--uri-ignore-words-list=mitre

But I'll leave this open because I don't see an advantage of checking URLs. IMHO they could be ignored by default.

With --help

  --uri-regex URI_REGEX
                        regular expression that is used to find URIs and
                        emails. A default expression is provided.

What does "A default expression is provided." means? I don't see a "default expression" and just using --uri-regex without a value do not work.

@DimitriPapadopoulos
Copy link
Collaborator

A default regex is provided and used by the code, but it is not shown in the documentation:

uri_regex_def = (
"(\\b(?:https?|[ts]?ftp|file|git|smb)://[^\\s]+(?=$|\\s)|"
"\\b[\\w.%+-]+@[\\w.-]+\\b)"
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants