[go: nahoru, domu]

Skip to content

Commit

Permalink
Disabling only the package private unused detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlahoda committed Apr 21, 2024
1 parent 72f3133 commit d09a254
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public Preferences getFilePreferences(FileObject file, String mimeType) {

Preferences testPreferences = NbPreferences.forModule(FileHintPreferencesProvider.class).node("jtreg");
Preferences unusedHintNode = testPreferences.node("org.netbeans.modules.java.hints.bugs.Unused");
if ("undefined".equals(unusedHintNode.get("enabled", "undefined"))) {
if ("undefined".equals(unusedHintNode.get("detect.unused.package.private", "undefined"))) {
//unused elements are common in tests, and often not bugs/problematic
//better disable the unused element hint in tests, to avoid too many false positives
//(note semantic highlighting should still mark them):
unusedHintNode.putBoolean("enabled", false);
unusedHintNode.putBoolean("detect.unused.package.private", false);
}

return testPreferences;
Expand Down

0 comments on commit d09a254

Please sign in to comment.