TUDublin / code-and-docs-rachelrring

code-and-docs-rachelrring created by GitHub Classroom
0 stars 0 forks source link

Final Security #44

Open rachelrring opened 7 months ago

rachelrring commented 7 months ago
rachelrring commented 6 months ago

Sonar Cloud: I can't use this because I don't own this repository. As a replacement, I am going to use the Sonar lint extension on Visual studio code IDE.

rachelrring commented 6 months ago

Installed Linting tool for angular frontend using

ng lint

This is what came up the first time it was run:

Linting "budget-app"...

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\app.component.ts
  27:3  warning  Lifecycle interface 'OnInit' should be implemented for method 'ngOnInit'. (https://angular.io/styleguide#style-09-01)  @angular-eslint/use-lifecycle-interface

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\budget-planner\budget-planner.component.html
  1448:68  error  Expected `===` but received `==`  @angular-eslint/template/eqeqeq 
  1448:96  error  Expected `===` but received `==`  @angular-eslint/template/eqeqeq 

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\budget-planner\budget-planner.component.spec.ts
  158:11  error  'expectedYearlyIncome' is never reassigned. Use 'const' instead    prefer-const
  178:11  error  'expectedYearlyExpenses' is never reassigned. Use 'const' instead  prefer-const
  200:11  error  'expectedYearlyExpenses' is never reassigned. Use 'const' instead  prefer-const
  201:11  error  'expectedYearlyIncome' is never reassigned. Use 'const' instead    prefer-const
  202:11  error  'expectedYearlySurplus' is never reassigned. Use 'const' instead   prefer-const
  223:11  error  'expectedYearlyExpenses' is never reassigned. Use 'const' instead  prefer-const
  224:11  error  'expectedYearlyIncome' is never reassigned. Use 'const' instead    prefer-const
  225:11  error  'expectedYearlySurplus' is never reassigned. Use 'const' instead   prefer-const

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\budget-planner\budget-planner.component.ts
   44:10  error  Unexpected any. Specify a different type                   @typescript-eslint/no-explicit-any
   45:16  error  Unexpected any. Specify a different type                   @typescript-eslint/no-explicit-any
  362:11  error  'ue' is never reassigned. Use 'const' instead              prefer-const
  364:13  error  'address' is never reassigned. Use 'const' instead         prefer-const
  365:13  error  'res' is never reassigned. Use 'const' instead             prefer-const
  427:13  error  'budgettosave' is never reassigned. Use 'const' instead    prefer-const
  431:20  error  '_' is defined but never used                              @typescript-eslint/no-unused-vars
  561:13  error  'income' is assigned a value but never used                @typescript-eslint/no-unused-vars
  653:9   error  'frequencyField' is never reassigned. Use 'const' instead  prefer-const
  654:9   error  'controlValue' is never reassigned. Use 'const' instead    prefer-const
  664:9   error  'budgettosave' is never reassigned. Use 'const' instead    prefer-const
  670:18  error  '_' is defined but never used                              @typescript-eslint/no-unused-vars
  682:9   error  'userEmail' is never reassigned. Use 'const' instead       prefer-const
  684:9   error  'budgettosave' is never reassigned. Use 'const' instead    prefer-const

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\data-visualisations\data-visualisations.component.html
   87:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
   92:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
   97:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  102:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  107:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  112:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  117:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  122:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  127:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  132:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  137:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  142:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  147:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  152:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  157:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  162:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  167:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  
  172:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq  

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\data-visualisations\data-visualisations.component.ts
   51:10  error  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
   52:15  error  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
   53:26  error  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
   54:20  error  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
   55:15  error  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
   56:23  error  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
  155:15  error  't' is never reassigned. Use 'const' instead        prefer-const   
  169:11  error  'ue' is never reassigned. Use 'const' instead       prefer-const   
  171:13  error  'address' is never reassigned. Use 'const' instead  prefer-const   

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\data-visualisations\expense-recommendation\expense-recommendation.component.html        
  36:26  error  Expected `===` but received `==`  @angular-eslint/template/eqeqeq   

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\data-visualisations\expense-recommendation\expense-recommendation.component.ts
  30:15  error  'changes' is defined but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\data-visualisations\recommendation-list\recommendation-list.component.ts
  18:9  error  'l' is never reassigned. Use 'const' instead  prefer-const

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\shared\custom-validators\password-confirmation-validator.service.spec.ts
  2:23  error  'FormGroup' is defined but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\shared\services\authentication.service.spec.ts
  225:7  error  'routerSpy' is assigned a value but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\shared\services\repository-service.service.spec.ts
  32:15  error  'mockResponse' is assigned a value but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\shared\services\repository-service.service.ts
  3:22  error  'HttpHeaders' is defined but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\login-user\login-user.component.spec.ts
   2:10  error  'BehaviorSubject' is defined but never used   @typescript-eslint/no-unused-vars
  10:10  error  'MatButtonHarness' is defined but never used  @typescript-eslint/no-unused-vars
  13:10  error  'MatInputHarness' is defined but never used   @typescript-eslint/no-unused-vars
  22:9   error  'loader' is assigned a value but never used   @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\login-user\login-user.component.ts
   7:67  error  'Form' is defined but never used             @typescript-eslint/no-unused-vars
   7:73  error  'AbstractControl' is defined but never used  @typescript-eslint/no-unused-vars
  51:32  error  Unexpected any. Specify a different type     @typescript-eslint/no-explicit-any
  68:17  error  'err' is defined but never used              @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\password-reset\password-reset.component.html
  46:25  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq   

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\password-reset\password-reset.component.spec.ts
   8:34  error  'RouterLink' is defined but never used        @typescript-eslint/no-unused-vars
  19:9   error  'route' is assigned a value but never used    @typescript-eslint/no-unused-vars
  55:13  error  'x' is never reassigned. Use 'const' instead  prefer-const

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\password-reset\password-reset.component.ts
   6:67  error  'Form' is defined but never used               @typescript-eslint/no-unused-vars
  51:11  error  'ue' is never reassigned. Use 'const' instead  prefer-const
  80:44  error  Unexpected any. Specify a different type       @typescript-eslint/no-explicit-any
  89:16  error  '_' is defined but never used                  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\register-user\register-user.component.html
  52:25  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq   

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\register-user\register-user.component.spec.ts
  19:9   error  'route' is assigned a value but never used    @typescript-eslint/no-unused-vars
  77:13  error  'r' is never reassigned. Use 'const' instead  prefer-const

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\register-user\register-user.component.ts
   6:67  error  'Form' is defined but never used            @typescript-eslint/no-unused-vars
   8:18  error  'ActivatedRoute' is defined but never used  @typescript-eslint/no-unused-vars
  58:45  error  Unexpected any. Specify a different type    @typescript-eslint/no-explicit-any
  71:16  error  '_' is defined but never used               @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\user-budget\user-budget.component.html
  16:18  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq   
  84:16  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq   

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\user-budget\user-budget.component.spec.ts
   9:10  error  'UserBudgetResponseDto' is defined but never used       @typescript-eslint/no-unused-vars
  11:10  error  'throwError' is defined but never used                  @typescript-eslint/no-unused-vars
  17:9   error  'router' is assigned a value but never used             @typescript-eslint/no-unused-vars
  18:9   error  'route' is assigned a value but never used              @typescript-eslint/no-unused-vars
  19:9   error  'authServiceSpy' is assigned a value but never used     @typescript-eslint/no-unused-vars
  22:15  error  'authServiceSpyObj' is assigned a value but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\user-budget\user-budget.component.ts
   70:11  error  'ue' is never reassigned. Use 'const' instead       prefer-const   
   72:13  error  'address' is never reassigned. Use 'const' instead  prefer-const   
   90:78  error  '_' is defined but never used                       @typescript-eslint/no-unused-vars
   94:19  error  'tmp' is never reassigned. Use 'const' instead      prefer-const   
  101:77  error  '_' is defined but never used                       @typescript-eslint/no-unused-vars
  105:19  error  'tmp' is never reassigned. Use 'const' instead      prefer-const   

sed-vars
  2:26  error  'Router' is defined but never used          @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\welcome-page\welcome-page.component.ts
  3:10  error  'RouterLink' is defined but never used  @typescript-eslint/no-unused-vars

✖ 99 problems (98 errors, 1 warning)
  28 errors and 0 warnings potentially fixable with the `--fix` option.

Lint warnings found in the listed files.

Lint errors found in the listed files.
rachelrring commented 6 months ago

after running

ng lint --fix

this is the output:

Linting "budget-app"...

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\app.component.ts
  27:3  warning  Lifecycle interface 'OnInit' should be implemented for method 'ngOnInit'. (https://angular.io/styleguide#style-09-01)  @angular-eslint/use-lifecycle-interface

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\budget-planner\budget-planner.component.ts
   44:10  error  Unexpected any. Specify a different type     @typescript-eslint/no-explicit-any
   45:16  error  Unexpected any. Specify a different type     @typescript-eslint/no-explicit-any
  431:20  error  '_' is defined but never used                @typescript-eslint/no-unused-vars
  561:13  error  'income' is assigned a value but never used  @typescript-eslint/no-unused-vars
  670:18  error  '_' is defined but never used                @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\data-visualisations\data-visualisations.component.html
   87:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
   92:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
   97:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  102:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  107:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  112:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  117:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  122:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  127:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  132:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  137:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  142:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  147:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  152:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  157:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  162:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  167:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  172:33  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\data-visualisations\data-visualisations.component.ts
  51:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  52:15  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  53:26  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  54:20  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  55:15  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  56:23  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\data-visualisations\expense-recommendation\expense-recommendation.component.html
  36:26  error  Expected `===` but received `==`  @angular-eslint/template/eqeqeq

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\data-visualisations\expense-recommendation\expense-recommendation.component.ts
  30:15  error  'changes' is defined but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\shared\custom-validators\password-confirmation-validator.service.spec.ts  
  2:23  error  'FormGroup' is defined but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\shared\services\authentication.service.spec.ts
  225:7  error  'routerSpy' is assigned a value but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\shared\services\repository-service.service.spec.ts
  32:15  error  'mockResponse' is assigned a value but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\shared\services\repository-service.service.ts
  3:22  error  'HttpHeaders' is defined but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\login-user\login-user.component.spec.ts
   2:10  error  'BehaviorSubject' is defined but never used   @typescript-eslint/no-unused-vars
  10:10  error  'MatButtonHarness' is defined but never used  @typescript-eslint/no-unused-vars
  13:10  error  'MatInputHarness' is defined but never used   @typescript-eslint/no-unused-vars
  22:9   error  'loader' is assigned a value but never used   @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\login-user\login-user.component.ts
   7:67  error  'Form' is defined but never used             @typescript-eslint/no-unused-vars
   7:73  error  'AbstractControl' is defined but never used  @typescript-eslint/no-unused-vars
  51:32  error  Unexpected any. Specify a different type     @typescript-eslint/no-explicit-any
  68:17  error  'err' is defined but never used              @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\password-reset\password-reset.component.html
  46:25  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\password-reset\password-reset.component.spec.ts
   8:34  error  'RouterLink' is defined but never used      @typescript-eslint/no-unused-vars
  19:9   error  'route' is assigned a value but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\password-reset\password-reset.component.ts
   6:67  error  'Form' is defined but never used          @typescript-eslint/no-unused-vars
  80:44  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  89:16  error  '_' is defined but never used             @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\register-user\register-user.component.html
  52:25  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\register-user\register-user.component.spec.ts
  19:9  error  'route' is assigned a value but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\register-user\register-user.component.ts
   6:67  error  'Form' is defined but never used            @typescript-eslint/no-unused-vars
   8:18  error  'ActivatedRoute' is defined but never used  @typescript-eslint/no-unused-vars
  58:45  error  Unexpected any. Specify a different type    @typescript-eslint/no-explicit-any
  71:16  error  '_' is defined but never used               @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\user-budget\user-budget.component.html
  16:18  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq
  84:16  error  Expected `!==` but received `!=`  @angular-eslint/template/eqeqeq

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\user-budget\user-budget.component.spec.ts
   9:10  error  'UserBudgetResponseDto' is defined but never used       @typescript-eslint/no-unused-vars
  11:10  error  'throwError' is defined but never used                  @typescript-eslint/no-unused-vars
  17:9   error  'router' is assigned a value but never used             @typescript-eslint/no-unused-vars
  18:9   error  'route' is assigned a value but never used              @typescript-eslint/no-unused-vars
  19:9   error  'authServiceSpy' is assigned a value but never used     @typescript-eslint/no-unused-vars
  22:15  error  'authServiceSpyObj' is assigned a value but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\user\user-budget\user-budget.component.ts
   90:78  error  '_' is defined but never used  @typescript-eslint/no-unused-vars
  101:77  error  '_' is defined but never used  @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\welcome-page\welcome-page.component.spec.ts
  2:10  error  'ActivatedRoute' is defined but never used  @typescript-eslint/no-unused-vars
  2:26  error  'Router' is defined but never used          @typescript-eslint/no-unused-vars

C:\Users\Rachel\year 4\code-and-docs-rachelrring\client-side\budget-app\src\app\welcome-page\welcome-page.component.ts
  3:10  error  'RouterLink' is defined but never used  @typescript-eslint/no-unused-vars

✖ 69 problems (68 errors, 1 warning)

Lint warnings found in the listed files.

Lint errors found in the listed files.