Sonar lint bug with default setting
Missing --silent
option in the sonar_lint_report(),
function sonar_lint_report() {
if [[ "$SONAR_HOST_URL" ]] || [[ "$SONAR_URL" ]]
then
mkdir -p -m 777 reports
# generate ts lint report in json for SONARqube
# shellcheck disable=SC2086
ng $NG_LINT_ARGS --format=json --force > reports/ng-lint.tslint.json
fi
}
Without this option, the json is incorrect :
$ ng lint --format=json --force > reports/ng-lint.tslint.json
Lint warnings found in the listed files.
Lint errors found in the listed files.
$ head reports/ng-lint.tslint.json
Linting "frontend"...
[{"filePath":"/home/adowowas/src/front-end/src/app/roadmap/roadmap-extract/roadmap-extract.component.ts","messages":[{"ruleId":"@angular-eslint/no-empty-lifecycle-
Linting "frontend"...
and other ng lint messages are printed in the json.
With --silent
, the json is correct