Skip to content

Commit

Permalink
S4790 FN: Add repro (#8807)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-paidis-sonarsource authored Feb 26, 2024
1 parent 0a21d98 commit 212af52
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,17 @@ void NewlinesInStringInterpolation()
part2}}"""); // FN (at the moment we validate only constant string)
}
}

// All the new .NET5 methods should be taken into consideration
// https://github.com/SonarSource/sonar-dotnet/issues/8758
public class Repro_FN_8758
{
void Method()
{
var data = new byte[42];
using var stream = new System.IO.MemoryStream(data);
SHA1.HashData(stream); // FN
SHA1.HashData(data); // FN
}
}
}

0 comments on commit 212af52

Please sign in to comment.