@@ -181,8 +181,8 @@ forward, and you just can use the example *noxfile.py* below.
181181
182182 .. _toolbox tasks :
183183
184- 7. Setup for deploying documentation (optional)
185- +++++++++++++++++++++++++++++++++++++++++++++++
184+ 7. Set up for deploying documentation (optional)
185+ ++++++++++++++++++++++++++++++++++++++++++++++++
186186Within the `gh-pages.yml `, we use the GitHub `upload-pages-artifact ` and `deploy-pages `
187187actions. In order to properly deploy your pages, you'll need to reconfigure the GitHub
188188Pages settings for the repo:
@@ -201,8 +201,32 @@ We also need to configure settings for github-pages environment:
2012015. In the 'Deployment branches and tags', click 'Add deployment branch or tag rule'
2022026. Select 'Ref type' to be 'Tag' and set the 'Name pattern' to `[0-9]*.[0-9]*.[0-9]* ` (or whatever matches that repo's tags)
203203
204+ 8. Set up for Sonar
205+ +++++++++++++++++++
206+ PTB supports using SonarQube Cloud to analyze, visualize, & track linting, security, &
207+ coverage. In order to properly set it up, you'll need to do the following instructions
208+ for each **public ** project. At this time, PTB currently does not support setting up
209+ SonarQube for a **private ** project.
204210
205- 8. Go 🥜
211+ 1. Specify in the `noxconfig.py ` the relative path to the project's source code in `Config.source `
212+ .. code-block :: python
213+
214+ source: Path = Path(" exasol/toolbox" )
215+ 2. Add the 'SONAR_TOKEN' to the 'Organization secrets' in GitHub (this requires a person being a GitHub organization owner).
216+ 3. Activate the SonarQubeCloud App
217+ 4. Create a project on SonarCloud
218+ 5. Add the following information to the project's file `pyproject.toml `
219+ .. code-block :: toml
220+
221+ [tool.sonar]
222+ projectKey = "com.exasol:<project-key>"
223+ hostUrl = "https://sonarcloud.io"
224+ organization = "exasol"
225+ 6. Post-merge, update the branch protections to include SonarQube analysis
226+
227+
228+
229+ 9. Go 🥜
206230+++++++++++++
207231You are ready to use the toolbox. With *nox -l * you can list all available tasks.
208232
0 commit comments