vaclavsvejcar / headroom

©️ Manager for license headers in source code files.
https://doc.norcane.com/headroom/latest/
BSD 3-Clause "New" or "Revised" License
48 stars 3 forks source link

Add --check-headers command #45

Closed mheinzel closed 4 years ago

mheinzel commented 4 years ago

It would work similarly to --replace-headers, but if any of the file's contents changed (#44), Headroom would fail with an error message listing all files that changed.

This would be useful to run in CI to make sure the correct license headers are added to all files.

vaclavsvejcar commented 4 years ago

Sounds good, guess this one will be pretty straightforward to implement and can be part of the upcoming version 0.2.2.0.

vaclavsvejcar commented 4 years ago

@mheinzel This feature is now implemented in master and can be run using the headroom run -c or headroom run --check-headers command. It doesn't touch any source files but ends execution with return code 1 in case that any source file contains outdated license header. I'll release it to Hackage with upcoming version, after I'll do some more testing.

vaclavsvejcar commented 4 years ago

@mheinzel Final version 0.2.2.0 has been released to hackage.