Comments (5)
Agree, this would be very useful for common files such as CMakeLists.txt where #
can be used for comment.
from addlicense.
addlicense already handles cmakelists.txt files, or at least it's supposed to: https://github.com/google/addlicense/blob/master/main.go#L311-L314 Does that not work?
We certainly wouldn't want to add headers to all .txt files, which is why cmakelists.txt is handled the way it is (looking for the full name)
I'm not sure what a .tmpl file would even be... I worry that that is used to generically mean "template file" for all sorts of underlying file types. Is it an HTML file? Something else?
.patch could possibly work, but aren't there different patch formats? Do they all support the same comment style?
from addlicense.
@willnorris it wasn't working for me. Maybe there is a case sensitivity issue here? I don't know why, but historically CMake projects use CMakeLists.txt
by convention.
P.S. thanks for providing this tool. It saved me a lot of time even though it didn't work exactly how I wanted it to.
from addlicense.
Thank you for the response, @willnorris ! And sorry for the delayed follow-up.
We certainly wouldn't want to add headers to all .txt files, which is why cmakelists.txt is handled the way it is (looking for the full name)
Gotcha!
I'm not sure what a .tmpl file would even be... I worry that that is used to generically mean "template file" for all sorts of underlying file types. Is it an HTML file? Something else?
I think in our use case, it is a custom template file used to generated markdown files. So it's technically a generic template file.
.patch could possibly work, but aren't there different patch formats? Do they all support the same comment style?
Possibly! So do you think it's reasonable to support the configuration of additional extensions and comment styles need for the additional extensions to fit different use cases? E.g. --add-extension ".patch" --style pound --add-extension ".txt" --style double-slash
.
from addlicense.
I just spent an hour trying to figure out why nothing was being added. Not only that but files with a file extension are also ignored for some weird reason. This needs to be more clear in the documentation guys.
from addlicense.
Related Issues (20)
- use GoReleaser to build and push container images HOT 6
- use go-enry to identify generated, vendored and other types of code
- Ignore subdirectories pattern HOT 9
- Ignore doesn't work without equals sign HOT 2
- Using `//` comments for C++ header files
- malformed module path "io/fs" HOT 2
- Intermittent failure
- Include basic example of running for the first time. HOT 1
- [Proposal] Usage as module instead of CLI HOT 3
- Can a new tag be added? HOT 1
- Introduce a flag to prefer `//` over `/*...*/` HOT 1
- Copyright line should append after the SPDX identifier HOT 3
- An extra whitespace indentation for the Apache License template
- Recursive check pattern HOT 1
- (Provide option to) ignore empty files
- Feature Request: Add a version subcommand HOT 1
- Bug: Files generated by stringer are skipped HOT 4
- How to install? `go get` is deprecated
- provide fail-on-diff flag to enable checking licence headers HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from addlicense.