Skip to content

Commit ce4bddd

Browse files
authored
Add yamllint (#521)
1 parent a2d622b commit ce4bddd

File tree

5 files changed

+61
-25
lines changed

5 files changed

+61
-25
lines changed

.github/labeler.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
change:
2-
- head-branch: ['^change/']
2+
- head-branch: ["^change/"]
33

44
enhancement:
5-
- head-branch: ['^feature/', '^feat/', '^enhancement/', '^enh/']
5+
- head-branch: ["^feature/", "^feat/", "^enhancement/", "^enh/"]
66

77
bug:
8-
- head-branch: ['^fix/', '^bug/']
8+
- head-branch: ["^fix/", "^bug/"]
99

1010
chore:
11-
- head-branch: ['^chore/']
11+
- head-branch: ["^chore/"]
1212

1313
tests:
14-
- any:
15-
- head-branch: ['^tests/', '^test/']
16-
- changed-files:
17-
- any-glob-to-any-file: 'tests/**/*'
18-
- all:
19-
- changed-files:
20-
- all-globs-to-all-files: ['!tests/requirements.txt']
14+
- any:
15+
- head-branch: ["^tests/", "^test/"]
16+
- changed-files:
17+
- any-glob-to-any-file: "tests/**/*"
18+
- all:
19+
- changed-files:
20+
- all-globs-to-all-files: ["!tests/requirements.txt"]
2121

2222
documentation:
23-
- head-branch: ['^docs/', '^doc/']
23+
- head-branch: ["^docs/", "^doc/"]
2424
- changed-files:
25-
- any-glob-to-any-file: '**/*.md'
25+
- any-glob-to-any-file: "**/*.md"
2626

2727
dependencies:
28-
- head-branch: ['^deps/', '^dep/', '^dependabot/', 'pre-commit-ci-update-config']
28+
- head-branch:
29+
["^deps/", "^dep/", "^dependabot/", "pre-commit-ci-update-config"]
2930
- changed-files:
30-
- any-glob-to-any-file: ['go.mod', 'go.sum']
31+
- any-glob-to-any-file: ["go.mod", "go.sum"]

.github/workflows/lint.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
pull_request:
55
branches:
66
- main
7-
paths-ignore:
8-
- "examples/**"
9-
- "**.md"
7+
8+
defaults:
9+
run:
10+
shell: bash
1011

1112
concurrency:
1213
group: ${{ github.ref_name }}-lint
@@ -54,3 +55,15 @@ jobs:
5455
config: .markdownlint-cli2.yaml
5556
globs: "**/*.md"
5657
fix: false
58+
59+
yaml-lint:
60+
name: YAML lint
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v3
64+
65+
- name: Install yamllint
66+
run: pip install yamllint
67+
68+
- name: Lint YAML files
69+
run: yamllint .

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: OpenSSF Scorecards
22
on:
3-
branch_protection_rule:
3+
branch_protection_rule: # yamllint disable-line rule:empty-values
44
schedule:
55
- cron: "36 15 * * 3" # run every Wednesday at 15:36 UTC
66
push:

.goreleaser.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ env:
33

44
before:
55
hooks:
6-
- make LICENSES
6+
- make LICENSES
77

88
builds:
99
- id: nginx-asg-sync
@@ -97,7 +97,7 @@ signs:
9797
- cmd: cosign
9898
artifacts: checksum
9999
output: true
100-
certificate: '${artifact}.pem'
100+
certificate: "${artifact}.pem"
101101
args:
102102
- sign-blob
103103
- "--output-signature=${signature}"
@@ -108,14 +108,14 @@ signs:
108108
announce:
109109
slack:
110110
enabled: true
111-
channel: '#announcements'
112-
message_template: 'NGINX Plus Integration with Cloud Autoscaling {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}'
111+
channel: "#announcements"
112+
message_template: "NGINX Plus Integration with Cloud Autoscaling {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}"
113113

114114
milestones:
115115
- close: true
116116

117117
snapshot:
118-
name_template: 'edge'
118+
name_template: "edge"
119119

120120
snapcrafts:
121121
- summary: NGINX Plus Integration with Cloud Autoscaling
@@ -125,7 +125,7 @@ snapcrafts:
125125
grade: devel
126126
confinement: strict
127127
publish: true
128-
license: 'BSD 2-Clause'
128+
license: "BSD 2-Clause"
129129
apps:
130130
nginx-asg-sync:
131131
command: nginx-asg-sync

.yamllint.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
yaml-files:
3+
- "*.yaml"
4+
- "*.yml"
5+
6+
ignore-from-file: .gitignore
7+
8+
extends: default
9+
10+
rules:
11+
comments:
12+
min-spaces-from-content: 1
13+
comments-indentation: enable
14+
document-start: disable
15+
empty-values: enable
16+
line-length:
17+
max: 120
18+
ignore: |
19+
.goreleaser.yml
20+
.github/
21+
truthy:
22+
check-keys: false

0 commit comments

Comments
 (0)