Skip to content

Commit a151327

Browse files
authored
Add yamllint (#223)
1 parent fa70077 commit a151327

File tree

4 files changed

+50
-14
lines changed

4 files changed

+50
-14
lines changed

.github/labeler.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
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-
- head-branch: ['^tests/', '^test/']
14+
- head-branch: ["^tests/", "^test/"]
1515
- changed-files:
16-
- any-glob-to-any-file: 'tests/**/*'
16+
- any-glob-to-any-file: "tests/**/*"
1717

1818
documentation:
19-
- head-branch: ['^docs/', '^doc/']
19+
- head-branch: ["^docs/", "^doc/"]
2020
- changed-files:
21-
- any-glob-to-any-file: '**/*.md'
21+
- any-glob-to-any-file: "**/*.md"
2222

2323
dependencies:
24-
- head-branch: ['^deps/', '^dep/', '^dependabot/', 'pre-commit-ci-update-config']
24+
- head-branch:
25+
["^deps/", "^dep/", "^dependabot/", "pre-commit-ci-update-config"]
2526
- changed-files:
26-
- any-glob-to-any-file: ['go.mod', 'go.sum']
27+
- 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-
- "**.md"
9-
- "LICENSE"
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/scorecard.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: "42 15 * * 6" # run every Saturday at 15:42 UTC
66
push:

.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)