Commit Graph

19 Commits (fb312e51795bfb5fe02aabc501e2e00cfe901958)

Author SHA1 Message Date
Max Gautier 4f27bc2bf9
pre-commit: drop redundant ansible-syntax-check
ansible-lint hook already check syntax on the playbooks.
2024-10-07 14:18:36 +02:00
Max Gautier 07e551ab77
pre-commit: auto-update all hooks 2024-10-07 14:15:34 +02:00
Max Gautier a7ace2e55b
ansible-lint: Adjust pre-commit hooks dependencies
Dropping the ansible dependencies for ansible-lint will allow us to
catch missing dependencies collections in galaxy.yml. For collections
needed for contrib/ or tests/ (i.e: not part of core kubespray
dependencies), we can just configure ansible-lint to mock them.

This mean it won't check the mocked module parameters, but for those
area of the code base it's an acceptable trade-off.
2024-10-07 14:11:24 +02:00
Bas dd51ef6f96
Bugfix/code inspection. (#11384)
- Make ansible-galaxy collection dependencies explicit
- Reorganized requirements.yml
- Adding required collections to galaxy.yml
- Ansible 9.6.0 was yanked on Pypi
- Sync pre-commit requirements with requirements.txt

Signed-off-by: Bas Meijer <bas.meijer@enexis.nl>
2024-08-02 03:43:54 -07:00
Max Gautier 821dfbfdba
Switch back pre-commit hook misspell to upstream (#11280)
The pull request adding the pre-commit hook config was merged.
2024-06-26 05:14:21 -07:00
Max Gautier 870049523f
collection support: use manifest instead of excludes
The default for galaxy. `manifest` works well enough for our case, and
this avoids maintaining a blacklist.
2024-05-29 13:57:33 +02:00
Max Gautier 37d824fd2d
Update pre-commit hooks 2024-05-28 13:28:03 +02:00
Max Gautier ff48144607
pre-commit: adjust mardownlint default, md fixes
Use a style file as recommended by upstream. This makes for only one
source of truth.
Conserve previous upstream default for MD007 (upstream default changed
here https://github.com/markdownlint/markdownlint/pull/373)
2024-05-28 13:26:49 +02:00
Max Gautier 19851bb07c
collection-build-install convert to pre-commit 2024-05-28 13:26:46 +02:00
Max Gautier 7f7b65d388
Convert check_typo to pre-commit + use maintained version
client9/misspell is unmaintained, and has been forked by the golangci
team, see https://github.com/client9/misspell/issues/197#issuecomment-1596318684.

They haven't yet added a pre-commit config, so use my fork with the
pre-commit hook config until the pull request is merged.
2024-05-28 13:26:45 +02:00
Max Gautier 77bfb53455
Fix ci-matrix pre-commit hook
- Remove dependency of pydblite which fails to setup on recent pythons
- Discard shell script and put everything into pre-commit
2024-05-28 13:26:44 +02:00
Max Gautier 0e449ca75e
pre-commit: fix hooks dependencies
- ansible-syntax-check
- tox-inventory-builder
- jinja-syntax-check
2024-05-28 13:26:43 +02:00
Max Gautier f6d9ff4196
Switch to upstream ansible-lint pre-commit hook
This way, the hook is self contained and does not depend on a previous
virtualenv installation.
2024-05-28 13:26:42 +02:00
Max Gautier 21aba10e08
Use alternate self-sufficient shellcheck precommit
This pre-commit does not require prerequisite on the host, making it
easier to run in CI workflows.
2024-05-28 13:26:42 +02:00
Payback159 5d01dfa179 add auto generate documentation sidebar script, introduce script as pre-commit-hook, adapt existing scripts to work with documentation structure 2024-05-17 15:09:54 +02:00
Max Gautier d2944d2813
Check jinja templates for syntax error (#10667)
Allow to fail early (pre-commit time) for jinja error, rather than
waiting until executing the playbook and the invalid template.

I could not find a simple jinja pre-commit hook in the wild.
2023-12-06 03:05:24 +01:00
Bas bdd1c7bcb5
Catch ShellCheck errors in pre-commit using same command as CI. (#9752) 2023-02-06 19:08:57 -08:00
Bas 2c93c997cf
pre-commit autocorrected files (#9750) 2023-02-06 01:35:16 -08:00
Cristian Calin e6976a54e1
add pre-commit hook to facilitate local testing (#9158)
* add pre-commit hook configuration

* add tmp.md to .gitignore

* describe the use of pre-commit hook in CONTRIBUTING.md

* fix docs/integration.md errors identified by markdownlint

* fix docs/<file>.md errors identified by markdownlint

* docs/azure-csi.md
* docs/azure.md
* docs/bootstrap-os.md
* docs/calico.md
* docs/debian.md
* docs/fcos.md
* docs/vagrant.md
* docs/gcp-lb.md
* docs/kubernetes-apps/registry.md
* docs/setting-up-your-first-cluster.md
* docs/vagrant.md
* docs/vars.md

* fix contrib/<file>.md errors identified by markdownlint
2022-08-24 06:54:03 -07:00