Skip to content

Tests that make sure user provided implementations of interfaces have expected ServiceLifetime #2475

Tests that make sure user provided implementations of interfaces have expected ServiceLifetime

Tests that make sure user provided implementations of interfaces have expected ServiceLifetime #2475

Triggered via pull request September 20, 2024 06:39
Status Success
Total duration 8m 7s
Artifacts

test-and-analyze.yml

on: pull_request
Static code analysis
7m 53s
Static code analysis
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Static code analysis: src/Altinn.App.Internal.Analyzers/AppImplementationInjectionAnalyzer.cs#L82
Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)
Static code analysis: src/Altinn.App.Internal.Analyzers/AppImplementationInjectionAnalyzer.cs#L9
Initialize all 'static fields' inline and remove the 'static constructor'. (https://rules.sonarsource.com/csharp/RSPEC-3963)
Static code analysis: src/Altinn.App.Internal.Analyzers/AppImplementationInjectionAnalyzer.cs#L77
Refactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)
Static code analysis: src/Altinn.App.Internal.Analyzers/AppImplementationInjectionAnalyzer.cs#L180
Loop should be simplified by calling Select(parameter => parameter.Type)) (https://rules.sonarsource.com/csharp/RSPEC-3267)
Static code analysis: src/Altinn.App.Core/EFormidling/Implementation/DefaultEFormidlingService.cs#L41
Constructor has 10 parameters, which is greater than the 7 authorized. (https://rules.sonarsource.com/csharp/RSPEC-107)
Static code analysis: src/Altinn.App.Core/EFormidling/Implementation/DefaultEFormidlingService.cs#L132
'System.Exception' should not be thrown by user code. (https://rules.sonarsource.com/csharp/RSPEC-112)
Static code analysis: src/Altinn.App.Core/EFormidling/Implementation/DefaultEFormidlingService.cs#L120
Logging in a catch clause should pass the caught exception as a parameter. (https://rules.sonarsource.com/csharp/RSPEC-6667)
Static code analysis: src/Altinn.App.Api/Controllers/TextsController.cs#L33
ModelState.IsValid should be checked in controller actions. (https://rules.sonarsource.com/csharp/RSPEC-6967)
Static code analysis: src/Altinn.App.Api/Controllers/StatelessDataController.cs#L82
ModelState.IsValid should be checked in controller actions. (https://rules.sonarsource.com/csharp/RSPEC-6967)
Static code analysis: src/Altinn.App.Api/Controllers/StatelessDataController.cs#L163
ModelState.IsValid should be checked in controller actions. (https://rules.sonarsource.com/csharp/RSPEC-6967)