adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
10.26k stars 2.72k forks source link

style: Add pre-commit checks to fix whitespace #1588

Closed bocan closed 2 days ago

bocan commented 2 months ago

What does this PR change? What problem does it solve?

This changes no functionality, but cleans up a number of code styling issues. I've added a pre-commit configuration file, that optionally allows one to run pre-commit install after cloning, and from then on when you commit changes, it will run pre-commit against the code.

Specifically, it's setup to check for unnecessary trailing whitespaces, mixed windows/unix line endings, and missing end-of-file markers.

Was the change discussed in an issue or in the Discussions before?

Yes, in #1584.

PR Checklist

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud