Skip to content

Commit

Permalink
Fix yaml lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ciarams87 committed Aug 3, 2023
1 parent 6c09bf3 commit 1a62941
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# - run: |
# make bootstrap
# make release

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
nkg_prefix=$(echo ${{ steps.meta.outputs.tags }} | cut -d ":" -f 1)
nkg_tag=$(echo ${{ steps.meta.outputs.tags }} | cut -d ":" -f 2)
if [ ${{ github.event_name }} == "schedule" ]; then
export GW_API_VERSION=main
export GW_API_VERSION=main
fi
make install-nkg-local-no-build NKG_PREFIX=${nkg_prefix} NKG_TAG=${nkg_tag}
working-directory: ./conformance
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Scorecards supply-chain security
on:
# Only the default branch is supported.
branch_protection_rule:
types: [created, edited, deleted]
schedule:
- cron: "27 5 * * 0"
push:
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ linters-settings:
min-complexity: 15
govet:
enable:
- fieldalignment
- fieldalignment
lll:
line-length: 120
linters:
enable:
enable:
- asciicheck
- errcheck
- errorlint
Expand All @@ -63,7 +63,7 @@ linters:
- unparam
- unused
- wastedassign
disable-all: true
disable-all: true
issues:
max-issues-per-linter: 0
max-same-issues: 0
Expand Down
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ repos:
hooks:
- id: markdownlint-cli2-fix

# Rules are in .yamllint.yaml file
# See https://yamllint.readthedocs.io/en/stable/rules.html# for rule descriptions
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint

ci:
skip: [golang-diff, golangci-lint, prettier, markdownlint-cli2-fix]
skip: [golang-diff, golangci-lint, prettier, markdownlint-cli2-fix, yamllint]
autofix_prs: false
28 changes: 22 additions & 6 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ yaml-files:
- '*.yaml'
- '*.yml'

ignore:
- deploy/helm-chart/templates/

rules:
braces: enable
brackets: enable
Expand All @@ -13,21 +16,34 @@ rules:
require-starting-space: true
ignore-shebangs: true
min-spaces-from-content: 1
comments-indentation:
level: warning
comments-indentation: enable
document-end: disable
document-start: disable
empty-lines: enable
empty-values: disable
empty-values: enable
float-values: disable
hyphens: enable
indentation: enable
indentation:
spaces: consistent
indent-sequences: consistent
check-multi-line-strings: true
ignore: |
deploy/manifests/nginx-conf.yaml
deploy/manifests/njs-modules.yaml
key-duplicates: enable
key-ordering: disable
line-length: disable
line-length:
max: 120
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
ignore: |
.github/workflows/
deploy/manifests/deployment.yaml
new-line-at-end-of-file: enable
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy: disable
truthy:
ignore: |
.github/workflows/
2 changes: 1 addition & 1 deletion examples/http-header-filter/echo-route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
add:
- name: Accept-Encoding
value: compress
- name: My-cool-header
- name: My-cool-header
value: this-is-an-appended-value
remove:
- User-Agent
Expand Down
3 changes: 2 additions & 1 deletion examples/http-header-filter/headers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: headers-config
# yamllint disable rule:indentation
data:
nginx.conf: |-
user nginx;
Expand Down Expand Up @@ -61,7 +62,7 @@ data:
return s;
}
export default {getRequestHeaders};
# yamllint enable rule:indentation
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit 1a62941

Please sign in to comment.