Skip to content

Commit

Permalink
Add github action to run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongable committed May 7, 2024
1 parent 844f5d5 commit 5a62952
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint CP/CPS

on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- name: Run linter
working-directory: ./tools/lint
run: go run . ../../CP-CPS.md
8 changes: 4 additions & 4 deletions .github/workflows/pr_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Test Tools
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
build:

Expand All @@ -16,9 +16,9 @@ jobs:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions tools/lint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func main() {
os.Exit(1)
}

fmt.Println("lint checks complete; no findings")
}

func lintHeadings(lines []string) error {
Expand Down

0 comments on commit 5a62952

Please sign in to comment.