SONARPY-4110 Rule S8492: "set.discard()" should be used instead of ch… #670
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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - branch-* | |
| - dogfood-* | |
| workflow_dispatch: | |
| schedule: | |
| # Nightly build at 2 AM UTC for shadow analysis | |
| - cron: '0 2 * * *' | |
| env: | |
| PYTHON_VERSION: 3.9.5 | |
| IS_COMMUNITY: true | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| analyze: | |
| runs-on: github-ubuntu-latest-s | |
| name: Build | |
| permissions: | |
| id-token: write | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: "Analysis on SonarQube NEXT" | |
| sonarqube-instance: "next" | |
| sonar-project-key: "org.sonarsource.python:python" | |
| - name: "Analysis on Sonarcloud.io" | |
| sonarqube-instance: "sqc-eu" | |
| sonar-project-key: "SonarSource_sonar-python" | |
| - name: "Analysis on SonarQube.us" | |
| sonarqube-instance: "sqc-us" | |
| sonar-project-key: "SonarSource_sonar-python" | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Setup submodules | |
| run: | | |
| git submodule update --init --jobs 4 | |
| cd python-frontend/typeshed_serializer/resources/python-type-stubs | |
| git sparse-checkout set stubs/sklearn | |
| git checkout | |
| - uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3.5.1 | |
| with: | |
| version: 2025.12.12 | |
| cache: false | |
| env: | |
| MISE_ENV: test-and-analyze | |
| - name: Remove private directory | |
| run: rm -rf private | |
| - name: Analyze | |
| uses: ./.github-commons/actions/analyze | |
| with: | |
| sonarqube-instance: ${{ matrix.sonarqube-instance }} | |
| sonar-project-key: ${{ matrix.sonar-project-key }} | |
| disable-caching: true |