Adds Formatting to the CI (#69)

This MR adds linting and formatting to the CI pipeline for the repository for both the Golang and Lua code.
This commit is contained in:
Harrison (Harry) Cramer
2023-10-30 23:54:38 -04:00
committed by GitHub
parent 3a67424fec
commit a055c4c988
31 changed files with 484 additions and 453 deletions

39
.github/workflows/lint-and-format.yaml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Linting and Formatting
on:
pull_request:
branches:
- main
jobs:
luacheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Luacheck linter
uses: lunarmodules/luacheck@v1
with:
args: --globals vim --no-max-line-length -- .
stylua:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Action
uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.19'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
only-new-issues: true