Skip to content

fix: Remove normalization for map keys in go snippets #3343

fix: Remove normalization for map keys in go snippets

fix: Remove normalization for map keys in go snippets #3343

Triggered via pull request May 27, 2024 09:32
Status Success
Total duration 3m 52s
Artifacts

sonarcloud.yml

on: pull_request
check if SONAR_TOKEN is set in github secrets
0s
check if SONAR_TOKEN is set in github secrets
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs#L124
The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern '""' is not covered.
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs#L81
The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern '""' is not covered.
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L202
"Find" method should be used instead of the "FirstOrDefault" extension method. (https://rules.sonarsource.com/csharp/RSPEC-6602)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L319
Extract this nested ternary operation into an independent statement. (https://rules.sonarsource.com/csharp/RSPEC-3358)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L320
Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L320
Remove this unnecessary check for null. Some code paths are unreachable. (https://rules.sonarsource.com/csharp/RSPEC-2583)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L394
Indexing at 0 should be used instead of the "Enumerable" extension method "First" (https://rules.sonarsource.com/csharp/RSPEC-6608)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L459
Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L483
Refactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L642
Indexing at Count-1 should be used instead of the "Enumerable" extension method "Last" (https://rules.sonarsource.com/csharp/RSPEC-6608)