Skip to content

Commit 0d27ab9

Browse files
committed
add sonarqube
1 parent 4f5ca7b commit 0d27ab9

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

.github/workflows/nodejs.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,7 @@ jobs:
3636
- run: make install
3737
- run: make lint
3838
- run: make test
39-
# - name: Test & publish code coverage
40-
# # Publish code coverage on Code Climate
41-
# # https://github.com/paambaati/codeclimate-action
42-
# uses: paambaati/[email protected]
43-
# # Add Code Climate secret key
44-
# env:
45-
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
46-
# with:
47-
# coverageCommand: make test-coverage
48-
# debug: true
39+
- name: SonarQube Scan
40+
uses: SonarSource/sonarqube-scan-action@v5
41+
env:
42+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# nodejs-package
22

33
[![Node CI](https://github.com/hexlet-boilerplates/nodejs-package/workflows/Node%20CI/badge.svg)](https://github.com/hexlet-boilerplates/nodejs-package/actions)
4-
[![Maintainability](https://api.codeclimate.com/v1/badges/dfc50c2d88cd46d069c1/maintainability)](https://codeclimate.com/github/hexlet-boilerplates/nodejs-package/maintainability)
5-
[![Test Coverage](https://api.codeclimate.com/v1/badges/dfc50c2d88cd46d069c1/test_coverage)](https://codeclimate.com/github/hexlet-boilerplates/nodejs-package/test_coverage)
4+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_nodejs-package&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_nodejs-package)
5+
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_nodejs-package&metric=bugs)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_nodejs-package)
6+
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_nodejs-package&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_nodejs-package)
7+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_nodejs-package&metric=coverage)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_nodejs-package)
8+
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_nodejs-package&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_nodejs-package)
69

710
## Setup
811

sonar-project.properties

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
sonar.projectKey=hexlet-boilerplates_nodejs-package
2+
sonar.organization=hexlet-boilerplates
3+
sonar.testExecutionReportPaths=coverage/clover.xml
4+
5+
# This is the name and version displayed in the SonarCloud UI.
6+
#sonar.projectName=nodejs-package
7+
#sonar.projectVersion=1.0
8+
9+
10+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
11+
#sonar.sources=.
12+
13+
# Encoding of the source code. Default is default system encoding
14+
#sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)