Skip to content

Commit

Permalink
updating sonarcloud properties and coverage inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
teddmason committed Jan 4, 2024
1 parent de75776 commit 4aa4b4b
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.idea/
/smart-incident-reporting.iml
/node_modules/
coverage
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ services:
networks:
- default

##############################################################################################################
# Redis commander on port 8081
##############################################################################################################
redis_commander:
image: rediscommander/redis-commander
ports:
- "8081:8081"
environment:
- REDIS_HOST=redis
deploy:
restart_policy:
condition: on-failure

volumes:
redisdata:
driver: local
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"watch:nodejs": "nodemon --delay 1000ms --signal SIGTERM -r dotenv/config index.js",
"dev": "concurrently 'npm:watch:css' 'npm:watch:nodejs'",
"lint": "standard",
"unit-test": "npx jest --verbose",
"unit-test": "jest --verbose",
"test": "npm run unit-test",
"prettier": "prettier-config-standard",
"prepare": "husky install"
Expand Down Expand Up @@ -94,5 +94,12 @@
"**/docs/**"
],
"delay": 3000
},
"jest": {
"collectCoverage": true,
"coverageReporters": [
"lcov",
"text"
]
}
}
28 changes: 25 additions & 3 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
sonar.javascript.exclusions=**/jest.config.js,**/__mocks__/**,**/node_modules/**,**/test/**,**/test-output/**
sonar.javascript.lcov.reportPaths=test-output/lcov.info
sonar.exclusions=/test/**,**/*.spec.js,*snyk_report.html,*snyk_report.css
sonar.projectKey=DEFRA_smart-incident-reporting
sonar.organization=defra

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=smart-incident-reporting
sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=.

# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

# Coverage stats location
sonar.javascript.lcov.reportPaths=coverage/lcov.info

sonar.inclusions=**/src/**/*, **/azure-functions/**/*.js, **/azure-functions/**/*.mjs
sonar.exclusions=**/jest.config.js,**/__mocks__/**,**/node_modules/**,**/test/**,**/test-output/**,/test/**,**/*.spec.js,*snyk_report.html,*snyk_report.css
sonar.coverage.exclusions=**/test/**,**/__tests__/**, **/__mocks__/**, **/*.spec.*, **/*.test.*, **/test-env.js, **/jest.config.cjs, **/jest.config.js

# Ensure sonar recognises BigInt as
sonar.javascript.globals=BigInt

# Add code dupliciation exceptions
# sonar.cpd.exclusions=packages/eps/**/*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4aa4b4b

Please sign in to comment.