modulepackage
0.0.0-20240807082258-c0708cdf0d6c
Repository: https://github.com/nikojunttila/headercheck.git
Documentation: pkg.go.dev
# README
headerCheck
How to use
1. Clone repo
2. Run go install or go build for executable
3. In directory you want to check headers do command: headerCheck or ./headerCheck.exe if built (needs to be placed in same folder that running in so recommended to install)
4.Then program checks all files for copyright headers and notifies if some need updating
5. use flag -force to auto fix copyright headers. e.g: headerCheck -force
Current flags
-force fixes files that are not correct
--ignore="" Specify folders/files to ignore -ignore="vendor" -ignore="node_modules" you can use this multiple times to ignore many folders/files. Filepath is relational to directory where you start program so -ignore="tests\test.go" would ignore file inside tests directory
--author="Niko Junttila [email protected]" adds default author name/email if for some reason project is not in git/merc repo
--year="2022-2023" adds default year
-suffix=".js,.py,.cpp" to only go through those files and skip others
--newSuf=".haskell?" add new suffix to default list if not already included.
-verbose Prints more errors/info about whats happening
--noHeader ignores files that don't have a header already if you want to only check already existing headers.
-single="string" only checks this file and ignores rest
-usage flag for list of flags AND location of global exe for possible template.txt
For custom template modify template.txt. You can have multiple.
1st. checks flag -template="src" for custom template
2nd. checks current working directory where you call the executable So you can place project specific template there
3rd. checks global executable folder for template.txt (windows default location is $user/go/bin/ check with -usage if unsure)
4th. uses hardcoded default Centria template if nothing else was found.
*checks for .hg file if not found defaults to git*
currently checks these suffixes: .go, .cpp, .c, .h, .hpp, .js, .ts, .cs, .java, .rs, .qml, .css, .qss, .scala, .kt, .jsx, .tsx, .swift, .zig, .py, .exs, .hmtl, .rb, .lua, .ml, mli
for linux users
1. go build
2. sudo mv executable_name /usr/local/bin/
3. headerCheck -force
# Variables
No description provided by the author