mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
ae66312d8c
* Add Python linter to github actions * wip * Add back splat_ext * Format files * C++ -> C * format 2 files * split workflow into separate file, line length 120, fix excludes * -l 120 in ci * update black locally and apply formatting changes * pyproject.toject --------- Co-authored-by: Ethan Roseman <ethteck@gmail.com>
36 lines
927 B
YAML
36 lines
927 B
YAML
name: Lint
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
cpp_lint:
|
|
name: C format and lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Git
|
|
run: |
|
|
git log --oneline --graph --max-count=100
|
|
git log --oneline --graph --max-count=100 HEAD origin/main
|
|
- name: clang-format
|
|
run: |
|
|
git config --global color.ui always
|
|
git clang-format-14 --diff origin/main HEAD
|
|
git config --global color.ui auto
|
|
- name: Lint
|
|
uses: cpp-linter/cpp-linter-action@v2
|
|
id: linter
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
style: file
|
|
lines-changed-only: diff
|
|
tidy-checks: ''
|
|
version: '15'
|
|
- name: Fail if lint failed
|
|
if: steps.linter.outputs.checks-failed > 0
|
|
run: exit 1
|