Feature request: updating license text on files that already has a license header
- Dominant language
- Go
- Stars
- 886
- Forks
- 194
- PR merge metrics
- No merged PRs in 30d
Description
In case license headers have already been generated, but with incorrect content, or in cases where e.g. copyright owner should change (say, in the event of a handover of a project from one owner to another), it would be very useful to be able to _rewrite_ the headers instead of just adding them where they are missing.
I propose a flag `-force` to enable this - so the default behavior stays the same, but if one passes `-force` one also gets changes in any file (matching selectors in other parameters, of course) where the current license headers do not match whatever parameters were passed.
If this sounds like something you'd accept, I can whip up a PR, but given that e.g. #60 (which was justified differently, but worked similarly) was closed without merging, I'd like some indication that it'll be accepted before I start working on the feature.
Contributor guide
Research direction
Start at the command-line flag handling and existing license-header generation path, then review issue #60 for prior context. Check how selectors and current headers are handled before defining the force behavior. Done means the default remains unchanged while -force rewrites matching headers that differ from the requested parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100