kt3k / license-checker

:page_facing_up: CLI tool for checking license headers in files
https://jsr.io/@kt3k/license-checker
MIT License
29 stars 7 forks source link

Support shebangs #38

Closed satyarohith closed 1 month ago

satyarohith commented 1 month ago

If a file starts with a shebang, the license should be inserted after the shebang to support execution scripts.

For file below, when we set the inject option to true:

#!/bin/bash
echo "hello world"

we get the following:

# license
#!/bin/bash
echo "hello world"

but the desired fix is:

#!/bin/bash
# license
echo "hello world"