Should the coding guidelines be enforced using pre-commit hooks

There is a set of coding guidelines, but the repositories as far as I could see, do not yet include pre-commit hooks.
This would be a very easy and useful addition as the pre-commit hooks shown here can enforce the use of the .editorconfig settings and linters and formatters.
There is also an hook to remove trailing whitespace like defined in the guidelines.

The automation of these removes the need for developers to remember to do so and leaves more ressources for relevant work.
Setting up linters and formatters also enables a strict enforcement of the coding guidelines on the CI level.

I also created a Task for Jira already, if this is deemed a good idea by you:

*Purpose/Overview:* Add a system to enforce the [Coding Guidelines|]

 # Declare styling conventions for all tools
 # Choose linter/formatters for each language
 # Add an `.editorconfig` file and language specific linter settings to all repositories
 # Enforce conventions in [pre-commit hooks|]

 * Add global style settings (whitespace etc) via editorconfig
 ** Enforce removal of trailing whitespace using [trailing-whitespace hook|]
 ** Enforce matching editorconfig settings using an [editorconfig-precommit-hook|]
 * Add default styles for languages where there has not been chosen a special style
 ** eg. the one suggested by [ansible-lint|] for the [folio-ansible|] repository

 * Add checks for formatters to CI

*Acceptance criteria:*
 * All repositories have defined linter and settings
 * CI fails on incorrectly formatted code

FOLIO uses other ways to enforce the rules.

FOLIO Developers | Guides | Code analysis and linting facilities explains the code analysis and linting facilities run by Jenkins.

Some back-end modules run checkstyle during their maven compile phase: okapi/pom.xml at v4.13.2 · folio-org/okapi · GitHub

Some front-end modules use GitHub Actions to run yarn lint when a pull request is opened or a commit is merged: ui-checkout/build-npm.yml at v8.0.1 · folio-org/ui-checkout · GitHub

To “Declare styling conventions for all tools” and “Choose linter/formatters for each language” the #development Slack channel might be a better place because developers usually communicate via Slack rather than