Merge pull request #311 from Enapter/n/rain-sensor #1129
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Code Base | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: Lint Code Base | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed Lua files | |
id: changed-lua-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: | | |
**/*.lua | |
- name: Check Formatting | |
uses: JohnnyMorganz/stylua-action@v2 | |
if: steps.changed-lua-files.outputs.any_changed == 'true' | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
version: v0.16.1 | |
args: --check --allow-hidden ${{ steps.changed-lua-files.outputs.all_changed_files }} | |
- name: Lint Code Base | |
uses: github/super-linter/slim@v4 | |
env: | |
VALIDATE_ALL_CODEBASE: false | |
VALIDATE_NATURAL_LANGUAGE: false | |
VALIDATE_JSCPD: false | |
DEFAULT_BRANCH: main | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
LINTER_RULES_PATH: / | |
YAML_CONFIG_FILE: .yamllint.yml | |
LUA_CONFIG_FILE: .luacheckrc | |
MARKDOWN_CONFIG_FILE: .markdownlint.yml | |
FILTER_REGEX_EXCLUDE: .scripts/.* |