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

add-license-headers strips whitespace #115

Open
2 tasks done
klmcadams opened this issue Jan 11, 2024 · 0 comments
Open
2 tasks done

add-license-headers strips whitespace #115

klmcadams opened this issue Jan 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@klmcadams
Copy link
Contributor

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

The hook strips whitespace on the lines we copy over from before the hook was run. We use rstrip, so I think if I strip only ('\n') instead, that could solve the problem.

This is an issue bc it can fail the hook if the header hasn't changed but the trailing whitespace was removed

📝 Steps to reproduce

Add trailing whitespace to a line in a file, and run the hook (pre-commit run --file file_name --verbose)

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

No response

🐍 Which Python version are you using?

3.10

📦 Installed packages

N/A
@klmcadams klmcadams added the bug Something isn't working label Jan 11, 2024
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

1 participant