diff --git a/java-frontend/src/main/java/org/sonar/java/SonarComponents.java b/java-frontend/src/main/java/org/sonar/java/SonarComponents.java index f2bce885af5..72e6225d221 100644 --- a/java-frontend/src/main/java/org/sonar/java/SonarComponents.java +++ b/java-frontend/src/main/java/org/sonar/java/SonarComponents.java @@ -87,8 +87,9 @@ public class SonarComponents { public static final String SONAR_BATCH_SIZE_KEY = "sonar.java.experimental.batchModeSizeInKB"; public static final String SONAR_FILE_BY_FILE = "sonar.java.fileByFile"; /** - * Enables optimized analysis of unchanged by skipping some checks. - * Defaults to true. + * Describes if an optimized analysis of unchanged by skipping some rules is enabled. + * By default, the property is not set (null), leaving SQ/SC to decide whether to enable this behavior. + * Setting it to true or false, forces the behavior from the analyzer independently of the server. */ public static final String SONAR_CAN_SKIP_UNCHANGED_FILES_KEY = "sonar.java.skipUnchanged"; diff --git a/sonar-java-plugin/src/main/resources/static/documentation.md b/sonar-java-plugin/src/main/resources/static/documentation.md index 67fcd1d2d4a..f05fbc1571d 100644 --- a/sonar-java-plugin/src/main/resources/static/documentation.md +++ b/sonar-java-plugin/src/main/resources/static/documentation.md @@ -78,12 +78,12 @@ In practice, this means that on a file that has not changed, the analyzer only r To get a better understanding of the rule exclusion mechanism, keep in mind that: * Rules that need to run on multiple files to decide whether they need to raise issues are always executed * Rules that need to run at the end of the analysis to decide whether they need to raise issues are always executed -* Rules that are defined out of the `sonar.java.checks` package are always executed +* Rules that are defined outside of the `sonar.java.checks` package are always executed This last criteria implies that [custom rules](https://redirect.sonarsource.com/doc/java-custom-rules-guide.html) cannot be skipped. If you wish to disable this optimization, you can set the value of the analysis parameter `sonar.java.skipUnchanged` to `false`. -Leaving the parameter untouched is equivalent to having `sonar.java.skipUnchanged` set to `true`. +Leaving the parameter unset lets the server decide whether the optimization should be enabled. ## Analyzing JSP and Thymeleaf for XSS vulnerabilities