ansys / ansys/pre-commit-hooks
add-license-headers strips whitespace
- Dominant language
- Python
- Stars
- 5
- Forks
- 1
- Avg merge
- 4h 21m
- Merged PRs (30d)
- 9
Description
### 🔍 Before submitting the issue
- [X] I have searched among the existing issues
- [X] 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
```shell
N/A
```
Contributor guide
Assessment
This issue has not been assessed yet.