diff --git a/404.html b/404.html index 3359856b19..56945d4b4f 100644 --- a/404.html +++ b/404.html @@ -1446,7 +1446,7 @@
diff --git a/feed.xml b/feed.xml index 686f711eb3..88b40e505f 100644 --- a/feed.xml +++ b/feed.xml @@ -5,8 +5,8 @@ Intended as a documentation theme based on Jekyll for technical writers documenting software and other technical products, this theme has all the elements you would need to handle multiple products with both multi-level sidebar navigation, tags, and other documentation features. https://pmd.github.io/pmd/ - Thu, 03 Mar 2022 16:43:15 +0000 - Thu, 03 Mar 2022 16:43:15 +0000 + Thu, 10 Mar 2022 10:10:07 +0000 + Thu, 10 Mar 2022 10:10:07 +0000 Jekyll v3.9.0 diff --git a/index.html b/index.html index fa0aa16b75..50fecc798d 100644 --- a/index.html +++ b/index.html @@ -6531,7 +6531,7 @@ $('#filter a').click(function (e) {
diff --git a/js/mydoc_scroll.html b/js/mydoc_scroll.html index a1df341301..5ad11cfccd 100644 --- a/js/mydoc_scroll.html +++ b/js/mydoc_scroll.html @@ -1680,7 +1680,7 @@ $('#small-box-links').localScroll({
diff --git a/license.html b/license.html index 8628df13fa..de37389343 100644 --- a/license.html +++ b/license.html @@ -1690,7 +1690,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/news.html b/news.html index ebf87003c8..a6ba0bf6ba 100644 --- a/news.html +++ b/news.html @@ -1455,7 +1455,7 @@
diff --git a/news_archive.html b/news_archive.html index 9c3d68e406..c0ee7fca7c 100644 --- a/news_archive.html +++ b/news_archive.html @@ -1456,7 +1456,7 @@
diff --git a/pmd_about_help.html b/pmd_about_help.html index ff6605ec53..8f09c01e67 100644 --- a/pmd_about_help.html +++ b/pmd_about_help.html @@ -1466,7 +1466,7 @@ through the archives (archive1 diff --git a/pmd_apex_metrics_index.html b/pmd_apex_metrics_index.html index 87a5ce8dc8..4b8f0f12e3 100644 --- a/pmd_apex_metrics_index.html +++ b/pmd_apex_metrics_index.html @@ -1534,7 +1534,7 @@ flow statement.
diff --git a/pmd_devdocs_building.html b/pmd_devdocs_building.html index 7411515128..cec8e9437f 100644 --- a/pmd_devdocs_building.html +++ b/pmd_devdocs_building.html @@ -1537,7 +1537,7 @@ please post here an
diff --git a/pmd_devdocs_development.html b/pmd_devdocs_development.html index f693073661..9fe5270630 100644 --- a/pmd_devdocs_development.html +++ b/pmd_devdocs_development.html @@ -1484,7 +1484,7 @@ every push. Each pull request is built as well.

diff --git a/pmd_devdocs_experimental_ast_dump.html b/pmd_devdocs_experimental_ast_dump.html index 5df2886065..701d31db43 100644 --- a/pmd_devdocs_experimental_ast_dump.html +++ b/pmd_devdocs_experimental_ast_dump.html @@ -1554,7 +1554,7 @@ with the name “a”.

diff --git a/pmd_devdocs_how_pmd_works.html b/pmd_devdocs_how_pmd_works.html index 1aed4271a7..ff956d292f 100644 --- a/pmd_devdocs_how_pmd_works.html +++ b/pmd_devdocs_how_pmd_works.html @@ -1500,7 +1500,7 @@ type resolution information and DFA nodes.
diff --git a/pmd_devdocs_major_adding_new_cpd_language.html b/pmd_devdocs_major_adding_new_cpd_language.html index 0c6e8cc2a4..eb8558bc2c 100644 --- a/pmd_devdocs_major_adding_new_cpd_language.html +++ b/pmd_devdocs_major_adding_new_cpd_language.html @@ -1599,7 +1599,7 @@ call the method doTest
diff --git a/pmd_devdocs_major_adding_new_language.html b/pmd_devdocs_major_adding_new_language.html index 233d0de621..542fbdd5bc 100644 --- a/pmd_devdocs_major_adding_new_language.html +++ b/pmd_devdocs_major_adding_new_language.html @@ -1646,7 +1646,7 @@ This can be achieved with Rule Designer:

diff --git a/pmd_devdocs_major_adding_new_metrics_framework.html b/pmd_devdocs_major_adding_new_metrics_framework.html index 182680b825..e9329efa56 100644 --- a/pmd_devdocs_major_adding_new_metrics_framework.html +++ b/pmd_devdocs_major_adding_new_metrics_framework.html @@ -1499,7 +1499,7 @@ build a Signature<N> diff --git a/pmd_devdocs_major_rule_guidelines.html b/pmd_devdocs_major_rule_guidelines.html index 59264911cc..2a88f68924 100644 --- a/pmd_devdocs_major_rule_guidelines.html +++ b/pmd_devdocs_major_rule_guidelines.html @@ -1550,7 +1550,7 @@ non-private”).
diff --git a/pmd_devdocs_pmdtester.html b/pmd_devdocs_pmdtester.html index fbf3673cf5..9a6f66c6cb 100644 --- a/pmd_devdocs_pmdtester.html +++ b/pmd_devdocs_pmdtester.html @@ -1468,7 +1468,7 @@ Regression difference reports are commented back to the PR for the reviewer’s
diff --git a/pmd_devdocs_roadmap.html b/pmd_devdocs_roadmap.html index afc71e28bd..8536652c91 100644 --- a/pmd_devdocs_roadmap.html +++ b/pmd_devdocs_roadmap.html @@ -1589,7 +1589,7 @@ This should be configurable on per Rule basis similar to TR and SymbolTable.

diff --git a/pmd_devdocs_rule_deprecation_policy.html b/pmd_devdocs_rule_deprecation_policy.html index af315706b9..472174574d 100644 --- a/pmd_devdocs_rule_deprecation_policy.html +++ b/pmd_devdocs_rule_deprecation_policy.html @@ -1558,7 +1558,7 @@ major release of PMD.

diff --git a/pmd_devdocs_writing_documentation.html b/pmd_devdocs_writing_documentation.html index c4908e78d7..259b0237c8 100644 --- a/pmd_devdocs_writing_documentation.html +++ b/pmd_devdocs_writing_documentation.html @@ -1705,7 +1705,7 @@ by specifying -Dpmd.doc.check
diff --git a/pmd_java_metrics_index.html b/pmd_java_metrics_index.html index c6e41a946e..5a4f612366 100644 --- a/pmd_java_metrics_index.html +++ b/pmd_java_metrics_index.html @@ -1877,7 +1877,7 @@ In Proceedings ACM Symposium on Software Reusability, 1995.

diff --git a/pmd_languages_jsp.html b/pmd_languages_jsp.html index 7eb2d3ccce..5d86a56352 100644 --- a/pmd_languages_jsp.html +++ b/pmd_languages_jsp.html @@ -1499,7 +1499,7 @@ contains only “.java” files, JSP files obviously will not be checked.

diff --git a/pmd_languages_plsql.html b/pmd_languages_plsql.html index 961edea07f..f24a113e39 100644 --- a/pmd_languages_plsql.html +++ b/pmd_languages_plsql.html @@ -1486,7 +1486,7 @@ a custom XPath rule with the following expression:

diff --git a/pmd_languages_visualforce.html b/pmd_languages_visualforce.html index cbd64d1646..f3d9c89fe5 100644 --- a/pmd_languages_visualforce.html +++ b/pmd_languages_visualforce.html @@ -1485,7 +1485,7 @@ the needed data.

diff --git a/pmd_next_major_development.html b/pmd_next_major_development.html index c8c62fe6d7..110d09581c 100644 --- a/pmd_next_major_development.html +++ b/pmd_next_major_development.html @@ -3198,7 +3198,7 @@ new rule UnnecessaryBoxing diff --git a/pmd_projectdocs_committers_infrastructure.html b/pmd_projectdocs_committers_infrastructure.html index eb5d047b36..f205b21a2f 100644 --- a/pmd_projectdocs_committers_infrastructure.html +++ b/pmd_projectdocs_committers_infrastructure.html @@ -1530,7 +1530,7 @@ Login is via github.
diff --git a/pmd_projectdocs_committers_main_landing_page.html b/pmd_projectdocs_committers_main_landing_page.html index dd4292e712..eb0e482f25 100644 --- a/pmd_projectdocs_committers_main_landing_page.html +++ b/pmd_projectdocs_committers_main_landing_page.html @@ -1538,7 +1538,7 @@ the new post is recognized and added to the news section and also on the news su
diff --git a/pmd_projectdocs_committers_merging_pull_requests.html b/pmd_projectdocs_committers_merging_pull_requests.html index 0e72929e17..f7a7417d8e 100644 --- a/pmd_projectdocs_committers_merging_pull_requests.html +++ b/pmd_projectdocs_committers_merging_pull_requests.html @@ -1643,7 +1643,7 @@ integrated (e.g. gitk and github show the branches, from which the specific comm
diff --git a/pmd_projectdocs_committers_releasing.html b/pmd_projectdocs_committers_releasing.html index 63e456f947..e29a05e564 100644 --- a/pmd_projectdocs_committers_releasing.html +++ b/pmd_projectdocs_committers_releasing.html @@ -1846,7 +1846,7 @@ the maintenance branch needs to be set.

diff --git a/pmd_projectdocs_credits.html b/pmd_projectdocs_credits.html index 6adbeb6701..8d1867a2d2 100644 --- a/pmd_projectdocs_credits.html +++ b/pmd_projectdocs_credits.html @@ -2906,7 +2906,7 @@ PMD scoreboard formulas, pmd-dcpd optimizations
diff --git a/pmd_projectdocs_faq.html b/pmd_projectdocs_faq.html index 406f92f93d..142c5f5df4 100644 --- a/pmd_projectdocs_faq.html +++ b/pmd_projectdocs_faq.html @@ -1493,7 +1493,7 @@ You must take this into account for certain rules.

diff --git a/pmd_projectdocs_trivia_meaning.html b/pmd_projectdocs_trivia_meaning.html index 98d14ba6ac..2b46f2b428 100644 --- a/pmd_projectdocs_trivia_meaning.html +++ b/pmd_projectdocs_trivia_meaning.html @@ -1462,7 +1462,7 @@ really know. We just think the letters sound good together.

diff --git a/pmd_projectdocs_trivia_news.html b/pmd_projectdocs_trivia_news.html index bf0d71499c..d998d293df 100644 --- a/pmd_projectdocs_trivia_news.html +++ b/pmd_projectdocs_trivia_news.html @@ -1582,7 +1582,7 @@ interview with Ole-Martin and Tom

diff --git a/pmd_projectdocs_trivia_products.html b/pmd_projectdocs_trivia_products.html index c619e6340d..53f8de046d 100644 --- a/pmd_projectdocs_trivia_products.html +++ b/pmd_projectdocs_trivia_products.html @@ -1510,7 +1510,7 @@ to catch web app security problems. Thanks to Joseph Hemler for the props!

diff --git a/pmd_projectdocs_trivia_similarprojects.html b/pmd_projectdocs_trivia_similarprojects.html index b719bff13a..753b5ee7ca 100644 --- a/pmd_projectdocs_trivia_similarprojects.html +++ b/pmd_projectdocs_trivia_similarprojects.html @@ -1517,7 +1517,7 @@ only for maven project.
diff --git a/pmd_release_notes.html b/pmd_release_notes.html index b7a635a270..f5ef200008 100644 --- a/pmd_release_notes.html +++ b/pmd_release_notes.html @@ -1446,13 +1446,14 @@ and a config.setInputPaths("src/main/java"); config.prependAuxClasspath("target/classes"); config.setMinimumPriority(RulePriority.HIGH); -config.setRuleSets("rulesets/java/quickstart.xml"); +config.addRuleSet("rulesets/java/quickstart.xml"); config.setReportFormat("xml"); config.setReportFile("target/pmd-report.xml"); try (PmdAnalysis pmd = PmdAnalysis.create(config)) { + // note: don't use `config` once a PmdAnalysis has been created. // optional: add more rulesets - pmd.addRuleSet(RuleSetLoader.fromPmdConfig(configuration).loadFromResource("custom-ruleset.xml")); + pmd.addRuleSet(pmd.newRuleSetLoader().loadFromResource("custom-ruleset.xml")); // optional: add more files pmd.files().addFile(Paths.get("src", "main", "more-java", "ExtraSource.java")); // optional: add more renderers @@ -1475,6 +1476,11 @@ The CLI itself remains compatible, if you run PMD via command-line, no action is
  • #3773: [apex] EagerlyLoadedDescribeSObjectResult false positives with SObjectField.getDescribe()
  • +
  • core +
      +
    • #3299: [core] Deprecate system properties of PMDCommandLineInterface
    • +
    +
  • API Changes

    @@ -1492,6 +1498,15 @@ The CLI itself remains compatible, if you run PMD via command-line, no action is
  • PMDConfiguration#prependClasspath is deprecated in favour of prependAuxClasspath.
  • +
  • PMDConfiguration#setRuleSets and +getRuleSets are deprecated. Use instead +setRuleSets, +addRuleSet, +and getRuleSetPaths.
  • +
  • Several members of BaseCLITest have been deprecated with replacements.
  • +
  • Several members of PMDCommandLineInterface have been explicitly deprecated. +The whole class however was deprecated long ago already with 6.30.0. It is internal API and should +not be used.
  • Experimental APIs

    @@ -1530,7 +1545,7 @@ decouples you from this. A file collector is available through diff --git a/pmd_release_notes_old.html b/pmd_release_notes_old.html index 3c7a1ad961..d3c5244a7c 100644 --- a/pmd_release_notes_old.html +++ b/pmd_release_notes_old.html @@ -15156,7 +15156,7 @@ Added new HTML report format
    diff --git a/pmd_rules_apex.html b/pmd_rules_apex.html index 45552aefec..6968662b3c 100644 --- a/pmd_rules_apex.html +++ b/pmd_rules_apex.html @@ -1661,7 +1661,7 @@
    diff --git a/pmd_rules_apex_bestpractices.html b/pmd_rules_apex_bestpractices.html index 788e99c983..851364ad3a 100644 --- a/pmd_rules_apex_bestpractices.html +++ b/pmd_rules_apex_bestpractices.html @@ -1977,7 +1977,7 @@ Therefore delegate the triggers work to a regular class (often called Trigger ha
    diff --git a/pmd_rules_apex_codestyle.html b/pmd_rules_apex_codestyle.html index 8a21d66cc4..c1a607bbdc 100644 --- a/pmd_rules_apex_codestyle.html +++ b/pmd_rules_apex_codestyle.html @@ -2538,7 +2538,7 @@ controlled from the rest.

    diff --git a/pmd_rules_apex_design.html b/pmd_rules_apex_design.html index 87a01e6d8a..e37f5a3352 100644 --- a/pmd_rules_apex_design.html +++ b/pmd_rules_apex_design.html @@ -2488,7 +2488,7 @@ city/state/zip fields could park them within a single Address field.

    diff --git a/pmd_rules_apex_documentation.html b/pmd_rules_apex_documentation.html index bb093e0ee5..6466dd83c6 100644 --- a/pmd_rules_apex_documentation.html +++ b/pmd_rules_apex_documentation.html @@ -1558,7 +1558,7 @@ By setting reportProperty diff --git a/pmd_rules_apex_errorprone.html b/pmd_rules_apex_errorprone.html index 90f1ceb175..8874945e9c 100644 --- a/pmd_rules_apex_errorprone.html +++ b/pmd_rules_apex_errorprone.html @@ -2382,7 +2382,7 @@ dealing with legacy code.

    diff --git a/pmd_rules_apex_performance.html b/pmd_rules_apex_performance.html index 5aea5a002d..546522001d 100644 --- a/pmd_rules_apex_performance.html +++ b/pmd_rules_apex_performance.html @@ -1925,7 +1925,7 @@ to be consistent across different contexts and API versions.

    diff --git a/pmd_rules_apex_security.html b/pmd_rules_apex_security.html index 936995cf9b..39476a6771 100644 --- a/pmd_rules_apex_security.html +++ b/pmd_rules_apex_security.html @@ -2272,7 +2272,7 @@ to avoid XSS attacks.

    diff --git a/pmd_rules_ecmascript.html b/pmd_rules_ecmascript.html index 6e67ebe204..11bb175ab4 100644 --- a/pmd_rules_ecmascript.html +++ b/pmd_rules_ecmascript.html @@ -1533,7 +1533,7 @@
    diff --git a/pmd_rules_ecmascript_bestpractices.html b/pmd_rules_ecmascript_bestpractices.html index 877557a4db..8b09c1ff9d 100644 --- a/pmd_rules_ecmascript_bestpractices.html +++ b/pmd_rules_ecmascript_bestpractices.html @@ -1657,7 +1657,7 @@ It also improves readability, if the base is given.

    diff --git a/pmd_rules_ecmascript_codestyle.html b/pmd_rules_ecmascript_codestyle.html index b06d9d0e89..00b215031b 100644 --- a/pmd_rules_ecmascript_codestyle.html +++ b/pmd_rules_ecmascript_codestyle.html @@ -1799,7 +1799,7 @@ will never execute. This is a bug, or extremely poor style.

    diff --git a/pmd_rules_ecmascript_errorprone.html b/pmd_rules_ecmascript_errorprone.html index 8c15f3b113..226a3f9ec9 100644 --- a/pmd_rules_ecmascript_errorprone.html +++ b/pmd_rules_ecmascript_errorprone.html @@ -1580,7 +1580,7 @@ precision in a floating point number. This may result in numeric calculations b
    diff --git a/pmd_rules_java.html b/pmd_rules_java.html index 146f892f26..c43f363f4c 100644 --- a/pmd_rules_java.html +++ b/pmd_rules_java.html @@ -2108,7 +2108,7 @@
    diff --git a/pmd_rules_java_bestpractices.html b/pmd_rules_java_bestpractices.html index 576af24167..102183a26a 100644 --- a/pmd_rules_java_bestpractices.html +++ b/pmd_rules_java_bestpractices.html @@ -3961,7 +3961,7 @@ a block {} is sufficie
    diff --git a/pmd_rules_java_codestyle.html b/pmd_rules_java_codestyle.html index 8589a5580c..28f715b177 100644 --- a/pmd_rules_java_codestyle.html +++ b/pmd_rules_java_codestyle.html @@ -4754,7 +4754,7 @@ by the rule
    diff --git a/pmd_rules_java_design.html b/pmd_rules_java_design.html index 3ca8235201..836472f2cf 100644 --- a/pmd_rules_java_design.html +++ b/pmd_rules_java_design.html @@ -4133,7 +4133,7 @@ remember to add a private constructor to prevent instantiation.
    diff --git a/pmd_rules_java_documentation.html b/pmd_rules_java_documentation.html index 08345d86ea..ce86621176 100644 --- a/pmd_rules_java_documentation.html +++ b/pmd_rules_java_documentation.html @@ -1769,7 +1769,7 @@ empty methods.

    diff --git a/pmd_rules_java_errorprone.html b/pmd_rules_java_errorprone.html index 0feceb8960..1fb49e3894 100644 --- a/pmd_rules_java_errorprone.html +++ b/pmd_rules_java_errorprone.html @@ -5514,7 +5514,7 @@ Thread.currentThread().getContextClassLoader() instead.

    diff --git a/pmd_rules_java_multithreading.html b/pmd_rules_java_multithreading.html index 34d95b4143..23717f4e4b 100644 --- a/pmd_rules_java_multithreading.html +++ b/pmd_rules_java_multithreading.html @@ -1955,7 +1955,7 @@ one is chosen. The thread chosen is arbitrary; thus its usually safer to call n
    diff --git a/pmd_rules_java_performance.html b/pmd_rules_java_performance.html index 521ea2b97b..29757266f5 100644 --- a/pmd_rules_java_performance.html +++ b/pmd_rules_java_performance.html @@ -2622,7 +2622,7 @@ or StringBuffer.toString().length() == …

    diff --git a/pmd_rules_java_security.html b/pmd_rules_java_security.html index 1052212a7c..431b0d6f74 100644 --- a/pmd_rules_java_security.html +++ b/pmd_rules_java_security.html @@ -1506,7 +1506,7 @@
    diff --git a/pmd_rules_jsp.html b/pmd_rules_jsp.html index a8666ce175..68b5172296 100644 --- a/pmd_rules_jsp.html +++ b/pmd_rules_jsp.html @@ -1515,7 +1515,7 @@
    diff --git a/pmd_rules_jsp_bestpractices.html b/pmd_rules_jsp_bestpractices.html index 6a7ad7647e..1a7eed4c21 100644 --- a/pmd_rules_jsp_bestpractices.html +++ b/pmd_rules_jsp_bestpractices.html @@ -1548,7 +1548,7 @@ little other purpose. Consider switching to JSP comments.

    diff --git a/pmd_rules_jsp_codestyle.html b/pmd_rules_jsp_codestyle.html index 06966a1d0b..b79d8be023 100644 --- a/pmd_rules_jsp_codestyle.html +++ b/pmd_rules_jsp_codestyle.html @@ -1465,7 +1465,7 @@
    diff --git a/pmd_rules_jsp_design.html b/pmd_rules_jsp_design.html index 57da6208a8..251ca09773 100644 --- a/pmd_rules_jsp_design.html +++ b/pmd_rules_jsp_design.html @@ -1556,7 +1556,7 @@ onload=calcDays;
    diff --git a/pmd_rules_jsp_errorprone.html b/pmd_rules_jsp_errorprone.html index 88a281b9b6..55d99c0d21 100644 --- a/pmd_rules_jsp_errorprone.html +++ b/pmd_rules_jsp_errorprone.html @@ -1477,7 +1477,7 @@
    diff --git a/pmd_rules_jsp_security.html b/pmd_rules_jsp_security.html index e56b2f5096..73c14f8af4 100644 --- a/pmd_rules_jsp_security.html +++ b/pmd_rules_jsp_security.html @@ -1498,7 +1498,7 @@ ${fn:escapeXml(expression)} <!-- instead, escape it --&g
    diff --git a/pmd_rules_modelica.html b/pmd_rules_modelica.html index 6422f0ed9f..d5fefbb677 100644 --- a/pmd_rules_modelica.html +++ b/pmd_rules_modelica.html @@ -1464,7 +1464,7 @@
    diff --git a/pmd_rules_modelica_bestpractices.html b/pmd_rules_modelica_bestpractices.html index d572c8569f..f0dc3c03e0 100644 --- a/pmd_rules_modelica_bestpractices.html +++ b/pmd_rules_modelica_bestpractices.html @@ -1540,7 +1540,7 @@ end Example;
    diff --git a/pmd_rules_plsql.html b/pmd_rules_plsql.html index 0fdd7bb583..65acaf6a21 100644 --- a/pmd_rules_plsql.html +++ b/pmd_rules_plsql.html @@ -1544,7 +1544,7 @@
    diff --git a/pmd_rules_plsql_bestpractices.html b/pmd_rules_plsql_bestpractices.html index a6cd807616..8efa576f1c 100644 --- a/pmd_rules_plsql_bestpractices.html +++ b/pmd_rules_plsql_bestpractices.html @@ -1506,7 +1506,7 @@
    diff --git a/pmd_rules_plsql_codestyle.html b/pmd_rules_plsql_codestyle.html index a4039c0973..4e1dc83f74 100644 --- a/pmd_rules_plsql_codestyle.html +++ b/pmd_rules_plsql_codestyle.html @@ -1790,7 +1790,7 @@ https://docs.oracle.com/cd/B28359_01/appdev.111/b28370/static.htm#BABIIHBJ

    diff --git a/pmd_rules_plsql_design.html b/pmd_rules_plsql_design.html index 6e564b6a63..a2997d5cec 100644 --- a/pmd_rules_plsql_design.html +++ b/pmd_rules_plsql_design.html @@ -2430,7 +2430,7 @@ have more fine grained objects.

    diff --git a/pmd_rules_plsql_errorprone.html b/pmd_rules_plsql_errorprone.html index f5fdc048b5..1a6958a8ef 100644 --- a/pmd_rules_plsql_errorprone.html +++ b/pmd_rules_plsql_errorprone.html @@ -1575,7 +1575,7 @@
    diff --git a/pmd_rules_pom.html b/pmd_rules_pom.html index a4860cd5a8..e83bbabdb8 100644 --- a/pmd_rules_pom.html +++ b/pmd_rules_pom.html @@ -1477,7 +1477,7 @@
    diff --git a/pmd_rules_pom_errorprone.html b/pmd_rules_pom_errorprone.html index 65b8f22ac5..c8c0252c38 100644 --- a/pmd_rules_pom_errorprone.html +++ b/pmd_rules_pom_errorprone.html @@ -1546,7 +1546,7 @@ By far the most common problem is the use of ${project.version} in a BOM or pare
    diff --git a/pmd_rules_scala.html b/pmd_rules_scala.html index 1407053988..2f321ed8b9 100644 --- a/pmd_rules_scala.html +++ b/pmd_rules_scala.html @@ -1459,7 +1459,7 @@
    diff --git a/pmd_rules_vf.html b/pmd_rules_vf.html index 237740efe3..9b4199a452 100644 --- a/pmd_rules_vf.html +++ b/pmd_rules_vf.html @@ -1478,7 +1478,7 @@
    diff --git a/pmd_rules_vf_security.html b/pmd_rules_vf_security.html index 2863216363..7e7f5c7eda 100644 --- a/pmd_rules_vf_security.html +++ b/pmd_rules_vf_security.html @@ -1521,7 +1521,7 @@ on
    diff --git a/pmd_rules_vm.html b/pmd_rules_vm.html index be326f9d85..687327b66c 100644 --- a/pmd_rules_vm.html +++ b/pmd_rules_vm.html @@ -1498,7 +1498,7 @@
    diff --git a/pmd_rules_vm_bestpractices.html b/pmd_rules_vm_bestpractices.html index 9d5b747b2f..646418285e 100644 --- a/pmd_rules_vm_bestpractices.html +++ b/pmd_rules_vm_bestpractices.html @@ -1474,7 +1474,7 @@
    diff --git a/pmd_rules_vm_design.html b/pmd_rules_vm_design.html index eed4d81978..3726eb87b7 100644 --- a/pmd_rules_vm_design.html +++ b/pmd_rules_vm_design.html @@ -1588,7 +1588,7 @@
    diff --git a/pmd_rules_vm_errorprone.html b/pmd_rules_vm_errorprone.html index 4d752adcc2..1b525b4bef 100644 --- a/pmd_rules_vm_errorprone.html +++ b/pmd_rules_vm_errorprone.html @@ -1474,7 +1474,7 @@
    diff --git a/pmd_rules_xml.html b/pmd_rules_xml.html index 9b2940fe59..152d8039cf 100644 --- a/pmd_rules_xml.html +++ b/pmd_rules_xml.html @@ -1476,7 +1476,7 @@
    diff --git a/pmd_rules_xml_errorprone.html b/pmd_rules_xml_errorprone.html index dc01602ebb..b9a1cff0ad 100644 --- a/pmd_rules_xml_errorprone.html +++ b/pmd_rules_xml_errorprone.html @@ -1478,7 +1478,7 @@
    diff --git a/pmd_rules_xsl.html b/pmd_rules_xsl.html index cffcf6ea26..947051a6c2 100644 --- a/pmd_rules_xsl.html +++ b/pmd_rules_xsl.html @@ -1484,7 +1484,7 @@
    diff --git a/pmd_rules_xsl_codestyle.html b/pmd_rules_xsl_codestyle.html index c861e6ea4d..0e65dbf67e 100644 --- a/pmd_rules_xsl_codestyle.html +++ b/pmd_rules_xsl_codestyle.html @@ -1469,7 +1469,7 @@
    diff --git a/pmd_rules_xsl_performance.html b/pmd_rules_xsl_performance.html index d411aafca9..412aa80e60 100644 --- a/pmd_rules_xsl_performance.html +++ b/pmd_rules_xsl_performance.html @@ -1512,7 +1512,7 @@ cutting through 100% of the document.

    diff --git a/pmd_userdocs_best_practices.html b/pmd_userdocs_best_practices.html index f1179faaa2..1850e8547f 100644 --- a/pmd_userdocs_best_practices.html +++ b/pmd_userdocs_best_practices.html @@ -1481,7 +1481,7 @@ and soon you’ll be fixing problems much faster.

    diff --git a/pmd_userdocs_cli_reference.html b/pmd_userdocs_cli_reference.html index f0db18bd7b..25b545e5d8 100644 --- a/pmd_userdocs_cli_reference.html +++ b/pmd_userdocs_cli_reference.html @@ -2171,7 +2171,7 @@ $ ./run.sh pmd --file-list /home/me/src/filelist.txt -f text -R ruleset.xml --fo
    diff --git a/pmd_userdocs_configuring_rules.html b/pmd_userdocs_configuring_rules.html index 7ea31de283..f61ed34948 100644 --- a/pmd_userdocs_configuring_rules.html +++ b/pmd_userdocs_configuring_rules.html @@ -1507,7 +1507,7 @@ will cause the rule to be ignored.

    diff --git a/pmd_userdocs_cpd.html b/pmd_userdocs_cpd.html index d489359466..ca4b1c6864 100644 --- a/pmd_userdocs_cpd.html +++ b/pmd_userdocs_cpd.html @@ -2486,7 +2486,7 @@ the comment based approach will be extended to those of them that can support it
    diff --git a/pmd_userdocs_cpd_report_formats.html b/pmd_userdocs_cpd_report_formats.html index 967f8d0817..38d141d2b2 100644 --- a/pmd_userdocs_cpd_report_formats.html +++ b/pmd_userdocs_cpd_report_formats.html @@ -1658,7 +1658,7 @@ is shown in the console. You can then click on the filenames to jump to the sour
    diff --git a/pmd_userdocs_extending_defining_properties.html b/pmd_userdocs_extending_defining_properties.html index c86c5c84eb..02ba9466ca 100644 --- a/pmd_userdocs_extending_defining_properties.html +++ b/pmd_userdocs_extending_defining_properties.html @@ -1657,7 +1657,7 @@ are supported.

    diff --git a/pmd_userdocs_extending_designer_reference.html b/pmd_userdocs_extending_designer_reference.html index c2b8b9e3e5..594aec2138 100644 --- a/pmd_userdocs_extending_designer_reference.html +++ b/pmd_userdocs_extending_designer_reference.html @@ -1696,7 +1696,7 @@ The available language modules are those on the classpath of the app’s JVM. Th
    diff --git a/pmd_userdocs_extending_metrics_howto.html b/pmd_userdocs_extending_metrics_howto.html index cfadce32ac..022e688545 100644 --- a/pmd_userdocs_extending_metrics_howto.html +++ b/pmd_userdocs_extending_metrics_howto.html @@ -1782,7 +1782,7 @@ classes. Here’s the default behaviour by language and type of metric:

    diff --git a/pmd_userdocs_extending_rule_guidelines.html b/pmd_userdocs_extending_rule_guidelines.html index 9d57572c8e..2276626a17 100644 --- a/pmd_userdocs_extending_rule_guidelines.html +++ b/pmd_userdocs_extending_rule_guidelines.html @@ -1486,7 +1486,7 @@
    diff --git a/pmd_userdocs_extending_testing.html b/pmd_userdocs_extending_testing.html index c06a197568..672e1a02e7 100644 --- a/pmd_userdocs_extending_testing.html +++ b/pmd_userdocs_extending_testing.html @@ -1762,7 +1762,7 @@ will be executed twice.

    diff --git a/pmd_userdocs_extending_writing_java_rules.html b/pmd_userdocs_extending_writing_java_rules.html index f6fefefbbe..45b6ec7f46 100644 --- a/pmd_userdocs_extending_writing_java_rules.html +++ b/pmd_userdocs_extending_writing_java_rules.html @@ -1614,7 +1614,7 @@ the file
    diff --git a/pmd_userdocs_extending_writing_pmd_rules.html b/pmd_userdocs_extending_writing_pmd_rules.html index 52f6653f3e..f45da1a620 100644 --- a/pmd_userdocs_extending_writing_pmd_rules.html +++ b/pmd_userdocs_extending_writing_pmd_rules.html @@ -1478,7 +1478,7 @@ your rule
    diff --git a/pmd_userdocs_extending_writing_rules_intro.html b/pmd_userdocs_extending_writing_rules_intro.html index 22b1e6da10..8b9f823136 100644 --- a/pmd_userdocs_extending_writing_rules_intro.html +++ b/pmd_userdocs_extending_writing_rules_intro.html @@ -1596,7 +1596,7 @@ your rule
    diff --git a/pmd_userdocs_extending_writing_xpath_rules.html b/pmd_userdocs_extending_writing_xpath_rules.html index ead518ccd0..43962b2814 100644 --- a/pmd_userdocs_extending_writing_xpath_rules.html +++ b/pmd_userdocs_extending_writing_xpath_rules.html @@ -1956,7 +1956,7 @@ deprecated and whose usages should be replaced with uses of diff --git a/pmd_userdocs_extending_your_first_rule.html b/pmd_userdocs_extending_your_first_rule.html index f2e799aea0..c557f03f4a 100644 --- a/pmd_userdocs_extending_your_first_rule.html +++ b/pmd_userdocs_extending_your_first_rule.html @@ -1585,7 +1585,7 @@ of a rule of type XPathRule, which is how XPath rules are implemented.

    diff --git a/pmd_userdocs_incremental_analysis.html b/pmd_userdocs_incremental_analysis.html index 40b04ee6d5..efea7fb71d 100644 --- a/pmd_userdocs_incremental_analysis.html +++ b/pmd_userdocs_incremental_analysis.html @@ -1561,7 +1561,7 @@ same execution classpath).

    diff --git a/pmd_userdocs_installation.html b/pmd_userdocs_installation.html index a4a8525f8e..91fe84e2ce 100644 --- a/pmd_userdocs_installation.html +++ b/pmd_userdocs_installation.html @@ -1621,7 +1621,7 @@ directory or a jar or zip file containing the sources.
    diff --git a/pmd_userdocs_making_rulesets.html b/pmd_userdocs_making_rulesets.html index 008acc33e7..a514ed6154 100644 --- a/pmd_userdocs_making_rulesets.html +++ b/pmd_userdocs_making_rulesets.html @@ -1564,7 +1564,7 @@ a single rule reference.
    diff --git a/pmd_userdocs_report_formats.html b/pmd_userdocs_report_formats.html index 5da306d640..034f99f60e 100644 --- a/pmd_userdocs_report_formats.html +++ b/pmd_userdocs_report_formats.html @@ -1827,7 +1827,7 @@ The output directory must exist. If not specified, the html files are created in
    diff --git a/pmd_userdocs_suppressing_warnings.html b/pmd_userdocs_suppressing_warnings.html index dad5dccbfe..4bb192fe51 100644 --- a/pmd_userdocs_suppressing_warnings.html +++ b/pmd_userdocs_suppressing_warnings.html @@ -1665,7 +1665,7 @@ violations you wish to suppress. XPath queries are explained in
    diff --git a/pmd_userdocs_tools.html b/pmd_userdocs_tools.html index 47f1710a18..0d17a639bf 100644 --- a/pmd_userdocs_tools.html +++ b/pmd_userdocs_tools.html @@ -1931,7 +1931,7 @@ the (blank Command Results) document, and then confirming that, “yes, I do rea
    diff --git a/pmd_userdocs_tools_ant.html b/pmd_userdocs_tools_ant.html index 9d43f04966..65323a26b5 100644 --- a/pmd_userdocs_tools_ant.html +++ b/pmd_userdocs_tools_ant.html @@ -1895,7 +1895,7 @@ To prevent this from happening, increase the maximum memory usable by ant using
    diff --git a/pmd_userdocs_tools_ci.html b/pmd_userdocs_tools_ci.html index ebe5dc07c0..48dddf427c 100644 --- a/pmd_userdocs_tools_ci.html +++ b/pmd_userdocs_tools_ci.html @@ -1481,7 +1481,7 @@ result of the PMD maven plugin.

    diff --git a/pmd_userdocs_tools_gradle.html b/pmd_userdocs_tools_gradle.html index 3dee5ff0d1..cb69f6b534 100644 --- a/pmd_userdocs_tools_gradle.html +++ b/pmd_userdocs_tools_gradle.html @@ -1514,7 +1514,7 @@ with the property toolVersion
    diff --git a/pmd_userdocs_tools_java_api.html b/pmd_userdocs_tools_java_api.html index bca5958871..296f20114f 100644 --- a/pmd_userdocs_tools_java_api.html +++ b/pmd_userdocs_tools_java_api.html @@ -1486,7 +1486,7 @@ as described here.

    public static void main(String[] args) { PMDConfiguration configuration = new PMDConfiguration(); configuration.setInputPaths("/home/workspace/src/main/java/code"); - configuration.setRuleSets("rulesets/java/quickstart.xml"); + configuration.addRuleSet("rulesets/java/quickstart.xml"); configuration.setReportFormat("xml"); configuration.setReportFile("/home/workspace/pmd-report.xml"); @@ -1506,7 +1506,7 @@ You can also provide your own custom renderers.

    PMDConfiguration configuration = new PMDConfiguration();
     configuration.setMinimumPriority(RulePriority.MEDIUM);
    -configuration.setRuleSets("rulesets/java/quickstart.xml");
    +configuration.addRuleSet("rulesets/java/quickstart.xml");
     
  • @@ -1556,7 +1556,7 @@ by adding additional files to analyze or adding additional rulesets or renderers
    try (PmdAnalysis pmd = PmdAnalysis.create(configuration)) {
         // optional: add more rulesets
    -    pmd.addRuleSet(RuleSetLoader.fromPmdConfig(configuration).loadFromResource("custom-ruleset.xml"));
    +    pmd.addRuleSet(pmd.newRuleSetLoader().loadFromResource("custom-ruleset.xml"));
         // optional: add more files
         pmd.files().addFile(Paths.get("src", "main", "more-java", "ExtraSource.java"));
         // optional: add more renderers
    @@ -1588,7 +1588,6 @@ by adding additional files to analyze or adding additional rulesets or renderers
     import net.sourceforge.pmd.PMDConfiguration;
     import net.sourceforge.pmd.PmdAnalysis;
     import net.sourceforge.pmd.RulePriority;
    -import net.sourceforge.pmd.RuleSetLoader;
     import net.sourceforge.pmd.lang.LanguageRegistry;
     import net.sourceforge.pmd.renderers.Renderer;
     import net.sourceforge.pmd.renderers.XMLRenderer;
    @@ -1598,7 +1597,7 @@ by adding additional files to analyze or adding additional rulesets or renderers
         public static void main(String[] args) throws IOException {
             PMDConfiguration configuration = new PMDConfiguration();
             configuration.setMinimumPriority(RulePriority.MEDIUM);
    -        configuration.setRuleSets("rulesets/java/quickstart.xml");
    +        configuration.addRuleSet("rulesets/java/quickstart.xml");
     
             configuration.setInputPaths("/home/workspace/src/main/java/code");
     
    @@ -1613,7 +1612,7 @@ by adding additional files to analyze or adding additional rulesets or renderers
     
             try (PmdAnalysis pmd = PmdAnalysis.create(configuration)) {
                 // optional: add more rulesets
    -            pmd.addRuleSet(RuleSetLoader.fromPmdConfig(configuration).loadFromResource("custom-ruleset.xml"));
    +            pmd.addRuleSet(pmd.newRuleSetLoader().loadFromResource("custom-ruleset.xml"));
                 // optional: add more files
                 pmd.files().addFile(Paths.get("src", "main", "more-java", "ExtraSource.java"));
                 // optional: add more renderers
    @@ -1663,7 +1662,7 @@ by adding additional files to analyze or adding additional rulesets or renderers
                 
    diff --git a/pmd_userdocs_tools_maven.html b/pmd_userdocs_tools_maven.html index f1e9ecc046..226cb537f8 100644 --- a/pmd_userdocs_tools_maven.html +++ b/pmd_userdocs_tools_maven.html @@ -1729,7 +1729,7 @@ the previous paragraph. Add the following property to your project now:

    diff --git a/tag_devdocs.html b/tag_devdocs.html index 70c39880d5..d63d2ccefd 100644 --- a/tag_devdocs.html +++ b/tag_devdocs.html @@ -1973,7 +1973,7 @@
    diff --git a/tag_extending.html b/tag_extending.html index 37df79f584..7dd179a660 100644 --- a/tag_extending.html +++ b/tag_extending.html @@ -1997,7 +1997,7 @@
    diff --git a/tag_getting_started.html b/tag_getting_started.html index ee8e1acf6f..d33aa7e152 100644 --- a/tag_getting_started.html +++ b/tag_getting_started.html @@ -1925,7 +1925,7 @@
    diff --git a/tag_languages.html b/tag_languages.html index 8fbd49233b..1bf2c8ac1c 100644 --- a/tag_languages.html +++ b/tag_languages.html @@ -1901,7 +1901,7 @@
    diff --git a/tag_metrics.html b/tag_metrics.html index 636f74bc0f..ac044542cd 100644 --- a/tag_metrics.html +++ b/tag_metrics.html @@ -1925,7 +1925,7 @@
    diff --git a/tag_release_notes.html b/tag_release_notes.html index 31f9c26f2b..152b791700 100644 --- a/tag_release_notes.html +++ b/tag_release_notes.html @@ -1901,7 +1901,7 @@
    diff --git a/tag_rule_references.html b/tag_rule_references.html index 4b2ae71731..406d2f5210 100644 --- a/tag_rule_references.html +++ b/tag_rule_references.html @@ -1973,7 +1973,7 @@
    diff --git a/tag_tools.html b/tag_tools.html index 70fefac149..b653c78661 100644 --- a/tag_tools.html +++ b/tag_tools.html @@ -1937,7 +1937,7 @@
    diff --git a/tag_troubleshooting.html b/tag_troubleshooting.html index ab54ff2da8..0cab71d29f 100644 --- a/tag_troubleshooting.html +++ b/tag_troubleshooting.html @@ -1901,7 +1901,7 @@
    diff --git a/tag_userdocs.html b/tag_userdocs.html index d790cadc68..c39814a022 100644 --- a/tag_userdocs.html +++ b/tag_userdocs.html @@ -2057,7 +2057,7 @@