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

Precommit removes shebang from executable #3

Open
webb-ben opened this issue Feb 3, 2025 · 6 comments
Open

Precommit removes shebang from executable #3

webb-ben opened this issue Feb 3, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@webb-ben
Copy link
Member

webb-ben commented Feb 3, 2025

Description
Pre-commit action removes the shebangs from an executable shell script when adding the header.

Steps to Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots/Tracebacks
If applicable, add screenshots to help explain your problem.

Environment

  • OS:
  • Python version:
  • Python env/venv:

Additional context
Add any other context about the problem here.

@webb-ben webb-ben added the bug Something isn't working label Feb 3, 2025
@C-Loftus
Copy link
Member

C-Loftus commented Feb 3, 2025

imo due to issues like these I think we probably shouldn't implement a license precommit hook ourselves since it already exists. There are a lot of edge cases like this that are easy to miss and a lot of different languages to handle.

We also should probably support spdx license identifiers as the standard which is another thing to add.

@webb-ben
Copy link
Member Author

webb-ben commented Feb 3, 2025

My understanding was https://github.com/google/addlicense is not a precommit action. What are you using?

@webb-ben
Copy link
Member Author

webb-ben commented Feb 3, 2025

Would also really like to include who owns the file in the header.

@webb-ben
Copy link
Member Author

webb-ben commented Feb 3, 2025

We will also need the action to work for some internal private license

@C-Loftus
Copy link
Member

C-Loftus commented Feb 3, 2025

I am using the precommit action from the fork that was used for this pr. It was approved today so imagine it will be merged. google/addlicense#160

@C-Loftus
Copy link
Member

C-Loftus commented Feb 3, 2025

We will also need the action to work for some internal private license

addlicense works with arbitary licenses by specifying a path to a license file just as an fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants