-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: Add support for autoformatting YAML and spell checking via pre-commit hooks #1874
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,44 @@ | ||
repos: | ||
- repo: https://github.com/streetsidesoftware/cspell-cli | ||
rev: v8.3.0 | ||
hooks: | ||
- id: cspell | ||
args: [--exclude, 'ADOPTERS.md', --exclude, '.pre-commit-config.yaml', --exclude, '.gitignore', --exclude, '*.drawio', --exclude, 'mkdocs.yml', --exclude, '.helmignore', --exclude, '.github/workflows/*', --exclude, 'patterns/istio-multi-cluster/*', --exclude, 'patterns/blue-green-upgrade/*'] | ||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.12.0 | ||
hooks: | ||
- id: pretty-format-yaml | ||
args: [--autofix, --indent, '2', --offset, '2', --preserve-quotes] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
args: ['--markdown-linebreak-ext=md'] | ||
- id: end-of-file-fixer | ||
- id: check-merge-conflict | ||
- id: detect-private-key | ||
- id: detect-aws-credentials | ||
args: ['--allow-missing-credentials'] | ||
args: [--allow-missing-credentials] | ||
- repo: https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.86.0 | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform_docs | ||
args: | ||
- '--args=--lockfile=false' | ||
- --args=--lockfile=false | ||
- id: terraform_tflint | ||
args: | ||
- '--args=--only=terraform_deprecated_interpolation' | ||
- '--args=--only=terraform_deprecated_index' | ||
- '--args=--only=terraform_unused_declarations' | ||
- '--args=--only=terraform_comment_syntax' | ||
- '--args=--only=terraform_documented_outputs' | ||
- '--args=--only=terraform_documented_variables' | ||
- '--args=--only=terraform_typed_variables' | ||
- '--args=--only=terraform_module_pinned_source' | ||
- '--args=--only=terraform_naming_convention' | ||
- '--args=--only=terraform_required_version' | ||
- '--args=--only=terraform_required_providers' | ||
- '--args=--only=terraform_unused_required_providers' | ||
- '--args=--only=terraform_workspace_remote' | ||
- --args=--only=terraform_deprecated_interpolation | ||
- --args=--only=terraform_deprecated_index | ||
- --args=--only=terraform_unused_declarations | ||
- --args=--only=terraform_comment_syntax | ||
- --args=--only=terraform_documented_outputs | ||
- --args=--only=terraform_documented_variables | ||
- --args=--only=terraform_typed_variables | ||
- --args=--only=terraform_module_pinned_source | ||
- --args=--only=terraform_naming_convention | ||
- --args=--only=terraform_required_version | ||
- --args=--only=terraform_required_providers | ||
- --args=--only=terraform_unused_required_providers | ||
- --args=--only=terraform_workspace_remote | ||
- id: terraform_validate | ||
exclude: (docs|modules) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dictionaryDefinitions: | ||
- name: bpWords | ||
path: ./docs/cSpell_dict.txt | ||
addWords: true | ||
dictionaries: | ||
- bpWords |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
acmpca | ||
acmca_arn | ||
addrs | ||
adot | ||
agones | ||
akuity | ||
algbw | ||
ALLOWVOLUMEEXPANSION | ||
amazonlinux | ||
apigatewayv2 | ||
apiextensions | ||
apiversion | ||
applicationset | ||
appsets | ||
argocd | ||
argoproj | ||
athenaaccess | ||
athenacurcfn | ||
autoscaler | ||
awscli | ||
awscliv2 | ||
awslabs | ||
awspca | ||
awspcaclusterissuers | ||
basepath | ||
billingreports | ||
bootstrappers | ||
boto | ||
bottlerocket | ||
busbw | ||
cacerts | ||
cainjector | ||
chdir | ||
cidrsubnet | ||
ciliumnetworkpolicy | ||
clusterip | ||
clusterissuer | ||
clusterrole | ||
clusterrolebinding | ||
clusterwide | ||
cncf | ||
compat | ||
configmap | ||
concat | ||
containerd | ||
coredns | ||
cuda | ||
customresourcedefinition | ||
crossplane | ||
crds | ||
curlimages | ||
cwlogs | ||
daemonset | ||
dcgm | ||
distro | ||
ecrpublic | ||
ecsdemo | ||
ecsfrontend | ||
elbv | ||
eksctl | ||
eksvpc | ||
emrcontainers | ||
errexit | ||
eventbridge | ||
externaldns | ||
externalsecrets | ||
externalsnat | ||
fargate | ||
fileexists | ||
finalizer | ||
finalizers | ||
flblogs | ||
fluentbit | ||
gameserver | ||
gameservers | ||
gavinbunney | ||
gitops | ||
helloworld | ||
heptio | ||
identitystore | ||
iedn | ||
iezn | ||
ingressgateway | ||
instanceids | ||
ipam | ||
irsa | ||
istio | ||
istiod | ||
istioing | ||
jsonencode | ||
karpenter | ||
kiali | ||
kubeconfig | ||
kubecost | ||
kubeflow | ||
kubelet | ||
kyverno | ||
libfabric | ||
logtag | ||
loglevel | ||
makefiles | ||
maxport | ||
minport | ||
mkdocs | ||
mktemp | ||
mountpoint | ||
mpijob | ||
mpijobs | ||
mtls | ||
nccl | ||
netcat | ||
nics | ||
nodegroup | ||
nodeport | ||
nvme | ||
oidc | ||
persistentvolume | ||
pkce | ||
pubkey | ||
privateca | ||
privatelink | ||
prometheusservice | ||
proto | ||
readyz | ||
reclaimpolicy | ||
redop | ||
replicaset | ||
rdmap | ||
rolearn | ||
rollouts | ||
rootdir | ||
rpfilter | ||
secretpassword | ||
secretstore | ||
secretuser | ||
selfsigned | ||
serviceaccount | ||
SHA512WITHRSA | ||
sleepdocs | ||
ssoadmin | ||
storageclass | ||
storageclasses | ||
tcpdump | ||
templatefile | ||
tfstate | ||
tfvars | ||
tolist | ||
toset | ||
velero | ||
VOLUMEBINDINGMODE | ||
vpclattice | ||
webfront | ||
wontfix | ||
yamlencode | ||
xlarge | ||
xonotic | ||
xrds | ||
xvda | ||
xvdb | ||
zipkin | ||
zipmap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the spell checker isn't super great - if it sees 4 or more characters in a row it will treat it as a word. so something like
cert-manager-87f5555f-tcxj7
will fail spell check but if you break it up with a numeric value likecert-manager-87f5555f-t1xj7
it ignores it 🤷🏽 (looking at just the last part after the last hyphen)