A command line tool for synchronizing project properties with the SonarCloud Web API
npm install @launchfort/sonar-cliA command line tool for communicating with the SonarCloud Web API.
```
npm install --global launchfort/sonar-cli
sonar
Create a .sonar-project.json in the root of your git repository.
``
{
"$schema": "https://raw.githubusercontent.com/launchfort/sonar-cli/master/schemas/project.json",
"sonar.projectKey": "some_project",
"sonar.inclusions": [ "src" ]
}
Then store the settings to SonarCloud
NOTE: All settings will be stored in SonarCloud except sonar.projectKey.
``
SONAR_CLOUD_ACCESS_TOKEN=dsdfsdf sonar project store
OR
sonar project store --accessToken dsdfsdf
To view help:
``
sonar --help
sonar project --help
sonar project store --help
... etc.
The settings are supported. As found on the SonarCloud Administration > General Settings
page: Analysis Scope, General, Pull Requests, SCM, JavaScript and TypeScript.
To see descriptions of all settings supported see the JSON schema.
To reset any setting to the default value provided by SonarCloud, then set it
to null.
``
{
"$schema": "https://raw.githubusercontent.com/launchfort/sonar-cli/master/schemas/project.json",
"sonar.projectKey": "some_project",
"sonar.inclusions": [ "src" ],
"sonar.typescript.file.suffixes": null
}
To see dubug messages set the env var DEBUG to sonar-cli`. See the debug
module for further details.