Skip to content

Commit 7d4426a

Browse files
authored
Code Scanning Fixes (#2637)
* fix: sonar cloud code check fix in frontend and backend * chore: added new sonarcloud project keys * chore: updated sonar timeout on frontend
1 parent e6b6f4a commit 7d4426a

File tree

2 files changed

+45
-7
lines changed

2 files changed

+45
-7
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ jobs:
4040
with:
4141
commands: |
4242
npm ci
43-
npm run lint
4443
npm run test:cov
4544
dir: services
4645
node_version: "22"
4746
sonar_args: >
4847
-Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
4948
-Dsonar.organization=bcgov-sonarcloud
50-
-Dsonar.projectKey=bcgov_alcs
49+
-Dsonar.projectKey=bcgov-alcs-services
5150
-Dsonar.sources=apps,libs
5251
-Dsonar.tests.inclusions=**/*spec.ts
5352
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
@@ -58,22 +57,21 @@ jobs:
5857
name: ALCS Frontend Tests
5958
if: (! github.event.pull_request.draft)
6059
runs-on: ubuntu-24.04
61-
timeout-minutes: 5
60+
timeout-minutes: 10
6261
steps:
6362
- uses: bcgov/action-test-and-analyse@51b50be3bb2522e480ed8eab72735612deff7f15 # v1.4.0
6463
env:
6564
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6665
with:
6766
commands: |
6867
npm ci
69-
npm run lint
7068
npm run test:cov
7169
dir: alcs-frontend
7270
node_version: "22"
7371
sonar_args: >
7472
-Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
7573
-Dsonar.organization=bcgov-sonarcloud
76-
-Dsonar.projectKey=bcgov_alcs
74+
-Dsonar.projectKey=bcgov-alcs-frontend
7775
-Dsonar.sources=src
7876
-Dsonar.tests.inclusions=**/*spec.ts
7977
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
@@ -92,14 +90,13 @@ jobs:
9290
with:
9391
commands: |
9492
npm ci
95-
npm run lint
9693
npm run test:cov
9794
dir: portal-frontend
9895
node_version: "22"
9996
sonar_args: >
10097
-Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
10198
-Dsonar.organization=bcgov-sonarcloud
102-
-Dsonar.projectKey=bcgov_alcs
99+
-Dsonar.projectKey=bcgov-alcs-portal-frontend
103100
-Dsonar.sources=src
104101
-Dsonar.tests.inclusions=**/*spec.ts
105102
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info

portal-frontend/.eslintrc.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"parserOptions": {
8+
"project": ["tsconfig.json"],
9+
"createDefaultProgram": true
10+
},
11+
"extends": ["plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates"],
12+
"rules": {
13+
"@angular-eslint/directive-selector": [
14+
"error",
15+
{
16+
"type": "attribute",
17+
"prefix": "app",
18+
"style": "camelCase"
19+
}
20+
],
21+
"@angular-eslint/component-selector": [
22+
"error",
23+
{
24+
"type": "element",
25+
"prefix": "app",
26+
"style": "kebab-case"
27+
}
28+
]
29+
}
30+
},
31+
{
32+
"files": ["*.html"],
33+
"extends": ["plugin:@angular-eslint/template/recommended"],
34+
"rules": {
35+
"@angular-eslint/template/no-positive-tabindex": 1,
36+
"@angular-eslint/template/click-events-have-key-events": 1,
37+
"@angular-eslint/template/mouse-events-have-key-events": 1
38+
}
39+
}
40+
]
41+
}

0 commit comments

Comments
 (0)