name: Rubocop on: [push, pull_request] jobs: rubocop: strategy: fail-fast: false matrix: os: [ubuntu-latest] ruby: [2.7] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Install Rubocop run: gem install rubocop code-scanning-rubocop - name: Rubocop run --no-doc run: | bash -c " rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif [[ $? -ne 2 ]] "