-
Notifications
You must be signed in to change notification settings - Fork 149
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
Do not scan uncommentable files #825
Conversation
This PR seems good. I did some light tweaking. I especially liked renaming the function from I'm not entirely certain this won't have undesired effects. I'm going to approve the PR, and I'll merge it after discussing with some other peeps. Thanks a lot @hoijui ! |
thank you for these comments @carmenbianca, and the improvements! |
Did an in-person review together with @nicorikken. Let's merge this! (after fixing some merge conflicts) |
Also renames `_is_uncommentable` to `_is_commentable`, to prevent needless double (and triple) negations, which makes code harder to understand.
This prevents incidents of e.g. falsely detected copyright info in e.g. binary files, if they contain the word "Copyright" as plain-text. This happened to me in the case of some JPG files, for example. This also saves us from reading binary file contents unnecessarily.
Wooho, thanks! :-) |
This prevents incidents of falsely detected copyright info
in binary files (and other uncommentable file types),
if they contain the word "Copyright" as plain-text.
This happened to me in the case of some JPG files, for example.
This also saves us from reading binary file contents unnecessarily.
... or are there ever cases where we want to detect plain-text in binary or uncommentable files?