You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a really good point - I'm sure there's a handful of cases like this that copywrite misses today on HashiCorp repos.
Is there a way to update this files, either through explicit configuration or automagically?
Unfortunately, not today. Detecting the file format when no extension is present is tricky. We could try to parse shebangs to detect it and skip out if it isn't a known shebang, though I wonder if something like https://github.com/github/linguist would do a better job.
The point about explicit configuration is an interesting one. Do you have any ideas for what that might look like? My first thought was a key-value mapping of files to file type, but I see that as potentially more unwieldy to maintain than manually adding headers for the files that are missed. I'd love to discuss more
For explicitly setting I think something like the ignore_headers globbing could work, but I guess you'd need to have an include and exclude merge type of complexity to avoid mangling things it shouldn't?
Or just key-value pairs as you suggest. More work but definitely more accurate and simpler to maintain. If we compared that to say node's package.json packaging approach, you could include everything by default if not specified, or only what is if it is?
I think automatic file identifying is also good idea, and consistent with things like pre-commit. Linguist is a possibility for sure, or perhaps something like scc (go) or pre-commit's own identify (python) could do the heavy lifting here?
As I'm testing I've noticed
copywrite
correctly updates scripts that have a file extension, e.g..sh
,.js
etc. but doesn't update scripts that don't.E.g. it would detect and update
check-release.sh
but notcheck-release
Is there a way to update this files, either through explicit configuration or automagically?
The text was updated successfully, but these errors were encountered: