diff --git a/404.html b/404.html index 9a319686ab..3294ac1a81 100644 --- a/404.html +++ b/404.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Page Not Found Edit on GitHubPage Not Found -
    +
    @@ -1922,7 +1922,7 @@ github and create a PR: Edit on GitHub diff --git a/feed.xml b/feed.xml index 4d213b61a8..0ec7d622c3 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://docs.pmd-code.org/latest/ - Thu, 26 Sep 2024 14:09:15 +0000 - Thu, 26 Sep 2024 14:09:15 +0000 + Thu, 26 Sep 2024 14:55:08 +0000 + Thu, 26 Sep 2024 14:55:08 +0000 Jekyll v3.10.0 diff --git a/index.html b/index.html index 4679adab4f..3c89652bf9 100644 --- a/index.html +++ b/index.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Documentation Index Edit on GitHubDocumentation Index
    -
    +
    Welcome to the documentation site for PMD and CPD!

    @@ -8433,7 +8433,7 @@ Contributions of any kind welcome!

    github and create a PR: Edit on GitHub diff --git a/license.html b/license.html index 51e3b14b59..5402b6c689 100644 --- a/license.html +++ b/license.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » License Edit on GitHubLicense
    -
    +
    @@ -2166,7 +2166,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. github and create a PR: Edit on GitHub diff --git a/news.html b/news.html index 1e40cc4dda..4a89dac9b8 100644 --- a/news.html +++ b/news.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » News Edit on GitHubNews
    -
    +
    @@ -1931,7 +1931,7 @@ github and create a PR: Edit on GitHub diff --git a/news_archive.html b/news_archive.html index fa04c51c93..6128308d68 100644 --- a/news_archive.html +++ b/news_archive.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » News Edit on GitHubNews
    -
    +
    @@ -1932,7 +1932,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_about_help.html b/pmd_about_help.html index 84b3679a9c..723e13713f 100644 --- a/pmd_about_help.html +++ b/pmd_about_help.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Getting Help Edit on GitHubGetting Help
    -
    +
    @@ -1942,7 +1942,7 @@ through the mailing l github and create a PR: Edit on GitHub diff --git a/pmd_about_release_policies.html b/pmd_about_release_policies.html index 50999523ea..86eea8d1cb 100644 --- a/pmd_about_release_policies.html +++ b/pmd_about_release_policies.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Release schedule and version policies Edit on GitHubRelease schedule and version policies
    -
    +
    @@ -1946,9 +1946,9 @@ a patch release.

    Git branches/tags policy

      -
    • Main development happens on the main branch (currently called master).
    • +
    • Main development happens on the main branch (currently called main).
    • PR and enhancements are done on the main branch.
    • -
    • Release are usually done directly from the main branch, we don’t create release branches.
    • +
    • Releases are usually done directly from the main branch, we don’t create release branches.
    • Each release has its own tag named pmd_releases/MAJOR.MINOR.PATCH.
    • In case of a patch release, we either do it from the main branch (if there was no development ongoing) or create a separate branch off the last release tag.
    • @@ -1973,7 +1973,7 @@ or create a separate branch off the last release tag. github and create a PR: Edit on GitHub diff --git a/pmd_about_support_lifecycle.html b/pmd_about_support_lifecycle.html index 8272982a90..59d2f59026 100644 --- a/pmd_about_support_lifecycle.html +++ b/pmd_about_support_lifecycle.html @@ -1560,7 +1560,7 @@ -
    • Contributing
    • +
    • Contributing
    • @@ -1876,7 +1876,7 @@ » Support lifecycle Edit on GitHubSupport lifecycle
    -
    +
    @@ -1989,7 +1989,7 @@ We recommend to always update to the latest version to benefit from new features github and create a PR: Edit on GitHub diff --git a/pmd_devdocs_building.html b/pmd_devdocs_building.html index 32bc9e7e9a..413110ed16 100644 --- a/pmd_devdocs_building.html +++ b/pmd_devdocs_building.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Building PMD from source Edit on GitHubBuilding PMD from source
    -
    +
    @@ -2010,7 +2010,7 @@ They’re also in the jar file that’s included with both the source and binary github and create a PR: Edit on GitHub diff --git a/pmd_devdocs_development.html b/pmd_devdocs_development.html index b55be6b7e9..8a22d79d39 100644 --- a/pmd_devdocs_development.html +++ b/pmd_devdocs_development.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Developer Resources Edit on GitHubDeveloper Resources
    -
    +
    @@ -1934,8 +1934,8 @@ every push. Each pull request is built as well.

    First off, thanks for taking the time to contribute!

    -

    Please have a look at CONTRIBUTING.md and -BUILDING.md.

    +

    Please have a look at CONTRIBUTING.md and +BUILDING.md.

    @@ -1962,7 +1962,7 @@ every push. Each pull request is built as well.

    github and create a PR: Edit on GitHub diff --git a/pmd_devdocs_how_pmd_works.html b/pmd_devdocs_how_pmd_works.html index d0b0585a18..50ee67049c 100644 --- a/pmd_devdocs_how_pmd_works.html +++ b/pmd_devdocs_how_pmd_works.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » How PMD Works Edit on GitHubHow PMD Works
    -
    +
    Processing overview of the different steps taken by PMD.
    @@ -1973,7 +1973,7 @@ type resolution information and DFA nodes. github and create a PR: Edit on GitHub diff --git a/pmd_devdocs_logging.html b/pmd_devdocs_logging.html index 3465e45161..90c6ddf475 100644 --- a/pmd_devdocs_logging.html +++ b/pmd_devdocs_logging.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Logging Edit on GitHubLogging
    -
    +
    @@ -1979,7 +1979,7 @@ The default configuration is provided in Edit on GitHub diff --git a/pmd_devdocs_major_adding_new_cpd_language.html b/pmd_devdocs_major_adding_new_cpd_language.html index c94a2e7add..1a6326acb9 100644 --- a/pmd_devdocs_major_adding_new_cpd_language.html +++ b/pmd_devdocs_major_adding_new_cpd_language.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » How to add a new CPD language Edit on GitHubHow to add a new CPD language
    -
    +
    How to add a new language module with CPD support.
    @@ -1916,7 +1916,7 @@ easy to implement the Tokenizer interface.

    Use the following guide to set up a new language module that supports CPD.

      -
    1. Create a new Maven module for your language. You can take the Golang module as an example. +
    2. Create a new Maven module for your language. You can take the Golang module as an example.
      • Make sure to add your new module to the parent pom as <module> entry, so that it is built alongside the other languages.
      • @@ -1928,7 +1928,7 @@ is automatically available in the binary distribution (pmd-dist).
        • For Antlr grammars you can take the grammar from antlr/grammars-v4 and place it in src/main/antlr4 followed by the package name of the language. You then need to call the appropriate ant wrapper to generate - the lexer from the grammar. To do so, edit pom.xml (eg like the Golang module). + the lexer from the grammar. To do so, edit pom.xml (eg like the Golang module). Once that is done, mvn generate-sources should generate the lexer sources for you.

          You can now implement a CpdLexer, for instance by extending AntlrCpdLexer. The following reproduces the Go implementation: @@ -1951,7 +1951,7 @@ Once that is done, mvn genera change each token e.g. into uppercase, so that CPD sees the same strings and can find duplicates even when the casing differs. See TSqlCpdLexer for an example. You will also need a “CaseChangingCharStream”, so that antlr itself is case-insensitive.

        • -
        • For JavaCC grammars, place your grammar in etc/grammar and edit the pom.xml like the Python implementation does. +
        • For JavaCC grammars, place your grammar in etc/grammar and edit the pom.xml like the Python implementation does. You can then subclass JavaccCpdLexer instead of AntlrCpdLexer.
        • If your JavaCC based language is case-insensitive (option IGNORE_CASE=true), then you need to implement JavaccTokenDocument.TokenDocumentBehavior, which can change each token @@ -1986,7 +1986,7 @@ If your language only supports CPD, then you can subclass CPD and usable by CPD like any other language.

        • -

          Update the test that asserts the list of supported languages by updating the SUPPORTED_LANGUAGES constant in BinaryDistributionIT.

          +

          Update the test that asserts the list of supported languages by updating the SUPPORTED_LANGUAGES constant in BinaryDistributionIT.

        • Add some tests for your CpdLexer by following the section below.

          @@ -2025,7 +2025,7 @@ of BaseTokenFilter as a base class, or another base class in net.sourceforge.pmd.cpd.impl. -Take a look at the Kotlin token filter implementation, or the Java one.

          +Take a look at the Kotlin token filter implementation, or the Java one.

          Testing your implementation

          @@ -2107,7 +2107,7 @@ call the method doTest github and create a PR: Edit on GitHub diff --git a/pmd_devdocs_major_adding_new_language_antlr.html b/pmd_devdocs_major_adding_new_language_antlr.html index bbef224cdb..54fbe9c07f 100644 --- a/pmd_devdocs_major_adding_new_language_antlr.html +++ b/pmd_devdocs_major_adding_new_language_antlr.html @@ -1560,7 +1560,7 @@ -
        • Contributing
        • +
        • Contributing
        • @@ -1876,7 +1876,7 @@ » Adding PMD support for a new ANTLR grammar based language Edit on GitHubAdding PMD support for a new ANTLR grammar based language
    -
    +
    How to add a new language to PMD using ANTLR grammar.
    @@ -1960,7 +1960,7 @@ is automatically available in the binary distribution (pmd-dist).
    • ANTLR will generate the parser for you based on the grammar file. The grammar file needs to be placed in the folder src/main/antlr4 in the appropriate sub package ast of the language. E.g. for swift, the grammar -file is Swift.g4 +file is Swift.g4 and is placed in the package net.sourceforge.pmd.lang.swift.ast.
    • Configure the options “superClass” and “contextSuperClass”. These are the base classes for the generated classes.
    • @@ -1970,29 +1970,29 @@ classes.
    • In order for the generated code to match and use our custom classes, we have a common ant script, that fiddles with -the generated code. The ant script is antlr4-wrapper.xml +the generated code. The ant script is antlr4-wrapper.xml and does not need to be adjusted - it has plenty of parameters that can be configured. The ant script is added in the language module’s pom.xml where the parameters are set (e.g. name of root name -class). Have a look at Swift’s example: pmd-swift/pom.xml.
    • +class). Have a look at Swift’s example: pmd-swift/pom.xml.
    • You can add additional methods in your “InnerNode” (e.g. SwiftInnerNode) that are available on all nodes. But on most cases you won’t need to do anything.
    @@ -2021,22 +2021,22 @@ to the phase generate-sources have the parser generated.
  • The generated code will be placed under target/generated-sources/antlr4 and will not be committed to source control.
  • -
  • You should review pmd-swift/pom.xml.
  • +
  • You should review pmd-swift/pom.xml.
  • 5. Create a TokenManager

    • This is needed to support CPD (copy paste detection)
    • -
    • We provide a default implementation using AntlrTokenManager.
    • +
    • We provide a default implementation using AntlrTokenManager.
    • You must create your own “AntlrCpdLexer” such as we do with -SwiftCpdLexer.
    • +SwiftCpdLexer.
    • If you wish to filter specific tokens (e.g. comments to support CPD suppression via “CPD-OFF” and “CPD-ON”) you can create your own implementation of -AntlrTokenFilter. +AntlrTokenFilter. You’ll need to override then the protected method getTokenFilter(AntlrTokenManager) and return your custom filter. See the CpdLexer for C# as an exmaple: -CsCpdLexer.

      +CsCpdLexer.

      If you don’t need a custom token filter, you don’t need to override the method. It returns the default AntlrTokenFilter which doesn’t filter anything.

      @@ -2046,14 +2046,14 @@ and return your custom filter. See the CpdLexer for C# as an exmaple:

      6. Create a PMD parser “adapter”

      7. Create a language version handler

        -
      • Now you need to create your version handler, as we did with SwiftHandler.
      • +
      • Now you need to create your version handler, as we did with SwiftHandler.
      • This class is sort of a gateway between PMD and all parsing logic specific to your language.
      • For a minimal implementation, it just needs to return a parser (see step #6).
      • It can be used to provide other features for your language like @@ -2073,17 +2073,17 @@ provide the method name or class name, where the violation occurred.
      • A parser visitor adapter is not needed anymore with PMD 7. The visitor interface now provides a default implementation.
      • The visitor for ANTLR based AST is generated along the parser from the ANTLR grammar file. The -base interface for a visitor is AstVisitor.
      • +base interface for a visitor is AstVisitor.
      • The generated visitor class for Swift is called SwiftVisitor.
      • In order to help use this visitor later on, a base visitor class should be created. -See SwiftVisitorBase +See SwiftVisitorBase as an example.

      9. Make PMD recognize your language

      • Create your own subclass of net.sourceforge.pmd.lang.impl.SimpleLanguageModuleBase, see Swift as an example: - SwiftLanguageModule.
      • + SwiftLanguageModule.
      • Add for each version of your language a call to addVersion in your language module’s constructor. Use addDefaultVersion for defining the default version.
      • You’ll need to refer the language version handler created in step #7.
      • @@ -2095,9 +2095,9 @@ Add your fully qualified class name as a single line into it.
        • You need to create your own abstract rule class in order to interface your language with PMD’s generic rule execution.
        • -
        • See AbstractSwiftRule as an example.
        • +
        • See AbstractSwiftRule as an example.
        • The rule basically just extends -AbstractVisitorRule +AbstractVisitorRule and only redefines the abstract buildVisitor() method to return our own type of visitor. In this case our SwiftVisitor is used. While there is no real functionality added, every language should have its own base class for rules. @@ -2118,7 +2118,7 @@ may have different AST nodes.
        • To add a visitor rule:
          • You need to extend the abstract rule you created on the previous step, you can use the swift -rule UnavailableFunctionRule +rule UnavailableFunctionRule as an example. Note, that all rule classes should be suffixed with Rule and should be placed in a package the corresponds to their category.
          @@ -2144,17 +2144,17 @@ resource filtering configuration in the language module’s PmdRuleTst (see -UnavailableFunctionTest +UnavailableFunctionTest for example)
        • Create a category rule set for your language (see -pmd-swift/src/main/resources/bestpractices.xml +pmd-swift/src/main/resources/bestpractices.xml for example)
        • Place the test XML file with the test cases in the correct location
        • When executing the test class
          • this triggers the unit test to read the corresponding XML file with the rule test data (see -UnavailableFunction.xml +UnavailableFunction.xml for example)
          • This test XML file contains sample pieces of code which should trigger a specified number of violations of this rule. The unit test will execute the rule on this piece of code, and verify @@ -2228,7 +2228,7 @@ syntax tree) is not suitable to add methods such as Edit on GitHub diff --git a/pmd_devdocs_major_adding_new_language_javacc.html b/pmd_devdocs_major_adding_new_language_javacc.html index 738b0b3e3b..130c697a8f 100644 --- a/pmd_devdocs_major_adding_new_language_javacc.html +++ b/pmd_devdocs_major_adding_new_language_javacc.html @@ -1560,7 +1560,7 @@ -
          • Contributing
          • +
          • Contributing
          • @@ -1876,7 +1876,7 @@ » Adding PMD support for a new JavaCC grammar based language Edit on GitHubAdding PMD support for a new JavaCC grammar based language
    -
    +
    How to add a new language to PMD using JavaCC grammar.
    @@ -2291,7 +2291,7 @@ see Java-specific features and guidance. Edit on GitHub diff --git a/pmd_devdocs_major_rule_guidelines.html b/pmd_devdocs_major_rule_guidelines.html index 5e664b07d0..841fb941bf 100644 --- a/pmd_devdocs_major_rule_guidelines.html +++ b/pmd_devdocs_major_rule_guidelines.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Guidelines for standard rules Edit on GitHubGuidelines for standard rules
    -
    +
    Guidelines for rules that are included in the standard distribution
    @@ -2026,7 +2026,7 @@ non-private”). github and create a PR: Edit on GitHub diff --git a/pmd_devdocs_pmdtester.html b/pmd_devdocs_pmdtester.html index 67a60def62..93ea6a873f 100644 --- a/pmd_devdocs_pmdtester.html +++ b/pmd_devdocs_pmdtester.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Pmdtester Edit on GitHubPmdtester
    -
    +
    @@ -1913,11 +1913,11 @@ Regression difference reports are commented back to the PR for the reviewer’s

    Verifying your local changes and generate a diff-report locally

    -

    pmdtester -r YOUR_LOCAL_PMD_GIT_REPO_ROOT_DIR -b master -p YOUR_DEVELOPMENT_BRANCH

    +

    pmdtester -r YOUR_LOCAL_PMD_GIT_REPO_ROOT_DIR -b main -p YOUR_DEVELOPMENT_BRANCH

    The regression difference report is placed in the YOUR_WORKING_DIR/target/reports/diff directory.

    -

    For more documentation on pmdtester, see README.rdoc

    +

    For more documentation on pmdtester, see README.rdoc

    @@ -1944,7 +1944,7 @@ Regression difference reports are commented back to the PR for the reviewer’s github and create a PR: Edit on GitHub diff --git a/pmd_devdocs_roadmap.html b/pmd_devdocs_roadmap.html index d8acb654a7..40b0dba761 100644 --- a/pmd_devdocs_roadmap.html +++ b/pmd_devdocs_roadmap.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Roadmap Edit on GitHubRoadmap
    -
    +
    @@ -2065,7 +2065,7 @@ This should be configurable on per Rule basis similar to TR and SymbolTable.

    github and create a PR: Edit on GitHub diff --git a/pmd_devdocs_rule_deprecation_policy.html b/pmd_devdocs_rule_deprecation_policy.html index 829e2bb50b..ac46b06252 100644 --- a/pmd_devdocs_rule_deprecation_policy.html +++ b/pmd_devdocs_rule_deprecation_policy.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Rule deprecation policy Edit on GitHubRule deprecation policy
    -
    +
    Describes when and how rules are deprecated
    @@ -2034,7 +2034,7 @@ major release of PMD.

    github and create a PR: Edit on GitHub diff --git a/pmd_devdocs_writing_documentation.html b/pmd_devdocs_writing_documentation.html index f1fcf78075..fd8bb6e86d 100644 --- a/pmd_devdocs_writing_documentation.html +++ b/pmd_devdocs_writing_documentation.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Writing documentation Edit on GitHubWriting documentation
    -
    +
    @@ -1929,7 +1929,7 @@ This makes it easy to view the documentation also offline.

    The categories for a language %lang% are located in pmd-%lang%/src/main/resources/category/%lang% . So for Java the categories -can be found under pmd-java/src/main/resources/category/java. +can be found under pmd-java/src/main/resources/category/java. The XML category files in this directory are transformed during build into markdown pages describing the rules they contain. These pages are placed under docs/ like the handwritten documentation, and are then rendered with Jekyll like the rest of them. The rule documentation @@ -2022,7 +2022,7 @@ all formatting inside the delimiters, and allow to write code samples without

    For the javadoc tags, the standard PMD maven modules are already defined as namespaces, e.g. core, java, apex, ….

    -

    For the implementation of these tags, see the _plugins folder.

    +

    For the implementation of these tags, see the _plugins folder.

    Building

    @@ -2181,7 +2181,7 @@ by specifying -Dpmd.doc.check github and create a PR: Edit on GitHub diff --git a/pmd_languages_apex.html b/pmd_languages_apex.html index 792dac976a..395df556be 100644 --- a/pmd_languages_apex.html +++ b/pmd_languages_apex.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Apex support Edit on GitHubApex support
    -
    +
    Apex-specific features and guidance
    @@ -1985,7 +1985,7 @@ and generate an AST. This library is however a binary-blob provided as part of t github and create a PR: Edit on GitHub diff --git a/pmd_languages_coco.html b/pmd_languages_coco.html index 5deaed5928..32f5530eb0 100644 --- a/pmd_languages_coco.html +++ b/pmd_languages_coco.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Coco support Edit on GitHubCoco support
    -
    +
    Coco features and guidance
    @@ -1960,7 +1960,7 @@ It is part of the Coco Platform from https://cocot github and create a PR: Edit on GitHub diff --git a/pmd_languages_configuration.html b/pmd_languages_configuration.html index 932ed687d9..3cc1db79d8 100644 --- a/pmd_languages_configuration.html +++ b/pmd_languages_configuration.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Language configuration Edit on GitHubLanguage configuration
    -
    +
    Summary of language configuration options and properties
    @@ -2088,7 +2088,7 @@ that is conditionally compiled out. Set this property to empty to disable this.< github and create a PR: Edit on GitHub diff --git a/pmd_languages_cpp.html b/pmd_languages_cpp.html index a5a955c5ee..e948c51dda 100644 --- a/pmd_languages_cpp.html +++ b/pmd_languages_cpp.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » C/C++ support Edit on GitHubC/C++ support
    -
    +
    C/C++ features and guidance
    @@ -1951,7 +1951,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_cs.html b/pmd_languages_cs.html index 9710a5af4e..17483e193f 100644 --- a/pmd_languages_cs.html +++ b/pmd_languages_cs.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » C# support Edit on GitHubC# support
    -
    +
    C#-specific features and guidance
    @@ -1948,7 +1948,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_dart.html b/pmd_languages_dart.html index e6b08ff2a7..8ee161d198 100644 --- a/pmd_languages_dart.html +++ b/pmd_languages_dart.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Dart support Edit on GitHubDart support
    -
    +
    Dart-specific features and guidance
    @@ -1952,7 +1952,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_fortran.html b/pmd_languages_fortran.html index 66c9ecd199..afdeaf009e 100644 --- a/pmd_languages_fortran.html +++ b/pmd_languages_fortran.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Fortran support Edit on GitHubFortran support
    -
    +
    Fortran features and guidance
    @@ -1948,7 +1948,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_gherkin.html b/pmd_languages_gherkin.html index 07ee10687a..03a00493f7 100644 --- a/pmd_languages_gherkin.html +++ b/pmd_languages_gherkin.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Gherkin support Edit on GitHubGherkin support
    -
    +
    Gherkin features and guidance
    @@ -1961,7 +1961,7 @@ languages, CPD currently supports only the English version of the Gherkin langua github and create a PR: Edit on GitHub diff --git a/pmd_languages_go.html b/pmd_languages_go.html index 1da47f2758..e2a0b21b0d 100644 --- a/pmd_languages_go.html +++ b/pmd_languages_go.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Go support Edit on GitHubGo support
    -
    +
    Go features and guidance
    @@ -1952,7 +1952,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_groovy.html b/pmd_languages_groovy.html index 4d8f22961a..363b86e960 100644 --- a/pmd_languages_groovy.html +++ b/pmd_languages_groovy.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Groovy support Edit on GitHubGroovy support
    -
    +
    Groovy-specific features and guidance
    @@ -1963,7 +1963,7 @@ familiar and easy to learn syntax.

    github and create a PR: Edit on GitHub diff --git a/pmd_languages_html.html b/pmd_languages_html.html index 33c6e39499..9773c55c9e 100644 --- a/pmd_languages_html.html +++ b/pmd_languages_html.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » HTML support Edit on GitHubHTML support
    -
    +
    HTML-specific features and guidance
    @@ -1960,7 +1960,7 @@ so that you have to select attributes by e.g. Edit on GitHub diff --git a/pmd_languages_index.html b/pmd_languages_index.html index 76264e2c00..d35af5764c 100644 --- a/pmd_languages_index.html +++ b/pmd_languages_index.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Overview Edit on GitHubOverview
    -
    +
    @@ -1931,7 +1931,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_java.html b/pmd_languages_java.html index 89b582c5ae..6501b5ce3d 100644 --- a/pmd_languages_java.html +++ b/pmd_languages_java.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Java support Edit on GitHubJava support
    -
    +
    Java-specific features and guidance
    @@ -2207,7 +2207,7 @@ Java does this by adding the following additional information for each reported

    There is no API yet for dataflow analysis. However, some rules such as UnusedAssignment or ImmutableField are using an internal implementation of an additional AST pass that adds dataflow information. The implementation can be found in -net.sourceforge.pmd.lang.java.rule.internal.DataflowPass.

    +net.sourceforge.pmd.lang.java.rule.internal.DataflowPass.

    @@ -2242,7 +2242,7 @@ AST pass that adds dataflow information. The implementation can be found in github and create a PR: Edit on GitHub diff --git a/pmd_languages_js_ts.html b/pmd_languages_js_ts.html index c9c31d7243..b7fd9ee954 100644 --- a/pmd_languages_js_ts.html +++ b/pmd_languages_js_ts.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » JavaScript and TypeScript support Edit on GitHubJavaScript and TypeScript support
    -
    +
    JavaScript- and TypeScript-specific features and guidance
    @@ -1979,7 +1979,7 @@ This grammar is published under the Edit on GitHub diff --git a/pmd_languages_jsp.html b/pmd_languages_jsp.html index 01614972c5..5cd0b59e3b 100644 --- a/pmd_languages_jsp.html +++ b/pmd_languages_jsp.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » JSP Support Edit on GitHubJSP Support
    -
    +
    JSP-specific features and guidance
    @@ -1993,7 +1993,7 @@ have to do “manual” string manipulation (e.g. using regular expressions).

    Edit on GitHub diff --git a/pmd_languages_julia.html b/pmd_languages_julia.html index 2bd9f7b45f..d3f80e809c 100644 --- a/pmd_languages_julia.html +++ b/pmd_languages_julia.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Julia support Edit on GitHubJulia support
    -
    +
    Julia-specific features and guidance
    @@ -1962,7 +1962,7 @@ Julia programs compile to efficient native code for multiple platforms via LLVM. github and create a PR: Edit on GitHub diff --git a/pmd_languages_kotlin.html b/pmd_languages_kotlin.html index 8eb738fad4..b8a56aa321 100644 --- a/pmd_languages_kotlin.html +++ b/pmd_languages_kotlin.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Kotlin Support Edit on GitHubKotlin Support
    -
    +
    Kotlin-specific features and guidance
    @@ -1955,7 +1955,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_lua.html b/pmd_languages_lua.html index c8fad93064..7ca5f21da7 100644 --- a/pmd_languages_lua.html +++ b/pmd_languages_lua.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Lua support Edit on GitHubLua support
    -
    +
    Lua-specifc features and guidance
    @@ -1954,7 +1954,7 @@ a gradually typed language derived from Lua, was added.

    github and create a PR: Edit on GitHub diff --git a/pmd_languages_matlab.html b/pmd_languages_matlab.html index a8b77c29ae..3667122c32 100644 --- a/pmd_languages_matlab.html +++ b/pmd_languages_matlab.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Matlab support Edit on GitHubMatlab support
    -
    +
    Matlab-specific features and guidance
    @@ -1950,7 +1950,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_modelica.html b/pmd_languages_modelica.html index 4b7802b83e..e26abcc331 100644 --- a/pmd_languages_modelica.html +++ b/pmd_languages_modelica.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Modelica support Edit on GitHubModelica support
    -
    +
    Modelica-specific features and guidance
    @@ -1954,7 +1954,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_objectivec.html b/pmd_languages_objectivec.html index 1cc91c7b46..8178f48da2 100644 --- a/pmd_languages_objectivec.html +++ b/pmd_languages_objectivec.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Objective-C support Edit on GitHubObjective-C support
    -
    +
    Objective-C-specific features and guidance
    @@ -1953,7 +1953,7 @@ a superset of the C programming language and provides object-oriented capabiliti github and create a PR: Edit on GitHub diff --git a/pmd_languages_perl.html b/pmd_languages_perl.html index 04fb86819d..e4dde9041d 100644 --- a/pmd_languages_perl.html +++ b/pmd_languages_perl.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Perl support Edit on GitHubPerl support
    -
    +
    Perl-specific features and guidance
    @@ -1952,7 +1952,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_php.html b/pmd_languages_php.html index 73937dc2cc..34ba4640ba 100644 --- a/pmd_languages_php.html +++ b/pmd_languages_php.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » PHP support Edit on GitHubPHP support
    -
    +
    PHP-specific features and guidance
    @@ -1952,7 +1952,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_plsql.html b/pmd_languages_plsql.html index d550188e4c..7ac8824f0d 100644 --- a/pmd_languages_plsql.html +++ b/pmd_languages_plsql.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » PL/SQL Support Edit on GitHubPL/SQL Support
    -
    +
    PL/SQL-specific features and guidance
    @@ -2005,7 +2005,7 @@ a custom XPath rule with the following expression:

    github and create a PR: Edit on GitHub diff --git a/pmd_languages_python.html b/pmd_languages_python.html index f633bba651..fa79818527 100644 --- a/pmd_languages_python.html +++ b/pmd_languages_python.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Python support Edit on GitHubPython support
    -
    +
    Python-specific features and guidance
    @@ -1952,7 +1952,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_languages_ruby.html b/pmd_languages_ruby.html index f10589ed15..4d4500b5c5 100644 --- a/pmd_languages_ruby.html +++ b/pmd_languages_ruby.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Ruby support Edit on GitHubRuby support
    -
    +
    Ruby-specific features and guidance
    @@ -1953,7 +1953,7 @@ productivity. It has an elegant syntax that is natural to read and easy to write github and create a PR: Edit on GitHub diff --git a/pmd_languages_scala.html b/pmd_languages_scala.html index 86ee6228b4..535f68094f 100644 --- a/pmd_languages_scala.html +++ b/pmd_languages_scala.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Scala support Edit on GitHubScala support
    -
    +
    Scala-specific features and guidance
    @@ -1958,7 +1958,7 @@ object-oriented and functional languages.

    github and create a PR: Edit on GitHub diff --git a/pmd_languages_swift.html b/pmd_languages_swift.html index f76d57a7c5..ca99d9f395 100644 --- a/pmd_languages_swift.html +++ b/pmd_languages_swift.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Swift support Edit on GitHubSwift support
    -
    +
    Swift-specific features and guidance
    @@ -1958,7 +1958,7 @@ powerful for experts. It is fast, modern, safe, and a joy to write.

    github and create a PR: Edit on GitHub diff --git a/pmd_languages_tsql.html b/pmd_languages_tsql.html index c5d6af33ad..103be20024 100644 --- a/pmd_languages_tsql.html +++ b/pmd_languages_tsql.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » T-SQL support Edit on GitHubT-SQL support
    -
    +
    T-SQL-specific features and guidance
    @@ -1953,7 +1953,7 @@ proprietary extension to the SQL (Structured Query Language) used to interact wi github and create a PR: Edit on GitHub diff --git a/pmd_languages_velocity.html b/pmd_languages_velocity.html index 2b8a85e365..c4e2edb9bc 100644 --- a/pmd_languages_velocity.html +++ b/pmd_languages_velocity.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Velocity Template Language (VTL) support Edit on GitHubVelocity Template Language (VTL) support
    -
    +
    VTL-specific features and guidance
    @@ -1963,7 +1963,7 @@ is used as the prefix, e.g. V github and create a PR: Edit on GitHub diff --git a/pmd_languages_visualforce.html b/pmd_languages_visualforce.html index 2ef40beece..ed1bc3bceb 100644 --- a/pmd_languages_visualforce.html +++ b/pmd_languages_visualforce.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Visualforce Support Edit on GitHubVisualforce Support
    -
    +
    Visualforce-specific features and guidance
    @@ -2011,7 +2011,7 @@ the needed data.

    github and create a PR: Edit on GitHub diff --git a/pmd_languages_xml.html b/pmd_languages_xml.html index cbf8622b70..5249686eb6 100644 --- a/pmd_languages_xml.html +++ b/pmd_languages_xml.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » XML support Edit on GitHubXML support
    -
    +
    XML-specific features and guidance
    @@ -2085,7 +2085,7 @@ for more info about the differences with Edit on GitHub diff --git a/pmd_projectdocs_committers_infrastructure.html b/pmd_projectdocs_committers_infrastructure.html index 978067bdad..0fdba05ae5 100644 --- a/pmd_projectdocs_committers_infrastructure.html +++ b/pmd_projectdocs_committers_infrastructure.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Infrastructure Edit on GitHubInfrastructure
    -
    +
    @@ -2006,7 +2006,7 @@ Login is via github. github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_committers_main_landing_page.html b/pmd_projectdocs_committers_main_landing_page.html index 24fdaabbbb..1f071d9451 100644 --- a/pmd_projectdocs_committers_main_landing_page.html +++ b/pmd_projectdocs_committers_main_landing_page.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Main Landing Page Edit on GitHubMain Landing Page
    -
    +
    @@ -1915,19 +1915,19 @@ It usually takes 15 minutes.

    -
    +
    @@ -1901,7 +1901,7 @@
    -

    Example 1: Merging PR #123 into master

    +

    Example 1: Merging PR #123 into main

    1. @@ -1921,15 +1921,15 @@ If the PR fixes a bug, make sure, that the bug issue is added to the same milest
    2. The actual merge commands:

      -

      We assume, that the PR has been created from the master branch. If this is not the case, +

      We assume, that the PR has been created from the main branch. If this is not the case, then we’ll either need to rebase or ask for rebasing before merging.

      -
      git checkout master && git pull origin master                    # make sure, you have the latest code
      +    
      git checkout main && git pull origin main                        # make sure, you have the latest code
       git fetch origin pull/123/head:pr-123 && git checkout pr-123     # creates a new temporary branch "pr-123"
       
    3. -

      Update the release notes:

      +

      Update the release notes:

      • Are there any API changes, that need to be documented? (Section “API Changes”)
      • @@ -1967,12 +1967,12 @@ This will automatically close the github issue.
    the file .all-contributorsrc and docs/pages/pmd/projectdocs/credits.md.

  • -

    Now merge the pull request into the master branch:

    +

    Now merge the pull request into the main branch:

    -
    git checkout master
    -git merge --no-ff pr-123 -m "Merge pull request #123 from xyz:branch
    +    
    git checkout main
    +git merge --no-ff pr-123 -m "Full-title-of-the-pr (#123)
         
    -Full-title-of-the-pr #123" --log
    +Merge pull request #123 from xyz:branch" --log
     
    @@ -1981,7 +1981,7 @@ Full-title-of-the-pr #123" --log

    Run the complete build: ./mvnw clean verify -Pgenerate-rule-docs

    +that the complete project can be build and is functioning on top of the current main.
    @@ -1989,7 +1989,7 @@ otherwise only run on github actions and fail the build, if e.g. a jdoc or rule
  • If the build was successful, you are ready to push:

    -
    git push origin master
    +    
    git push origin main
     

    Since the temporary branch is now not needed anymore, you can delete it: @@ -1999,7 +1999,7 @@ otherwise only run on github actions and fail the build, if e.g. a jdoc or rule

    Example 2: Merging PR #124 into a maintenance branch

    -

    We ask, to create every pull request against master, to make it easier to contribute. +

    We ask, to create every pull request against main, to make it easier to contribute. But if a pull request is intended to fix a bug in an older version of PMD, then we need to backport this pull request.

    Creating a maintenance branch

    @@ -2036,7 +2036,7 @@ git commit -m "Prepare next version 5.8.1-SNAPSHOT"

    Fetch the PR and rebase it onto the maintenance branch:

    git fetch origin pull/124/head:pr-124 && git checkout pr-124     # creates a new temporary branch
    -git rebase master --onto pmd/5.8.x
    +git rebase main --onto pmd/5.8.x
     ./mvnw clean verify                                # make sure, everything works after the rebase
     
    @@ -2071,7 +2071,7 @@ rebased onto the maintenance branch.

  • -

    Merging into master

    +

    Merging into main

    Now the PR has been merged into the maintenance branch, but it is missing in any later version of PMD. Therefore, we merge first into the next minor version maintenance branch (if existing):

    @@ -2080,18 +2080,18 @@ Therefore, we merge first into the next minor version maintenance branch (if exi git merge pmd/5.8.x
    -

    After that, we merge the changes into the master branch:

    +

    After that, we merge the changes into the main branch:

    -
    git checkout master
    +
    git checkout main
     git merge pmd/5.9.x
     

    Merging vs. Cherry-Picking

    @@ -2100,7 +2100,7 @@ done outside the temporary branch.
    Cherry-picking would duplicate the commit and you can’t see in the log, on which branches the fix has been integrated (e.g. gitk and github show the branches, from which the specific commit is reachable).

    -

    The downside is a more complex history - the maintenance branches and master branch are “connected” and not separate.

    +

    The downside is a more complex history - the maintenance branches and main branch are “connected” and not separate.

    @@ -2119,7 +2119,7 @@ integrated (e.g. gitk and github show the branches, from which the specific comm github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_committers_releasing.html b/pmd_projectdocs_committers_releasing.html index 967d0987ad..dbefd38a70 100644 --- a/pmd_projectdocs_committers_releasing.html +++ b/pmd_projectdocs_committers_releasing.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Release process Edit on GitHubRelease process
    -
    +
    @@ -2042,7 +2042,7 @@ above code snippet (e.g. NEW_VERSION, MILESTONE, DEPENDENCIES_COUNT):

    Note: both shell snippets are also integrated into do-release.sh.

    -

    Check in all (version) changes to branch master or any other branch, from which the release takes place:

    +

    Check in all (version) changes to branch main or any other branch, from which the release takes place:

    $ git commit -a -m "Prepare pmd release <version>"
     $ git push
    @@ -2080,7 +2080,7 @@ bundle install
     cat > "../pmd.github.io/${RELEASE_NOTES_POST}" <<EOF
     
    -

    Check in all (version, blog post) changes to branch master:

    +

    Check in all (version, blog post) changes to branch main:

    $ git commit -a -m "Prepare pmd release <version>"
     $ git push
    @@ -2160,7 +2160,7 @@ under https://pmd.sourceforge
     
     
     

    The release on GitHub Actions currently takes about 30-45 minutes. Once this is done, you -can proceed with releasing pmd designer, see https://github.com/pmd/pmd-designer/blob/master/releasing.md. +can proceed with releasing pmd designer, see https://github.com/pmd/pmd-designer/blob/main/releasing.md. Make sure to release the version, you have used earlier for the property pmd-designer.version.

    Once the pmd-designer release is done, you can proceed with part 2. This is simply triggering manually @@ -2366,7 +2366,7 @@ This is a {{ site.pmd.release_type }} release.

    Finally, commit and push the changes:

    $ git commit -m "Prepare next development version"
    -$ git push origin master
    +$ git push origin main
     

    Branches

    @@ -2374,7 +2374,7 @@ $ git push origin master

    Merging

    If the release was done on a maintenance branch, such as pmd/5.4.x, then this branch should be -merged into the next “higher” branches, such as pmd/5.5.x and master.

    +merged into the next “higher” branches, such as pmd/5.5.x and main.

    This ensures, that all fixes done on the maintenance branch, finally end up in the other branches. In theory, the fixes should already be there, but you never now.

    @@ -2383,7 +2383,7 @@ In theory, the fixes should already be there, but you never now.

    If releases from multiple branches are being done, the order matters. You should start from the “oldest” branch, e.g. pmd/5.4.x, release from there. Then merge (see above) into the next branch, e.g. pmd/5.5.x and release -from there. Then merge into the master branch and release from there. This way, the last release done, becomes +from there. Then merge into the main branch and release from there. This way, the last release done, becomes automatically the latest release on https://docs.pmd-code.org/latest/ and on sourceforge.

    (Optional) Create a new maintenance branch

    @@ -2414,7 +2414,7 @@ the tag. Here are the steps:

    github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_credits.html b/pmd_projectdocs_credits.html index 0d4f47e699..a2320ded5d 100644 --- a/pmd_projectdocs_credits.html +++ b/pmd_projectdocs_credits.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Credits Edit on GitHubCredits
    -
    +
    @@ -3562,7 +3562,7 @@ PMD scoreboard formulas, pmd-dcpd optimizations github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_decisions.html b/pmd_projectdocs_decisions.html index 0fdf620e2d..797dd600a0 100644 --- a/pmd_projectdocs_decisions.html +++ b/pmd_projectdocs_decisions.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Architecture Decisions Edit on GitHubArchitecture Decisions
    -
    +
    @@ -2276,7 +2276,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_decisions_adr_1.html b/pmd_projectdocs_decisions_adr_1.html index 45e588e97f..c525f5ae36 100644 --- a/pmd_projectdocs_decisions_adr_1.html +++ b/pmd_projectdocs_decisions_adr_1.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » ADR 1 - Use architecture decision records Edit on GitHubADR 1 - Use architecture decision records
    -
    +
    @@ -1978,7 +1978,7 @@ as the decisions need to be formulated and written down. Everybody is on the sam github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_decisions_adr_2.html b/pmd_projectdocs_decisions_adr_2.html index b69291e9a7..81fed91a4f 100644 --- a/pmd_projectdocs_decisions_adr_2.html +++ b/pmd_projectdocs_decisions_adr_2.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » ADR 2 - Policy on the use of Kotlin for development Edit on GitHubADR 2 - Policy on the use of Kotlin for development
    -
    +
    @@ -1981,7 +1981,7 @@ when Kotlin is used. Eclipse can’t be used practically anymore.

    github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_decisions_adr_3.html b/pmd_projectdocs_decisions_adr_3.html index ff98042793..79a0214ebb 100644 --- a/pmd_projectdocs_decisions_adr_3.html +++ b/pmd_projectdocs_decisions_adr_3.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » ADR 3 - API evolution principles Edit on GitHubADR 3 - API evolution principles
    -
    +
    @@ -2132,7 +2132,7 @@ Java Module System. github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_decisions_adr_NNN.html b/pmd_projectdocs_decisions_adr_NNN.html index 74602b2b88..acc6b6a588 100644 --- a/pmd_projectdocs_decisions_adr_NNN.html +++ b/pmd_projectdocs_decisions_adr_NNN.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » ADR NNN - Template Edit on GitHubADR NNN - Template
    -
    +
    @@ -1942,7 +1942,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_faq.html b/pmd_projectdocs_faq.html index 048a3f96da..7224453667 100644 --- a/pmd_projectdocs_faq.html +++ b/pmd_projectdocs_faq.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » FAQ Edit on GitHubFAQ
    -
    +
    @@ -1969,7 +1969,7 @@ You must take this into account for certain rules.

    github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_logo.html b/pmd_projectdocs_logo.html index c255ace516..a5031765ef 100644 --- a/pmd_projectdocs_logo.html +++ b/pmd_projectdocs_logo.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Logo Edit on GitHubLogo
    -
    +
    @@ -1958,7 +1958,7 @@ These old logos are provided here only as reference for historical reasons and s github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_trivia_meaning.html b/pmd_projectdocs_trivia_meaning.html index dbe6c61bda..660e1828db 100644 --- a/pmd_projectdocs_trivia_meaning.html +++ b/pmd_projectdocs_trivia_meaning.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » What does 'PMD' mean? Edit on GitHubWhat does 'PMD' mean?
    -
    +
    @@ -1938,7 +1938,7 @@ really know. We just think the letters sound good together.

    github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_trivia_news.html b/pmd_projectdocs_trivia_news.html index 42f48c4247..3ed99a5fc7 100644 --- a/pmd_projectdocs_trivia_news.html +++ b/pmd_projectdocs_trivia_news.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » PMD in the press Edit on GitHubPMD in the press
    -
    +
    @@ -2078,7 +2078,7 @@ interview with Ole-Martin and Tom

    github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_trivia_products.html b/pmd_projectdocs_trivia_products.html index ef99226937..81d94c666e 100644 --- a/pmd_projectdocs_trivia_products.html +++ b/pmd_projectdocs_trivia_products.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Products/books related to PMD Edit on GitHubProducts/books related to PMD
    -
    +
    @@ -1986,7 +1986,7 @@ to catch web app security problems. Thanks to Joseph Hemler for the props!

    github and create a PR: Edit on GitHub diff --git a/pmd_projectdocs_trivia_similarprojects.html b/pmd_projectdocs_trivia_similarprojects.html index 4589c835df..0e21eca8e0 100644 --- a/pmd_projectdocs_trivia_similarprojects.html +++ b/pmd_projectdocs_trivia_similarprojects.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Similar projects Edit on GitHubSimilar projects
    -
    +
    @@ -1993,7 +1993,7 @@ only for maven project. github and create a PR: Edit on GitHub diff --git a/pmd_release_notes.html b/pmd_release_notes.html index 5d82b7b22d..2abdbe4b0e 100644 --- a/pmd_release_notes.html +++ b/pmd_release_notes.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » PMD Release Notes Edit on GitHubPMD Release Notes
    -
    +
    @@ -1909,6 +1909,44 @@

    🚀 New and noteworthy

    +

    New Git default branch - “main”

    + +

    We are joining the Git community and updating “master” to “main”. Using the term “master” for the main +development branch can be offensive to some people. Existing versions of Git have been always capable of +working with any branch name and since 2.28.0 (July 2020) the default initial branch is configurable +(init.defaultBranch). Since October 2020, the default branch for new repositories on GitHub +is “main”. Finally, PMD will also use this new name for the main branch in all our own repositories.

    + +

    Why “main”? PMD uses a very simple branching model - pull requests with feature branches and one main development +branch, from which releases are created. That’s why “main” is currently the best fitting name.

    + +

    More information:

    + + +

    What changes?

    + +

    🐛 Fixed Issues

    • apex @@ -1972,7 +2010,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_release_notes_old.html b/pmd_release_notes_old.html index 8221898749..f47d54eaae 100644 --- a/pmd_release_notes_old.html +++ b/pmd_release_notes_old.html @@ -1560,7 +1560,7 @@ -
    • Contributing
    • +
    • Contributing
    • @@ -1876,7 +1876,7 @@ » Old Release Notes Edit on GitHubOld Release Notes
    -
    +
    @@ -12110,7 +12110,7 @@ conduct.

    Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

    -

    You can find the code of conduct in the file code_of_conduct.md +

    You can find the code of conduct in the file code_of_conduct.md in our repository.

    Performance improvements for XPath 2.0 rules

    @@ -22635,7 +22635,7 @@ Added new HTML report format github and create a PR: Edit on GitHub diff --git a/pmd_release_notes_pmd7.html b/pmd_release_notes_pmd7.html index 86159d85d5..d72e2d9a62 100644 --- a/pmd_release_notes_pmd7.html +++ b/pmd_release_notes_pmd7.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Detailed Release Notes for PMD 7 Edit on GitHubDetailed Release Notes for PMD 7
    -
    +
    These are the detailed release notes for PMD 7.
    @@ -6445,7 +6445,7 @@ Please use Edit on GitHub diff --git a/pmd_rules_apex.html b/pmd_rules_apex.html index 375391823f..30c3b010ea 100644 --- a/pmd_rules_apex.html +++ b/pmd_rules_apex.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_apex_bestpractices.html b/pmd_rules_apex_bestpractices.html index 1a51c22c1a..e00c5aa3a2 100644 --- a/pmd_rules_apex_bestpractices.html +++ b/pmd_rules_apex_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1914,7 +1914,7 @@ Having a second/third parameter provides more information and makes it easier to debug the test failure and improves the readability of test output.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexAssertionsShouldIncludeMessageRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexAssertionsShouldIncludeMessageRule

    Example(s):

    @@ -1944,7 +1944,7 @@ improves the readability of test output.

    with messages provide the developer a clearer idea of what the test does. Custom assert method invocation patterns can be specified using the ‘additionalAssertMethodPattern’ property if required.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexUnitTestClassShouldHaveAssertsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexUnitTestClassShouldHaveAssertsRule

    Example(s):

    @@ -1999,7 +1999,7 @@ patterns can be specified using the ‘additionalAssertMethodPattern’ property

    Apex unit tests should include at least one runAs method. This makes the tests more robust, and independent from the user running it.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexUnitTestClassShouldHaveRunAsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexUnitTestClassShouldHaveRunAsRule

    Example(s):

    @@ -2077,7 +2077,7 @@ annotation for test classes and methods.

    Apex unit tests should not use @isTest(seeAllData=true) because it opens up the existing database data for unexpected modification by tests.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexUnitTestShouldNotUseSeeAllDataTrueRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexUnitTestShouldNotUseSeeAllDataTrueRule

    Example(s):

    @@ -2105,7 +2105,7 @@ annotation for test classes and methods.

    Global classes should be avoided (especially in managed packages) as they can never be deleted or changed in signature. Always check twice if something needs to be global. Many interfaces (e.g. Batch) required global modifiers in the past but don’t require this anymore. Don’t lock yourself in.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.AvoidGlobalModifierRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.AvoidGlobalModifierRule

    Example(s):

    @@ -2131,7 +2131,7 @@ Therefore delegate the triggers work to a regular class (often called Trigger ha

    See more here: https://developer.salesforce.com/page/Trigger_Frameworks_and_Apex_Trigger_Best_Practices

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.AvoidLogicInTriggerRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.AvoidLogicInTriggerRule

    Example(s):

    @@ -2221,7 +2221,7 @@ Therefore delegate the triggers work to a regular class (often called Trigger ha

    Detects when a local variable is declared and/or assigned but not used.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.UnusedLocalVariableRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.UnusedLocalVariableRule

    Example(s):

    @@ -2255,7 +2255,7 @@ Therefore delegate the triggers work to a regular class (often called Trigger ha github and create a PR: Edit on GitHub diff --git a/pmd_rules_apex_codestyle.html b/pmd_rules_apex_codestyle.html index dc2778d24d..4eddd22fe6 100644 --- a/pmd_rules_apex_codestyle.html +++ b/pmd_rules_apex_codestyle.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Code Style Edit on GitHubCode Style
    -
    +
    Rules which enforce a specific coding style.
    @@ -1917,7 +1917,7 @@ properties.

    By default this rule uses the standard Apex naming convention (Pascal case).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.ClassNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.ClassNamingConventionsRule

    Example(s):

    @@ -2001,7 +2001,7 @@ properties.

    Field declarations should appear before method declarations within a class.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.FieldDeclarationsShouldBeAtStartRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.FieldDeclarationsShouldBeAtStartRule

    Example(s):

    @@ -2031,7 +2031,7 @@ static field, final field. Each regex can be configured through properties.

    By default this rule uses the standard Apex naming convention (Camel case).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.FieldNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.FieldNamingConventionsRule

    Example(s):

    @@ -2140,7 +2140,7 @@ configured through properties.

    By default this rule uses the standard Apex naming convention (Camel case).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.FormalParameterNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.FormalParameterNamingConventionsRule

    Example(s):

    @@ -2261,7 +2261,7 @@ properties.

    By default this rule uses the standard Apex naming convention (Camel case).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.LocalVariableNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.LocalVariableNamingConventionsRule

    Example(s):

    @@ -2324,7 +2324,7 @@ configured through properties.

    By default this rule uses the standard Apex naming convention (Camel case).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.MethodNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.MethodNamingConventionsRule

    Example(s):

    @@ -2457,7 +2457,7 @@ configured through properties.

    By default this rule uses the standard Apex naming convention (Camel case).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.PropertyNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.codestyle.PropertyNamingConventionsRule

    Example(s):

    @@ -2551,7 +2551,7 @@ controlled from the rest.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_apex_design.html b/pmd_rules_apex_design.html index 4222251ff7..3fd0034050 100644 --- a/pmd_rules_apex_design.html +++ b/pmd_rules_apex_design.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Design Edit on GitHubDesign
    -
    +
    Rules that help you discover design issues.
    @@ -1912,7 +1912,7 @@

    Avoid creating deeply nested if-then statements since they are harder to read and error-prone to maintain.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.AvoidDeeplyNestedIfStmtsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.AvoidDeeplyNestedIfStmtsRule

    Example(s):

    @@ -1980,7 +1980,7 @@ control flow leading to an increase in cognitive complexity.

    By default, this rule reports methods with a complexity of 15 or more. Reported methods should be broken down into less complex components.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.CognitiveComplexityRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.CognitiveComplexityRule

    Example(s):

    @@ -2079,7 +2079,7 @@ methods’ complexities reaches 40, even if none of the methods was directly rep

    Reported methods should be broken down into several smaller methods. Reported classes should probably be broken down into subcomponents.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.CyclomaticComplexityRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.CyclomaticComplexityRule

    Example(s):

    @@ -2155,7 +2155,7 @@ into subcomponents.

    responsibilities that could be provided by external classes or functions. In breaking these methods apart the code becomes more managable and ripe for reuse.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.ExcessiveClassLengthRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.ExcessiveClassLengthRule

    Example(s):

    @@ -2215,7 +2215,7 @@ apart the code becomes more managable and ripe for reuse.

    Methods with numerous parameters are a challenge to maintain, especially if most of them share the same datatype. These situations usually denote the need for new objects to wrap the numerous parameters.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.ExcessiveParameterListRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.ExcessiveParameterListRule

    Example(s):

    @@ -2271,7 +2271,7 @@ since combinatorial side effects grow rapidly and increase risk. Refactoring the smaller ones not only increases testability and reliability but also allows new variations to be developed easily.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.ExcessivePublicCountRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.ExcessivePublicCountRule

    Example(s):

    @@ -2332,7 +2332,7 @@ developed easily.

    of code for a given constructor. NCSS ignores comments, and counts actual statements. Using this algorithm, lines of code that are split are counted as one.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.NcssConstructorCountRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.NcssConstructorCountRule

    Example(s):

    @@ -2390,7 +2390,7 @@ lines of code that are split are counted as one.

    of code for a given method. NCSS ignores comments, and counts actual statements. Using this algorithm, lines of code that are split are counted as one.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.NcssMethodCountRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.NcssMethodCountRule

    Example(s):

    @@ -2447,7 +2447,7 @@ lines of code that are split are counted as one.

    of code for a given type. NCSS ignores comments, and counts actual statements. Using this algorithm, lines of code that are split are counted as one.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.NcssTypeCountRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.NcssTypeCountRule

    Example(s):

    @@ -2507,7 +2507,7 @@ plus one for the method entry. The decision points include ‘if’, ‘while Generally, numbers ranging from 1-4 denote low complexity, 5-7 denote moderate complexity, 8-10 denote high complexity, and 11+ is very high complexity.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.StdCyclomaticComplexityRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.StdCyclomaticComplexityRule

    Example(s):

    @@ -2602,7 +2602,7 @@ high complexity, and 11+ is very high complexity.

    possibly through grouping related fields in new objects. For example, a class with individual city/state/zip fields could park them within a single Address field.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.TooManyFieldsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.TooManyFieldsRule

    Example(s):

    @@ -2696,7 +2696,7 @@ well-formed sfdx-project.json }
    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.UnusedMethodRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.design.UnusedMethodRule

    Example(s):

    @@ -2740,7 +2740,7 @@ well-formed sfdx-project.json github and create a PR: Edit on GitHub diff --git a/pmd_rules_apex_documentation.html b/pmd_rules_apex_documentation.html index 7c08989573..6910f68d74 100644 --- a/pmd_rules_apex_documentation.html +++ b/pmd_rules_apex_documentation.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Documentation Edit on GitHubDocumentation
    -
    +
    Rules that are related to code documentation.
    @@ -1928,7 +1928,7 @@ By setting reportPropertyMethod overrides and tests are both exempted from having ApexDoc.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.documentation.ApexDocRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.documentation.ApexDocRule

    Example(s):

    @@ -2011,7 +2011,7 @@ By setting reportProperty Edit on GitHub diff --git a/pmd_rules_apex_errorprone.html b/pmd_rules_apex_errorprone.html index f73b96c288..90534e9e75 100644 --- a/pmd_rules_apex_errorprone.html +++ b/pmd_rules_apex_errorprone.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -1921,7 +1921,7 @@ Just querying the database is permitted.

    Note: This rule has been moved from category "Security" to "Error Prone" with PMD 6.21.0, since using DML in constructors is not a security problem, but crashes the application.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.ApexCSRFRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.ApexCSRFRule

    Example(s):

    @@ -1984,7 +1984,7 @@ using DML in constructors is not a security problem, but crashes the application it is essential to avoid hardcoding IDs in the Apex code. By doing so, if the record IDs change between environments, the logic can dynamically identify the proper data to operate against and not fail.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.AvoidHardcodingIdRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.AvoidHardcodingIdRule

    Example(s):

    @@ -2015,7 +2015,7 @@ In the future, use of such non-existent annotations could result in broken apex This will prevent users of garbage annotations from being able to use legitimate annotations added to Apex in the future. A full list of supported annotations can be found at https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation.htm

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.AvoidNonExistentAnnotationsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.AvoidNonExistentAnnotationsRule

    Example(s):

    @@ -2271,7 +2271,7 @@ a while loop that does a lot in the exit expression, rewrite it to make it clear Lightning component markup. The update prevents access to private or protected Apex getters from Aura and Lightning Web Components.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.InaccessibleAuraEnabledGetterRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.InaccessibleAuraEnabledGetterRule

    Example(s):

    @@ -2329,7 +2329,7 @@ and Lightning Web Components.

    Non-constructor methods should not have the same name as the enclosing class.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.MethodWithSameNameAsEnclosingClassRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.MethodWithSameNameAsEnclosingClassRule

    Example(s):

    @@ -2357,7 +2357,7 @@ delegating to your superclass.

    This is especially important when Using Custom Types in Map Keys and Sets.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.OverrideBothEqualsAndHashcodeRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.OverrideBothEqualsAndHashcodeRule

    Example(s):

    @@ -2462,7 +2462,7 @@ dealing with legacy code.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_apex_performance.html b/pmd_rules_apex_performance.html index 2f2f6a40ee..126194e8cd 100644 --- a/pmd_rules_apex_performance.html +++ b/pmd_rules_apex_performance.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Performance Edit on GitHubPerformance
    -
    +
    Rules that flag suboptimal code.
    @@ -1953,7 +1953,7 @@ governor limit exceptions.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.performance.AvoidNonRestrictiveQueriesRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.performance.AvoidNonRestrictiveQueriesRule

    Example(s):

    @@ -2077,7 +2077,7 @@ and net.sourceforge.pmd.lang.apex.rule.performance.OperationWithHighCostInLoopRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.performance.OperationWithHighCostInLoopRule

    Example(s):

    @@ -2143,7 +2143,7 @@ a potential performance issue.

    Database class methods, DML operations, SOQL queries, SOSL queries, Approval class methods, Email sending, async scheduling or queueing within loops can cause governor limit exceptions. Instead, try to batch up the data into a list and invoke the operation once on that list of data outside the loop.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.performance.OperationWithLimitsInLoopRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.performance.OperationWithLimitsInLoopRule

    Example(s):

    @@ -2224,7 +2224,7 @@ a potential performance issue.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_apex_security.html b/pmd_rules_apex_security.html index 80060158ac..20e9edf583 100644 --- a/pmd_rules_apex_security.html +++ b/pmd_rules_apex_security.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Security Edit on GitHubSecurity
    -
    +
    Rules that flag potential security flaws.
    @@ -1913,7 +1913,7 @@

    The rule makes sure you are using randomly generated IVs and keys for Crypto calls. Hard-wiring these values greatly compromises the security of encrypted data.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexBadCryptoRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexBadCryptoRule

    Example(s):

    @@ -1993,7 +1993,7 @@ check happens automatically and is not needed explicitly. However, the rule can whether a getter is a VF getter or not and reports a violation in any case. In such cases, the violation should be suppressed.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule

    Example(s):

    @@ -2129,7 +2129,7 @@ opens the door to several attacks and requires manual validation, which is unrel of private data. -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexDangerousMethodsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexDangerousMethodsRule

    Example(s):

    @@ -2153,7 +2153,7 @@ of private data.

    Checks against accessing endpoints under plain http. You should always use https for security.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexInsecureEndpointRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexInsecureEndpointRule

    Example(s):

    @@ -2178,7 +2178,7 @@ of private data.

    Checks against redirects to user-controlled locations. This prevents attackers from redirecting users to phishing sites.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexOpenRedirectRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexOpenRedirectRule

    Example(s):

    @@ -2203,7 +2203,7 @@ redirecting users to phishing sites.

    Detect classes declared without explicit sharing mode if DML methods are used. This forces the developer to take access restrictions into account before modifying objects.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexSharingViolationsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexSharingViolationsRule

    Example(s):

    @@ -2224,7 +2224,7 @@ forces the developer to take access restrictions into account before modifying o

    Detects the usage of untrusted / unescaped variables in DML queries.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexSOQLInjectionRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexSOQLInjectionRule

    Example(s):

    @@ -2261,7 +2261,7 @@ forces the developer to take access restrictions into account before modifying o

    For more information, you can check this

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexSuggestUsingNamedCredRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexSuggestUsingNamedCredRule

    Example(s):

    @@ -2288,7 +2288,7 @@ forces the developer to take access restrictions into account before modifying o will be displayed directly to the user in the UI, making it prime ground for XSS attacks if unescaped.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexXSSFromEscapeFalseRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexXSSFromEscapeFalseRule

    Example(s):

    @@ -2310,7 +2310,7 @@ attacks if unescaped.

    Makes sure that all values obtained from URL parameters are properly escaped / sanitized to avoid XSS attacks.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexXSSFromURLParamRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.security.ApexXSSFromURLParamRule

    Example(s):

    @@ -2342,7 +2342,7 @@ to avoid XSS attacks.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_ecmascript.html b/pmd_rules_ecmascript.html index 3c61123c3c..03dff02f21 100644 --- a/pmd_rules_ecmascript.html +++ b/pmd_rules_ecmascript.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_ecmascript_bestpractices.html b/pmd_rules_ecmascript_bestpractices.html index 7b6aed8fef..259506388c 100644 --- a/pmd_rules_ecmascript_bestpractices.html +++ b/pmd_rules_ecmascript_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1937,7 +1937,7 @@ However, when a function does use returns they should all have a value, or all with no value. Mixed return usage is likely a bug, or at best poor style.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.ecmascript.rule.bestpractices.ConsistentReturnRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.ecmascript.rule.bestpractices.ConsistentReturnRule

    Example(s):

    @@ -2090,7 +2090,7 @@ It also improves readability, if the base is given.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_ecmascript_codestyle.html b/pmd_rules_ecmascript_codestyle.html index 67194dde45..69ff659c0e 100644 --- a/pmd_rules_ecmascript_codestyle.html +++ b/pmd_rules_ecmascript_codestyle.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Code Style Edit on GitHubCode Style
    -
    +
    Rules which enforce a specific coding style.
    @@ -2266,7 +2266,7 @@ will never execute. This is a bug, or extremely poor style.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_ecmascript_errorprone.html b/pmd_rules_ecmascript_errorprone.html index 2f6f677645..c8cb80e097 100644 --- a/pmd_rules_ecmascript_errorprone.html +++ b/pmd_rules_ecmascript_errorprone.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -2103,7 +2103,7 @@ and Edit on GitHub diff --git a/pmd_rules_ecmascript_performance.html b/pmd_rules_ecmascript_performance.html index 92854b1ac6..d785a8fec1 100644 --- a/pmd_rules_ecmascript_performance.html +++ b/pmd_rules_ecmascript_performance.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Performance Edit on GitHubPerformance
    -
    +
    Rules that flag suboptimal code.
    @@ -1957,7 +1957,7 @@ In addition, logging could expose sensitive data.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_html.html b/pmd_rules_html.html index 5ff2d16be7..c95d3bc98b 100644 --- a/pmd_rules_html.html +++ b/pmd_rules_html.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_html_bestpractices.html b/pmd_rules_html_bestpractices.html index 99f0ab0c31..80d08476ad 100644 --- a/pmd_rules_html_bestpractices.html +++ b/pmd_rules_html_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1935,7 +1935,7 @@ This helps to reuse common styles.

    In HTML5 the explicit type attribute for link and script elements is not needed. Modern browsers expect stylesheets to be in CSS and scripts to use JavaScript.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.html.rule.bestpractices.UnnecessaryTypeAttributeRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.html.rule.bestpractices.UnnecessaryTypeAttributeRule

    Example(s):

    @@ -1961,7 +1961,7 @@ stylesheets to be in CSS and scripts to use JavaScript.

    Always use an "alt" attribute for images. This provides an alternative text and is extensively used by screen readers.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.html.rule.bestpractices.UseAltAttributeForImagesRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.html.rule.bestpractices.UseAltAttributeForImagesRule

    Example(s):

    @@ -1994,7 +1994,7 @@ by screen readers.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_java.html b/pmd_rules_java.html index 8d120164ee..6440b1a317 100644 --- a/pmd_rules_java.html +++ b/pmd_rules_java.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_java_bestpractices.html b/pmd_rules_java_bestpractices.html index fbee26acb6..758bd36350 100644 --- a/pmd_rules_java_bestpractices.html +++ b/pmd_rules_java_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1915,7 +1915,7 @@ an incomplete implementation, which is to be completed by subclasses implementin abstract methods. If the class is intended to be used as a base class only (not to be instantiated directly) a protected constructor can be provided to prevent direct instantiation.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AbstractClassWithoutAbstractMethodRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AbstractClassWithoutAbstractMethodRule

    Example(s):

    @@ -1949,7 +1949,7 @@ This turns a private constructor effectively into one with package scope, and is Since Java 11, JEP 181: Nest-Based Access Control has been implemented. This means that in Java 11 and above accessor classes are not generated anymore.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AccessorClassGenerationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AccessorClassGenerationRule

    Example(s):

    @@ -1983,7 +1983,7 @@ be avoided by changing the visibility of the field / method from private to pack Since Java 11, JEP 181: Nest-Based Access Control has been implemented. This means that in Java 11 and above accessor classes are not generated anymore.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AccessorMethodGenerationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AccessorMethodGenerationRule

    Example(s):

    @@ -2016,7 +2016,7 @@ means that in Java 11 and above accessor classes are not generated anymore.

    Constructors and methods receiving arrays should clone objects and store the copy. This prevents future changes from the user from affecting the original array.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.ArrayIsStoredDirectlyRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.ArrayIsStoredDirectlyRule

    Example(s):

    @@ -2147,7 +2147,7 @@ Creating a new instance is easier than synchronizing access to a shared instance

    2) Following the principle of least surprise we want to make sure that a variable caught in a catch statement is always the one thrown in a try block.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AvoidReassigningCatchVariablesRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AvoidReassigningCatchVariablesRule

    Example(s):

    @@ -2196,7 +2196,7 @@ is always the one thrown in a try block.

    This prevents accidental reassignments or unconditional increments of the control variable. -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AvoidReassigningLoopVariablesRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AvoidReassigningLoopVariablesRule

    Example(s):

    @@ -2278,7 +2278,7 @@ understandable.

    Note that this rule considers both methods and constructors. If there are multiple assignments for a formal parameter, then only the first assignment is reported.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AvoidReassigningParametersRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AvoidReassigningParametersRule

    Example(s):

    @@ -2331,7 +2331,7 @@ if held within objects with long lifetimes.

    Application with hard-coded IP addresses can become impossible to deploy in some cases. Externalizing IP adresses is preferable.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AvoidUsingHardCodedIPRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.AvoidUsingHardCodedIPRule

    Example(s):

    @@ -2380,7 +2380,7 @@ Externalizing IP adresses is preferable.

    Always check the return values of navigation methods (next, previous, first, last) of a ResultSet. If the value return is ‘false’, it should be handled properly.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.CheckResultSetRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.CheckResultSetRule

    Example(s):

    @@ -2554,7 +2554,7 @@ lists, arrays and iterators. A loop is safe to replace if it only uses the index access an element of the list or array, only has one update statement, and loops through every element of the list or array left to right.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.ForLoopCanBeForeachRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.ForLoopCanBeForeachRule

    Example(s):

    @@ -2638,7 +2638,7 @@ otherwise skip the associate String creation and manipulation, as well as any me

    An alternative to checking the log level are substituting parameters, formatters or lazy logging with lambdas. The available alternatives depend on the actual logging framework.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.GuardLogStatementRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.GuardLogStatementRule

    Example(s):

    @@ -2956,7 +2956,7 @@ is a good practice to limit their visibility.

    JUnit assertions should include an informative message - i.e., use the three-argument version of assertEquals(), not the two-argument version.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.JUnitAssertionsShouldIncludeMessageRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.JUnitAssertionsShouldIncludeMessageRule

    Example(s):

    @@ -2986,7 +2986,7 @@ Customize the maximum number of assertions used by this Rule to suit your needs.

    This rule checks for JUnit4, JUnit5 and TestNG Tests, as well as methods starting with "test".

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.JUnitTestContainsTooManyAssertsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.JUnitTestContainsTooManyAssertsRule

    Example(s):

    @@ -3052,7 +3052,7 @@ Customize the maximum number of assertions used by this Rule to suit your needs.

    JUnit tests should include at least one assertion. This makes the tests more robust, and using assert with messages provide the developer a clearer idea of what the test does.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.JUnitTestsShouldIncludeAssertRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.JUnitTestsShouldIncludeAssertRule

    Example(s):

    @@ -3105,7 +3105,7 @@ with messages provide the developer a clearer idea of what the test does.

    In JUnit4, use the @Test(expected) annotation to denote tests that should throw exceptions.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.JUnitUseExpectedRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.JUnitUseExpectedRule

    Example(s):

    @@ -3140,7 +3140,7 @@ with messages provide the developer a clearer idea of what the test does.

    can be avoided, they will just return false. Note that switching literal positions for compareTo and compareToIgnoreCase may change the result, see examples.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.LiteralsFirstInComparisonsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.LiteralsFirstInComparisonsRule

    Example(s):

    @@ -3180,7 +3180,7 @@ and parameters using a more general type (e.g, allowedTypes.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.LooseCouplingRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.LooseCouplingRule

    Example(s):

    @@ -3244,7 +3244,7 @@ the same as interfaces can be configured with the property net.sourceforge.pmd.lang.java.rule.bestpractices.MethodReturnsInternalArrayRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.MethodReturnsInternalArrayRule

    Example(s):

    @@ -3272,7 +3272,7 @@ removed or replaced outside of the object that owns it. It is safer to return a

    Annotating overridden methods with @Override ensures at compile time that the method really overrides one, which helps refactoring and clarifies intent.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.MissingOverrideRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.MissingOverrideRule

    Example(s):

    @@ -3372,7 +3372,7 @@ replaced by their cause exception. The discarded part of the stack trace is in t cases only JDK-internal code, which is not very useful. The rule also ignores exceptions whose name starts with ignored.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.PreserveStackTraceRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.PreserveStackTraceRule

    Example(s):

    @@ -3420,7 +3420,7 @@ a new instance each time.

    Note that for Boolean, the named constants Boolean.TRUE and Boolean.FALSE are preferred instead of Boolean.valueOf.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.PrimitiveWrapperInstantiationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.PrimitiveWrapperInstantiationRule

    Example(s):

    @@ -3525,7 +3525,7 @@ are preferred instead of Bool assertion method. This enables better error messages, and makes the assertions more readable.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.SimplifiableTestAssertionRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.SimplifiableTestAssertionRule

    Example(s):

    @@ -3632,7 +3632,7 @@ For instance:

    Arrays.asList("foo", "bar");
     
    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnnecessaryVarargsArrayCreationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnnecessaryVarargsArrayCreationRule

    Example(s):

    @@ -3688,7 +3688,7 @@ things like assert sta

    Both of those limitations may be partly relaxed in PMD 7.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedAssignmentRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedAssignmentRule

    Example(s):

    @@ -3822,7 +3822,7 @@ Parameters whose name starts with checkAll property to true.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedFormalParameterRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedFormalParameterRule

    Example(s):

    @@ -3873,7 +3873,7 @@ Hence, by default, this rule only considers private methods. To include non-priv

    Detects when a local variable is declared and/or assigned, but not used. Variables whose name starts with ignored or unused are filtered out.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedLocalVariableRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedLocalVariableRule

    Example(s):

    @@ -3902,7 +3902,7 @@ or e.g. Lombok) which use the fields by reflection or other means. This usage ca Previously these frameworks where explicitly allowed by listing their annotations in the property "ignoredAnnotations", but that turned out to be prone of false positive for any not explicitly considered framework.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedPrivateFieldRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedPrivateFieldRule

    Example(s):

    @@ -3961,7 +3961,7 @@ Previously these frameworks where explicitly allowed by listing their annotation

    Unused Private Method detects when a private method is declared but is unused.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedPrivateMethodRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UnusedPrivateMethodRule

    Example(s):

    @@ -4010,7 +4010,7 @@ Previously these frameworks where explicitly allowed by listing their annotation

    The isEmpty() method on java.util.Collection is provided to determine if a collection has any elements. Comparing the value of size() to 0 does not convey intent as well as the isEmpty() method.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UseCollectionIsEmptyRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UseCollectionIsEmptyRule

    Example(s):

    @@ -4046,7 +4046,7 @@ are of an enum type. The specialized enum collections are more space- and time-e This rule reports constructor expressions for hash sets or maps whose key type is an enum type.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UseEnumCollectionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UseEnumCollectionsRule

    Example(s):

    @@ -4126,7 +4126,7 @@ are better handled: If an exception occurred both in the try-with-resources statement, the exception thrown from the try-block is preserved.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UseTryWithResourcesRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.bestpractices.UseTryWithResourcesRule

    Example(s):

    @@ -4312,7 +4312,7 @@ a block {} is sufficie github and create a PR: Edit on GitHub diff --git a/pmd_rules_java_codestyle.html b/pmd_rules_java_codestyle.html index 50592606b0..62c40c2764 100644 --- a/pmd_rules_java_codestyle.html +++ b/pmd_rules_java_codestyle.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Code Style Edit on GitHubCode Style
    -
    +
    Rules which enforce a specific coding style.
    @@ -1913,7 +1913,7 @@

    Each non-static class should declare at least one constructor. Classes with solely static members are ignored, refer to UseUtilityClassRule to detect those.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.AtLeastOneConstructorRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.AtLeastOneConstructorRule

    Example(s):

    @@ -2189,7 +2189,7 @@ or methods.

    either inherit from JUnit 3 TestCase or have at least one method annotated with the Test annotations from JUnit4/5 or TestNG.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.ClassNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.ClassNamingConventionsRule

    Example(s):

    @@ -2287,7 +2287,7 @@ By default, the comment must be @VisibleForTesting annotation or any JUnit5/TestNG annotation. Use the property "ignoredAnnotations" to customize the recognized annotations.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.CommentDefaultAccessModifierRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.CommentDefaultAccessModifierRule

    Example(s):

    @@ -2369,7 +2369,7 @@ property "ignoredAnnotations" to customize the recognized annotations.

    rule makes the code easier to read. Also, this resolves trivial ordering problems, such as "does the error case go first?" or "does the common case go first?".

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.ConfusingTernaryRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.ConfusingTernaryRule

    Example(s):

    @@ -2552,7 +2552,7 @@ EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, and EmptyWhileStmt

    EmptyStatementNotInLoop is replaced by UnnecessarySemicolon.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.EmptyControlStatementRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.EmptyControlStatementRule

    Example(s):

    @@ -2665,7 +2665,7 @@ usage by developers who should be implementing their own versions in the concret

    Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.FieldDeclarationsShouldBeAtStartOfClassRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.FieldDeclarationsShouldBeAtStartOfClassRule

    Example(s):

    @@ -2739,7 +2739,7 @@ enum constant, final field. Each regex can be configured through properties.

    By default this rule uses the standard Java naming convention (Camel case), and uses the ALL_UPPER convention for constants and enum constants.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.FieldNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.FieldNamingConventionsRule

    Example(s):

    @@ -2891,7 +2891,7 @@ configured through properties.

    By default this rule uses the standard Java naming convention (Camel case).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.FormalParameterNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.FormalParameterNamingConventionsRule

    Example(s):

    @@ -3016,7 +3016,7 @@ configured through properties.

    adding functionality. It’s better style to collapse identical branches into a single multi-catch branch.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.IdenticalCatchBranchesRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.IdenticalCatchBranchesRule

    Example(s):

    @@ -3063,7 +3063,7 @@ branch.

  • The rule cannot know if the qualifier of a method call performs side effects. This means (x) -> sideEffectingMethod().foo(x) will be reported. Suppress the warning in this case.
  • -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.LambdaCanBeMethodReferenceRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.LambdaCanBeMethodReferenceRule

    Example(s):

    @@ -3134,7 +3134,7 @@ false positives.

    For more information, see Linguistic Antipatterns - What They Are and How Developers Perceive Them.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.LinguisticNamingRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.LinguisticNamingRule

    Example(s):

    @@ -3330,7 +3330,7 @@ Developers Perceive Them.

    A local variable assigned only once can be declared final.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.LocalVariableCouldBeFinalRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.LocalVariableCouldBeFinalRule

    Example(s):

    @@ -3386,7 +3386,7 @@ properties.

    By default this rule uses the standard Java naming convention (Camel case).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.LocalVariableNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.LocalVariableNamingConventionsRule

    Example(s):

    @@ -3545,7 +3545,7 @@ properties.

    This rule ignores unused parameters so as not to overlap with the rule UnusedFormalParameter. It will also ignore the parameters of abstract methods.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.MethodArgumentCouldBeFinalRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.MethodArgumentCouldBeFinalRule

    Example(s):

    @@ -3582,7 +3582,7 @@ configured through properties.

    By default this rule uses the standard Java naming convention (Camel case).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.MethodNamingConventionsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.MethodNamingConventionsRule

    Example(s):

    @@ -3684,7 +3684,7 @@ configured through properties.

    A method should have only one exit point, and that should be the last statement in the method.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.OnlyOneReturnRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.OnlyOneReturnRule

    Example(s):

    @@ -3744,7 +3744,7 @@ most method and constructor invocations to be impure. See the second example.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.PrematureDeclarationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.PrematureDeclarationRule

    Example(s):

    @@ -4154,7 +4154,7 @@ or because they’re semantically a noop (eg unboxing a value to rebox it immedi calls to valueOf or one of the intValue, byteValue, etc. methods. Casts that command a conversion are reported by UnnecessaryCast instead.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryBoxingRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryBoxingRule

    Example(s):

    @@ -4197,7 +4197,7 @@ for the context type. For instance, in the following:

    The literal would be autoboxed to Integer anyway.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryCastRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryCastRule

    Example(s):

    @@ -4258,7 +4258,7 @@ for the context type. For instance, in the following:

    constructor is identical to the default constructor. The default constructor should has same access modifier as the declaring class. In an enum type, the default constructor is implicitly private.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryConstructorRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryConstructorRule

    Example(s):

    @@ -4307,7 +4307,7 @@ modifier as the declaring class. In an enum type, the default constructor is imp

    Import statements allow the use of non-fully qualified names. The use of a fully qualified name which is covered by an import statement is redundant. Consider using the non-fully qualified name.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryFullyQualifiedNameRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryFullyQualifiedNameRule

    Example(s):

    @@ -4370,7 +4370,7 @@ because they’re in java.lang, or the current package.

    an incomplete auxiliary classpath, some imports may be conservatively marked as used even if they’re not to avoid false positives.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryImportRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryImportRule

    Example(s):

    @@ -4400,7 +4400,7 @@ as used even if they’re not to avoid false positives.

    Avoid the creation of unnecessary local variables

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryLocalBeforeReturnRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryLocalBeforeReturnRule

    Example(s):

    @@ -4455,7 +4455,7 @@ Classes, interfaces or annotations nested in an interface or annotation are auto Nested enums are automatically static. For historical reasons, modifiers which are implied by the context are accepted by the compiler, but are superfluous.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryModifierRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryModifierRule

    Example(s):

    @@ -4498,7 +4498,7 @@ For historical reasons, modifiers which are implied by the context are accepted

    Avoid the use of unnecessary return statements. A return is unnecessary when no instructions follow anyway.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryReturnRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UnnecessaryReturnRule

    Example(s):

    @@ -4568,7 +4568,7 @@ The diamond syntax was first introduced in Java 1.7. In Java 8, improvements in type inference made more type arguments redundant. In Java 9, type arguments inference was made possible for anonymous class constructors.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UseDiamondOperatorRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UseDiamondOperatorRule

    Example(s):

    @@ -4689,7 +4689,7 @@ just more visually pleasing. Unset the property net.sourceforge.pmd.lang.java.rule.codestyle.UselessParenthesesRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.codestyle.UselessParenthesesRule

    Example(s):

    @@ -4903,7 +4903,7 @@ that are misplaced (not making groups of 3 digits) are reported.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_java_design.html b/pmd_rules_java_design.html index 1d6bb374c6..729384f57d 100644 --- a/pmd_rules_java_design.html +++ b/pmd_rules_java_design.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Design Edit on GitHubDesign
    -
    +
    Rules that help you discover design issues.
    @@ -1984,7 +1984,7 @@ protected constructor in order to prevent instantiation than make the class misl

    Avoid creating deeply nested if-then statements since they are harder to read and error-prone to maintain.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.AvoidDeeplyNestedIfStmtsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.AvoidDeeplyNestedIfStmtsRule

    Example(s):

    @@ -2129,7 +2129,7 @@ validation in methods and constructors with multiple parameters.

    }
    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.AvoidThrowingNullPointerExceptionRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.AvoidThrowingNullPointerExceptionRule

    Example(s):

    @@ -2214,7 +2214,7 @@ exceptional cases with a @thr their compilation unit anyway. This is because all their constructors are private, so a subclass could not call the super constructor.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ClassWithOnlyPrivateConstructorsShouldBeFinalRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ClassWithOnlyPrivateConstructorsShouldBeFinalRule

    Example(s):

    @@ -2247,7 +2247,7 @@ control flow leading to an increase in cognitive complexity.

    By default, this rule reports methods with a complexity of 15 or more. Reported methods should be broken down into less complex components.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.CognitiveComplexityRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.CognitiveComplexityRule

    Example(s):

    @@ -2365,7 +2365,7 @@ conditions with a boolean &am

    This rule counts the number of unique attributes, local variables, and return types within an object. A number higher than the specified threshold can indicate a high degree of coupling.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.CouplingBetweenObjectsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.CouplingBetweenObjectsRule

    Example(s):

    @@ -2440,7 +2440,7 @@ methods’ complexities reaches 80, even if none of the methods was directly rep

    Reported methods should be broken down into several smaller methods. Reported classes should probably be broken down into subcomponents.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.CyclomaticComplexityRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.CyclomaticComplexityRule

    Example(s):

    @@ -2548,7 +2548,7 @@ gives information about the values of these metrics:

  • Low WMC
  • -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.DataClassRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.DataClassRule

    Example(s):

    @@ -2604,7 +2604,7 @@ This use of exceptions as a form of net.sourceforge.pmd.lang.java.rule.design.ExceptionAsFlowControlRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ExceptionAsFlowControlRule

    Example(s):

    @@ -2635,7 +2635,7 @@ To fix a violation, add the necessary validation or use an alternate control str counts the number of unique imports and reports a violation if the count is above the user-specified threshold.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ExcessiveImportsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ExcessiveImportsRule

    Example(s):

    @@ -2687,7 +2687,7 @@ user-specified threshold.

    Methods with numerous parameters are a challenge to maintain, especially if most of them share the same datatype. These situations usually denote the need for new objects to wrap the numerous parameters.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ExcessiveParameterListRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ExcessiveParameterListRule

    Example(s):

    @@ -2746,7 +2746,7 @@ since combinational side effects grow rapidly and increase risk. Refactoring the smaller ones not only increases testability and reliability but also allows new variations to be developed easily.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ExcessivePublicCountRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ExcessivePublicCountRule

    Example(s):

    @@ -2862,7 +2862,7 @@ gives information about the values of these metrics:

    Using Software Metrics to Characterize, Evaluate, and Improve the Design of Object-Oriented Systems. Springer, Berlin, 1 edition, October 2006. Page 80.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.GodClassRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.GodClassRule

    Use this rule by referencing it:

    <rule ref="category/java/design.xml/GodClass" />
    @@ -2884,7 +2884,7 @@ see Effective Java, 3rd Edition, Item 17: Minimize mutability.

    Limitations: We can only check private fields for now.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ImmutableFieldRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.ImmutableFieldRule

    Example(s):

    @@ -2925,7 +2925,7 @@ original JavaBeans specification, frameworks nowadays don’t strictly require t

    In order to avoid many false positives in classes that are not beans, the rule needs to be explicitly enabled by configuring the property packages.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.InvalidJavaBeanRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.InvalidJavaBeanRule

    Example(s):

    @@ -3031,7 +3031,7 @@ of degree trustRadius + 1http://en.wikipedia.org/wiki/Law_of_Demeter -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.LawOfDemeterRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.LawOfDemeterRule

    Example(s):

    @@ -3127,7 +3127,7 @@ of degree trustRadius + 1Avoid using classes from the configured package hierarchy outside of the package hierarchy, except when using one of the configured allowed classes.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.LoosePackageCouplingRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.LoosePackageCouplingRule

    Example(s):

    @@ -3220,7 +3220,7 @@ of code in a class, method or constructor. NCSS ignores comments, blank lines, a statements. For more details on the calculation, see the documentation NCSS.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.NcssCountRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.NcssCountRule

    Example(s):

    @@ -3309,7 +3309,7 @@ documentation net.sourceforge.pmd.lang.java.rule.design.NPathComplexityRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.NPathComplexityRule

    Example(s):

    @@ -3391,7 +3391,7 @@ is unclear which exceptions that can be thrown from the methods. It might be difficult to document and understand such vague interfaces. Use either a class derived from RuntimeException or a checked exception.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.SignatureDeclareThrowsExceptionRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.SignatureDeclareThrowsExceptionRule

    Example(s):

    @@ -3516,7 +3516,7 @@ or condition ? foo : literalB

    Avoid unnecessary if-then-else statements when returning a boolean. The result of the conditional test can be returned instead.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.SimplifyBooleanReturnsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.SimplifyBooleanReturnsRule

    Example(s):

    @@ -3545,7 +3545,7 @@ the conditional test can be returned instead.

    No need to check for null before an instanceof; the instanceof keyword returns false when given a null argument.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.SimplifyConditionalRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.SimplifyConditionalRule

    Example(s):

    @@ -3580,7 +3580,7 @@ so it might as well not be stored in the enclosing object.

    Such FPs are best handled by suppression (see also the ignoredAnnotations property). -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.SingularFieldRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.SingularFieldRule

    Example(s):

    @@ -3640,7 +3640,7 @@ Such FPs are best handled by suppression (see also the net.sourceforge.pmd.lang.java.rule.design.SwitchDensityRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.SwitchDensityRule

    Example(s):

    @@ -3816,7 +3816,7 @@ complexity and find a way to have more fine grained objects.

    The overriding method merely calls the same method defined in a superclass.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.UselessOverridingMethodRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.UselessOverridingMethodRule

    Example(s):

    @@ -3916,7 +3916,7 @@ well include non-static methods. Also, if you want this class to be a utility c remember to add a private constructor to prevent instantiation. (Note, that this use was known before PMD 5.1.0 as UseSingleton).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.UseUtilityClassRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.design.UseUtilityClassRule

    Example(s):

    @@ -3948,7 +3948,7 @@ remember to add a private constructor to prevent instantiation. github and create a PR: Edit on GitHub diff --git a/pmd_rules_java_documentation.html b/pmd_rules_java_documentation.html index dfe32640ff..d9cea12d90 100644 --- a/pmd_rules_java_documentation.html +++ b/pmd_rules_java_documentation.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Documentation Edit on GitHubDocumentation
    -
    +
    Rules that are related to code documentation.
    @@ -1912,7 +1912,7 @@

    A rule for the politically correct… we don’t want to offend anyone.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.documentation.CommentContentRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.documentation.CommentContentRule

    Example(s):

    @@ -1958,7 +1958,7 @@

    Denotes whether javadoc (formal) comments are required (or unwanted) for specific language elements.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.documentation.CommentRequiredRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.documentation.CommentRequiredRule

    Example(s):

    @@ -2056,7 +2056,7 @@

    Determines whether the dimensions of non-header comments found are within the specified limits.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.documentation.CommentSizeRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.documentation.CommentSizeRule

    Example(s):

    @@ -2219,7 +2219,7 @@ empty methods.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_java_errorprone.html b/pmd_rules_java_errorprone.html index d2ba1d0e36..bf0237c836 100644 --- a/pmd_rules_java_errorprone.html +++ b/pmd_rules_java_errorprone.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -1912,7 +1912,7 @@

    Avoid assignments in operands; this can make code more complicated and harder to read.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AssignmentInOperandRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AssignmentInOperandRule

    Example(s):

    @@ -1981,7 +1981,7 @@

    Identifies a possible unsafe usage of a static field.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AssignmentToNonFinalStaticRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AssignmentToNonFinalStaticRule

    Example(s):

    @@ -2109,7 +2109,7 @@ for old Java code before Java 1.4. It can be used to identify problematic code p

    Using a branching statement as the last part of a loop may be a bug, and/or is confusing. Ensure that the usage is not a bug, or consider using another approach.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AvoidBranchingStatementAsLastInLoopRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AvoidBranchingStatementAsLastInLoopRule

    Example(s):

    @@ -2299,7 +2299,7 @@ exactly equal to 0.1, as one would expect. Therefore, it is generally recommend

    Code containing duplicate String literals can usually be improved by declaring the String as a constant field.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AvoidDuplicateLiteralsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AvoidDuplicateLiteralsRule

    Example(s):

    @@ -2670,7 +2670,7 @@ Ensure that the intended usage is not a bug, or consider simplifying the express

    Integer literals should not start with zero since this denotes that the rest of literal will be interpreted as an octal value.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AvoidUsingOctalValuesRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.AvoidUsingOctalValuesRule

    Example(s):

    @@ -2719,7 +2719,7 @@ interpreted as an octal value.

    The null check is broken since it will throw a NullPointerException itself. It is likely that you used || instead of && or vice versa.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.BrokenNullCheckRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.BrokenNullCheckRule

    Example(s):

    @@ -2823,7 +2823,7 @@ It is likely that you used || instead of && or vice versa.

    The skip() method may skip a smaller number of bytes than requested. Check the returned value to find out if it was the case or not.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.CheckSkipResultRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.CheckSkipResultRule

    Example(s):

    @@ -2931,7 +2931,7 @@ a final method that only throws CloneNotSupportedException.

    The rule can also detect, if the class implements or extends a Cloneable class.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.CloneMethodMustImplementCloneableRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.CloneMethodMustImplementCloneableRule

    Example(s):

    @@ -3003,7 +3003,7 @@ the types, if the type resolution / auxclasspath is not correctly setup.

    now cases where the standard java.io.*Stream classes are involved. In order to restore the old behaviour, just remove "AutoCloseable" from the types.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.CloseResourceRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.CloseResourceRule

    Example(s):

    @@ -3227,7 +3227,7 @@ of Object[] and of -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.ConfusingArgumentToVarargsMethodRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.ConfusingArgumentToVarargsMethodRule

    Example(s):

    @@ -3262,7 +3262,7 @@ else to blow up later.

    To avoid this problem, only use methods that are static, private, or final in constructors. Note that those methods also must not call overridable methods transitively to be safe.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.ConstructorCallsOverridableMethodRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.ConstructorCallsOverridableMethodRule

    Example(s):

    @@ -3302,7 +3302,7 @@ member of a class that has one or more JUnit test cases. If it is a utility method, it should likely have private visibility. If it is an ignored test, it should be annotated with @Test and @Ignore.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.DetachedTestCaseRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.DetachedTestCaseRule

    Example(s):

    @@ -3787,7 +3787,7 @@ other classes may invoke it at inappropriate times.

    Avoid idempotent operations - they have no effect.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.IdempotentOperationsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.IdempotentOperationsRule

    Example(s):

    @@ -3818,7 +3818,7 @@ which is reached by fallthrough, or with -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.ImplicitSwitchFallThroughRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.ImplicitSwitchFallThroughRule

    Example(s):

    @@ -3886,7 +3886,7 @@ messages are supported (%sThis rule has been renamed from "InvalidSlf4jMessageFormat" in PMD 6.19.0.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.InvalidLogMessageFormatRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.InvalidLogMessageFormatRule

    Example(s):

    @@ -3944,7 +3944,7 @@ messages are supported (%s -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.JUnitSpellingRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.JUnitSpellingRule

    Example(s):

    @@ -3968,7 +3968,7 @@ You should not misspell method name if you want your test to set up and clean up

    The suite() method in a JUnit test needs to be both public and static.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.JUnitStaticSuiteRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.JUnitStaticSuiteRule

    Example(s):

    @@ -4293,7 +4293,7 @@ a replacement object (writeRe The property prefix has been deprecated, since in a serializable class all fields have to be serializable regardless of the name.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.NonSerializableClassRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.NonSerializableClassRule

    Example(s):

    @@ -4384,7 +4384,7 @@ of assignment is an indication that the programmer doesn’t completely understa

    NOTE: This sort of assignment may used in some cases to dereference objects and encourage garbage collection.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.NullAssignmentRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.NullAssignmentRule

    Example(s):

    @@ -4409,7 +4409,7 @@ of assignment is an indication that the programmer doesn’t completely understa

    Override both public boolean Object.equals(Object other), and public int Object.hashCode(), or override neither. Even if you are inheriting a hashCode() from a parent class, consider implementing hashCode and explicitly delegating to your superclass.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.OverrideBothEqualsAndHashcodeRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.OverrideBothEqualsAndHashcodeRule

    Example(s):

    @@ -4447,7 +4447,7 @@ of assignment is an indication that the programmer doesn’t completely understa

    Object clone() should be implemented with super.clone().

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.ProperCloneImplementationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.ProperCloneImplementationRule

    Example(s):

    @@ -4660,7 +4660,7 @@ formatting is used.

    is that the instance created using the overloaded method is not cached and so, for each call and new objects will be created for every invocation.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.SingleMethodSingletonRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.SingleMethodSingletonRule

    Example(s):

    @@ -4695,7 +4695,7 @@ for each call and new objects will be created for every invocation.

    whether an instance has already been created may result in multiple instances being created.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.SingletonClassReturningNewInstanceRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.SingletonClassReturningNewInstanceRule

    Example(s):

    @@ -4892,7 +4892,7 @@ followed by:

    e.g. "\038" is interpreted as the octal escape sequence "\03" followed by the literal character "8".

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.SuspiciousOctalEscapeRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.SuspiciousOctalEscapeRule

    Example(s):

    @@ -4919,7 +4919,7 @@ named "testXXX" (JUnit3) or use annotations (e.g. testClassPattern. To disable the detection of possible test classes by name, set this property to an empty string.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.TestClassWithoutTestCasesRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.TestClassWithoutTestCasesRule

    Example(s):

    @@ -5043,7 +5043,7 @@ an error, use the fail()Using equalsIgnoreCase() is faster than using toUpperCase/toLowerCase().equals()

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.UnnecessaryCaseChangeRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.UnnecessaryCaseChangeRule

    Example(s):

    @@ -5225,7 +5225,7 @@ is used on both sides.

    An operation on an Immutable object (String, BigDecimal or BigInteger) won’t change the object itself since the result of the operation is a new object. Therefore, ignoring the operation result is an error.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.UselessOperationOnImmutableRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.errorprone.UselessOperationOnImmutableRule

    Example(s):

    @@ -5338,7 +5338,7 @@ Thread.currentThread().getContextClassLoader() instead.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_java_multithreading.html b/pmd_rules_java_multithreading.html index b912e5b222..25b8036bb2 100644 --- a/pmd_rules_java_multithreading.html +++ b/pmd_rules_java_multithreading.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Multithreading Edit on GitHubMultithreading
    -
    +
    Rules that flag issues when dealing with multiple threads of execution.
    @@ -2179,7 +2179,7 @@ reference points to.

    For more details refer to: http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-double.html or http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.multithreading.DoubleCheckedLockingRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.multithreading.DoubleCheckedLockingRule

    Example(s):

    @@ -2220,7 +2220,7 @@ performance penalty. net.sourceforge.pmd.lang.java.rule.multithreading.NonThreadSafeSingletonRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.multithreading.NonThreadSafeSingletonRule

    Example(s):

    @@ -2283,7 +2283,7 @@ Sun recommends using separate format instances for each thread. If multiple threads must access a static formatter, the formatter must be synchronized on block level.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.multithreading.UnsynchronizedStaticFormatterRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.multithreading.UnsynchronizedStaticFormatterRule

    Example(s):

    @@ -2408,7 +2408,7 @@ one is chosen. The thread chosen is arbitrary; thus its usually safer to call n github and create a PR: Edit on GitHub diff --git a/pmd_rules_java_performance.html b/pmd_rules_java_performance.html index a2dcfb1dc5..fd26f4b5a1 100644 --- a/pmd_rules_java_performance.html +++ b/pmd_rules_java_performance.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Performance Edit on GitHubPerformance
    -
    +
    Rules that flag suboptimal code.
    @@ -1913,7 +1913,7 @@

    The conversion of literals to strings by concatenating them with empty strings is inefficient. It is much better to use one of the type-specific toString() methods instead or String.valueOf().

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.AddEmptyStringRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.AddEmptyStringRule

    Example(s):

    @@ -1933,7 +1933,7 @@ It is much better to use one of the type-specific net.sourceforge.pmd.lang.java.rule.performance.AppendCharacterWithCharRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.AppendCharacterWithCharRule

    Example(s):

    @@ -2182,7 +2182,7 @@ that one covers both.

    New objects created within loops should be checked to see if they can created outside them and reused.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.AvoidInstantiatingObjectsInLoopsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.AvoidInstantiatingObjectsInLoopsRule

    Example(s):

    @@ -2209,7 +2209,7 @@ that one covers both.

    for Java 1.5 onwards, BigInteger.TEN and BigDecimal (BigDecimal.ZERO, BigDecimal.ONE, BigDecimal.TEN) and for Java 9 onwards BigInteger.TWO.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.BigIntegerInstantiationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.BigIntegerInstantiationRule

    Example(s):

    @@ -2236,7 +2236,7 @@ for Java 9 onwards BigInteger

    Consecutive calls to StringBuffer/StringBuilder .append should be chained, reusing the target object. This can improve the performance by producing a smaller bytecode, reducing overhead and improving inlining. A complete analysis can be found here

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.ConsecutiveAppendsShouldReuseRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.ConsecutiveAppendsShouldReuseRule

    Example(s):

    @@ -2265,7 +2265,7 @@ by producing a smaller bytecode, reducing overhead and improving inlining. A com Since the literals are constants, they can already be combined into a single String literal and this String can be appended in a single method call.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.ConsecutiveLiteralAppendsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.ConsecutiveLiteralAppendsRule

    Example(s):

    @@ -2338,7 +2338,7 @@ Spring’s StringUtils#hasText (in the Spring framework) or Google’s CharMatcher#whitespace (in Guava) for existing implementations (some might include the check for != null).

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.InefficientEmptyStringCheckRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.InefficientEmptyStringCheckRule

    Example(s):

    @@ -2362,7 +2362,7 @@ include the check for != null).

    Avoid concatenating non-literals in a StringBuffer constructor or append() since intermediate buffers will need to be be created and destroyed by the JVM.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.InefficientStringBufferingRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.InefficientStringBufferingRule

    Example(s):

    @@ -2390,7 +2390,7 @@ passed into StringBuffer.append(), but represents a best guess "worst case" scen StringBuffer/StringBuilder constructor initializes the object to 16 characters. This default is assumed if the length of the constructor can not be determined.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.InsufficientStringBufferDeclarationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.InsufficientStringBufferDeclarationRule

    Example(s):

    @@ -2455,7 +2455,7 @@ is faster, but returns only an array of type net.sourceforge.pmd.lang.java.rule.performance.RedundantFieldInitializerRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.RedundantFieldInitializerRule

    Example(s):

    @@ -2492,7 +2492,7 @@ is redundant and results in a larger class file (approximately three additional

    Avoid instantiating String objects; this is usually unnecessary since they are immutable and can be safely shared.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.StringInstantiationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.StringInstantiationRule

    Example(s):

    @@ -2685,7 +2685,7 @@ You must use new ArrayList<

    Use String.indexOf(char) when checking for the index of a single character; it executes faster.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.UseIndexOfCharRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.UseIndexOfCharRule

    Example(s):

    @@ -2746,7 +2746,7 @@ and buffering.

    No need to call String.valueOf to append to a string; just use the valueOf() argument directly.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.UselessStringValueOfRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.UselessStringValueOfRule

    Example(s):

    @@ -2772,7 +2772,7 @@ and buffering.

    If a non-trivial number of these concatenations are being used then the explicit use of a StringBuilder or threadsafe StringBuffer is recommended to avoid this.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.UseStringBufferForStringAppendsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.performance.UseStringBufferForStringAppendsRule

    Example(s):

    @@ -2852,7 +2852,7 @@ or StringBuffer.toString().length() == …

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_java_security.html b/pmd_rules_java_security.html index c09d390b06..17ec983740 100644 --- a/pmd_rules_java_security.html +++ b/pmd_rules_java_security.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Security Edit on GitHubSecurity
    -
    +
    Rules that flag potential security flaws.
    @@ -1912,7 +1912,7 @@

    Do not use hard coded values for cryptographic operations. Please store keys outside of source code.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.security.HardCodedCryptoKeyRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.security.HardCodedCryptoKeyRule

    Example(s):

    @@ -1939,7 +1939,7 @@

    Do not use hard coded initialization vector in cryptographic operations. Please use a randomly generated IV.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.security.InsecureCryptoIvRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.security.InsecureCryptoIvRule

    Example(s):

    @@ -1982,7 +1982,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_jsp.html b/pmd_rules_jsp.html index 611d476a2c..866ff04ae9 100644 --- a/pmd_rules_jsp.html +++ b/pmd_rules_jsp.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_jsp_bestpractices.html b/pmd_rules_jsp_bestpractices.html index 14770d224b..49de87b016 100644 --- a/pmd_rules_jsp_bestpractices.html +++ b/pmd_rules_jsp_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -2024,7 +2024,7 @@ little other purpose. Consider switching to JSP comments.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_jsp_codestyle.html b/pmd_rules_jsp_codestyle.html index e15bdd6f5f..7b54fe3eec 100644 --- a/pmd_rules_jsp_codestyle.html +++ b/pmd_rules_jsp_codestyle.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Code Style Edit on GitHubCode Style
    -
    +
    Rules which enforce a specific coding style.
    @@ -1912,7 +1912,7 @@

    Avoid duplicate import statements inside JSP’s.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.jsp.rule.codestyle.DuplicateJspImportsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.jsp.rule.codestyle.DuplicateJspImportsRule

    Example(s):

    @@ -1941,7 +1941,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_jsp_design.html b/pmd_rules_jsp_design.html index 209dc85f02..a1326419e0 100644 --- a/pmd_rules_jsp_design.html +++ b/pmd_rules_jsp_design.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Design Edit on GitHubDesign
    -
    +
    Rules that help you discover design issues.
    @@ -1930,7 +1930,7 @@ Externalized script could be reused between pages. Browsers can also cache the

    Style information should be put in CSS files, not in JSPs. Therefore, don’t use <B> or <FONT> tags, or attributes like "align=’center’".

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.jsp.rule.design.NoInlineStyleInformationRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.jsp.rule.design.NoInlineStyleInformationRule

    Example(s):

    @@ -2032,7 +2032,7 @@ onload=calcDays; github and create a PR: Edit on GitHub diff --git a/pmd_rules_jsp_errorprone.html b/pmd_rules_jsp_errorprone.html index 943c3969d2..1f0cd70884 100644 --- a/pmd_rules_jsp_errorprone.html +++ b/pmd_rules_jsp_errorprone.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -1953,7 +1953,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_jsp_security.html b/pmd_rules_jsp_security.html index b666fa5983..c4b55553f2 100644 --- a/pmd_rules_jsp_security.html +++ b/pmd_rules_jsp_security.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Security Edit on GitHubSecurity
    -
    +
    Rules that flag potential security flaws.
    @@ -1941,7 +1941,7 @@ through SSL. See http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q261188

    Avoid using expressions without escaping / sanitizing. This could lead to cross site scripting - as the expression would be interpreted by the browser directly (e.g. "<script>alert(‘hello’);</script>").

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.jsp.rule.security.NoUnsanitizedJSPExpressionRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.jsp.rule.security.NoUnsanitizedJSPExpressionRule

    Example(s):

    @@ -1974,7 +1974,7 @@ ${fn:escapeXml(expression)} <!-- instead, escape it --&g github and create a PR: Edit on GitHub diff --git a/pmd_rules_kotlin.html b/pmd_rules_kotlin.html index 3a3bfceebd..c0f6348631 100644 --- a/pmd_rules_kotlin.html +++ b/pmd_rules_kotlin.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_kotlin_bestpractices.html b/pmd_rules_kotlin_bestpractices.html index 44e1589742..4d86092808 100644 --- a/pmd_rules_kotlin_bestpractices.html +++ b/pmd_rules_kotlin_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1945,7 +1945,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_kotlin_errorprone.html b/pmd_rules_kotlin_errorprone.html index 637f63f570..c0af0da1d7 100644 --- a/pmd_rules_kotlin_errorprone.html +++ b/pmd_rules_kotlin_errorprone.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -1912,7 +1912,7 @@

    Override both public boolean Object.equals(Object other), and public int Object.hashCode(), or override neither. Even if you are inheriting a hashCode() from a parent class, consider implementing hashCode and explicitly delegating to your superclass.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.kotlin.rule.errorprone.OverrideBothEqualsAndHashcodeRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.kotlin.rule.errorprone.OverrideBothEqualsAndHashcodeRule

    Example(s):

    @@ -1960,7 +1960,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_modelica.html b/pmd_rules_modelica.html index 2213a69dc0..bdab57662f 100644 --- a/pmd_rules_modelica.html +++ b/pmd_rules_modelica.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_modelica_bestpractices.html b/pmd_rules_modelica_bestpractices.html index c15f1357a4..959afbcc7c 100644 --- a/pmd_rules_modelica_bestpractices.html +++ b/pmd_rules_modelica_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1913,7 +1913,7 @@

    There is multiple candidates for this type resolution. While generally this is not an error, this may indicate a bug.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.modelica.rule.bestpractices.AmbiguousResolutionRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.modelica.rule.bestpractices.AmbiguousResolutionRule

    Example(s):

    @@ -1977,7 +1977,7 @@ end SomeOtherName /* should be SomeName */;

    Modelica specification requires passing connectors to the connect clause, while some implementations tolerate using it on plain variables, etc..

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.modelica.rule.bestpractices.ConnectUsingNonConnectorRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.modelica.rule.bestpractices.ConnectUsingNonConnectorRule

    Example(s):

    @@ -2022,7 +2022,7 @@ end Example; github and create a PR: Edit on GitHub diff --git a/pmd_rules_plsql.html b/pmd_rules_plsql.html index 7b6c400974..3ffa7f46d7 100644 --- a/pmd_rules_plsql.html +++ b/pmd_rules_plsql.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_plsql_bestpractices.html b/pmd_rules_plsql_bestpractices.html index c758bd259b..e1c33572a8 100644 --- a/pmd_rules_plsql_bestpractices.html +++ b/pmd_rules_plsql_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1984,7 +1984,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_plsql_codestyle.html b/pmd_rules_plsql_codestyle.html index b641d729f1..5ab47ca82a 100644 --- a/pmd_rules_plsql_codestyle.html +++ b/pmd_rules_plsql_codestyle.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Code Style Edit on GitHubCode Style
    -
    +
    Rules which enforce a specific coding style.
    @@ -1918,7 +1918,7 @@ uses the same tab with in their editor.

    This rule is the PMD equivalent of checkstyle’s FileTabCharacter check.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.codestyle.AvoidTabCharacterRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.codestyle.AvoidTabCharacterRule

    This rule has the following properties:

    @@ -1994,7 +1994,7 @@ on a separate line. -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.codestyle.CodeFormatRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.codestyle.CodeFormatRule

    Example(s):

    @@ -2160,7 +2160,7 @@ on a separate line.

    This rule is the PMD equivalent of checkstyle’s LineLength check.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.codestyle.LineLengthRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.codestyle.LineLengthRule

    This rule has the following properties:

    @@ -2255,7 +2255,7 @@ https://docs.oracle.com/cd/B28359_01/appdev.111/b28370/static.htm#BABIIHBJ

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_plsql_design.html b/pmd_rules_plsql_design.html index 71efa28491..caff55af7b 100644 --- a/pmd_rules_plsql_design.html +++ b/pmd_rules_plsql_design.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Design Edit on GitHubDesign
    -
    +
    Rules that help you discover design issues.
    @@ -1915,7 +1915,7 @@ plus one for the method entry. The decision points include ‘if’, ‘while Generally, numbers ranging from 1-4 denote low complexity, 5-7 denote moderate complexity, 8-10 denote high complexity, and 11+ is very high complexity.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.CyclomaticComplexityRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.CyclomaticComplexityRule

    Example(s):

    @@ -2089,7 +2089,7 @@ name/signature might suggest. They also become challenging for others to digest scrolling causes readers to lose focus. Try to reduce the method length by creating helper methods and removing any copy/pasted code.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessiveMethodLengthRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessiveMethodLengthRule

    Example(s):

    @@ -2142,7 +2142,7 @@ Try to reduce the method length by creating helper methods and removing any copy responsibilities that could be provided by other objects. In breaking these methods apart the code becomes more managable and ripe for reuse.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessiveObjectLengthRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessiveObjectLengthRule

    Example(s):

    @@ -2206,7 +2206,7 @@ apart the code becomes more managable and ripe for reuse.

    responsibilities that could be provided by external classes or functions. In breaking these methods apart the code becomes more managable and ripe for reuse.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessivePackageBodyLengthRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessivePackageBodyLengthRule

    Example(s):

    @@ -2270,7 +2270,7 @@ apart the code becomes more managable and ripe for reuse.

    responsibilities that could be provided by external classes or functions. In breaking these methods apart the code becomes more managable and ripe for reuse.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessivePackageSpecificationLengthRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessivePackageSpecificationLengthRule

    Example(s):

    @@ -2326,7 +2326,7 @@ apart the code becomes more managable and ripe for reuse.

    Methods with numerous parameters are a challenge to maintain, especially if most of them share the same datatype. These situations usually denote the need for new objects to wrap the numerous parameters.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessiveParameterListRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessiveParameterListRule

    Example(s):

    @@ -2386,7 +2386,7 @@ same datatype. These situations usually denote the need for new objects to wrap responsibilities that could be provided by external classes or functions. In breaking these methods apart the code becomes more managable and ripe for reuse.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessiveTypeLengthRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.ExcessiveTypeLengthRule

    Example(s):

    @@ -2450,7 +2450,7 @@ apart the code becomes more managable and ripe for reuse.

    of code for a given method. NCSS ignores comments, and counts actual statements. Using this algorithm, lines of code that are split are counted as one.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.NcssMethodCountRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.NcssMethodCountRule

    Example(s):

    @@ -2503,7 +2503,7 @@ lines of code that are split are counted as one.

    of code for a given Oracle object. NCSS ignores comments, and counts actual statements. Using this algorithm, lines of code that are split are counted as one.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.NcssObjectCountRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.NcssObjectCountRule

    Example(s):

    @@ -2558,7 +2558,7 @@ lines of code that are split are counted as one.

    A threshold of 200 is generally considered the point where measures should be taken to reduce complexity and increase readability.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.NPathComplexityRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.NPathComplexityRule

    Example(s):

    @@ -2637,7 +2637,7 @@ complexity and increase readability.

    possibly through grouping related fields in new objects. For example, a class with individual city/state/zip fields could park them within a single Address field.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.TooManyFieldsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.plsql.rule.design.TooManyFieldsRule

    Example(s):

    @@ -2772,7 +2772,7 @@ have more fine grained objects.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_plsql_errorprone.html b/pmd_rules_plsql_errorprone.html index 7515d9337d..8cf7735864 100644 --- a/pmd_rules_plsql_errorprone.html +++ b/pmd_rules_plsql_errorprone.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -2051,7 +2051,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_pom.html b/pmd_rules_pom.html index 05cacb2e32..3fc2f56737 100644 --- a/pmd_rules_pom.html +++ b/pmd_rules_pom.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_pom_errorprone.html b/pmd_rules_pom_errorprone.html index 9bb746b1d1..5b19b4b4a4 100644 --- a/pmd_rules_pom_errorprone.html +++ b/pmd_rules_pom_errorprone.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -2020,7 +2020,7 @@ By far the most common problem is the use of ${project.version} in a BOM or pare github and create a PR: Edit on GitHub diff --git a/pmd_rules_scala.html b/pmd_rules_scala.html index d8d11faa76..257c0a50d5 100644 --- a/pmd_rules_scala.html +++ b/pmd_rules_scala.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Scala Rules Edit on GitHubScala Rules
    -
    +
    Index of all built-in rules available for Scala
    @@ -1935,7 +1935,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_swift.html b/pmd_rules_swift.html index b7bad103ea..1386ca99b7 100644 --- a/pmd_rules_swift.html +++ b/pmd_rules_swift.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_swift_bestpractices.html b/pmd_rules_swift_bestpractices.html index 936de6ac5e..a7a2a355c7 100644 --- a/pmd_rules_swift_bestpractices.html +++ b/pmd_rules_swift_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1947,7 +1947,7 @@ aren’t really needed. It is extremely common that the sole implementation of t a fatal error. Marking these functions as unavailable prevents them from being executed while still making the compiler happy.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.swift.rule.bestpractices.UnavailableFunctionRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.swift.rule.bestpractices.UnavailableFunctionRule

    Example(s):

    @@ -1982,7 +1982,7 @@ the compiler happy.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_swift_errorprone.html b/pmd_rules_swift_errorprone.html index dda1f07046..ae067171ad 100644 --- a/pmd_rules_swift_errorprone.html +++ b/pmd_rules_swift_errorprone.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -1971,7 +1971,7 @@ Consider using a conditional try and handling the resulting optional, or wrappin github and create a PR: Edit on GitHub diff --git a/pmd_rules_velocity.html b/pmd_rules_velocity.html index 1ca17a3d4c..bd3cb2e0a9 100644 --- a/pmd_rules_velocity.html +++ b/pmd_rules_velocity.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_velocity_bestpractices.html b/pmd_rules_velocity_bestpractices.html index b991575d2d..0d1187107d 100644 --- a/pmd_rules_velocity_bestpractices.html +++ b/pmd_rules_velocity_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1912,7 +1912,7 @@

    Reassigning values to incoming parameters is not recommended. Use temporary local variables instead.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.bestpractices.AvoidReassigningParametersRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.bestpractices.AvoidReassigningParametersRule

    Use this rule by referencing it:

    <rule ref="category/velocity/bestpractices.xml/AvoidReassigningParameters" />
    @@ -1926,7 +1926,7 @@
     
     

    Avoid unused macro parameters. They should be deleted.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.bestpractices.UnusedMacroParameterRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.bestpractices.UnusedMacroParameterRule

    Use this rule by referencing it:

    <rule ref="category/velocity/bestpractices.xml/UnusedMacroParameter" />
    @@ -1950,7 +1950,7 @@
             github and create a PR:
              Edit on GitHub
    diff --git a/pmd_rules_velocity_design.html b/pmd_rules_velocity_design.html
    index 0f08aadc0d..4d70138194 100644
    --- a/pmd_rules_velocity_design.html
    +++ b/pmd_rules_velocity_design.html
    @@ -1560,7 +1560,7 @@
                 
     
                     
    -                
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Design Edit on GitHubDesign
    -
    +
    Rules that help you discover design issues.
    @@ -1912,7 +1912,7 @@

    Avoid creating deeply nested if-then statements since they are harder to read and error-prone to maintain.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.design.AvoidDeeplyNestedIfStmtsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.design.AvoidDeeplyNestedIfStmtsRule

    This rule has the following properties:

    @@ -1953,7 +1953,7 @@

    Sometimes two consecutive ‘if’ statements can be consolidated by separating their conditions with a boolean short-circuit operator.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.design.CollapsibleIfStatementsRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.design.CollapsibleIfStatementsRule

    Use this rule by referencing it:

    <rule ref="category/velocity/design.xml/CollapsibleIfStatements" />
    @@ -1967,7 +1967,7 @@
     
     

    The template is too long. It should be broken up into smaller pieces.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.design.ExcessiveTemplateLengthRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.design.ExcessiveTemplateLengthRule

    This rule has the following properties:

    @@ -2008,7 +2008,7 @@

    Avoid inline JavaScript. Import .js files instead.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.design.NoInlineJavaScriptRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.design.NoInlineJavaScriptRule

    Use this rule by referencing it:

    <rule ref="category/velocity/design.xml/NoInlineJavaScript" />
    @@ -2048,7 +2048,7 @@
             github and create a PR:
              Edit on GitHub
    diff --git a/pmd_rules_velocity_errorprone.html b/pmd_rules_velocity_errorprone.html
    index d64cc23d79..2c2eb17c7f 100644
    --- a/pmd_rules_velocity_errorprone.html
    +++ b/pmd_rules_velocity_errorprone.html
    @@ -1560,7 +1560,7 @@
                 
     
                     
    -                
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -1912,7 +1912,7 @@

    Empty foreach statements should be deleted.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.errorprone.EmptyForeachStmtRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.errorprone.EmptyForeachStmtRule

    Use this rule by referencing it:

    <rule ref="category/velocity/errorprone.xml/EmptyForeachStmt" />
    @@ -1926,7 +1926,7 @@
     
     

    Empty if statements should be deleted.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.errorprone.EmptyIfStmtRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.velocity.rule.errorprone.EmptyIfStmtRule

    Use this rule by referencing it:

    <rule ref="category/velocity/errorprone.xml/EmptyIfStmt" />
    @@ -1950,7 +1950,7 @@
             github and create a PR:
              Edit on GitHub
    diff --git a/pmd_rules_visualforce.html b/pmd_rules_visualforce.html
    index 5b06624406..5f9586bb35 100644
    --- a/pmd_rules_visualforce.html
    +++ b/pmd_rules_visualforce.html
    @@ -1560,7 +1560,7 @@
                 
     
                     
    -                
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_visualforce_security.html b/pmd_rules_visualforce_security.html index b18a4eac25..f49a66ba4b 100644 --- a/pmd_rules_visualforce_security.html +++ b/pmd_rules_visualforce_security.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Security Edit on GitHubSecurity
    -
    +
    Rules that flag potential security flaws.
    @@ -1912,7 +1912,7 @@

    Avoid calling VF action upon page load as the action becomes vulnerable to CSRF.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.visualforce.rule.security.VfCsrfRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.visualforce.rule.security.VfCsrfRule

    Example(s):

    @@ -1940,7 +1940,7 @@ on VfUnescapeEl to check escaping in other places on Visualforce pages.

    -

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.visualforce.rule.security.VfHtmlStyleTagXssRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.visualforce.rule.security.VfHtmlStyleTagXssRule

    Example(s):

    @@ -1968,7 +1968,7 @@ on net.sourceforge.pmd.lang.visualforce.rule.security.VfUnescapeElRule

    +

    This rule is defined by the following Java class: net.sourceforge.pmd.lang.visualforce.rule.security.VfUnescapeElRule

    Example(s):

    @@ -1997,7 +1997,7 @@ on Edit on GitHub diff --git a/pmd_rules_xml.html b/pmd_rules_xml.html index 505d720e5d..86035b1d1c 100644 --- a/pmd_rules_xml.html +++ b/pmd_rules_xml.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_xml_bestpractices.html b/pmd_rules_xml_bestpractices.html index 934fb27b1b..296a915d68 100644 --- a/pmd_rules_xml_bestpractices.html +++ b/pmd_rules_xml_bestpractices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    Rules which enforce generally accepted best practices.
    @@ -1945,7 +1945,7 @@ parsing.

    github and create a PR: Edit on GitHub diff --git a/pmd_rules_xml_errorprone.html b/pmd_rules_xml_errorprone.html index 116346d4d6..fa845c6e25 100644 --- a/pmd_rules_xml_errorprone.html +++ b/pmd_rules_xml_errorprone.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Error Prone Edit on GitHubError Prone
    -
    +
    Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
    @@ -1954,7 +1954,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_xsl.html b/pmd_rules_xsl.html index 321f86c09e..b91ef8ed03 100644 --- a/pmd_rules_xsl.html +++ b/pmd_rules_xsl.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • diff --git a/pmd_rules_xsl_codestyle.html b/pmd_rules_xsl_codestyle.html index f8990862dd..bc4e00c674 100644 --- a/pmd_rules_xsl_codestyle.html +++ b/pmd_rules_xsl_codestyle.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Code Style Edit on GitHubCode Style
    -
    +
    Rules which enforce a specific coding style.
    @@ -1945,7 +1945,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_rules_xsl_performance.html b/pmd_rules_xsl_performance.html index dfd7e7e8b7..56b03958a1 100644 --- a/pmd_rules_xsl_performance.html +++ b/pmd_rules_xsl_performance.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Performance Edit on GitHubPerformance
    -
    +
    Rules that flag suboptimal code.
    @@ -1986,7 +1986,7 @@ cutting through 100% of the document.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_3rdpartyrulesets.html b/pmd_userdocs_3rdpartyrulesets.html index cd0b29894c..fdca4ac462 100644 --- a/pmd_userdocs_3rdpartyrulesets.html +++ b/pmd_userdocs_3rdpartyrulesets.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » 3rd party rulesets Edit on GitHub3rd party rulesets
    -
    +
    Lists rulesets and rules from the community
    @@ -1970,7 +1970,7 @@ well-known frameworks like Spring, Quarkus, etc. github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_best_practices.html b/pmd_userdocs_best_practices.html index 5133c2f9b4..e31455270c 100644 --- a/pmd_userdocs_best_practices.html +++ b/pmd_userdocs_best_practices.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Best Practices Edit on GitHubBest Practices
    -
    +
    @@ -1957,7 +1957,7 @@ and soon you’ll be fixing problems much faster.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_cli_reference.html b/pmd_userdocs_cli_reference.html index ab742cbcff..4113dc22fe 100644 --- a/pmd_userdocs_cli_reference.html +++ b/pmd_userdocs_cli_reference.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » PMD CLI reference Edit on GitHubPMD CLI reference
    -
    +
    Full reference for PMD's command-line interface, including options, output formats and supported languages
    @@ -2808,7 +2808,7 @@ parse errors are suppressed in order to reduce irrelevant noise:

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_configuring_rules.html b/pmd_userdocs_configuring_rules.html index 178bf03403..a7eb8ef00d 100644 --- a/pmd_userdocs_configuring_rules.html +++ b/pmd_userdocs_configuring_rules.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Configuring rules Edit on GitHubConfiguring rules
    -
    +
    Learn how to configure your rules directly from the ruleset XML.
    @@ -2023,7 +2023,7 @@ a comma (‘,’), e.g.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_cpd.html b/pmd_userdocs_cpd.html index 31af16a689..494c5aa511 100644 --- a/pmd_userdocs_cpd.html +++ b/pmd_userdocs_cpd.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Finding duplicated code with CPD Edit on GitHubFinding duplicated code with CPD
    -
    +
    Learn how to use CPD, the copy-paste detector shipped with PMD.
    @@ -3343,7 +3343,7 @@ the comment based approach will be extended to those of them that can support it github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_cpd_report_formats.html b/pmd_userdocs_cpd_report_formats.html index dc4977b3a6..f563d305d1 100644 --- a/pmd_userdocs_cpd_report_formats.html +++ b/pmd_userdocs_cpd_report_formats.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Report formats for CPD Edit on GitHubReport formats for CPD
    -
    +
    Overview of the built-in report formats for CPD
    @@ -2154,7 +2154,7 @@ e.g. xalan (see cpdhtml.xslt -

    This stylesheet is available in the sources or from GitHub at: https://raw.githubusercontent.com/pmd/pmd/master/pmd-core/etc/xslt/cpdhtml.xslt.

    +

    This stylesheet is available in the sources or from GitHub at: https://raw.githubusercontent.com/pmd/pmd/main/pmd-core/etc/xslt/cpdhtml.xslt.

    xalan -in cpd-report-sample.xml -xsl cpdhtml.xslt -out cpd-report-sample-cpdhtml.html
     
    @@ -2169,7 +2169,7 @@ the param lines:

    cpdhtml-v2.xslt

    -

    This stylesheet is available in the sources or from GitHub at: https://raw.githubusercontent.com/pmd/pmd/master/pmd-core/etc/xslt/cpdhtml-v2.xslt.

    +

    This stylesheet is available in the sources or from GitHub at: https://raw.githubusercontent.com/pmd/pmd/main/pmd-core/etc/xslt/cpdhtml-v2.xslt.

    xalan -in pmd-core-cpd-report.xml -xsl etc/xslt/cpdhtml-v2.xslt -out pmd-core-cpd-report-v2.html
     
    @@ -2206,7 +2206,7 @@ the param lines:

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_extending_ast_dump.html b/pmd_userdocs_extending_ast_dump.html index 21acce3fa3..e21a56ba7c 100644 --- a/pmd_userdocs_extending_ast_dump.html +++ b/pmd_userdocs_extending_ast_dump.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Creating XML dump of the AST Edit on GitHubCreating XML dump of the AST
    -
    +
    Creating a XML representation of the AST allows to analyze the AST with other tools.
    @@ -2042,7 +2042,7 @@ with the name “a”.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_extending_defining_properties.html b/pmd_userdocs_extending_defining_properties.html index 64c78f8de0..5201f3013f 100644 --- a/pmd_userdocs_extending_defining_properties.html +++ b/pmd_userdocs_extending_defining_properties.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Defining rule properties Edit on GitHubDefining rule properties
    -
    +
    Learn how to define your own properties both for Java and XPath rules.
    @@ -1989,7 +1989,7 @@ the associated value, not the label. Here’s an example:

    Example

    -

    You can see an example of properties used in a PMD rule such as AvoidReassigningLoopVariables. +

    You can see an example of properties used in a PMD rule such as AvoidReassigningLoopVariables. There are several things to notice here:

    • The property descriptors are declared static final, which should generally be @@ -2132,7 +2132,7 @@ are supported.

      github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_extending_designer_reference.html b/pmd_userdocs_extending_designer_reference.html index b783056520..1d01f97fed 100644 --- a/pmd_userdocs_extending_designer_reference.html +++ b/pmd_userdocs_extending_designer_reference.html @@ -1560,7 +1560,7 @@ -
    • Contributing
    • +
    • Contributing
    • @@ -1876,7 +1876,7 @@ » The rule designer Edit on GitHubThe rule designer
    -
    +
    Learn about the usage and features of the rule designer.
    @@ -2247,7 +2247,7 @@ explained in Edit on GitHub diff --git a/pmd_userdocs_extending_rule_guidelines.html b/pmd_userdocs_extending_rule_guidelines.html index 4856dd8cfb..a37d4ba894 100644 --- a/pmd_userdocs_extending_rule_guidelines.html +++ b/pmd_userdocs_extending_rule_guidelines.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Rule guidelines Edit on GitHubRule guidelines
    -
    +
    Rule Guidelines, or the last touches to a rule
    @@ -1973,7 +1973,7 @@ is logged as a debug message.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_extending_testing.html b/pmd_userdocs_extending_testing.html index 18b0dd6794..69dcb17d79 100644 --- a/pmd_userdocs_extending_testing.html +++ b/pmd_userdocs_extending_testing.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Testing your rules Edit on GitHubTesting your rules
    -
    +
    Learn how to use PMD's simple test framework for unit testing rules.
    @@ -2029,7 +2029,7 @@ you can verify the line number, too.

    Each <test-code> element defines a single test case. <code-fragment> elements are used to share code snippets between different test cases.

    - +

    <test-code> attributes

    @@ -2240,7 +2240,7 @@ create custom PMD rules for different languages including tests.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_extending_writing_java_rules.html b/pmd_userdocs_extending_writing_java_rules.html index fcf56a3b3e..6d55d7faa0 100644 --- a/pmd_userdocs_extending_writing_java_rules.html +++ b/pmd_userdocs_extending_writing_java_rules.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Writing a custom rule Edit on GitHubWriting a custom rule
    -
    +
    Learn how to write a custom rule for PMD
    @@ -2195,7 +2195,7 @@ create custom PMD rules for different languages.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_extending_writing_pmd_rules.html b/pmd_userdocs_extending_writing_pmd_rules.html index 8ebd33ef29..5cbcb1c194 100644 --- a/pmd_userdocs_extending_writing_pmd_rules.html +++ b/pmd_userdocs_extending_writing_pmd_rules.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Writing a custom rule Edit on GitHubWriting a custom rule
    -
    +
    @@ -1954,7 +1954,7 @@ your rule github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_extending_writing_rules_intro.html b/pmd_userdocs_extending_writing_rules_intro.html index 1d28972b15..77a60351f8 100644 --- a/pmd_userdocs_extending_writing_rules_intro.html +++ b/pmd_userdocs_extending_writing_rules_intro.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Introduction to writing PMD rules Edit on GitHubIntroduction to writing PMD rules
    -
    +
    Writing your own PMD rules
    @@ -2093,7 +2093,7 @@ your rule github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_extending_writing_xpath_rules.html b/pmd_userdocs_extending_writing_xpath_rules.html index 80c3add344..7fda7ffd8d 100644 --- a/pmd_userdocs_extending_writing_xpath_rules.html +++ b/pmd_userdocs_extending_writing_xpath_rules.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Writing XPath rules Edit on GitHubWriting XPath rules
    -
    +
    This page describes XPath rule support in more details
    @@ -3036,7 +3036,7 @@ Column numbers are 1-based. The end column is exclusive. github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_extending_your_first_rule.html b/pmd_userdocs_extending_your_first_rule.html index ca5d0cb656..ea1c1c0e26 100644 --- a/pmd_userdocs_extending_your_first_rule.html +++ b/pmd_userdocs_extending_your_first_rule.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Your first rule Edit on GitHubYour first rule
    -
    +
    Introduction to rule writing through an example for a XPath rule.
    @@ -2083,7 +2083,7 @@ of a rule of type XPathRule, which is how XPath rules are implemented.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_incremental_analysis.html b/pmd_userdocs_incremental_analysis.html index 3151bde5d7..5c01a91f67 100644 --- a/pmd_userdocs_incremental_analysis.html +++ b/pmd_userdocs_incremental_analysis.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Incremental Analysis Edit on GitHubIncremental Analysis
    -
    +
    Explains how to use incremental analysis to speed up analysis
    @@ -2037,7 +2037,7 @@ same execution classpath).

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_installation.html b/pmd_userdocs_installation.html index f919e15c63..ee90411627 100644 --- a/pmd_userdocs_installation.html +++ b/pmd_userdocs_installation.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Installation and basic CLI usage Edit on GitHubInstallation and basic CLI usage
    -
    +
    Sums up the first steps to set up a CLI installation and get started using PMD
    @@ -2122,7 +2122,7 @@ assertEquals(Boolean.TYPE, expressions.get(index++).getType()); github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_making_rulesets.html b/pmd_userdocs_making_rulesets.html index b16cf3297e..0c7be036ee 100644 --- a/pmd_userdocs_making_rulesets.html +++ b/pmd_userdocs_making_rulesets.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Making rulesets Edit on GitHubMaking rulesets
    -
    +
    A ruleset is an XML configuration file, which describes a collection of rules to be executed in a PMD run. PMD includes built-in rulesets to run quick analyses with a default configuration, but users are encouraged to make their own rulesets from the start, because they allow for so much configurability. This page walk you through the creation of a ruleset and the multiple configuration features offered by rulesets.
    @@ -2045,7 +2045,7 @@ on 3rd party rulesets.
    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_migrating_to_pmd7.html b/pmd_userdocs_migrating_to_pmd7.html index 9da49d4cfa..bdc92b2a8b 100644 --- a/pmd_userdocs_migrating_to_pmd7.html +++ b/pmd_userdocs_migrating_to_pmd7.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Migration Guide for PMD 7 Edit on GitHubMigration Guide for PMD 7
    -
    +
    Migrating to PMD 7 from PMD 6.x
    @@ -5496,7 +5496,7 @@ the ant task is in an own dependency with PMD 7: github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_report_formats.html b/pmd_userdocs_report_formats.html index ed36038ccd..60fffb1314 100644 --- a/pmd_userdocs_report_formats.html +++ b/pmd_userdocs_report_formats.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Report formats for PMD Edit on GitHubReport formats for PMD
    -
    +
    Overview of the built-in report formats for PMD
    @@ -1992,7 +1992,7 @@ columns, use these CLI parameters additionally: -property linkPrefix=https://github.com/pmd/pmd/blob/master/ -property linePrefix=L -shortnames -d pmd. +have been found. The following example has been created with -property linkPrefix=https://github.com/pmd/pmd/blob/main/ -property linePrefix=L -shortnames -d pmd. If “linkPrefix” is not set, then “linePrefix” has no effect anyway: just the filename will be rendered, with no html link. Otherwise if “linePrefix” is not set, then the link will not contain a line number.

    @@ -2178,7 +2178,7 @@ Was expecting one of:

    XML format.

    -

    This format is a XML document, that can be validated by a XSD schema. The schema is report_2_0_0.xsd.

    +

    This format is a XML document, that can be validated by a XSD schema. The schema is report_2_0_0.xsd.

    Example:

    @@ -2247,10 +2247,10 @@ Was expecting one of:

    PMD provides one built-in stylesheet, that is used by default, if no other stylesheet with the property “xsltFilename” is specified. It is called -pmd-nicerhtml.xsl +pmd-nicerhtml.xsl and can be used for customization.

    -

    There are many other stylesheets available online: https://github.com/pmd/pmd/tree/master/pmd-core/etc/xslt.

    +

    There are many other stylesheets available online: https://github.com/pmd/pmd/tree/main/pmd-core/etc/xslt.

    Examples:

      @@ -2308,7 +2308,7 @@ The output directory must exist. If not specified, the html files are created in github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_suppressing_warnings.html b/pmd_userdocs_suppressing_warnings.html index aa008d43c9..47163baf26 100644 --- a/pmd_userdocs_suppressing_warnings.html +++ b/pmd_userdocs_suppressing_warnings.html @@ -1560,7 +1560,7 @@ -
    • Contributing
    • +
    • Contributing
    • @@ -1876,7 +1876,7 @@ » Suppressing warnings Edit on GitHubSuppressing warnings
    -
    +
    Learn how to suppress some rule violations, from the source code using annotations or comments, or globally from the ruleset
    @@ -2154,7 +2154,7 @@ violations you wish to suppress. XPath queries are explained in github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_tools.html b/pmd_userdocs_tools.html index 19b7939a91..485a396769 100644 --- a/pmd_userdocs_tools.html +++ b/pmd_userdocs_tools.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Tools / Integrations Edit on GitHubTools / Integrations
    -
    +
    @@ -1997,7 +1997,7 @@ code quality, and be more conducive to inheriting an excellent team code culture BlueJ - pmd-bluej + pmd-bluej Tom Copeland @@ -2039,7 +2039,7 @@ code quality, and be more conducive to inheriting an excellent team code culture Gel - github: pmd/pmd-misc/pmd-gel + github: pmd/pmd-misc/pmd-gel Andrei Lumianski @@ -2067,7 +2067,7 @@ code quality, and be more conducive to inheriting an excellent team code culture JBuilder - github: pmd/pmd-misc/pmd-jbuilder + github: pmd/pmd-misc/pmd-jbuilder Tom Copeland @@ -2446,7 +2446,7 @@ the (blank Command Results) document, and then confirming that, “yes, I do rea github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_tools_ant.html b/pmd_userdocs_tools_ant.html index e17e2e2d58..b11b1a2c5f 100644 --- a/pmd_userdocs_tools_ant.html +++ b/pmd_userdocs_tools_ant.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Ant Task Usage Edit on GitHubAnt Task Usage
    -
    +
    @@ -2338,7 +2338,7 @@ To prevent this from happening, increase the maximum memory usable by ant using github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_tools_bld.html b/pmd_userdocs_tools_bld.html index 5c03e17d32..20413b0981 100644 --- a/pmd_userdocs_tools_bld.html +++ b/pmd_userdocs_tools_bld.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » bld PMD Extension Edit on GitHubbld PMD Extension
    -
    +
    @@ -1957,7 +1957,7 @@ github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_tools_ci.html b/pmd_userdocs_tools_ci.html index 78b604507d..a6ba5cfa12 100644 --- a/pmd_userdocs_tools_ci.html +++ b/pmd_userdocs_tools_ci.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Continuous Integrations plugins Edit on GitHubContinuous Integrations plugins
    -
    +
    @@ -1965,7 +1965,7 @@ GitHub Action, other CI tools or locally.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_tools_gradle.html b/pmd_userdocs_tools_gradle.html index cc72b3710d..7ae5ff2a28 100644 --- a/pmd_userdocs_tools_gradle.html +++ b/pmd_userdocs_tools_gradle.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Gradle Edit on GitHubGradle
    -
    +
    @@ -1992,7 +1992,7 @@ with the property toolVersion github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_tools_java_api.html b/pmd_userdocs_tools_java_api.html index ad08107637..2bc59db970 100644 --- a/pmd_userdocs_tools_java_api.html +++ b/pmd_userdocs_tools_java_api.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » PMD Java API Edit on GitHubPMD Java API
    -
    +
    @@ -1963,7 +1963,7 @@ as described here.

    github and create a PR: Edit on GitHub diff --git a/pmd_userdocs_tools_maven.html b/pmd_userdocs_tools_maven.html index 0896f7709c..786ace95a8 100644 --- a/pmd_userdocs_tools_maven.html +++ b/pmd_userdocs_tools_maven.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Maven PMD Plugin Edit on GitHubMaven PMD Plugin
    -
    +
    @@ -2176,7 +2176,7 @@ Also, the bug tracker for this plugin is Edit on GitHub diff --git a/report-examples/pmd-report-html.html b/report-examples/pmd-report-html.html index 2c1c41342d..0d745e32b9 100644 --- a/report-examples/pmd-report-html.html +++ b/report-examples/pmd-report-html.html @@ -3,20 +3,20 @@ #FileLineProblem 1 -pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java +pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java 124 Logger calls should be surrounded by log level guards. 2 -pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java +pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java 58 This for loop can be replaced by a foreach loop

    Processing errors

    - +
    FileProblem
    pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.javapmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java
    net.sourceforge.pmd.PMDException: Error while parsing pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java
         at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:110)
         at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:89)
    @@ -52,7 +52,7 @@ Was expecting one of:
     

    Suppressed warnings

    - + @@ -64,4 +64,4 @@ Was expecting one of: -
    FileLineRuleNOPMD or AnnotationReason
    pmd-core/src/main/java/net/sourceforge/pmd/PMD.javapmd-core/src/main/java/net/sourceforge/pmd/PMD.java 505 CloseResource AnnotationLoosePackageCoupling No packages or classes specified
    \ No newline at end of file + diff --git a/report-examples/pmd-report-summaryhtml.html b/report-examples/pmd-report-summaryhtml.html index 92dc3e1f72..cf6c056057 100644 --- a/report-examples/pmd-report-summaryhtml.html +++ b/report-examples/pmd-report-summaryhtml.html @@ -10,20 +10,20 @@ #FileLineProblem 1 -pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java +pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java 124 Logger calls should be surrounded by log level guards. 2 -pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java +pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java 58 This for loop can be replaced by a foreach loop

    Processing errors

    - +
    FileProblem
    pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.javapmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java
    net.sourceforge.pmd.PMDException: Error while parsing pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java
         at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:110)
         at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:89)
    @@ -59,7 +59,7 @@ Was expecting one of:
     

    Suppressed warnings

    - + @@ -71,4 +71,4 @@ Was expecting one of: -
    FileLineRuleNOPMD or AnnotationReason
    pmd-core/src/main/java/net/sourceforge/pmd/PMD.javapmd-core/src/main/java/net/sourceforge/pmd/PMD.java 505 CloseResource AnnotationLoosePackageCoupling No packages or classes specified
    \ No newline at end of file + diff --git a/tag_CpdCapableLanguage.html b/tag_CpdCapableLanguage.html index 7ee8eab8d1..162507015b 100644 --- a/tag_CpdCapableLanguage.html +++ b/tag_CpdCapableLanguage.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » CPD Capable Languages Edit on GitHubCPD Capable Languages
    -
    +
    @@ -2809,7 +2809,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_PmdCapableLanguage.html b/tag_PmdCapableLanguage.html index b6991a11f6..990baeef5a 100644 --- a/tag_PmdCapableLanguage.html +++ b/tag_PmdCapableLanguage.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » PMD Capable Languages Edit on GitHubPMD Capable Languages
    -
    +
    @@ -2707,7 +2707,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_devdocs.html b/tag_devdocs.html index dac909dde0..72dd1e7e88 100644 --- a/tag_devdocs.html +++ b/tag_devdocs.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Developer and contributor documentation Edit on GitHubDeveloper and contributor documentation
    -
    +
    @@ -2701,7 +2701,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_experimental.html b/tag_experimental.html index 750506f6ff..bac794a2ef 100644 --- a/tag_experimental.html +++ b/tag_experimental.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Experimental Features Edit on GitHubExperimental Features
    -
    +
    @@ -2629,7 +2629,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_extending.html b/tag_extending.html index 804f633b02..6fd4225531 100644 --- a/tag_extending.html +++ b/tag_extending.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Extending PMD Edit on GitHubExtending PMD
    -
    +
    @@ -2707,7 +2707,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_getting_started.html b/tag_getting_started.html index f477375f3c..cd8efa9e5e 100644 --- a/tag_getting_started.html +++ b/tag_getting_started.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Getting started pages Edit on GitHubGetting started pages
    -
    +
    @@ -2653,7 +2653,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_languages.html b/tag_languages.html index a11bf6780f..d759a6b9e5 100644 --- a/tag_languages.html +++ b/tag_languages.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Supported Languages Edit on GitHubSupported Languages
    -
    +
    @@ -2825,7 +2825,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_metrics.html b/tag_metrics.html index f0acf2bbeb..31fa33f505 100644 --- a/tag_metrics.html +++ b/tag_metrics.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Code metrics Edit on GitHubCode metrics
    -
    +
    @@ -2629,7 +2629,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_release_notes.html b/tag_release_notes.html index 3d2049a0fb..4882093592 100644 --- a/tag_release_notes.html +++ b/tag_release_notes.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Release Notes Pages Edit on GitHubRelease Notes Pages
    -
    +
    @@ -2629,7 +2629,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_rule_references.html b/tag_rule_references.html index 6f9f2ae3ca..fb364c3be8 100644 --- a/tag_rule_references.html +++ b/tag_rule_references.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Rule references Edit on GitHubRule references
    -
    +
    @@ -2725,7 +2725,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_tools.html b/tag_tools.html index 2ae63cab5f..7c2b81ad4c 100644 --- a/tag_tools.html +++ b/tag_tools.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Tools and integrations Edit on GitHubTools and integrations
    -
    +
    @@ -2671,7 +2671,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_troubleshooting.html b/tag_troubleshooting.html index 06ff1e7c5d..2b7dd6a368 100644 --- a/tag_troubleshooting.html +++ b/tag_troubleshooting.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » Troubleshooting pages Edit on GitHubTroubleshooting pages
    -
    +
    @@ -2629,7 +2629,7 @@ github and create a PR: Edit on GitHub diff --git a/tag_userdocs.html b/tag_userdocs.html index d9d533e9c5..d965956fcc 100644 --- a/tag_userdocs.html +++ b/tag_userdocs.html @@ -1560,7 +1560,7 @@ -
  • Contributing
  • +
  • Contributing
  • @@ -1876,7 +1876,7 @@ » User documentation Edit on GitHubUser documentation
    -
    +
    @@ -2803,7 +2803,7 @@ github and create a PR: Edit on GitHub