Skip to content

Commit 1a62941

Browse files
committed
Fix yaml lint issues
1 parent 6c09bf3 commit 1a62941

File tree

8 files changed

+34
-14
lines changed

8 files changed

+34
-14
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
# and modify them (or add more) to build your code if your project
6363
# uses a compiled language
6464

65-
#- run: |
65+
# - run: |
6666
# make bootstrap
6767
# make release
6868

.github/workflows/conformance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
nkg_prefix=$(echo ${{ steps.meta.outputs.tags }} | cut -d ":" -f 1)
108108
nkg_tag=$(echo ${{ steps.meta.outputs.tags }} | cut -d ":" -f 2)
109109
if [ ${{ github.event_name }} == "schedule" ]; then
110-
export GW_API_VERSION=main
110+
export GW_API_VERSION=main
111111
fi
112112
make install-nkg-local-no-build NKG_PREFIX=${nkg_prefix} NKG_TAG=${nkg_tag}
113113
working-directory: ./conformance

.github/workflows/scorecards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Scorecards supply-chain security
22
on:
33
# Only the default branch is supported.
44
branch_protection_rule:
5+
types: [created, edited, deleted]
56
schedule:
67
- cron: "27 5 * * 0"
78
push:

.golangci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ linters-settings:
3434
min-complexity: 15
3535
govet:
3636
enable:
37-
- fieldalignment
37+
- fieldalignment
3838
lll:
3939
line-length: 120
4040
linters:
41-
enable:
41+
enable:
4242
- asciicheck
4343
- errcheck
4444
- errorlint
@@ -63,7 +63,7 @@ linters:
6363
- unparam
6464
- unused
6565
- wastedassign
66-
disable-all: true
66+
disable-all: true
6767
issues:
6868
max-issues-per-linter: 0
6969
max-same-issues: 0

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ repos:
5656
hooks:
5757
- id: markdownlint-cli2-fix
5858

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

6466
ci:
65-
skip: [golang-diff, golangci-lint, prettier, markdownlint-cli2-fix]
67+
skip: [golang-diff, golangci-lint, prettier, markdownlint-cli2-fix, yamllint]
6668
autofix_prs: false

.yamllint.yaml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ yaml-files:
44
- '*.yaml'
55
- '*.yml'
66

7+
ignore:
8+
- deploy/helm-chart/templates/
9+
710
rules:
811
braces: enable
912
brackets: enable
@@ -13,21 +16,34 @@ rules:
1316
require-starting-space: true
1417
ignore-shebangs: true
1518
min-spaces-from-content: 1
16-
comments-indentation:
17-
level: warning
19+
comments-indentation: enable
1820
document-end: disable
1921
document-start: disable
2022
empty-lines: enable
21-
empty-values: disable
23+
empty-values: enable
2224
float-values: disable
2325
hyphens: enable
24-
indentation: enable
26+
indentation:
27+
spaces: consistent
28+
indent-sequences: consistent
29+
check-multi-line-strings: true
30+
ignore: |
31+
deploy/manifests/nginx-conf.yaml
32+
deploy/manifests/njs-modules.yaml
2533
key-duplicates: enable
2634
key-ordering: disable
27-
line-length: disable
35+
line-length:
36+
max: 120
37+
allow-non-breakable-words: true
38+
allow-non-breakable-inline-mappings: true
39+
ignore: |
40+
.github/workflows/
41+
deploy/manifests/deployment.yaml
2842
new-line-at-end-of-file: enable
2943
new-lines: enable
3044
octal-values: disable
3145
quoted-strings: disable
3246
trailing-spaces: enable
33-
truthy: disable
47+
truthy:
48+
ignore: |
49+
.github/workflows/

examples/http-header-filter/echo-route.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
add:
2323
- name: Accept-Encoding
2424
value: compress
25-
- name: My-cool-header
25+
- name: My-cool-header
2626
value: this-is-an-appended-value
2727
remove:
2828
- User-Agent

examples/http-header-filter/headers.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ apiVersion: v1
3030
kind: ConfigMap
3131
metadata:
3232
name: headers-config
33+
# yamllint disable rule:indentation
3334
data:
3435
nginx.conf: |-
3536
user nginx;
@@ -61,7 +62,7 @@ data:
6162
return s;
6263
}
6364
export default {getRequestHeaders};
64-
65+
# yamllint enable rule:indentation
6566
---
6667
apiVersion: v1
6768
kind: Service

0 commit comments

Comments
 (0)