Skip to content

Commit

Permalink
Merge pull request #17 from szepeviktor/extract-front-matter
Browse files Browse the repository at this point in the history
Lint Front Matter
  • Loading branch information
adamlaki authored Sep 7, 2023
2 parents 0bcc5e8 + 7f029f5 commit e4441f6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,29 @@ jobs:
with:
eclint_args: |
-exclude=css/*
lint_front_matter:
name: Lint Front Matter
runs-on: ubuntu-latest

steps:
-
name: Checkout repository
uses: actions/checkout@v3
-
name: Cache pip
uses: actions/cache@v3
with:
path: '~/.cache/pip'
key: '${{ runner.os }}-pip-yamllint'
-
name: Install yamllint
run: pip install --user yamllint
-
name: Remove document contents
run: |
git ls-files -z -- 'src/**.md' | xargs -0 -n 1 -- sed -i -e 'N;P;/---\n$/Q;D'
-
name: Check Front Matter
run: |
git ls-files -z -- 'src/**.md' | xargs -0 -n 1 -- python -m yamllint
20 changes: 20 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
extends: "default"

rules:
document-start:
present: true
braces:
forbid: true
brackets:
forbid: false
empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
indentation:
spaces: 4
indent-sequences: false
line-length: "disable"
quoted-strings:
quote-type: "double"
required: true

0 comments on commit e4441f6

Please sign in to comment.