name: lint
on: [push, pull_request]
jobs:
  clang-format:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: DoozyX/clang-format-lint-action@v0.12
      with:
        source: 'src lib'
        exclude: 'lib/NintendoSDK lib/aarch64 lib/agl lib/eui lib/sead'
        clangFormatVersion: 12
  custom-lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - name: Set up python
      uses: actions/setup-python@v4
      with:
        python-version: '3.9'
        cache: 'pip'
    - name: Set up python package dependencies
      run: pip install capstone colorama cxxfilt pyelftools ansiwrap watchdog python-Levenshtein toml
    - name: Run custom code styling checks
      run: tools/check-format.py
