You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
makes the offending method private, but it should suggest so only if it isn't used anywhere else. Not sure if this can be done, but it should definitely be possible to reduce false positives.
The text was updated successfully, but these errors were encountered:
@Bartleby2718 Yes, the wording could be improved, to something like The non-test method is not private.
Unfortunately there is no way to see if the method is used elsewhere. The analyzer pass only knows about the current "file", not about others. The code fix is to help, not blindly follow. If method are really used it would involve moving the method to another helper class or so.
Problem 1:
nunit.analyzers/src/nunit.analyzers/NonTestMethodAccessibilityLevel/NonTestMethodAccessibilityLevelAnalyzer.cs
Lines 63 to 75 in e52e3a1
clearly says that NUnit1028 detects public or internal methods, but the title, message, and description don't mention
internal
:nunit.analyzers/src/nunit.analyzers/NonTestMethodAccessibilityLevel/NonTestMethodAccessibilityLevelConstants.cs
Lines 5 to 7 in e52e3a1
Problem 2:
nunit.analyzers/src/nunit.analyzers/NonTestMethodAccessibilityLevel/NonTestMethodAccessibilityLevelCodeFix.cs
Lines 61 to 101 in e52e3a1
private
, but it should suggest so only if it isn't used anywhere else. Not sure if this can be done, but it should definitely be possible to reduce false positives.The text was updated successfully, but these errors were encountered: