Commit Graph

24 Commits

Author SHA1 Message Date
Mithun Ayachit
27146d5f03 Implement -check flag
When this flag is used:

* The program never modifies any files
* If all files in the pattern contain a license, the program exits with
a zero exit code
* If at least one file in the pattern requires modification to include
license text, the program prints such files to STDOUT and exits with
a non-zero exit code
2020-02-18 08:54:38 -05:00
Mithun Ayachit
c46413539e replace WaitGroup with errgroup to allow error handling and propagation
The program now exits with a non-zero code when errors are encountered
while reading and/or writing files.

This now also introduces Go Modules for dependency management
2020-02-12 06:05:24 -06:00
Thiébaud Weksteen
fd1a812fc2 Add verbose option to print filename when modified
Adds the -v option which prints the name of the files that have been
modified.
2020-01-08 05:56:47 +01:00
Frank Farzan
d70fc5530d Support TypeScript files 2019-12-05 13:43:45 -08:00
Alejandro Lopez
0df0829f35 Add OCaml files to list of accepted extensions 2019-09-06 11:56:11 -04:00
mjduijn
ba3f334c00 Add kotlin files to list of accepted extensions 2019-05-10 11:35:41 +02:00
alex
f6c8b89ee5 Switch year arg from int to string
This effectively allows for arbitrary copyright
years. For instance, 2018-2019.
2019-01-07 14:10:08 +01:00
Daniel Seymour
66fdaacba5 Update test data licenses to use the current year and copyright holder 2018-12-19 15:59:35 -08:00
Daniel Seymour
12f10136e4 Add support for several other file types
Adds support for Dockerfiles, Gemfiles, Ruby files, and Groovy files.
Also, in order to fully support Dockerfile and Gemfiles, a new file
extension parser was created to deal with files that do not have an
extension.
2018-12-19 15:56:43 -08:00
alex
8bc5e5f694 print error in default format
Co-Authored-By: jmccann <jmccann.git@gmail.com>
2018-11-30 11:25:11 -06:00
alex
ee8851987e print error in default format
Co-Authored-By: jmccann <jmccann.git@gmail.com>
2018-11-30 11:25:02 -06:00
Jacob McCann
9772e39228 update error prefix 2018-11-30 10:58:03 -06:00
Brad Rydzewski
c63d25f5fc custom license from file 2018-11-30 10:55:22 -06:00
Marko Bencun
30bcbce56d add .jsx, .tsx files 2018-07-30 11:49:02 +02:00
alex
071b332aa8 Better support for XML and HTML
Keep <?xml and <!doctype declarations.
2018-07-21 16:57:39 +02:00
alex
a97ed9397e Merge pull request #8 from morgante/support_tf
Add support for Terraform files
2018-07-21 15:19:25 +02:00
alex
2c0d0d6bb4 Merge pull request #9 from morgante/change_default_name
Change default copyright holder to Google LLC
2018-07-21 15:18:53 +02:00
Morgante Pell
807bf143ce Change default copyright holder to Google LLC 2018-07-20 18:09:21 -04:00
Morgante Pell
76852768cb Add support for Terraform files 2018-07-20 18:06:44 -04:00
wzshiming
4f64a1cddf Added support for sql files 2018-07-18 13:31:05 +08:00
alex
6709751243 Merge pull request #3 from InfoSec812/support-yaml-files
Added support for YAML files with extensions of YML and YAML
2018-07-13 12:53:59 +02:00
Deven Phillips
5c63b45c95 Added support for YAML files with extensions of YML and YAML 2018-03-16 12:39:06 -04:00
Brad Rydzewski
40c31bd566 added bsd license header 2017-12-07 15:36:14 -08:00
alex
6631c269a8 initial import 2016-06-27 12:03:58 +01:00