Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License header for shell #2062

Closed
xenoterracide opened this issue Mar 6, 2024 · 3 comments
Closed

License header for shell #2062

xenoterracide opened this issue Mar 6, 2024 · 3 comments

Comments

@xenoterracide
Copy link

title says it all? in this case of course it has to go "after" the shebang #!/.. line

@trajano
Copy link

trajano commented Oct 25, 2024

<shell>
                  <includes>
                    <include>**/*.sh</include>
                  </includes>
                  <excludes>
                    <exclude>**/node_modules/**</exclude>
                  </excludes>
                  <trimTrailingWhitespace/>
                  <endWithNewline/>
                  <licenseHeader>
                    <content># (c)$YEAR .... blah....</content>
                    <skipLinesMatching>^#!/.+?$</skipLinesMatching>
                    <delimiter>[\n]|set</delimiter>
                  </licenseHeader>
                </shell>

But this will require your shell scripts to start with a blank line or set after the #!/

This won't work correctly with -DspotlessSetLicenseHeaderYearsFromGitHistory=true though #2316

@nedtwigg
Copy link
Member

This is the OG issue, but closing as dupe of #2316 since it has more detailed repro

@nedtwigg
Copy link
Member

Actually, go to #2270, seems like the root cause may have been identified there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants