Skip to content

Fix functions as object names in go snippets #3309

Fix functions as object names in go snippets

Fix functions as object names in go snippets #3309

Triggered via pull request May 16, 2024 12:44
Status Success
Total duration 4m 5s
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/GoGenerator.cs#L17
Remove the unused private field 'clientVarType'. (https://rules.sonarsource.com/csharp/RSPEC-1144)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L18
Remove the unused private field 'clientFactoryVariables'. (https://rules.sonarsource.com/csharp/RSPEC-1144)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L204
"Find" method should be used instead of the "FirstOrDefault" extension method. (https://rules.sonarsource.com/csharp/RSPEC-6602)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L321
Extract this nested ternary operation into an independent statement. (https://rules.sonarsource.com/csharp/RSPEC-3358)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L322
Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L322
Remove this unnecessary check for null. Some code paths are unreachable. (https://rules.sonarsource.com/csharp/RSPEC-2583)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L396
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#L461
Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)
Build: CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs#L485
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#L644
Indexing at Count-1 should be used instead of the "Enumerable" extension method "Last" (https://rules.sonarsource.com/csharp/RSPEC-6608)