Skip to content

axe Linter Connector and SonarQube Cloud Integration with GitHub Action

Notifications You must be signed in to change notification settings

dequelabs/axe-linter-sonarcloud-github-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

axe Linter Connector and SonarQube Cloud Integration with GitHub Action

You will need to download a copy of the axe-linter-connector for your runner's platform and place it in the root of your project along with the bash scripts contained here.

Downloads for axe DevTools Linter

If using a platform other than linux you will need to update the command in the bash scripts (ie: change axe-linter-connector-linux toaxe-linter-connector-macos or axe-linter-connector-win.exe).

Notes:

  • It may be possible to deploy these scripts in other CI/CD pipelines.
  • There is more than one way to get axe-linter-connector running in your GitHub pipelines, including checking out/cloning it from another repository and using a self-hosted runner that includes axe-linter-connector.

Bash Scripts

  • axe-liner-full.sh - Lints all files in the repository
  • axe-liner-changed.sh - Lints only changed files

GitHub Action YML

...

      - name: Run axe Linter
        run: ${GITHUB_WORKSPACE}/axe-linter-full.sh #or axe-linter-changed.sh
        env: 
          AXE_LINTER_API_KEY: ${{ secrets.AXE_LINTER_API_KEY }}
          AXE_LINTER_SERVER_URL: https://axe-linter.deque.com/
      - name: SonarQube Scan
        uses: SonarSource/sonarqube-scan-action@v4
        with: 
          args: > 
            -Dsonar.projectKey=<your-project-key>
            -Dsonar.organization=<your-organization>
            -Dsonar.externalIssuesReportPaths=axe-linter-report.json
        env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

...

axe-linter-connector debugging

For additional axe-linter-connector debugging logs prepend DEBUG=* to the linter-connector command in the bash script.

DEBUG=* axe-linter-connector -s . -d . --api-key $AXE_LINTER_API_KEY --url $AXE_LINTER_SERVER_URL

About

axe Linter Connector and SonarQube Cloud Integration with GitHub Action

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages