Skip to content

Commit

Permalink
actions: Add lint action
Browse files Browse the repository at this point in the history
Supports Vim and YAML files
  • Loading branch information
derekerdmann committed Jan 15, 2024
1 parent 0be4559 commit 6ec547e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Lint

"on": [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python 3.9
id: python39
uses: actions/setup-python@v5
with:
python-version: 3.9
check-latest: true

- name: Vint
shell: bash
run: |
pipx install --python '${{ steps.python39.outputs.python-path }}' vim-vint
vint $(git ls-files -s '.*vim*' '**/*.vim' | awk '!/^16/ {print $4}')
- name: yamllint
shell: bash
run: |
pipx install yamllint
yamllint $(git ls-files -s '*.yml' '**/*.yml' '*.yaml' '**/*.yaml' | awk '!/^16/ {print $4}')
7 changes: 7 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
extends: default

rules:
line-length:
max: 120
level: warning

0 comments on commit 6ec547e

Please sign in to comment.