Update hooks; Exclude markdown; Better pre-commit install command (#186)
* Update hooks; Exclude markdown; Better pre-commit install command * Documented pre-commit more clearly * Added warning about how pre-commit works
This commit is contained in:
1 parent
088c1d9bcf
commit
ee2f7e9a38
3 files changed
+18
-5
No files matched your search
@@ -9,9 +9,10 @@ repos:
|
|||||||
- .github/lint/.yamllint.yaml
|
- .github/lint/.yamllint.yaml
|
||||||
id: yamllint
|
id: yamllint
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.0.1
|
rev: v4.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
args: [--markdown-linebreak-ext=md]
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||||
@@ -24,6 +25,6 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: fix-smartquotes
|
- id: fix-smartquotes
|
||||||
- repo: https://github.com/k8s-at-home/sops-pre-commit
|
- repo: https://github.com/k8s-at-home/sops-pre-commit
|
||||||
rev: v2.0.3
|
rev: v2.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: forbid-secrets
|
- id: forbid-secrets
|
||||||
@@ -5,7 +5,7 @@ tasks:
|
|||||||
init:
|
init:
|
||||||
desc: Initialize pre-commit hooks
|
desc: Initialize pre-commit hooks
|
||||||
cmds:
|
cmds:
|
||||||
- pre-commit install-hooks
|
- pre-commit install --install-hooks
|
||||||
run:
|
run:
|
||||||
desc: Run pre-commit
|
desc: Run pre-commit
|
||||||
cmds:
|
cmds:
|
||||||
|
|||||||
@@ -80,7 +80,19 @@ It is advisable to install [pre-commit](https://pre-commit.com/) and the pre-com
|
|||||||
After pre-commit is installed on your machine run:
|
After pre-commit is installed on your machine run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pre-commit install-hooks
|
task pre-commit:init
|
||||||
|
```
|
||||||
|
**Remember to run this on each new clone of the repository for it to have effect.**
|
||||||
|
|
||||||
|
Commands are of interest, for learning purposes:
|
||||||
|
|
||||||
|
This command makes it so pre-commit runs on `git commit`, and also installs environments per the config file.
|
||||||
|
```
|
||||||
|
pre-commit install --install-hooks
|
||||||
|
```
|
||||||
|
This command checks for new versions of hooks, though it will occasionally make mistakes, so verify its results.
|
||||||
|
```
|
||||||
|
pre-commit autoupdate
|
||||||
```
|
```
|
||||||
|
|
||||||
## :open_file_folder: Repository structure
|
## :open_file_folder: Repository structure
|
||||||
@@ -194,7 +206,7 @@ In order to use Terraform and `cert-manager` with the Cloudflare DNS challenge y
|
|||||||
4. If everything goes as planned you should see Ansible running the k3s install Playbook against your nodes.
|
4. If everything goes as planned you should see Ansible running the k3s install Playbook against your nodes.
|
||||||
|
|
||||||
5. Verify the nodes are online
|
5. Verify the nodes are online
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
kubectl --kubeconfig=./provision/kubeconfig get nodes
|
kubectl --kubeconfig=./provision/kubeconfig get nodes
|
||||||
# NAME STATUS ROLES AGE VERSION
|
# NAME STATUS ROLES AGE VERSION
|
||||||
|
|||||||
Reference in new issue
Block a user