@launchfort/sonar-cli
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

Sonar CLI

A command line tool for communicating with the SonarCloud Web API.

Installation

npm install --global launchfort/sonar-cli
sonar

Usage

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.

Settings Supported

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.

Resetting settings to their defaults

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
}

Debugging

To see dubug messages set the env var DEBUG to sonar-cli. See the debug module for further details.

Package Sidebar

Install

npm i @launchfort/sonar-cli

Weekly Downloads

0

Version

0.2.3

License

MIT

Unpacked Size

175 kB

Total Files

41

Last publish

Collaborators

  • dschnare
  • joneng
  • julsricketti
  • matb33
  • phr
  • sthompsonlaunchfort