Fix emmylua_check warnings #1147
This file contains hidden or 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: Static analysis | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| cmake-presets: | |
| if: | | |
| github.event_name == 'push' || | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name != github.repository | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#schema | |
| # A machine-readable JSON schema for the CMakePresets.json format. | |
| - run: curl -O https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json | |
| - run: pip3 install jsonschema | |
| - name: Check JSON schema of the CMakePresets.json | |
| run: jsonschema -i CMakePresets.json schema.json | |
| luacheck: | |
| if: | | |
| github.event_name == 'push' || | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name != github.repository | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup luarocks | |
| run: sudo apt install -y luarocks | |
| - name: Setup luacheck | |
| run: luarocks install --local --server=https://luarocks.org/dev luacheck | |
| - run: echo $(luarocks path --lr-bin) >> $GITHUB_PATH | |
| - name: Run luacheck | |
| run: luacheck . | |
| emmylua_check: | |
| if: | | |
| github.event_name == 'push' || | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name != github.repository | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-emmylua-analyzer | |
| - name: Run emmylua_check | |
| run: emmylua_check tests --config .emmyrc.json |