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

Better Pre-commits #442

Open
wants to merge 3 commits into
base: cmake
Choose a base branch
from
Open

Conversation

LecrisUT
Copy link
Contributor

@LecrisUT LecrisUT commented Apr 18, 2023

The pre-commit was basically never run because of the filters. This fixes the configuration and runs pre-commit once

Depends-on: #441

@jimustafa
Copy link
Contributor

The pre-commit was basically never run because of the filters.

Greetings @LecrisUT. Yes, the filters were applied to incorporate the pre-commit checks in a measured way, only including a small selection of the files to start. Agreed that we should probably consider adding more files to the checks, and #404 is a small step in that direction.

I do think we should continue expanding the pre-commit checks, but more gradually, and also taking care to exclude files that either are not expected to change or the checks do not add much value, such as the UPF files, and maybe the examples and some of the test files. Eventually, I expected the filters to change from including certain files to only excluding certain files, with some files always meant to be excluded; thinking again of the UPF files.

Maybe a good candidate for the next incremental expansion of the pre-commit checks would be the TeX source files for the documentation.

@LecrisUT
Copy link
Contributor Author

LecrisUT commented Apr 18, 2023

For the white-space checker and end-of-file, I believe it should be added to all files except:

  • license files
  • bundled files

Afaik, there are no files for the latter, and if there are they should be properly documented and attributed according to their license. As for the former, it is already well formatted (otherwise it is not imported properly). So it is safe to use it on all files, unless the latter case applies.

If there are any test breakage or code failure, then there is a serious bug somewhere. But overall these 2 checks are good coding standards to enforce and should be fixed, as you can see in a55b2ae otherwise.

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

Successfully merging this pull request may close these issues.

2 participants