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

License header checker #5

Open
mbrukman opened this issue Sep 12, 2016 · 1 comment
Open

License header checker #5

mbrukman opened this issue Sep 12, 2016 · 1 comment

Comments

@mbrukman
Copy link
Owner

It would be nice to have a utility that would run over a given set of files and output whether or not each of them have a valid header comment with a license in it.

This could be used in presubmit checks to ensure that no new files are added without such a license.

It could also be run from a unit test.

Caveats:

  • need to handle years in the past
  • need to handle whitespace changes, e.g., new lines or indentation changes
  • need to handle minor changes around the license, such as flags to the #!/... line
  • [maybe] avoid handling reflowed text, as that's a difficult problem

For an example, see Java Checkstyle.

@mbrukman
Copy link
Owner Author

https://github.com/google/addlicense appears to handle this use case already.

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

No branches or pull requests

1 participant