Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Rule: ExcludeFromCodeCoverage attributes should include a justification #6593

Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a31056a
Crreate analyzers.
Dec 24, 2022
052c78b
Support null string.empty and whitsepace, ignore older versions of .NET.
Mar 9, 2023
fa7c65d
390+
Mar 9, 2023
830ccb5
Update analyzers/src/SonarAnalyzer.Common/Rules/ExcludeFromCodeCovera…
Corniel Mar 9, 2023
9dfe3e1
Update analyzers/tests/SonarAnalyzer.UnitTest/Rules/ExcludeFromCodeCo…
Corniel Mar 9, 2023
5f215a6
Update analyzers/tests/SonarAnalyzer.UnitTest/TestCases/ExcludeFromCo…
Corniel Mar 9, 2023
530a0ae
Get Justification content.
Mar 9, 2023
22535ed
Oops.
Mar 9, 2023
77c9a98
Update analyzers/src/SonarAnalyzer.Common/Rules/ExcludeFromCodeCovera…
Corniel Mar 9, 2023
5b7e905
Add test case to indicate type alias support.
Mar 9, 2023
3fe1bd4
Merge branch 'corniel/justify-exclude-from-code-coverage' of https://…
Mar 9, 2023
b537f13
Added comment.
Mar 9, 2023
93469be
Update analyzers/src/SonarAnalyzer.Common/Rules/ExcludeFromCodeCovera…
Corniel Mar 9, 2023
f285304
Move comment,
Mar 9, 2023
5098ff3
Merge branch 'corniel/justify-exclude-from-code-coverage' of https://…
Mar 9, 2023
5a5e61a
Indentation fix.
Mar 10, 2023
c46bd1c
Update analyzers/src/SonarAnalyzer.Common/Rules/ExcludeFromCodeCovera…
Corniel Mar 13, 2023
7d7bff5
Update analyzers/src/SonarAnalyzer.Common/Rules/ExcludeFromCodeCovera…
Corniel Mar 13, 2023
4e43f03
Run rspec script.
martin-strecker-sonarsource Mar 13, 2023
916c251
Whitespace
martin-strecker-sonarsource Mar 13, 2023
2342fd4
Update RSpec
martin-strecker-sonarsource Mar 14, 2023
bf74d6a
Fix file header
martin-strecker-sonarsource Mar 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update analyzers/tests/SonarAnalyzer.UnitTest/TestCases/ExcludeFromCo…
…deCoverageAttributesNeedJustification.net48.cs

Co-authored-by: Martin Strecker <103252490+martin-strecker-sonarsource@users.noreply.github.com>
  • Loading branch information
Corniel and martin-strecker-sonarsource authored Mar 9, 2023
commit 5f215a66913122efd452bf20b5555bf249015bbf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Ignores
[ExcludeFromCodeCoverage(Justification = "not existing")] // Error[CS0246]
void JustifcationDoesNotExist() { }

[ExcludeFromCodeCoverage()]
[ExcludeFromCodeCoverage()] // Compliant: "Justification" property was added in .Net 5
void WithBrackets() { }

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
Expand Down