Add yamllint (#5129)

This commit is contained in:
Timothy
2025-03-19 08:57:24 +01:00
committed by GitHub
parent 040af5607f
commit 8e5b500c8e
7 changed files with 99 additions and 7 deletions

View File

@ -0,0 +1,22 @@
{
"problemMatcher": [
{
"owner": "yamllint",
"pattern": [
{
"regexp": "^(.*\\.ya?ml)$",
"file": 1
},
{
"regexp": "^\\s{2}(\\d+):(\\d+)\\s+(error|warning)\\s+(.*?)\\s+\\((.*)\\)$",
"line": 1,
"column": 2,
"severity": 3,
"message": 4,
"code": 5,
"loop": true
}
]
}
]
}

View File

@ -1,6 +1,6 @@
name: Bump our Calendar Version
on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: "30 3 1 * *"

View File

@ -1,6 +1,6 @@
name: On Push
on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
beta:

View File

@ -1,14 +1,26 @@
name: Pull Request
on:
on: # yamllint disable-line rule:truthy
pull_request:
branches: [master]
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Register yamllint problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/yamllint.json"
- name: Validate YAML
run: yamllint --strict --format github .
ktlint:
runs-on: ubuntu-latest
permissions:
security-events: write
security-events: write
steps:
- uses: actions/checkout@v4
@ -146,7 +158,6 @@ jobs:
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: echo "Generated AVD snapshot for caching."
- name: Build projects and run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:

View File

@ -1,6 +1,6 @@
name: Production Deploy
on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
release:
types: [released]

View File

@ -1,6 +1,6 @@
name: Tag Weekly Release
on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: "0 4 * * 0"

59
.yamllint Normal file
View File

@ -0,0 +1,59 @@
rules:
braces:
level: error
min-spaces-inside: 0
max-spaces-inside: 1
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
brackets:
level: error
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
colons:
level: error
max-spaces-before: 0
max-spaces-after: 1
commas:
level: error
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments:
level: error
require-starting-space: true
min-spaces-from-content: 1
comments-indentation:
level: error
document-end:
level: error
present: false
document-start:
level: error
present: false
empty-lines:
level: error
max: 1
max-start: 0
max-end: 1
hyphens:
level: error
max-spaces-after: 1
indentation:
level: error
spaces: 2
indent-sequences: true
check-multi-line-strings: false
key-duplicates:
level: error
line-length: disable
new-line-at-end-of-file:
level: error
new-lines:
level: error
type: unix
trailing-spaces:
level: error
truthy:
level: error