Sonar-dotnet: Fix S1172 FP: Issue is raised when parameter is used in tuple creation

Created on 25 Mar 2020  路  3Comments  路  Source: SonarSource/sonar-dotnet

As reported on this community thread

Description

C# public string UsedInTuple(string value) // Noncompliant FP { var x = (value, 7); return x.value; }

Related information

  • SonarC# 8.5
C# C#8 CFG False Positive

Most helpful comment

Hi @markusschaber, we don't have any specific estimation. Rough guess is that we'll try to fix this until January 2021.

All 3 comments

This is still reproducible when latest master DLL is referenced directly from a project (v8.6.1).
But it's not reproducible inside a test (see this commit

  <ItemGroup>
    <Analyzer Include="c:\Projects\sonar-dotnet\sonaranalyzer-dotnet\src\SonarAnalyzer.CSharp\bin\Debug\net46\\Google.Protobuf.dll" />
    <Analyzer Include="c:\Projects\sonar-dotnet\sonaranalyzer-dotnet\src\SonarAnalyzer.CSharp\bin\Debug\net46\\SonarAnalyzer.CFG.dll" />
    <Analyzer Include="c:\Projects\sonar-dotnet\sonaranalyzer-dotnet\src\SonarAnalyzer.CSharp\bin\Debug\net46\\SonarAnalyzer.CSharp.dll" />
    <Analyzer Include="c:\Projects\sonar-dotnet\sonaranalyzer-dotnet\src\SonarAnalyzer.CSharp\bin\Debug\net46\\SonarAnalyzer.dll" />
  </ItemGroup>

Just stumbled across this in our code. Any estimate when a fix for this will be released?

Hi @markusschaber, we don't have any specific estimation. Rough guess is that we'll try to fix this until January 2021.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SasikumarJonnadula picture SasikumarJonnadula  路  4Comments

Corniel picture Corniel  路  4Comments

franciscoarturoalonso picture franciscoarturoalonso  路  5Comments

valhristov picture valhristov  路  4Comments

rjgotten picture rjgotten  路  5Comments