rust-clippy analyze #5714
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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| # rust-clippy is a tool that runs a bunch of lints to catch common | |
| # mistakes in your Rust code and help improve your Rust code. | |
| # More details at https://github.com/rust-lang/rust-clippy | |
| # and https://rust-lang.github.io/rust-clippy/ | |
| name: rust-clippy analyze | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| schedule: | |
| - cron: '0 22 * * *' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| rust-clippy-analyze: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-24.04 | |
| - windows-2022 | |
| - macos-15 | |
| name: Run rust-clippy analyzing | |
| permissions: | |
| contents: read | |
| security-events: write | |
| steps: | |
| - run: git config --system core.longpaths true | |
| if: runner.os == 'Windows' | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: true | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| - uses: jdx/mise-action@c1ecc8f748cd28cdeabf76dab3cccde4ce692fe4 # v4.0.0 | |
| - name: Install requirements | |
| run: just install-requirements | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install required cargo | |
| run: | | |
| cargo install clippy-sarif || clippy-sarif --version | |
| cargo install sarif-fmt || sarif-fmt --version | |
| - run: pulumi login --local | |
| - name: Prerun clippy | |
| run: just check | |
| - name: Run rust-clippy | |
| run: just clippy-to-file | |
| - name: Upload analysis results to GitHub | |
| uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0 | |
| with: | |
| sarif_file: rust-clippy-results.sarif | |
| wait-for-processing: true | |
| category: Rust-${{ matrix.os }} |