-
Notifications
You must be signed in to change notification settings - Fork 580
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
CopyrightBear / LicenseCheckBear #823
Comments
Thanks for reporting this issue! A coalaian will look at it soon. |
This could be quite simple in a language independent manner without even caring if it's a comment or not as it should be quite impossible to write code that looks like a copyright header without knowing about it. Neat idea! |
The required header can be a literal multiline value that must appear. Different languages have different sections in .coafile, so that variation is already catered for. Typically the copyright header varies with different names per file. Worst case dedicated sections in the .coafile support this. Allowing patterns and variables in the template would help. |
@jayvdb would you be interested in doing this? I'll be available for help of course alongside http://coala.io/writingbears. Otherwise if it's a priority for you or someone else I'm sure we'll find someone who can look into it as it should be rather quick and rewarding. |
Not a priority for me. |
A script that is commonly used is |
@jayvdb do you think it makes sense to try to be better than licensecheck.pl or just wrap it? We could easily include it in the distribution I guess. |
@sils, looks like we can wrap https://packages.debian.org/sid/licensecheck . With Debian and Chromium using it, I think using the same maintained script is a good approach that helps packagers now. |
hey @divyam3897 still on this :D ? |
@Adrianzatreanu yes, stuck on few things which I am unable to figure out :( . I should commit what I am trying ? Though I have been trying to understand the workflow of the bears by going throught the bears and docs. Sorry, its taking too long :( |
Just visit us on gitter, there we can help you :) |
Still on it @divyam3897 ? |
@yash-nisar didn't get the time to hack on it. Feel free to assign it to someone else to make it done faster. I can review the commits, progress and help with my so far progress :) |
IIUC, the bear will check for copyright notices in all python files by running a simple regex search for strings like : |
imo this is up to you ;) |
Can we rename is to LicenseCheckBear and create a new bear for checking Copyright ? |
If the issue is not completely solved, let's reopen it :) |
So the milestone now would be to add CopyrightBear ? |
The existing external linter does both. The bear just needs improving. |
We won't be able to create user defined regexes IIUC and will have to rely on the regex defined in the script. Is that okay ? |
Many very important codebases use this external tool, so we need to expose its functionality via coala as sensibly as possible. If someone wants a different regex, they can write a RegexBear, or their own copyright bear. ;) Or they can enhance the external tool and then improve our bear. |
I don't imply anything, but sounds reasonable 👍 :) |
Well, I will have to override |
Hello @jayvdb I want to write this bear but I'm not confirmed which linter I have to wrap.The one that you gave https://pypi.python.org/pypi/flake8-copyright is only for python files but this bear would be a |
This is about improving the LicenseCheckBear to be more usable. |
A lint that is often missed is including copyright headers, and updating copyright years.
https://pypi.python.org/pypi/flake8-copyright
However some languages there are empty files, like python package
__init__.py
files, and no copyright header is needed.savoirfairelinux/flake8-copyright#1 (comment)
The text was updated successfully, but these errors were encountered: