Compare commits

...
Author SHA1 Message Date
Andreas Dangel 655d1dc6c3 Prepare release of pmd-compat6 7.0.0-rc4 2023-11-18 10:33:47 +01:00
Andreas Dangel 621dffdf4e Merge pull request #4741 from adangel:pmd-compat6-module
Add pmd-compat6 module for maven-pmd-plugin #4741
2023-11-18 10:28:50 +01:00
Andreas Dangel 4df11b35f1 [doc] Improve release notes, migration guide 2023-11-18 10:28:04 +01:00
Andreas Dangel 1e331f08b4 Fix property name skip-pmd-compat6 2023-11-18 10:16:57 +01:00
Andreas Dangel 1c8c5cf434 Bump pmdtester from 1.5.4 to 1.5.5 2023-11-16 10:27:54 +01:00
Andreas Dangel aed95e6870 Remove unused imports 2023-11-14 21:07:37 +01:00
Andreas Dangel 94cdd8a022 [doc] Update release notes and migration guide (#4717) 2023-11-14 20:44:04 +01:00
Andreas Dangel a0814be895 Test formats csv and txt for PMD 2023-11-14 20:31:15 +01:00
Andreas Dangel 9dd646a030 Support formats csv and txt for CPD 2023-11-14 20:21:21 +01:00
Andreas Dangel 16967d3c60 Merge pull request #4719 from ciufudean:master
[java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string #4719
2023-11-10 09:23:08 +01:00
Andreas Dangel 9c71f587c6 Add @ciufudean as a contributor 2023-11-10 09:18:48 +01:00
Andreas Dangel 5aaaf2b5ec [doc] Update release notes (#4719) 2023-11-10 09:18:29 +01:00
Andreas Dangel 1140aa2d00 Merge pull request #4724 from Monits:pattern-properties
[java] Make allowExceptionNameRegex a Regex #4724
2023-11-10 09:13:36 +01:00
Andreas Dangel e4d9a02824 [doc] Update release notes (#1027, #4724) 2023-11-10 09:12:39 +01:00
Juan Martín Sotuyo Dodero 4ac1d5f5f3 Bump snayeyaml dependency 2023-11-10 08:57:57 +01:00
Andreas Dangel 9037f708ba Merge pull request #4738 from ethauvin:master
[doc] Added reference to the PMD extension for bld
2023-11-10 08:53:06 +01:00
Andreas Dangel dabd1b1a35 [doc] Update release notes (#4738) 2023-11-10 08:52:36 +01:00
Andreas Dangel 6567cfe0cf Add @ethauvin as a contributor 2023-11-10 08:52:23 +01:00
Andreas Dangel 08de860ed9 [doc] Link to correct pages of build tools from index 2023-11-10 08:51:57 +01:00
Andreas Dangel dd2bb98aa0 Fix PMD dogfood issue 2023-11-09 21:57:21 +01:00
Andreas Dangel 64d20e0368 Fix it verification scripts, only build for java11 2023-11-09 21:29:20 +01:00
Andreas Dangel 1c43a4689c Log failing integration tests 2023-11-09 20:58:41 +01:00
Andreas Dangel b5d0ffb02f New pmd-compat6 module
This makes it possible to use PMD7 with maven-pmd-plugin
2023-11-09 20:02:23 +01:00
Erik C. Thauvin 057f0ac40c Added reference to the PMD extension for bld 2023-11-04 17:03:28 -07:00
Andreas Dangel c5503c938f Merge pull request #4677 from tprouvot:feature/apex/avoidGetGlobalDescribesInLoops
[apex] Add new rule: OperationWithHighCostInLoop #4677
2023-10-28 12:55:33 +02:00
Andreas Dangel 5f5c63bab9 [apex] OperationWithHighCostInLoop: add test for SObjectDescribeOptions 2023-10-28 12:25:27 +02:00
Andreas Dangel 49a3a96ec9 [doc] Update release notes (#4675, #4677) 2023-10-28 12:16:04 +02:00
Andreas Dangel 8b4f677774 Merge branch 'master' into pr-4677 2023-10-28 12:10:35 +02:00
Andreas Dangel c7cc050983 [apex] OperationWithHighCostInLoop - support System.Schema... as well
And improve test cases
2023-10-28 12:07:23 +02:00
Andreas Dangel 95609960ac [apex] OperationWithHighCostInLoop - improve rule doc 2023-10-28 11:52:59 +02:00
Andreas Dangel 6d240b2a75 [apex] performance.xml - sort rules alphabetically 2023-10-28 11:24:56 +02:00
Andreas Dangel df52c374ee Merge pull request #4673 from wener-tiobe:patch-2
[javascript] CPD: Added support for decorator notation #4673
2023-10-26 17:11:34 +02:00
Andreas Dangel db45dcd6db Fix tests 2023-10-26 16:45:06 +02:00
Andreas Dangel e29cb490e0 [doc] Update release notes (#4673) 2023-10-26 16:39:32 +02:00
Andreas Dangel 567bf9ed71 [javascript] Separate @ from Identifier 2023-10-26 16:39:28 +02:00
Andreas Dangel 59a23b1f8a Merge branch 'master' into pr-4673 2023-10-26 16:25:34 +02:00
Andreas Dangel 20a7f612d8 Merge pull request #4594 from Monits:runtime-completion
[cli] Change completion generation to runtime #4594
2023-10-20 12:46:35 +02:00
Andreas Dangel ec3abf0ca2 [doc] Update release notes (#4594) 2023-10-20 11:45:58 +02:00
Andreas Dangel 1951c68589 [java] Revert unrelated change in LawOfDemeter.xml 2023-10-20 11:39:30 +02:00
Andreas Dangel 3d0839dd64 Merge pull request #4670 from pmd/dependabot/github_actions/master/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-10-20 11:29:00 +02:00
Andreas Dangel 504a21cf76 [doc] Update sidebar
The new XML rule introduced xml-bestpractices...
2023-10-20 11:27:02 +02:00
Andreas Dangel bc005a2c61 [doc] Update release notes (#3175, #4659, #4669, #4723, #4640) 2023-10-20 11:05:27 +02:00
Juan Martín Sotuyo Dodero 981f44406f Merge pull request #4686 from adangel/remove-apexversion
[apex] Remove ApexNode.getApexVersion()
2023-10-19 23:56:33 -03:00
Juan Martín Sotuyo Dodero 93f5a68218 Make allowExceptionNameRegex a Regex 2023-10-19 22:00:34 -03:00
Juan Martín Sotuyo Dodero b355e11c17 Merge pull request #4705 from adangel/issue-4645-CommentDefaultAccessModifier
[java] CommentDefaultAccessModifier: Fix ParameterizedTest annotation
2023-10-19 21:43:13 -03:00
Juan Martín Sotuyo Dodero 4c590a71bd Merge branch 'master' into issue-4645-CommentDefaultAccessModifier 2023-10-19 21:42:36 -03:00
Juan Martín Sotuyo Dodero 8e3d60a772 Merge branch 'master' into remove-apexversion 2023-10-19 21:34:35 -03:00
Juan Martín Sotuyo Dodero ef57fb643f Merge pull request #4669 from adangel/doc-bld-tool
[doc] Add bld PMD Extension to Tools / Integrations
2023-10-19 21:13:51 -03:00
Juan Martín Sotuyo Dodero 3b44f93f39 Merge pull request #4661 from adangel/issue-3175-doc-language-modules
[doc] Update language modules
2023-10-19 21:11:52 -03:00
Juan Martín Sotuyo Dodero 854d6e5c05 Merge branch 'master' into issue-3175-doc-language-modules 2023-10-19 21:11:32 -03:00
Juan Martín Sotuyo Dodero be429e9a3d Merge pull request #4659 from adangel/issue-4658-doc-ant-tasks
[ant] Improve documentation
2023-10-19 21:06:10 -03:00
Juan Martín Sotuyo Dodero 5bb4a9290d Add @shai-bennathan as a contributor 2023-10-19 20:59:28 -03:00
Juan Martín Sotuyo Dodero e0633a1c65 Update changelog refs #4640 2023-10-19 20:46:57 -03:00
Juan Martín Sotuyo Dodero 2fa80cbc34 Merge branch 'pr-4640' 2023-10-19 20:44:11 -03:00
Juan Martín Sotuyo Dodero 0e94fe55d1 Fix issue for conf dir too 2023-10-19 20:43:17 -03:00
Juan Martín Sotuyo Dodero a768230ca8 Merge pull request #4612 from adangel/multithreading-errors
[core] Deal with errors from threads in multithreading mode
2023-10-19 20:38:03 -03:00
Juan Martín Sotuyo Dodero 2e4e1275d4 Merge branch 'master' into runtime-completion 2023-10-19 20:32:19 -03:00
Juan Martín Sotuyo Dodero 974092b7b9 Update javadoc to reflect new behavior 2023-10-19 20:30:25 -03:00
Juan Martín Sotuyo Dodero 508034d4dd Assume pmd is in the PATH already when enabling completion 2023-10-19 20:27:04 -03:00
Juan Martín Sotuyo Dodero 7792404e7d Don't hide the completion command 2023-10-19 20:24:26 -03:00
Andreas Dangel 14b9029e97 Merge pull request #4592 from Monits:xml-declaration
[xml] Add MissingEncoding rule #4592
2023-10-19 10:29:53 +02:00
Andreas Dangel 42c7fb0f17 [doc] release notes (#4592) xml-bestpractices/MissingEncoding 2023-10-19 10:29:21 +02:00
Andreas Dangel 7fc50e434c [xml] MissingEncoding - fix rule metadata 2023-10-19 10:24:45 +02:00
Andreas Dangel e92de6c1da [xml] MissingEncoding - only look at root document element 2023-10-19 10:16:10 +02:00
Andreas Dangel 7b69ff7355 Merge branch 'master' into pr-4592 2023-10-19 10:10:55 +02:00
ciufudean 453685d6c4 toUpperCase() should compare to a capitalized string 2023-10-19 11:09:45 +03:00
Andreas Dangel 0c53b69e82 Merge pull request #4586 from adangel:ruleset-xml
Use explicit encoding in ruleset xml files #4586
2023-10-19 09:41:57 +02:00
Andreas Dangel 2450177da6 [doc] Update release notes (#4586) 2023-10-19 09:40:19 +02:00
Andreas Dangel b9bc6ac58b Merge pull request #4699 from adangel:build-with-java21
Make PMD buildable with java 21 #4699
2023-10-19 09:37:05 +02:00
Andreas Dangel 809e1f8763 [doc] Update release notes (#4699) 2023-10-19 09:35:24 +02:00
Andreas Dangel d983be0a83 [ci] Use ga of java 21 from adoptium 2023-10-19 09:35:04 +02:00
Andreas Dangel 6366dc3d97 Bump byte-buddy from 1.12.19 to 1.14.9 2023-10-18 17:24:01 +02:00
Andreas Dangel 546a28aa23 Revert "[core] PmdAnalysisTest: Use concrete class to spy on"
This reverts commit df6a271f4f.
2023-10-18 17:23:26 +02:00
Thomas ProuvotandAndreas Dangel f4c3fc02a8 Update pmd-apex/src/main/resources/category/apex/performance.xml
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2023-10-18 15:42:09 +02:00
Thomas ProuvotandAndreas Dangel f0f05c6e2c Update pmd-apex/src/main/resources/category/apex/performance.xml
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2023-10-18 15:41:38 +02:00
Andreas Dangel 2bbb193d4e Merge pull request #4561 from adangel:issue-2847-new-rule-explicit-types
[java] New Rule: Use Explicit Types #4561
2023-10-06 19:51:40 +02:00
Andreas Dangel f7c913084a Add @harbulot as a contributor 2023-10-06 19:44:21 +02:00
Andreas Dangel e31c77c101 Merge pull request #4591 from Monits:fix-4578
[java] Fix #4578 - CommentDefaultAccessModifier comment needs to be before annotation if present #4591
2023-10-06 19:43:57 +02:00
Andreas Dangel 01a8a36f49 Merge branch 'master' into pr-4591 2023-10-06 19:15:58 +02:00
Andreas Dangel 8aeb45d9d7 [doc] Update release notes (#2847) 2023-10-06 19:06:57 +02:00
Andreas Dangel e9ed7dc25c [java] Fix quickstart ruleset for new rule UseExplicitTypes 2023-10-06 19:06:42 +02:00
Andreas Dangel 4ca9b26abb Merge branch 'master' into issue-2847-new-rule-explicit-types 2023-10-06 19:01:53 +02:00
Andreas Dangel c071143880 [java] CommentDefaultAccessModifier: Fix ParameterizedTest annotation
Fixes #4645
2023-10-06 18:58:15 +02:00
Andreas Dangel 89c7da82f4 [doc] Restore release notes for next rc 2023-09-30 20:52:56 +02:00
Andreas Dangel 70e25642ff [ci] Fix build scripts 2023-09-30 20:44:03 +02:00
Andreas Dangel 96e897ecdd Prepare next development version [skip ci] 2023-09-30 17:16:58 +02:00
Andreas Dangel 345bb24a25 [release] prepare for next development iteration 2023-09-30 17:15:59 +02:00
Andreas Dangel 720b9a328b [release] prepare release pmd_releases/7.0.0-rc4 2023-09-30 17:15:54 +02:00
Andreas Dangel 30c06ea182 Prepare pmd release 7.0.0-rc4 2023-09-30 16:54:18 +02:00
Andreas Dangel 1aeb2e0822 [ci] Build cli-dist for snapshots 2023-09-30 11:25:46 +02:00
Andreas Dangel 7917595c54 Bump build-tools from 22-SNAPSHOT to 22 2023-09-30 10:57:51 +02:00
Andreas Dangel 5ca007ea27 Merge pull request #4700 from adangel:two-step-release
[ci] Introduce a two-step release process #4700
2023-09-30 10:29:58 +02:00
Andreas Dangel 86f1e4b1eb Merge pull request #4696 from adangel:bump-scala
Bump various scala versions #4696
2023-09-30 10:26:19 +02:00
Andreas Dangel 4d225fa962 Merge pull request #4695 from adangel:update-designer
Bump pmd-designer from 7.0.0-rc1 to 7.0.0-SNAPSHOT #4695
2023-09-30 10:25:19 +02:00
Andreas Dangel f3e0a31d6f [ci] Add link to release process of pmd-designer 2023-09-29 20:25:43 +02:00
Andreas Dangel 289177c672 Introduce a two-step release process
1. Release all modules except pmd-cli and pmd-dist
2. Release pmd-cli and pmd-dist

This allows to release pmd-designer in between.
2023-09-29 20:20:53 +02:00
Andreas Dangel 3fe1f8b5d9 Make doc use lang-deps instead of dist 2023-09-29 17:23:02 +02:00
Andreas Dangel 90bd23404e Move cli and dist into profile "cli-dist" to be released separately 2023-09-29 16:54:12 +02:00
Andreas Dangel c21bf43cc2 [doc] Update release notes (#4691) 2023-09-29 15:31:47 +02:00
Andreas Dangel 06d190d1d3 Add @eugenepugach as a contributor 2023-09-29 15:31:14 +02:00
Andreas Dangel f6f9e55c78 [scala] Add additional AST nodes after scala-meta upgrade 2023-09-29 15:29:37 +02:00
Andreas Dangel df6a271f4f [core] PmdAnalysisTest: Use concrete class to spy on
This makes mockito be happy even with java21.
2023-09-29 14:56:20 +02:00
Andreas Dangel 21238e2a36 Bump org.scala-lang:scala-reflect from 2.13.3 to 2.13.12 2023-09-29 14:17:20 +02:00
Andreas Dangel fcaa79a718 Bump org.scala-lang:scala-library from 2.13.9 to 2.13.12 2023-09-29 14:13:07 +02:00
Andreas Dangel 5bab32ad8c Bump org.scalameta:* from 4.6.0 to 4.8.11 2023-09-29 14:12:31 +02:00
Andreas Dangel 537df61000 Bump org.scala-lang:scala-library from 2.12.17 to 2.12.18 2023-09-29 14:11:31 +02:00
Andreas Dangel c6db11610c Bump pmd-designer from 7.0.0-rc1 to 7.0.0-SNAPSHOT
Also remove jcommander, this is not needed anymore
2023-09-29 14:06:22 +02:00
Andreas Dangel e7aa2c4874 Merge pull request #4693 from adangel:update-gems
Update gems #4693
2023-09-28 17:15:10 +02:00
Andreas Dangel 5208afd057 Merge pull request #4692 from adangel:wiremock-2.35.1
Bump wiremock from 2.33.2 to 2.35.1 #4692
2023-09-28 17:14:19 +02:00
Andreas Dangel 9592e95c86 [doc] Update release notes - mention migration guide explicitly 2023-09-28 13:57:18 +02:00
Andreas Dangel 0f1b4cd7f3 Update @nwcm as a contributor 2023-09-28 13:42:55 +02:00
Andreas Dangel e455d702bf Add @Marcono1234 as a contributor 2023-09-28 13:41:51 +02:00
Andreas Dangel a108492ee3 Add @eant60 as a contributor 2023-09-28 13:37:58 +02:00
Andreas Dangel 94d374acaa Update gems
* Bump commonmarker from 0.23.9 to 0.23.10
** Fixes https://github.com/pmd/pmd/security/dependabot/43
** Fixes https://github.com/advisories/GHSA-7vh7-fw88-wj87
* Bump activesupport from 7.0.5 to 7.0.8
** Fixes https://github.com/pmd/pmd/security/dependabot/45
** Fixes CVE-2023-38037
** Fixes https://github.com/advisories/GHSA-cr5q-6q9f-rq6q
* Bump addressable from 2.8.4 to 2.8.5
* Bump danger from 9.2.0 to 9.3.2
* Bump execjs from 2.8.1 to 2.9.1
* Bump faraday from 2.7.5 to 2.7.11
* Bump ffi from 1.15.5 to 1.16.2
* Bump i18n from 1.13.0 to 1.14.1
* Bump mini_portile2 from 2.8.2 to 2.8.4
* Bump minitest from 5.18.0 to 5.20.0
* Bump nokogiri from 1.15.2 to 1.15.4
* Bump octokit from 5.6.1 to 6.1.1
* Bump public_suffix from 5.0.1 to 5.0.3
* Bump racc from 1.6.2 to 1.7.1
* Bump rexml from 3.2.5 to 3.2.6
* Bump rouge from 4.1.1 to 4.1.3
* Bump rufus-schedule from 3.8.2 to 3.9.1
2023-09-28 12:17:26 +02:00
Andreas Dangel 0d899d64f9 Bump wiremock from 2.33.2 to 2.35.1
Fixes https://github.com/pmd/pmd/security/dependabot/48
Fixes CVE-2023-41329
Fixes https://github.com/advisories/GHSA-pmxq-pj47-j8j4
2023-09-28 12:05:02 +02:00
Andreas Dangel 357548cdad Merge pull request #4638 from adangel:issue-4583-jdk-21
[java] Support JDK 21 (LTS) #4638
2023-09-28 11:58:51 +02:00
Andreas Dangel 066cd27764 Merge pull request #4611 from adangel:language-proprties-env
[core] Fix loading language properties from env vars #4611
2023-09-28 11:19:33 +02:00
Andreas Dangel c667efe108 [doc] Update release notes (#4611) 2023-09-28 11:19:05 +02:00
Andreas Dangel 601e594acf Merge branch 'master' into pr-4611 2023-09-28 11:18:15 +02:00
Andreas Dangel abbee4bb5c Merge pull request #4610 from adangel:issue-4453-apex-link-arrayoutofbounds
[apex] Add rule test for UnusedMethod #4610
2023-09-28 11:16:36 +02:00
Andreas Dangel c2b2a326b6 Merge pull request #4605 from adangel:issue-3973-apex-jorje
[apex] Update jorje #4605
2023-09-28 11:08:38 +02:00
Andreas Dangel d24d631217 Fix tests 2023-09-28 11:00:22 +02:00
Andreas Dangel d445b1d55c [java] Update LanguageVersionTest 2023-09-28 10:44:47 +02:00
Andreas Dangel 15ea5f0c00 Merge branch 'master' into issue-4583-jdk-21 2023-09-28 10:04:42 +02:00
Andreas Dangel 4d185d5a76 Merge branch 'master' into pr-4605 2023-09-28 09:26:01 +02:00
Andreas Dangel 3e7e050251 [apex] Remove ApexNode.getApexVersion() 2023-09-22 19:39:42 +02:00
Thomas Prouvot 2d7521401d Add apex new rule OperationWithHighCostInLoop 2023-09-14 10:10:37 +02:00
wener ec36fcc52f Fixed stylecheck issue. 2023-09-12 13:09:49 +02:00
wener dca539b841 Added unittest for decorators. 2023-09-12 11:30:34 +02:00
Wener 940585de9a Update TypeScriptTokenizerTest.java 2023-09-12 11:05:21 +02:00
Wener e0b3d206c2 Create decorator.ts 2023-09-12 10:50:05 +02:00
Wener 836230b7e7 Added support for "@" in identifiers
This is to resolve the following error on a typescript file:

[main] ERROR net.sourceforge.pmd.cli - Error while tokenizing: Lexical error in file '.\TableList.js' at
 line 67, column 1: "@" (64), after : "" (in lexical state DEFAULT)
2023-09-12 10:36:12 +02:00
dependabot[bot] c7401e130b Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:41:17 +00:00
Andreas Dangel 347d5992d1 Merge pull request #4649 from rcorfieldffdc:defect/4646-apex-soql-injection-sobjecttype-token-variables
[apex] Add SObjectType and SObjectField to list of injectable SOQL variable types #4649
2023-09-09 12:19:10 +02:00
Andreas Dangel a3644479e6 Add @m0rjc as a contributor
Closes #4648
2023-09-09 12:14:22 +02:00
Andreas Dangel 007decabe4 Add @rcorfieldffdc as a contributor
Closes #4647
2023-09-09 12:13:52 +02:00
Andreas Dangel 7d0e1f00cc [doc] Update release notes (#4649, #4646) 2023-09-09 12:11:19 +02:00
Andreas Dangel 518a5ee747 [doc] Add style for blockquotes 2023-09-09 12:00:41 +02:00
Andreas Dangel 839539d14b [doc] Add bld PMD Extension to Tools / Integrations 2023-09-09 11:48:18 +02:00
Andreas Dangel a2a64a7577 Merge pull request #4651 from cyw3:master (rebased)
[doc] Add "Tencent Cloud Code Analysis" in Tools / Integrations #4651

Closes #4651
2023-09-09 11:30:46 +02:00
Andreas Dangel c6a10db72b Update @cyw3 as a contributor 2023-09-09 11:25:27 +02:00
Andreas Dangel ecb6b39294 [doc] Update release notes (#4651) 2023-09-09 11:24:59 +02:00
Andreas Dangel deb60b1521 [doc] Sort tools for automatic code review alphabetically 2023-09-09 11:23:46 +02:00
yale 71e622f789 📝 update integrations md 2023-09-09 11:20:44 +02:00
Andreas Dangel 19f14e906e Merge pull request #4664 from wener-tiobe:patch-1
[cli] CPD: Fix NPE when only --file-list is specified #4664
2023-09-09 11:17:00 +02:00
Andreas Dangel 7076f162d7 [doc] Update release notes (#4423, #4664) 2023-09-09 10:55:41 +02:00
Andreas Dangel 8db5e83a37 [cli] Add test case for CPD --file-list 2023-09-09 10:55:00 +02:00
Andreas Dangel ca53c60ea8 Merge pull request #4665 from AndreyBozhko:autocloseable
[java] Doc: Fix references AutoClosable -> AutoCloseable #4665
2023-09-08 21:17:54 +02:00
Andreas Dangel dc1d4f9096 Add @AndreyBozhko as a contributor 2023-09-08 21:17:31 +02:00
Andreas Dangel b4150afcd5 [doc] Update release notes (#4665) 2023-09-08 21:15:55 +02:00
Andreas Dangel 52381a2acb Update TODO [skip ci] 2023-09-08 21:12:44 +02:00
Andreas Dangel ced61fb9bf [doc] Create experimental features page 2023-09-08 21:08:40 +02:00
Andreas Dangel 6978f4020c [doc] Improve language docs
- add links to language docs
- make summary consistent
- rename TSql -> T-SQL
2023-09-08 21:01:54 +02:00
Andrey Bozhko ba35bdc6bc [doc] AutoClosable -> AutoCloseable 2023-09-06 16:50:16 +00:00
Wener d79df96b7d Update CpdCommand.java 2023-09-06 18:01:19 +02:00
Andreas Dangel 039f5fbd85 [doc] Improve language docs 2023-09-05 19:53:21 +02:00
Andreas Dangel 81b1d7e32b [doc] Add tags PmdCapableLanguage and CpdCapableLanguage 2023-09-04 19:18:50 +02:00
Andreas Dangel 92b2718da7 Fix unit test 2023-09-04 19:09:21 +02:00
Andreas Dangel 91a1c21680 [doc] jdoc tag: Report location incl. linenumber for warnings 2023-09-01 13:00:45 +02:00
Andreas Dangel 107b8e5b67 [doc] Add pages for all supported language 2023-09-01 12:13:56 +02:00
Andreas Dangel ca40dc41b0 [doc] Add language info summary 2023-09-01 09:41:46 +02:00
Andreas Dangel 291a5aa956 [doc] Update language module docs (apex, java, visualforce) 2023-08-31 17:17:54 +02:00
Andreas Dangel 512d6cbb8d Merge pull request #4590 from adangel:issue-4294-migration-guide
[doc] Add migration guide for PMD 7 #4590
2023-08-31 16:20:57 +02:00
Andreas Dangel 61b603798c [doc] Update release notes (#4294, #4590) 2023-08-31 16:20:07 +02:00
Andreas Dangel a0b700dd95 [doc] Use unicode left arrow ➡️ instead of -> 2023-08-31 15:09:06 +02:00
Andreas Dangel aeba5f4fe6 [doc] Add "Migrating custom CPD language modules"
#4397
2023-08-31 15:06:07 +02:00
Andreas Dangel 55c65faa06 [doc] Update version of maven-pmd-plugin 2023-08-31 14:59:12 +02:00
Andreas Dangel 859a06a7e6 [doc] List rules which use now a different delimiter for multi-valued properties
#4380
2023-08-31 14:54:52 +02:00
Andreas Dangel 55eefcac03 Merge branch 'master' into issue-4294-migration-guide 2023-08-31 14:47:13 +02:00
Andreas Dangel 6e61b9f2a8 [ant] Improve documentation
Refs #4658
2023-08-31 14:42:53 +02:00
Andreas Dangel 056b339eb4 Merge pull request #4397 from oowekyala:clem.pmd7-refactor-cpd
[core] Refactor CPD #4397
2023-08-29 19:23:23 +02:00
Andreas Dangel 5d873fd241 Merge branch 'master' into issue-2847-new-rule-explicit-types 2023-08-28 20:26:17 +02:00
Andreas Dangel e33be0ba48 [java] UseExplicitTypes - move to category codestyle 2023-08-28 20:26:05 +02:00
Andreas Dangel 34cd92c55e [java] UseExplicitTypes - improve rule documentation 2023-08-28 19:42:22 +02:00
Andreas Dangel fc0b3ad145 [doc] Release notes (#4397) 2023-08-27 18:41:20 +02:00
Andreas Dangel f65a7cb450 [doc] Release notes and API changes (#3919, #4204, #4323, #4397) 2023-08-27 17:35:52 +02:00
Andreas Dangel ad4a19fbe2 [doc] CPD Language Properties 2023-08-27 17:33:56 +02:00
Andreas Dangel a2765a17f0 [doc] Update CPD supported languages 2023-08-27 16:09:58 +02:00
Andreas Dangel 1aefe472c3 Add correct tokenizers for vm, pom, wsdl and xsl 2023-08-26 18:49:08 +02:00
Andreas Dangel c1109b48fa [core] Fix potential NPE in SourceManager
when SoftReferences have been freed.
2023-08-26 18:49:03 +02:00
Andreas Dangel 908f480702 [core] CPD GUI - fix empty SourceManager
- Introduce ExitAction
- Sort languages by name
2023-08-26 18:48:57 +02:00
Andreas Dangel 32afa53f8e All language modules: getInstance()
Use a consistent implementation of getInstance().
Now all modules resolve against the LanguageRegistry.
2023-08-24 16:01:27 +02:00
Andreas Dangel 80856732cc Fix checkstyle 2023-08-24 14:19:36 +02:00
Andreas Dangel 41ff4beb2b [php] Recognize "//" as eol comment 2023-08-24 11:58:16 +02:00
Andreas Dangel 8511c7b0e1 [core] Move PmdCapableLanguage to n.sf.pmd.lang 2023-08-24 11:42:50 +02:00
Andreas Dangel 6298d87e71 [core] Add minimal javadoc for CpdAnalysis 2023-08-24 11:39:59 +02:00
Andreas Dangel 681c52836c [core] Create CpdLanguageProperties 2023-08-24 11:14:08 +02:00
Andreas Dangel 932ac33d15 Merge branch 'master' into pr-4397 2023-08-24 09:48:28 +02:00
Andreas Dangel 3984dc2493 [core] Configurations - keep fields private 2023-08-24 09:46:09 +02:00
Andreas Dangel 5200cc9e8a [cli] Fix javadoc 2023-08-24 09:32:01 +02:00
Andreas Dangel c6a63da887 [cli] Remove todo about slf4j 2023-08-24 09:28:49 +02:00
Andreas Dangel 67cbb947ef [cli] Move option "--relativize-paths-with" up to AbstractAnalysisPmdSubcommand
It applies to both PMD and CPD
2023-08-24 09:25:29 +02:00
Andreas Dangel df08d08608 [apex] Remove cpd property CASE_SENSITIVE 2023-08-24 09:10:06 +02:00
Andreas Dangel 9ce9b24f2a [doc] Mention pmd-languages-deps and module 2023-08-24 09:01:50 +02:00
Andreas Dangel 027fb4b9f4 Merge pull request #4380 from oowekyala:port-properties
[core] Update properties framework #4380
2023-08-22 19:55:34 +02:00
Juan Martín Sotuyo Dodero 9aa81016b0 Merge pull request #4643 from adangel/issue-4521-mobile-website
[doc] Make side fixed only for big screens
2023-08-22 11:33:24 -03:00
Richard Corfield 4151ca13f2 Fix Checkstyle errors by changing tab indentation to spaces
mvnw clean verify - now passes.
2023-08-18 17:53:19 +01:00
Richard Corfield 8f19067535 A neater set instantiation 2023-08-18 17:33:57 +01:00
Richard Corfield 2ab8447654 Remove the tests related to issue 4650
This commit will need to be reverted in 4650's branch.
2023-08-18 17:28:06 +01:00
Andreas Dangel 10a50b8677 [ci] Use adjusted m-pmd-p for dogfood 2023-08-17 18:59:07 +02:00
Richard Corfield bcbaffcf21 Add unit tests for the behavior I hope to see
Two of these tests are failing. It doesn't recognise constants.
I guess that it never has recognised constants, and this is another
problem in the code. I don't know whether to try to fix this or consider
it a different problem so I can make smaller pull requests.
2023-08-17 10:59:59 +01:00
Richard Corfield d85a1a7cfe Add SObjectType and SObjectField to list of injectable SOQL variable types 2023-08-17 10:07:51 +01:00
Andreas Dangel a9ed11b7be [doc] Fix dead links 2023-08-17 10:10:21 +02:00
Andreas Dangel 86fdc446d4 Suppress PMD warnings (UnnecessaryConstructor) 2023-08-17 10:03:12 +02:00
Andreas Dangel 894d9fba84 Merge branch 'master' into pr-4397 2023-08-17 09:31:53 +02:00
Andreas Dangel 24257a0207 [core] revert property collection syntax <seq>
Refs #4305
2023-08-15 17:55:09 +02:00
Andreas Dangel 5846666dba [core] Support min/max as property constraints in RuleSetWriter
Refs #1204
2023-08-15 17:47:17 +02:00
Andreas Dangel 5eea2f3e94 [core] Add tests in RuleSetFactoryMessages
- moved deprecated delimiter test to messages
- added value as attribute and tag test
2023-08-12 11:51:05 +02:00
Andreas Dangel 79d6e8bc48 [core] NumericConstraints - add tests for above/below 2023-08-12 11:30:20 +02:00
Andreas Dangel 3ea4031d0e [core] PropertyDescriptor - remove deprecated methods
Update tests and usages for valueFrom/asDelimitedString
2023-08-12 11:23:20 +02:00
Andreas Dangel 8681e8d7f9 [ci] Update Dangerfile - fix link to download regression report
[skip ci]
2023-08-12 11:12:30 +02:00
Andreas Dangel ea11fcda54 [core] Minor refactorings 2023-08-12 11:09:43 +02:00
Andreas Dangel 28c017ca8a [doc] Update release notes (rule properties)
#1204 #4301 #4302 #4303
2023-08-12 10:03:13 +02:00
Andreas Dangel 67fac20ac7 [doc] Update doc about (rule) properties
Refs #4303
2023-08-12 09:40:22 +02:00
Andreas Dangel faa2d0ae56 [ci] Stop uploading regression tester record to chunk.io 2023-08-10 17:48:01 +02:00
Andreas Dangel b73611f013 Merge branch 'master' into pr-4380 2023-08-10 17:37:36 +02:00
Andreas Dangel f980c1f17b [doc] Make side fixed only for big screens
Also wrap the inline-toc in an accordion to
save some space.
Remove some of the unneeded javascript.

Fixes #4521
2023-08-10 17:30:06 +02:00
Andreas Dangel a93c8f2b7b [doc] Add JDK21 to the build for integration testing
Note: This is using 21-ea for now
2023-08-10 15:37:35 +02:00
Andreas Dangel 99948c8fb6 [doc] Update release notes (JDK 21 Support) 2023-08-10 15:37:33 +02:00
Andreas Dangel 000f2e86fd [java] Fix more parsing errors after supporting String Templates 2023-08-10 15:36:30 +02:00
Andreas Dangel 41643dd020 [java] Avoid using Thread.fillInStackTrace() for token context
This requires to use the option TOKEN_MANAGER_USES_PARSER
2023-08-10 15:36:30 +02:00
Andreas Dangel d061883ca6 [java] Fix CPD tests, use latest java version
Now the files need to be syntactically valid java sources.
2023-08-10 15:36:30 +02:00
Andreas Dangel 630626ca82 [java] Fix Tokenizer for CPD after supporting String Templates 2023-08-10 15:36:29 +02:00
Andreas Dangel 38a5e827e9 Fix code duplication 2023-08-10 15:36:29 +02:00
Andreas Dangel f4c86b25ae [java] Support Unnamed Classes and Instance Main Methods for Java 21 Preview
JEP 445
2023-08-10 15:36:29 +02:00
Andreas Dangel 216dd09405 [java] Support Unnamed Patterns and Variables for Java 21 Preview
JEP 443
2023-08-10 15:36:28 +02:00
Andreas Dangel 715d58fef3 [java] Support String Templates for Java 21 Preview
JEP 430
2023-08-10 15:36:28 +02:00
Andreas Dangel c2710c9a91 Fix pmd-dist tests 2023-08-10 15:36:28 +02:00
Andreas Dangel b5d00b7e42 Fix checkstyle 2023-08-10 15:36:27 +02:00
Andreas Dangel 2488107b23 [java] Update impl for record patterns for java 21
- renamed ASTComponentPatternList to ASTPatternList
2023-08-10 15:36:27 +02:00
Andreas Dangel 3bdb921548 [java] Update impl for pattern matching for switch for java 21
- renamed ASTSwitchGuard to ASTGuard
2023-08-10 15:36:27 +02:00
Andreas Dangel 05d55d0d7a [java] Update tests for java 21
Only Pattern Matching for switch
2023-08-10 15:36:27 +02:00
Andreas Dangel 0ea6336044 [java] Add tests for java 21-preview
Copied from 20-preview
2023-08-10 15:36:26 +02:00
Andreas Dangel 9fa7565807 [java] Remove version java 19-preview 2023-08-10 15:36:26 +02:00
Andreas Dangel 0566eedfb4 [java] Bump asm from 9.4 to 9.5 2023-08-10 15:36:26 +02:00
Andreas Dangel 0cd0b40ede [java] Add new versions 21 and 21-preview 2023-08-10 15:36:25 +02:00
Andreas Dangel 2b0cadf0ed Bump maven from 3.9.2 to 3.9.4 2023-08-10 13:54:09 +02:00
Andreas Dangel 510608f9af Bump cyclonedx-maven-plugin from 2.7.6 to 2.7.9 2023-08-10 13:52:44 +02:00
Shai BennathanandJuan Martín Sotuyo Dodero 56ae02ad35 Update pmd-dist/src/main/resources/scripts/pmd
Co-authored-by: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2023-08-07 15:32:11 +03:00
Shai Bennathan 295ee304a4 Issue: Launch failure via bin/bash
Currently if run.sh is launched via 'bin/bash run.sh', when run.sh is not in the local directory (i.e., accessed via path env var) it thinks it runs in the local directory.
This change makes sure that all cases are covered.
Tested on local Ubuntu 22.04.
2023-08-07 12:51:09 +03:00
Andreas Dangel 1021b3b7d4 Merge pull request #4637 from krdabrowski:fix-4634
[java] fix #4634 - JUnit4TestShouldUseTestAnnotation false positive with TestNG #4637
2023-08-05 20:12:40 +02:00
Andreas Dangel 7b5a70e3c7 Add @krdabrowski as a contributor 2023-08-05 20:10:57 +02:00
Andreas Dangel 8523adc53b [doc] Update release notes (#4637, #4634) 2023-08-05 20:10:32 +02:00
Krystian Dabrowski 91d7cc2f21 Refs https://github.com/pmd/pmd/issues/4634
- fix the JUnit4TestShouldUseTestAnnotation rule for TestNG,
- add test
- update changelog
2023-08-04 10:45:05 +02:00
Andreas Dangel a065600e48 Update migration guide (Final touches)
- Final touches
2023-07-08 20:39:38 +02:00
Andreas Dangel 55f74601ed Update migration guide (Java AST)
- Final touches for Java AST changes:
add jdoc links, add details collapsible
- Move info from release notes into migration guide
2023-07-08 20:32:35 +02:00
Andreas Dangel 41964fe6b2 Update migration guide (Language versions, Build Tools)
- Language versions
- Build Tools
2023-07-08 20:32:20 +02:00
Andreas Dangel cb493bb537 Update migration guide
- Extending PMD
- Release downloads
- CLI changes
- Custom distributions
- Rule Tests
- CPD endcolumn
2023-07-08 16:29:27 +02:00
Andreas DangelandJuan Martín Sotuyo Dodero 5813391a98 Apply suggestions from review
Co-authored-by: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2023-07-07 20:03:02 +02:00
Andreas Dangel 6f278c4a42 [java] Update JavaDesignerBindings: Expose Operator as main attribute
for AssignmentExpression and UnaryExpression
2023-07-07 19:46:16 +02:00
Andreas Dangel 0bc59a818a Update migration guide (Java AST: Expressions)
- Field access, array access, variable access
- this/super expressions
- type expressions
- method call chains
- Parenthesized expressions
2023-07-07 19:45:20 +02:00
Andreas Dangel 3164e93e94 Update migration guide (Java AST: Expressions)
Literals, Method calls, Constructor calls
2023-07-07 15:33:56 +02:00
Andreas Dangel b53214e9c6 Update migration guide (Java AST: Statements) 2023-07-07 15:01:37 +02:00
Andreas Dangel 3e2de67190 Merge pull request #4621 from oowekyala:issue4620-classloading-child-first
[core] Make ClasspathClassLoader::getResource child first #4621
2023-07-06 11:08:19 +02:00
Andreas Dangel 42aee1d3d8 Simplify test case 2023-07-06 09:45:06 +02:00
Andreas Dangel 3a6fe3d507 [doc] Update release notes - removed apex rules 2023-07-06 09:12:04 +02:00
Andreas Dangel 43948893e3 Update migration guide (Java AST: Flattened Statements) 2023-07-06 09:07:49 +02:00
Clément Fournier 9673a23912 Update release notes 2023-07-02 17:54:52 +02:00
Clément Fournier 11ca2952e5 Add test 2023-07-02 17:52:36 +02:00
Clément Fournier b327c13679 Make ClasspathClassLoader::getResource child first 2023-07-02 17:33:36 +02:00
Clément Fournier 0557c5c85e Add tests for UseDiamondOperator
refs #4619
2023-07-02 17:05:30 +02:00
Andreas Dangel ec201c9af6 Update migration guide (Java AST: Body declarations, Module declarations, anonymous class declarations, method and constructor declarations, formal parameters, void type) 2023-06-30 16:55:39 +02:00
Andreas Dangel 6fc45493e7 [core] Deal with errors from threads in multithreading mode
If an error occurs in multithreading mode, PMD now
rethrows this. Such errors indicate a serious problem
like incomplete runtime classpath of PMD or other
VM error (out of memory) that shouldn't be swallowed.
2023-06-29 18:56:10 +02:00
Andreas Dangel 5f4acdb400 [core] Fix loading language properties from env vars
The environment variables should be uppercase as documented.
2023-06-29 13:04:51 +02:00
Andreas Dangel 53fcf249ee [doc] Update release notes (#4453) 2023-06-29 11:54:44 +02:00
Andreas Dangel 256ae42830 [apex] Fix rule test for UnusedMethod
Refs #4453
2023-06-29 11:52:02 +02:00
Andreas Dangel 670eea4f3b [apex] Add rule test for UnusedMethod
Refs #4453
2023-06-29 09:45:03 +02:00
Andreas Dangel 2f36868dcd Merge pull request #4528 from nawforce/update-apexlink
[apex] Update to apexlink
2023-06-26 20:55:04 +02:00
Andreas Dangel 1d66177c48 Update @nawforce as a contributor 2023-06-26 19:55:41 +02:00
Andreas Dangel e084b4978e [doc] Update release notes (#4528) 2023-06-26 19:36:02 +02:00
Andreas Dangel 60dfa53f77 Fix checkstyle 2023-06-26 19:32:07 +02:00
Andreas Dangel 68cc4e7315 Fix test - add workaround for differing antlr versions 2023-06-26 19:27:30 +02:00
Andreas Dangel 79b5904827 Merge branch 'master' into pr-4528 2023-06-26 18:17:29 +02:00
Andreas Dangel 56d5bfc908 [doc] Update release notes for PMD 7 2023-06-24 22:46:17 +02:00
Andreas Dangel 0b9d5ec5e4 [apex] ApexCRUDViolation: Add support for "as user"
Refs #4368
2023-06-24 22:46:17 +02:00
Andreas Dangel 25539e1fc0 Guava is needed for apex at runtime as well - remove default scope test 2023-06-24 22:46:17 +02:00
Andreas Dangel deed0ec8cc Bump guava from 31.0.1 to 32.0.1
Fixes https://github.com/pmd/pmd/security/dependabot/41
Fixes CVE-2023-2976
Fixes https://github.com/advisories/GHSA-7g45-4rm6-3mm3
2023-06-24 22:46:16 +02:00
Andreas Dangel aeb1504079 [apex] Update jorje to latest version from 2023-06-05
Fixes #3973
2023-06-24 22:46:16 +02:00
Andreas Dangel f5829ac5b1 [ci] Fix path for regression tester artifact upload (again) 2023-06-24 22:04:39 +02:00
Andreas Dangel d0bc4c70e8 [ci] Fix path for regression tester artifact upload (again) 2023-06-24 21:34:10 +02:00
Andreas Dangel 8d08ab262a [ci] Fix path for regression tester artifact upload 2023-06-24 19:27:12 +02:00
Andreas Dangel 47d3728d62 [doc] Update release notes 2023-06-24 19:26:49 +02:00
Juan Martín Sotuyo Dodero 6a3eb6f12e Merge pull request #4604 from adangel/issue-4596-apex-excessivepubliccount
[apex] ExcessivePublicCount: consider properties
2023-06-24 12:29:22 -03:00
Andreas Dangel 03a5b7549e [apex] ExcessivePublicCount: consider properties
Fixes #4596
2023-06-24 16:51:51 +02:00
Andreas Dangel d238de5307 [ci] Upload regression tester report as artifact 2023-06-24 16:50:14 +02:00
Andreas Dangel 601abc0a3e [ci] Increase maven download ttl to 180s again 2023-06-24 16:39:27 +02:00
Andreas Dangel 69e15ba23c Bump maven from 3.9.0 to 3.9.2
Maybe that fixes the download issues in azure
See https://issues.apache.org/jira/browse/MRESOLVER-347
2023-06-24 14:10:59 +02:00
Andreas Dangel 40b0f5ed23 [ci] Next try to fix maven downloads
- reduce ttl to 30 seconds
- show transfers/downloads
2023-06-24 13:04:20 +02:00
Andreas Dangel 92ae88b4b3 [ci] Use new aether properties to configure http ttl for maven
Since 3.9.0, maven uses native mode instead of wagon: https://maven.apache.org/docs/3.9.0/release-notes.html

https://maven.apache.org/guides/mini/guide-resolver-transport.html
https://maven.apache.org/resolver/configuration.html
2023-06-24 12:19:03 +02:00
Andreas Dangel ae506ac04e [doc] Update all contributors (@linusjf) 2023-06-24 10:05:34 +02:00
Andreas Dangel 6ad8363bae Update migration guide (Java AST, Types, Declarations) 2023-06-11 20:23:15 +02:00
Andreas Dangel 08f3776a2a Update migration guide (Java AST, Annotations) 2023-06-10 20:33:42 +02:00
Andreas Dangel 86f06ae268 Update migration guide (Java AST) 2023-06-10 19:48:52 +02:00
Clément Fournier efecee4b7b Add deprecated to Tokens ctor 2023-06-10 18:45:02 +02:00
Andreas Dangel a43a3d7c8f Update migration guide (Java AST) 2023-06-10 16:05:24 +02:00
Andreas Dangel d07240c872 Update migration guide (Node and NodeStream) 2023-06-10 14:55:26 +02:00
Clément Fournier 6f6608dad9 Delete cpp default version 2023-06-10 14:35:11 +02:00
Clément Fournier 287a9a275c Move forgotten things into language specific packages 2023-06-10 14:33:19 +02:00
Clément Fournier 629e3b415c Consolidate CPD packages 2023-06-10 14:30:07 +02:00
Clément Fournier 4ef43e9617 Fixups 2023-06-10 14:12:02 +02:00
Clément Fournier c54d3bb304 Merge branch 'master' into clem.pmd7-refactor-cpd 2023-06-10 14:08:47 +02:00
Andreas Dangel 9b1431df7d Update migration guide (xpath rules) 2023-06-10 11:45:27 +02:00
Andreas Dangel d0817da19c Update migration guide 2023-06-09 20:44:21 +02:00
Juan Martín Sotuyo Dodero 2fc4cb9929 Remove completion dependency from dist 2023-06-09 11:42:54 -03:00
Juan Martín Sotuyo Dodero 7062d79577 Fix indentation 2023-06-08 10:13:46 -03:00
Juan Martín Sotuyo Dodero 5a55af46d3 Change completion generation to runtime
- We no longer ship a pre-built completion script
 - A hidden subcommand is available to generate it dynamically based on
   actually available languages.
 - We update docs everywhere accordingly.
2023-06-08 00:28:58 -03:00
Juan Martín Sotuyo Dodero febd279be2 Fix import order 2023-06-07 10:10:12 -03:00
Juan Martín Sotuyo Dodero 3bac231516 Fix import order 2023-06-07 00:51:15 -03:00
Juan Martín Sotuyo Dodero 7f66265c1c Update AST tests 2023-06-06 23:07:20 -03:00
Juan Martín Sotuyo Dodero 34a3f792c9 Add test cases 2023-06-05 23:59:41 -03:00
Juan Martín Sotuyo Dodero 59fca83d10 Add a new rule for MissingEncoding
- Enforce XML files have an encoding set in the XML Declaration
2023-06-05 23:59:10 -03:00
Juan Martín Sotuyo Dodero f2c7da364c Expose XML Declaratoin as attributes 2023-06-05 23:58:39 -03:00
Juan Martín Sotuyo Dodero e9ee4a94c6 Update changelog, refs #4578 2023-06-05 23:05:07 -03:00
Juan Martín Sotuyo Dodero 1d6f0a43b5 Be more explicit as to when we want to extend the range 2023-06-05 23:02:59 -03:00
Juan Martín Sotuyo Dodero d1daf9e3fd Allow comment parsing to include comments after
- This is safe even for the last token
 - I don't love the semantics of this… get leading comments vs token
   in, and actually allowing tokens "around"… a lot of this is for
   the AccessNode special case and what we consider "leading" to be for
   those
2023-06-05 19:49:53 -03:00
Juan Martín Sotuyo Dodero e342bfd7f8 Add failing use case for #4578 2023-06-05 19:49:26 -03:00
Andreas Dangel d253f36ed5 [doc] Add migration guide for PMD 7 2023-06-02 18:09:09 +02:00
Juan Martín Sotuyo Dodero e8dbb54cb5 Merge pull request #4584 from adangel/issue-4401
[java] Fix test cases so that PMD can be built with Java19+
2023-06-01 13:38:18 -03:00
Andreas Dangel 451a364ed7 Use explicit encoding in internal ruleset files 2023-06-01 17:36:15 +02:00
Andreas Dangel 8a89a4c786 Use explicit encoding in ruleset files 2023-06-01 17:29:24 +02:00
Andreas Dangel be59b47a48 [java] Fix test cases so that PMD can be built with Java19+
Fixes #4401
2023-06-01 16:28:14 +02:00
Andreas Dangel e6428eb6fd [doc] Update release notes (#4582) 2023-06-01 08:44:55 +02:00
Andreas Dangel c11237828a [dist] Fix duplicated dependency 2023-06-01 08:43:46 +02:00
Andreas Dangel 4d7d36b988 [ci] Fix selecting default on sourceforge
Updates build-tools to 22-SNAPSHOT

Refs #4460
2023-06-01 08:19:58 +02:00
Andreas Dangel 9e5305f0eb [ci] Fix uploading doc to sourceforge
Refs #4460
2023-06-01 08:19:19 +02:00
Andreas Dangel cd572a9957 [doc] Restore release notes for next rc [skip ci] 2023-05-30 20:23:55 +02:00
Andreas Dangel 8a26648e64 Prepare next development version [skip ci] 2023-05-30 20:16:28 +02:00
Andreas Dangel 835b625d51 [release] prepare for next development iteration 2023-05-30 20:15:08 +02:00
Andreas Dangel 7d6d303488 [release] prepare release pmd_releases/7.0.0-rc3 2023-05-30 20:15:02 +02:00
Andreas Dangel e96c2c0fd1 Prepare pmd release 7.0.0-rc3 2023-05-30 19:53:13 +02:00
Andreas Dangel 25e230aff0 [dist] Add jcommander back
This dependency is needed by pmd-designer 7.0.0-rc1, which is shipped with the distribution.
2023-05-30 19:18:24 +02:00
Andreas Dangel 17beee6480 [core] TextDocument: Add backwards compatible factory method
This method is needed by pmd-designer 7.0.0-rc1, which is shipped with the distribution.
2023-05-30 19:18:04 +02:00
Andreas Dangel 8f486e118b Merge pull request #4425 from oowekyala:pmd7-textfile-display-name
[core] Replace TextFile::pathId #4425
2023-05-29 21:14:17 +02:00
Andreas Dangel 802ebc6869 [doc] Update release notes (#4425) 2023-05-29 21:13:33 +02:00
Clément Fournier 885ab6cbf0 Lint 2023-05-29 16:29:58 +02:00
Clément Fournier 5c436c7bca Fix cpd outputting unix paths on windows 2023-05-29 16:04:12 +02:00
Clément Fournier 5c4a566689 Doc for CPD 2023-05-29 15:59:43 +02:00
Clément Fournier bd42296c0c Fix distribution IT 2023-05-29 15:25:41 +02:00
Clément Fournier ac33663e94 Fix CPD cli tests 2023-05-29 14:28:30 +02:00
Clément Fournier aa716acebb Fix CPD renderer tests on windows
Note that those removed tests about form feeds
are related to the fact that form feeds are invalid
path characters on windows, so we can't construct
a file id containing them anyway.
2023-05-28 16:55:33 +02:00
Clément Fournier ae452c0588 Update docs 2023-05-28 13:59:53 +02:00
Clément Fournier 9b098b8803 Update release notes 2023-05-28 13:47:48 +02:00
Clément Fournier 700df966f2 Merge branch 'master' into port-properties 2023-05-28 13:43:29 +02:00
Clément Fournier bf647357c6 Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd 2023-05-28 13:42:49 +02:00
Clément Fournier fc13c3255b Merge branch 'master' into pmd7-textfile-display-name 2023-05-28 13:41:59 +02:00
Andreas Dangel 7584ba36d7 Merge pull request #4553 from anastasiia-koba:issue-4492
[java] Fix #4492: GuardLogStatement gives false positive when argument is a Java method reference #4553
2023-05-28 12:23:06 +02:00
Andreas Dangel dea05bfe6b [doc] Update release notes (#4492, #4543) 2023-05-28 12:22:32 +02:00
Andreas Dangel 47bb75df92 Add @anastasiia-koba as a contributor 2023-05-28 12:22:13 +02:00
Andreas Dangel 5aa917b7d0 Merge branch 'master' into pr-4553 2023-05-28 12:19:54 +02:00
Andreas Dangel 8742cbe943 Merge pull request #4545 from oowekyala:issue4433-hashtable-properties
[java] Fix #4433 - FP with ReplaceHashtableWithMap #4545
2023-05-28 12:18:44 +02:00
Andreas Dangel f8ec89b1ce [doc] Update release notes (#4433, #4545) 2023-05-28 12:18:12 +02:00
Andreas Dangel 96dce89935 Merge branch 'master' into pr-4545 2023-05-28 12:16:45 +02:00
Andreas Dangel 348248e39b Merge pull request #4542 from LynnBroe:issue4510
[java] Fix #4510: A false positive about ConstructorCallsOverridableMethod and @Value #4542
2023-05-28 12:10:53 +02:00
Andreas Dangel d6ee5876bd Merge pull request #4541 from LynnBroe:issue4458
[java] Fix #4458: A false positive about RedundantFieldInitializer and @Value #4541
2023-05-28 12:09:41 +02:00
Andreas Dangel 0f1453cb6d [doc] Update release notes (#4510, #4542) 2023-05-28 12:08:53 +02:00
Andreas Dangel 2d004a18f4 Merge branch 'master' into pr-4542 2023-05-28 12:06:15 +02:00
Andreas Dangel adb7fa2a18 [doc] Update release notes (#4458, #4541) 2023-05-28 12:04:48 +02:00
Andreas Dangel 4dd24976ff Merge branch 'master' into pr-4541 2023-05-28 12:01:18 +02:00
Andreas Dangel 07a9c0d5a1 Merge pull request #4538 from LynnBroe:issue4456
[java] Fix #4456: A false positive about FinalFieldCouldBeStatic and UtilityClass #4538
2023-05-28 10:42:04 +02:00
Andreas Dangel 3a82552ea0 Merge pull request #4537 from LynnBroe:issue4455
[java] Fix #4455: A false positive about FieldNamingConventions and UtilityClass #4537
2023-05-28 10:39:53 +02:00
Andreas Dangel 0499e4baab Merge pull request #4552 from adangel:minimum-priority
[doc] Update documentation regarding minimum-priority #4552
2023-05-28 10:39:03 +02:00
Andreas Dangel cf83a914df Merge pull request #4460 from adangel:fix-assembly-finalName
Fix assembly-plugin warnings #4460
2023-05-28 10:37:13 +02:00
Andreas Dangel 8f0cf6e0c8 [doc] Update release notes (#4456, #4538) 2023-05-28 10:36:21 +02:00
Andreas Dangel 263d368c3a Merge branch 'master' into pr-4538 2023-05-28 10:32:36 +02:00
Andreas Dangel 1a74cc242b [doc] Update release notes (#4455, #4537) 2023-05-28 10:29:38 +02:00
Andreas Dangel e290420228 Merge branch 'master' into pr-4537 2023-05-28 10:25:20 +02:00
Andreas Dangel a9b96729e8 Merge branch 'master' into minimum-priority 2023-05-28 10:22:47 +02:00
Andreas DangelandJuan Martín Sotuyo Dodero 01d055d0e3 [doc] Fix old rule name example
Co-authored-by: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2023-05-28 10:21:31 +02:00
Andreas Dangel c0364e2185 [doc] Update release notes (#4460) 2023-05-28 09:15:33 +02:00
Andreas Dangel f147c76577 Update gems - use pmdtester 1.5.4 2023-05-28 09:04:46 +02:00
Andreas Dangel ce6a3e25a1 Merge branch 'master' into fix-assembly-finalName 2023-05-28 09:02:21 +02:00
Andreas Dangel 8b952c2a1d [doc] Update release notes for rc3 (#4434, #4549) [skip ci] 2023-05-27 08:52:12 +02:00
Juan Martín Sotuyo Dodero d568ea7e66 Update LanguageRegistry.java javadoc
Be more clear about how to invoke replacement methods.
2023-05-26 20:25:30 -03:00
Clément Fournier 2f067dd8c0 Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd 2023-05-26 12:32:00 +02:00
Clément Fournier f2cd5abbab Merge branch 'master' into clem.pmd7-refactor-cpd 2023-05-26 12:21:08 +02:00
Clément Fournier 715f49d7c4 Merge remote-tracking branch 'origin/port-properties' into port-properties 2023-05-26 11:45:39 +02:00
Clément Fournier fd0416c85a Merge branch 'master' into port-properties 2023-05-26 11:42:11 +02:00
Clément Fournier ffeb9ab608 Merge branch 'master' into pr/4548 2023-05-26 11:38:29 +02:00
Clément Fournier 81233fa2d6 Merge branch 'master' into pr/4549 2023-05-26 11:37:31 +02:00
Clément Fournier 3c01697143 Merge branch 'master' into pr/4466 2023-05-26 11:27:32 +02:00
Clément Fournier 1474ab5a25 Merge remote-tracking branch 'origin/issue4434-exceptionasflowcontrol' into issue4434-exceptionasflowcontrol 2023-05-26 11:23:37 +02:00
Clément Fournier 7e07ee8ab2 Update release notes, ref #4543 2023-05-26 11:20:51 +02:00
Clément Fournier c358b39d30 Merge branch 'master' into issue4434-exceptionasflowcontrol 2023-05-26 11:19:13 +02:00
Clément Fournier 0c0d756fc9 Merge remote-tracking branch 'origin/pmd7-textfile-display-name' into pmd7-textfile-display-name 2023-05-26 11:05:28 +02:00
Clément Fournier 191b9de6a1 Merge branch 'master' into pmd7-textfile-display-name 2023-05-26 11:05:11 +02:00
Andreas Dangel 18b14c8c92 [doc] Update release notes (#4557) [skip ci] 2023-05-26 10:28:52 +02:00
Juan Martín Sotuyo Dodero bcf8bdd7ae Merge pull request #4550 from adangel/pmd-processor-threads
[core] Restore behavior with thread=1 setting
2023-05-22 18:10:01 -03:00
Juan Martín Sotuyo Dodero 59345b95ed Merge pull request #4560 from oowekyala/issue4557-unnecessary-import-ambiguous
[java] Fix FP of UnnecessaryImport
2023-05-22 18:07:38 -03:00
Juan Martín Sotuyo Dodero 68db0584ba Merge pull request #4567 from adangel/slf4j-logging-reconfiguration
[core] Rework slf4j reinitialization
2023-05-22 17:37:53 -03:00
Andreas Dangel 429ab23fd5 [core] Move property equals implementation into AbstractPropertySource 2023-05-20 19:27:16 +02:00
Andreas Dangel 110235cd72 [core] Move property equals implementation into AbstractPropertySource 2023-05-20 19:24:16 +02:00
Andreas Dangel 11f0e8a075 [core] Rework slf4j reinitialization
- Support also subclasses of slf4j-simple: e.g. maven uses an own logger factory and own loggers
- Determine the new log level by reevaluating the configuration, similar what the constructors did
- Remove unnecessary PmdLoggerFactoryFriend
2023-05-20 10:29:07 +02:00
Andreas Dangel 52b9d61eb0 [ci] Update m-pmd-p version for dogfood checks 2023-05-19 19:33:30 +02:00
Andreas Dangel e243da6c3d Merge branch 'master' into pr-4425 2023-05-19 18:45:12 +02:00
Andreas Dangel 97343c7664 [doc] Update release notes
add missing external contributions for rc3
2023-05-19 12:26:58 +02:00
Andreas Dangel d6deabe4b2 Merge pull request #4536 from LynnBroe:issue4268
[java] Fix #4268: CommentDefaultAccessModifier - false positive with TestNG's @Test annotation #4536
2023-05-19 12:26:00 +02:00
Andreas Dangel 327ac5eec8 [doc] Update release notes (#4268, #4536) 2023-05-19 12:25:26 +02:00
Andreas Dangel c6ab61c4ef [java] CommentDefaultAccessModifier - exclude more testng annotations 2023-05-19 12:19:50 +02:00
Andreas Dangel c4fb7af6ca Merge branch 'master' into pr-4536 2023-05-19 12:03:26 +02:00
Andreas Dangel 605dce0a98 Merge pull request #4533 from LynnBroe:issue4063
[java] Fix #4063: False-negative about try/catch block in Loop #4533
2023-05-19 12:02:58 +02:00
Andreas Dangel 337d26126d [doc] Update release notes (#4063, #4533) 2023-05-19 12:02:08 +02:00
Andreas Dangel 3f3216bbde [java] AvoidBranchingStatementAsLastInLoopRule - only check finally 2023-05-19 11:16:40 +02:00
Andreas Dangel b3d379cb9c Merge branch 'master' into pr-4533 2023-05-19 10:38:56 +02:00
Andreas Dangel e431831a69 Merge pull request #4507 from LynnBroe:issue4503
[java] Fix #4503: A false negative about JUnitTestsShouldIncludeAssert and testng #4507
2023-05-19 10:33:40 +02:00
Andreas Dangel fe34cbd6fe [doc] Update release notes (#4507, #4503) 2023-05-19 10:33:00 +02:00
Andreas Dangel d628e809f8 Merge branch 'master' into pr-4507 2023-05-19 10:29:50 +02:00
Andreas Dangel 9b3e76f86a Update pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/JUnitTestsShouldIncludeAssert.xml [skip ci] 2023-05-19 10:12:44 +02:00
Andreas Dangel a1adcce682 Merge pull request #4470 from tiobe:ignored-identifiers-and-literals
[cpp] CPD: Added strings as literal and ignore identifiers in sequences #4470
2023-05-19 10:09:02 +02:00
Andreas Dangel 75781f5c20 [doc] Update release notes (#4470) 2023-05-19 10:08:23 +02:00
Andreas Dangel ce3d6d1330 Add @wener-tiobe as a contributor 2023-05-19 10:04:56 +02:00
Andreas Dangel e3fd77a63b [core] Doc and use new CPD option --ignore-sequences 2023-05-19 10:03:29 +02:00
Andreas Dangel 6b4c6b2787 Merge branch 'master' into pr-4470 2023-05-19 09:46:16 +02:00
Andreas Dangel 1269635e42 [doc] Update list of supported languages 2023-05-19 09:45:27 +02:00
Andreas Dangel 23629f473f Merge pull request #4431 from tiobe:master
[coco] CPD: Coco support for code duplication detection #4431
2023-05-19 09:28:52 +02:00
Andreas Dangel 7d6d8d71d9 [doc] Update docs and release notes for Coco (#4431) 2023-05-19 09:28:20 +02:00
Andreas Dangel 11c06fdb03 Merge branch 'master' into pr-4431 2023-05-19 09:00:56 +02:00
Clément Fournier 42ff3a331e Cleanup test 2023-05-16 15:55:42 +02:00
Andreas Dangel 665187633f [java] Update quickstart.xml ruleset 2023-05-14 11:11:09 +02:00
Andreas Dangel d49178ae5f [java] New Rule: Use Explicit Types
Fixes #2847
2023-05-14 11:05:30 +02:00
Clément Fournier c5790f177c Update release notes
Fix #4557
2023-05-12 19:33:08 +02:00
Andreas Dangel e8c0d5787b Merge pull request #4426 from mohan-chinnappan-n:master
[cpd] New XML to HTML XLST report format for PMD CPD #4426
2023-05-12 12:52:01 +02:00
Andreas Dangel c1a42f5e2e [core] Fix unit tests for cpdhtml xslt stylesheetst 2023-05-12 12:51:35 +02:00
Clément Fournier 3aea46cbd0 Fix #4457 - overload ambiguity 2023-05-12 12:45:58 +02:00
Andreas Dangel 4635196996 [doc] Update release notes (#4426) 2023-05-12 12:38:13 +02:00
Andreas Dangel 16d92c2aba [doc] CPD Report Formats - add xslt examples 2023-05-12 12:22:49 +02:00
Clément Fournier 6c635c5ddb Add test case 2023-05-12 12:21:51 +02:00
Andreas Dangel 50efdaa5d0 [core] Refactor cpdhtml.xslt and cpdhtml-v2.xslt
- Update bootstrap, jquery, datatables
- Optimize styling
- Add param lines for cpdhtml.xslt
2023-05-12 12:18:19 +02:00
Andreas Dangel a8bb9d92a3 Merge branch 'master' into pr-4426 2023-05-12 10:37:55 +02:00
Andreas Dangel 9e5d131890 Merge pull request #4551 from oowekyala:issue4432-unnecessary-import-static
[java] Fix #4432 - FP with UnnecessaryImport #4551
2023-05-12 09:10:39 +02:00
Andreas Dangel ab37e2566b [doc] Update release notes (#4432, #4551) 2023-05-12 09:10:01 +02:00
Andreas Dangel 9a56cb3ae5 Merge branch 'master' into pr-4551 2023-05-11 11:54:10 +02:00
Andreas Dangel d230be23c8 [doc] Update doc regarding --minimum-priority 2023-05-11 10:34:18 +02:00
Andreas Dangel a35d647fee [cli] Use RulePriority.name() for completion candidates
This avoids having spaces in the possible values. E.g. MEDIUM_HIGH instead of Medium High.
2023-05-09 21:52:11 +02:00
Andreas Dangel 23756ec662 [cli] Support numeric values for minimum-priority 2023-05-09 20:47:18 +02:00
Andreas Dangel fa0be31c24 [cli] Add test for minimum-priority 2023-05-09 20:32:26 +02:00
Anastasiia Koba 28eefd6f4e Fix #4492: GuardLogStatement with Java method reference 2023-05-06 11:08:51 +03:00
Andreas Dangel eaf4354734 [doc] Update documentation regarding minimum-priority
Fixes #4454
2023-05-05 16:41:58 +02:00
Andreas Dangel 1252911daf [java] Dataflow - use LinkedHashSet/LinkedHashMap to maintain predictable iteration order 2023-05-05 15:46:49 +02:00
Andreas DangelandClément Fournier ef3a781164 Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/LawOfDemeterRule.java
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2023-05-05 15:30:17 +02:00
Clément Fournier 79546cc22c Fix pmd warning 2023-05-05 14:49:20 +02:00
Andreas Dangel 76db136f20 [java] LawOfDemeter - remove reversed sorting 2023-05-05 13:32:13 +02:00
Andreas Dangel bc9c43fb42 Fix tests 2023-05-05 13:19:18 +02:00
Andreas Dangel 6ade09a840 [ci] Run pmd-regression-tester with multiple threads
Also build the baseline with multiple threads.
2023-05-05 12:46:48 +02:00
Andreas Dangel e09962b3cf [core] Move MultiThreadProcessorTest to correct package 2023-05-05 12:40:18 +02:00
Andreas Dangel b3ca1fdda3 [core] Use MultiThreadProcessor already with 1 thread 2023-05-05 12:35:17 +02:00
Andreas Dangel 713a4a8178 Reorder test methods 2023-05-05 12:26:08 +02:00
Andreas Dangel e2866bebf8 Merge test classes for GlobalAnalysisListener 2023-05-05 12:23:53 +02:00
Andreas Dangel f4ba5f83f5 [java] Make LawOfDemeter results deterministic 2023-05-05 12:10:43 +02:00
Andreas Dangel 63204cdf97 [core] GlobalAnalysisListener.tee: Forward onConfigError 2023-05-05 10:20:09 +02:00
Andreas Dangel 3a9c361682 Merge pull request #4540 from LynnBroe:issue4457
[java] Fix #4457: false negative about OverrideBothEqualsAndHashcode #4540
2023-05-04 17:03:30 +02:00
Andreas Dangel f9b5c98640 [doc] Update release notes (#4540, #4457, #4546) 2023-05-04 17:02:08 +02:00
Andreas Dangel d5a44da575 [java] PMDCoverageTest - assert report (#4523) 2023-05-04 11:56:10 +02:00
Andreas Dangel dc61b11587 [doc] Update release notes (#4523) 2023-05-04 11:46:13 +02:00
LynnBroe 7a696d4a44 Update FieldNamingConventions.xml 2023-05-04 15:16:07 +08:00
Clément Fournier 56429ae8b0 Fix #4432 - FP of unnecessary import 2023-05-03 22:27:31 +02:00
Clément Fournier 838caff522 Fix scope of static interface methods 2023-05-03 22:24:21 +02:00
Clément Fournier da54727f4c Update release notes
Fix #4383 - the issue is not present in PMD 7.
2023-05-03 21:38:18 +02:00
Clément Fournier 172d41d042 Fix test 2023-05-03 16:21:50 +02:00
Clément Fournier e7e1c371c3 Merge branch 'master' into pmd7-textfile-display-name 2023-05-03 16:20:15 +02:00
Clément Fournier c9b5eda0a3 Rewrite OverrideBothEqualsAndHashcode
Support records
Use the rule chain
2023-05-03 14:56:57 +02:00
Clément Fournier 8580745430 Fix #4433 2023-05-03 14:03:42 +02:00
Clément Fournier 296d2596bd Fix #4434
Rewrite ExceptionAsFlowControl to a more efficient form.
Change message to be more informative.
Rewrite description of the rule.
2023-05-03 13:58:12 +02:00
LynnBroe 5d15889fb5 Fix issue4510 2023-05-03 19:39:13 +08:00
LynnBroe c0ebb3a435 Fix issue4458 2023-05-03 19:18:48 +08:00
LynnBroe 1a8eb72622 Fix 4457 2023-05-03 18:48:35 +08:00
LynnBroe 6c3cbb191f Fix 4456 2023-05-03 16:37:52 +08:00
LynnBroe e6c774a9b2 Fix issue4455 2023-05-03 15:02:38 +08:00
LynnBroe 5c6b443307 Fix issue4268 2023-05-03 14:33:47 +08:00
Clément Fournier 05165a4cda Lint 2023-05-02 23:34:13 +02:00
Clément Fournier 7e37e4b82e Check #4405 is fixed
Fix #4405
2023-05-02 18:52:16 +02:00
LynnBroe 376a259f7c fix issue4063 2023-05-03 00:21:16 +08:00
Clément Fournier baefff035d Ensure #3840 is fixed
Fix #3840
2023-05-02 17:39:48 +02:00
Clément Fournier e45ad6d722 Ensure #4070 is fixed
Fix #4070
2023-05-02 17:33:42 +02:00
Clément Fournier 0b6b949f61 Fix win test 2023-05-02 17:13:13 +02:00
Clément Fournier ac86bb21dc Merge branch 'master' into pmd7-textfile-display-name 2023-05-02 17:12:39 +02:00
Juan Martín Sotuyo Dodero 49b989b9ee Merge pull request #4524 from oowekyala/pmd7.java-opt-sigparser
[java] More unit tests for sig parser
2023-05-02 11:28:29 -03:00
Juan Martín Sotuyo Dodero cb62fab1c1 Merge pull request #4523 from oowekyala/pmd7.remove-core-cli
[core] Remove old CLI from pmd core
2023-05-02 11:26:29 -03:00
Clément Fournier dd671706cd Fix test 2023-05-01 21:32:58 +02:00
Clément Fournier 0887916159 Fix usage of FileId::toString 2023-05-01 21:32:46 +02:00
Clément Fournier 0f154289f1 Fix test on mac 2023-05-01 21:01:54 +02:00
Juan Martín Sotuyo Dodero 673681d7e4 Merge branch 'master' into issue4503 2023-05-01 15:27:34 -03:00
Kevin Jones 460fddd18c Update to apexlink 2.3.5 2023-04-30 20:37:22 +01:00
Andreas Dangel 37de19f890 [doc] Restore release notes for next rc [skip ci] 2023-04-29 23:46:45 +02:00
Andreas Dangel cf9a3de205 Prepare next development version [skip ci] 2023-04-29 23:40:52 +02:00
Andreas Dangel b79e6bd92b [release] prepare for next development iteration 2023-04-29 23:39:34 +02:00
Andreas Dangel a97e108269 [release] prepare release pmd_releases/7.0.0-rc2 2023-04-29 23:39:28 +02:00
Andreas Dangel 828993bc62 Prepare pmd release 7.0.0-rc2 2023-04-29 23:19:32 +02:00
Andreas Dangel b3fe03f424 Merge pull request #4501 from adangel:doc-pmd7-rule-changes
[doc] Document rule changes for PMD 7 #4501
2023-04-29 22:46:50 +02:00
Andreas Dangel d498cb1a7b [doc] Update release notes (SwitchDensity) 2023-04-29 22:45:27 +02:00
Andreas Dangel e493db664e Merge branch 'master' into pr-4501 2023-04-29 22:42:31 +02:00
Andreas Dangel 1530ee515d [doc] Update release notes 2023-04-29 22:39:07 +02:00
Clément Fournier 6cb92a8d62 More win problems 2023-04-29 22:22:59 +02:00
Clément Fournier 5e6652ab7c Fix bug on win 2023-04-29 19:59:18 +02:00
Clément Fournier 4034c3d87e Merge remote-tracking branch 'origin/clem.pmd7-refactor-cpd' into clem.pmd7-refactor-cpd 2023-04-29 19:45:39 +02:00
Clément Fournier 72740a8151 Lint 2023-04-29 19:45:09 +02:00
Clément Fournier b297538721 Fix merge 2023-04-29 19:31:43 +02:00
Clément Fournier b89970d5fe Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd 2023-04-29 19:20:38 +02:00
Clément Fournier 090ffa1a58 Merge remote-tracking branch 'origin/pmd7-textfile-display-name' into pmd7-textfile-display-name 2023-04-29 19:15:23 +02:00
Clément Fournier a1bdbd4bab Fix tests 2023-04-29 19:13:42 +02:00
Clément Fournier 4834aca95c Tests and doc 2023-04-29 18:59:23 +02:00
Clément Fournier d8606f656a Fix windows tests 2023-04-29 18:30:03 +02:00
Clément Fournier 68a4e84b5e Merge branch 'master' into pmd7-textfile-display-name 2023-04-29 18:21:30 +02:00
Clément Fournier 6010419974 Merge branch 'pr/4403' 2023-04-29 18:13:33 +02:00
Clément Fournier c42432d52a Update release notes, ref #4403 2023-04-29 18:12:29 +02:00
Clément Fournier 580bac6c90 Lint 2023-04-29 18:05:38 +02:00
Clément Fournier af4d47140f Merge branch 'pmd7.coverage-test' into pmd7.remove-core-cli 2023-04-29 18:01:39 +02:00
Clément Fournier 776897827f Merge branch 'master' into pmd8.coverage-test 2023-04-29 16:49:56 +02:00
Clément Fournier 75fe7f9f41 Use real 1-elt stacks 2023-04-29 16:08:17 +02:00
Clément Fournier 82847c9e01 More unit tests for sig parser 2023-04-29 16:08:15 +02:00
Clément Fournier 4d899b90c0 Merge branch 'master' into pr/4403 2023-04-29 15:53:10 +02:00
Clément Fournier 10dae561af Fix registration bug 2023-04-29 15:52:05 +02:00
Clément Fournier 551ab86113 Lint 2023-04-29 03:33:35 +02:00
Clément Fournier 5d9d4f68d6 Fix import 2023-04-29 03:08:38 +02:00
Clément Fournier 8217f26a16 Remove jcommander dep 2023-04-29 03:05:50 +02:00
Clément Fournier 8567fd77e9 Remove more things 2023-04-29 02:57:00 +02:00
Clément Fournier 82b4d97cb5 Remove old CLI, more doc 2023-04-29 02:52:09 +02:00
Clément Fournier 261df24af8 Improve doc for PmdAnalysis 2023-04-29 02:23:38 +02:00
Clément Fournier 76c41f2319 Fix bug found by coverage test 2023-04-29 01:25:42 +02:00
Clément Fournier 5031c83c88 Enable coverage test 2023-04-29 01:25:16 +02:00
Clément Fournier d23b52ffc3 Cleanup 2023-04-29 00:36:36 +02:00
Clément Fournier 750a6af37d Add julia to language deps 2023-04-29 00:34:14 +02:00
Clément Fournier 640ad6cf1d Merge branch 'master' into pr/4403 2023-04-29 00:32:14 +02:00
Clément Fournier 6d8ffa9d7a Update release notes, ref #4402 2023-04-29 00:27:57 +02:00
Clément Fournier c0f56861e7 Merge remote-tracking branch 'upstream/master' 2023-04-29 00:20:41 +02:00
Clément Fournier 5c5f94e4a6 Merge branch 'master' into pr/4402 2023-04-29 00:09:16 +02:00
Andreas Dangel 53170cceba Merge pull request #4445 from adangel:fix-release-scripts
[ci] Improve release scripts #4445
2023-04-28 23:03:33 +02:00
Andreas Dangel aef2c175e5 Merge pull request #4465 from adangel:apex-link-error-handling
[apex] Handle ApexLink initialization errors #4465
2023-04-28 22:43:15 +02:00
Andreas Dangel 3f2b31d746 Merge pull request #4475 from adangel:update-pmd-designer-7.0.0-rc1
Bump pmd-designer from 7.0.0-SNAPSHOT to 7.0.0-rc1
2023-04-28 22:41:35 +02:00
Juan Martín Sotuyo Dodero 58a7e60934 Merge pull request #4519 from adangel/doc-updates
[doc] Update doc page, fix fontawesome missing icons
2023-04-28 08:15:05 -03:00
Andreas Dangel 3af4276092 Merge pull request #4520 from joaodinissf:master
[doc] Fix typo: missing closing quotation mark after CPD-END #4520
2023-04-28 12:10:53 +02:00
Andreas Dangel d7b060dd2e [doc] Update release notes (#4520) 2023-04-28 12:10:26 +02:00
Andreas Dangel 4d8cc9c853 Add @joaodinissf as a contributor 2023-04-28 12:10:08 +02:00
Andreas Dangel bb022351ea [doc] Add #2160 to release notes 2023-04-28 11:49:15 +02:00
João Dinis Ferreira 2134e7b27d Fix typo: missing closing quotation mark after CPD-END 2023-04-28 11:46:04 +02:00
Andreas Dangel 4a34de594f Ensure #3858 is fixed
Fix #3858
2023-04-28 11:45:02 +02:00
Andreas Dangel 08f22c6650 Ensure #3642 is fixed
Fix #3642
2023-04-28 11:42:30 +02:00
Andreas Dangel e9b30fab94 Ensure #3848 is fixed
Fix #3848
2023-04-28 11:34:59 +02:00
Andreas Dangel 4ab49af693 Ensure #3843 is fixed
Fix #3843
2023-04-28 11:31:46 +02:00
Andreas Dangel cef70329f1 Ensure #1455 is fixed
Fix #1455
2023-04-28 11:28:27 +02:00
Andreas Dangel 9e9739e2b3 Fix favicon 2023-04-28 11:07:18 +02:00
Andreas Dangel 0756a7c0e4 Update fontawesome, fix external-link icon 2023-04-28 11:05:23 +02:00
Andreas Dangel ae766de203 Update gems
Fixes https://github.com/pmd/pmd/security/dependabot/38
Fixes https://github.com/pmd/pmd/security/dependabot/39
Fixes https://github.com/pmd/pmd/security/dependabot/40
2023-04-28 10:28:17 +02:00
Andreas Dangel 9ecc1a84ed [doc] UnusedLocalVariable with multiple for loop indices
Closes #4518
2023-04-28 09:29:12 +02:00
Andreas Dangel 429f0f076a [doc] UnusedLocalVariable with try-with-resources and compound statements
Closes #4516
Closes #4617
2023-04-28 09:16:28 +02:00
Andreas DangelandClément Fournier 0df041db1d [doc] Fix typo for CommentContent forbiddenRegex property
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2023-04-27 20:43:25 +02:00
Andreas Dangel 157cac9218 [doc] CommentRequired - doc changed behavior 2023-04-27 20:37:54 +02:00
Andreas Dangel daf574a888 [java] AvoidLiteralsInIfCondition - add test case for #4514
Closes #4514
2023-04-27 19:59:24 +02:00
Andreas Dangel afe1613c93 [java] UselessOperationOnImmutable - add test case for #4513
Closes #4513
2023-04-27 11:26:38 +02:00
Andreas Dangel b92a8e71db [doc] ImplicitSwitchFallThrough - case statements are reported
Refs #3123
2023-04-27 11:02:33 +02:00
Andreas Dangel 8c8ba41b20 [doc] CommentSize: mention the behavior change of #4369 explicitly 2023-04-27 10:49:26 +02:00
Andreas Dangel bd13b3915c [doc] ShortVariable now also reports short enum constant names
Refs #3123
2023-04-27 10:33:18 +02:00
Andreas Dangel bebe05bd8e [doc] Update release notes (#4512)
Closes #4512
2023-04-27 10:13:37 +02:00
Andreas Dangel 47252be306 [java] LocalVariableCouldBeFinal - update test case (#3122) 2023-04-27 10:01:13 +02:00
Andreas Dangel 40aa75aae8 [doc] Update release notes (#4511)
Closes #4511
2023-04-27 09:59:01 +02:00
Andreas Dangel 3b31913146 [doc] Update release notes (#4509)
Closes #4509
2023-04-27 09:34:12 +02:00
Andreas Dangel efbbd6cd2f [doc] Update violationSuppressXPath XPath version changes 2023-04-27 09:22:31 +02:00
Andreas Dangel 1d05aad9be [doc] Update issue titles in fixed issues section 2023-04-27 09:10:25 +02:00
Andreas Dangel c9c851554f [doc] Document removed properties for statistical rules 2023-04-27 09:10:19 +02:00
Andreas Dangel 3fab198010 [java] SwitchDensityRule - use common report level property for "minimum"
While we calculate the ratio between number of statements and number of labels,
we shouldn't pretend that this is an exact rule - it's anyway a best guess,
that high switch density is a problem. I don't think, it makes a big difference
between 10.2 and 10. You e.g. want to report, when the density is bigger than 10
or bigger than 5. We don't need the report level accuracy here.

Refs #3123
2023-04-27 09:06:01 +02:00
Andreas Dangel aa38d6023b [doc] Document removed rule properties
Refs #3123
2023-04-27 08:35:53 +02:00
Andreas Dangel 72d9fd6472 [doc] ArrayIsStoredDirectly - reports now on assignment
and not anymore on formal parameter.

Refs #3127
Refs #3123
2023-04-27 08:35:53 +02:00
Andreas Dangel d718d3fecc [doc] Document changes on report location
Refs #4439
Refs #730
Refs #3123
2023-04-27 08:35:53 +02:00
Andreas Dangel 90642972ab [java] AvoidReassigningLoopVariables - update test case, document differences
Refs #4500
Refs #3123
2023-04-27 08:35:53 +02:00
Andreas Dangel 7acb2f4eb1 [doc] Sort changed rules in release notes 2023-04-27 08:35:42 +02:00
Clément Fournier c2b18ce229 Ensure #1480 is fixed
Fix #1480
2023-04-25 21:50:59 +02:00
Clément Fournier c4e0586dd4 Ensure #1563 is fixed
Fix #1563
2023-04-25 21:47:04 +02:00
Andreas Dangel d04a1af8d3 Merge pull request #4506 from oowekyala:issue-4505-implicitSwitchFallThrough-npe
[java] Fix NPE in ImplicitSwitchFallThrough #4506
2023-04-25 20:28:37 +02:00
Andreas Dangel 8b5aba41fe [java] ImplicitSwitchFallThrough: Update test description 2023-04-25 20:27:39 +02:00
Andreas Dangel e8d9ec4347 [doc] Update release notes (#4505) 2023-04-25 20:26:38 +02:00
Andreas Dangel 25c24b2f1b [doc] Update release notes
- make sure that changes listed for rc2 are also listed in the complete release notes
- escape annotations to avoid github mentions
2023-04-25 19:26:49 +02:00
LynnBroe e653df6214 fix issue4503 2023-04-25 21:41:51 +08:00
Clément Fournier 6ca8d376b0 Update release notes 2023-04-24 17:50:42 +02:00
Clément Fournier ff026ce827 Fix #4505 2023-04-24 17:48:27 +02:00
Juan Martín Sotuyo Dodero 920386d4bd Merge branch 'pr-4488' 2023-04-23 19:11:07 -03:00
Juan Martín Sotuyo Dodero b077b6658c Update changelog, refs #4488 2023-04-23 19:09:49 -03:00
Juan Martín Sotuyo Dodero 3c7675ac58 Simplify check
- Move all annotation to the set, not only TestNG's
2023-04-23 19:06:27 -03:00
Juan Martín Sotuyo Dodero 622ba91f94 Merge branch 'pr-4494' 2023-04-23 19:01:38 -03:00
Juan Martín Sotuyo Dodero ba93312a50 Update changelog, refs #4494 2023-04-23 19:00:37 -03:00
LynnBroe fa7143b8de add annotations 2023-04-23 15:12:14 +08:00
LynnBroe 7034d40cc8 Update UnnecessaryConstructor.xml 2023-04-23 14:37:46 +08:00
LynnBroe d457cce9c5 Update UnnecessaryConstructorRule.java 2023-04-23 14:28:19 +08:00
Juan Martín Sotuyo Dodero c138fbb441 Merge pull request #4497 from adangel/apex-excessive-public-count
[apex] Improve ExcessivePublicCount message
2023-04-22 10:34:44 -03:00
Andreas Dangel 5882dda016 [apex] Fix compile errors after merge 2023-04-22 10:31:16 +02:00
Andreas Dangel 9fc7ab55a1 Merge branch 'master' into apex-excessive-public-count 2023-04-22 10:27:14 +02:00
Andreas Dangel 3e9d6081a4 [apex] Add limit in ExcessivePublicCount message 2023-04-22 09:43:19 +02:00
Andreas Dangel d5b2abe2c1 [doc] Update release notes
Add new issues/PRs to the final 7.0.0 release notes
2023-04-22 09:32:34 +02:00
Juan Martín Sotuyo Dodero 899da418e2 Merge branch 'pr-4495' 2023-04-22 00:59:47 -03:00
Juan Martín Sotuyo Dodero 3f94144927 Update changelog, refs #4493 2023-04-22 00:59:24 -03:00
Juan Martín Sotuyo Dodero c487043a5c Merge pull request #4489 from adangel/java-immutable-field-ignoredannot
[java] ImmutableField: Remove deprecated property "ignoredAnnotations"
2023-04-22 00:55:05 -03:00
Juan Martín Sotuyo Dodero 5130d5b69e Merge pull request #4496 from adangel/apex-ncss-method-count-message
[apex] Fix NcssMethodCount message
2023-04-21 11:49:48 -03:00
Andreas Dangel 646fb09908 [apex] Improve ExcessivePublicCount message
and verify inner class behavior.
2023-04-21 14:21:46 +02:00
Andreas Dangel e899909c3f [apex] Fix NcssMethodCount message 2023-04-21 12:08:39 +02:00
LynnBroe add3c46179 Update UnnecessaryConstructorRule.java 2023-04-21 16:13:29 +08:00
LynnBroe cced58c9a0 fix issue4493 2023-04-21 16:01:34 +08:00
LynnBroe 2f0d83f98d fix issue4487 2023-04-21 15:33:21 +08:00
Andreas Dangel 5eee9f6a13 [test] Fix rule test reporting 2023-04-21 09:02:05 +02:00
Juan Martín Sotuyo Dodero 9f13f12e4c Merge pull request #4491 from adangel/fix-4482
[dist] Fix pmd.bat script
2023-04-20 16:16:53 -03:00
Andreas Dangel dffab8e4fb Fix comment [skip ci] 2023-04-20 21:02:36 +02:00
Andreas Dangel 3cf0ba2b3f [dist] Fix pmd.bat script
Fixes #4482
2023-04-20 20:56:39 +02:00
Clément Fournier d6b02d18b4 Fix compil 2023-04-20 17:31:12 +02:00
Clément Fournier 69e2d319b9 Merge branch 'master' into port-properties 2023-04-20 17:21:51 +02:00
Clément Fournier 60f313f619 Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd 2023-04-20 17:18:07 +02:00
Clément Fournier dd48dabac9 Fix tests 2023-04-20 17:16:32 +02:00
Andreas Dangel 2c2d65f8b2 Merge pull request #4485 from Monits:fix-4484
[cli] Fix NPE in ast-dump command #4485
2023-04-20 17:10:39 +02:00
Andreas Dangel 07758415c0 Merge branch 'master' into pr-4485 2023-04-20 17:07:16 +02:00
Andreas Dangel e860d6aad5 [doc] Update release notes (#4484) 2023-04-20 17:04:28 +02:00
Andreas Dangel dec7c7dabc [dist] Add integration test for ast-dump 2023-04-20 17:02:50 +02:00
Clément Fournier e66f78ba10 Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd 2023-04-20 16:58:59 +02:00
Clément Fournier 7cf4d44d5d Fix NPE 2023-04-20 16:58:40 +02:00
Juan Martín Sotuyo Dodero 1cdd09bc86 Merge pull request #4490 from adangel/java-immutable-field-getter
[java] ImmutableField - remove @Getter
2023-04-20 11:49:48 -03:00
Clément Fournier 0233897d8a Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd 2023-04-20 16:44:40 +02:00
Clément Fournier 913a621f83 Merge branch 'master' into pmd7-textfile-display-name 2023-04-20 16:42:58 +02:00
Andreas Dangel d9a98b9f9a [java] ImmutableField - remove @Getter
This fixes a potential false negative when @Getter is used.
See discussion on #4474
2023-04-20 14:49:36 +02:00
Andreas Dangel 990fb94845 [java] ImmutableField: Remove deprecated property "ignoredAnnotations" 2023-04-20 14:39:51 +02:00
Andreas Dangel f072227721 [doc] Fix dead link in adding_a_new_antlr_based_language.md 2023-04-20 14:37:48 +02:00
Andreas Dangel 95de880b4b [doc] Update release notes for 7.0.0-rc2 2023-04-20 14:36:15 +02:00
LynnBroe 1a488c79a4 Update TestFrameworksUtil.java 2023-04-19 17:01:56 +08:00
Juan Martín Sotuyo Dodero ddac2a0404 Merge pull request #4473 from adangel/issue-2501-antlr-doc
[doc] Update ANTLR documentation
2023-04-19 00:23:05 -03:00
Juan Martín Sotuyo Dodero 38b541f896 Merge branch 'master' into issue-2501-antlr-doc 2023-04-19 00:22:59 -03:00
Juan Martín Sotuyo Dodero 68e1a5302f Merge pull request #4464 from adangel/filecollector-api
[core] Fix FileCollector#addSourceFile parameter order
2023-04-19 00:19:26 -03:00
Juan Martín Sotuyo Dodero 15f62761ab Merge branch 'master' into filecollector-api 2023-04-19 00:19:20 -03:00
Juan Martín Sotuyo Dodero e721c79f96 Merge pull request #4447 from adangel/doc-squared-logos
[doc] Add additional logos with a square shape
2023-04-19 00:11:54 -03:00
Juan Martín Sotuyo Dodero 740dc2d47b Merge pull request #4443 from adangel/fix-doc-issue-4438
[doc] Update base urls for documentation
2023-04-19 00:10:25 -03:00
Juan Martín Sotuyo Dodero 7b42f81dfd Merge branch 'master' into fix-doc-issue-4438 2023-04-19 00:10:17 -03:00
Juan Martín Sotuyo Dodero 08d362aa66 Merge pull request #4462 from adangel/create-sbom
Provide Software Bill of Materials (SBOM)
2023-04-19 00:08:00 -03:00
Juan Martín Sotuyo Dodero c54bd846b4 Fix #4484
- Avoid an NPE on properties.
2023-04-18 20:15:48 -03:00
Andreas Dangel 1789014dc6 [doc] Update release notes (#4483)
Closes #4483
2023-04-18 20:18:32 +02:00
Andreas Dangel 5e4f35e8e4 Merge pull request #4474 from PimvanderLoos:issue-4254
[java] ImmutableField: False positive with lombok (fixes #4254) #4474
2023-04-18 19:33:39 +02:00
Andreas Dangel 01aeed0b3f [doc] Update release notes (#4254, #4474) 2023-04-18 19:32:45 +02:00
Pim van der Loos 66ddd5617f Apply feedback 2023-04-17 11:10:55 +02:00
Andreas Dangel 9a0a52e950 Add custom scmCommentPrefix for maven-release-plugin 2023-04-15 16:08:04 +02:00
Andreas Dangel 1ca778f167 Revert "Don't use maven-release-plugin for release candidates"
This reverts commit 01617c4c7b.
2023-04-15 16:05:47 +02:00
Andreas Dangel 56f4e738aa Don't disable enforcer plugin 2023-04-15 16:05:40 +02:00
Andreas Dangel 9ed9b62a4c Bump pmd-designer from 7.0.0-SNAPSHOT to 7.0.0-rc1 2023-04-15 15:40:07 +02:00
Pim van der Loos 0a99c28bef [java] ImmutableField: False positive with lombok (fixes #4254) 2023-04-15 14:22:56 +02:00
Pim van der Loos 175d4498d8 Add @PimvanderLoos as a contributor 2023-04-15 13:48:53 +02:00
Andreas Dangel 079ff2050b [doc] ANTLR: Update documentation
Fixes #2501
2023-04-14 15:28:05 +02:00
Andreas Dangel f0b729b2e9 [doc] ANTLR: Update paragraph about limitations (CST vs. AST) 2023-04-14 15:27:41 +02:00
Andreas Dangel 414aa3ec3a [doc] ANTLR: Update URLs to point to github.com/pmd/pmd/blob/master... 2023-04-14 15:27:41 +02:00
Andreas Dangel d20257ad67 [doc] Update release notes (#2500) 2023-04-14 15:27:22 +02:00
Andreas Dangel 0d5ecebd4e [core] Antlr - make more methods protected
The abstract methods createPmdTerminal and createPmdError in AntlrGeneratedParserBase don't need to be public. They are just implementation.

The language specific inner nodes (KotlinInnerNode, SwiftInnerNode)
can be package private. Only the concrete subclasses are considered
public API.
2023-04-14 09:41:52 +02:00
Andreas Dangel ee227b1397 [core] Introduce an AbstractVisitorRule
Remove AntlrBaseRule
2023-04-13 20:32:58 +02:00
Andreas Dangel bdacd38437 [core] Move AntlrTokenizer and JavaCCTokenizer into impl packages 2023-04-13 20:32:53 +02:00
wener 85a0d7f59f Added strings as literal and ignore identifiers in sequences 2023-04-13 17:29:12 +02:00
Juan Martín Sotuyo Dodero 4eb9280f19 Merge pull request #4459 from adangel/languages-deps
Introduce a pmd-languages-deps module
2023-04-13 12:11:04 -03:00
Andreas Dangel c36a22eca6 Merge pull request #4452 from nwcm:patch-1
[doc] Update PMD_APEX_ROOT_DIRECTORY documentation reference #4452
2023-04-13 16:58:22 +02:00
Andreas Dangel 0d73abbd52 [doc] Update release notes (#4452) 2023-04-13 16:57:57 +02:00
Andreas Dangel ccf431aaad Add @nwcm as a contributor 2023-04-13 16:56:17 +02:00
Andreas Dangel bdd06be619 [doc] Mention pmd-languages-deps 2023-04-13 16:24:02 +02:00
Andreas Dangel 9e4b4c5f4a [core] Rules with the same regex properties should be equal 2023-04-11 20:15:05 +02:00
Andreas Dangel 71d7bbe1dc [apex] Handle ApexLink initialization errors
When running PMD as an Eclipse plugin, ApexLink can't initialize due to the special bundle classloader used for plugins.
This change just catches the additional possible errors.
2023-04-11 19:20:11 +02:00
Andreas Dangel af74964fcd [core] Fix FileCollector#addSourceFile parameter order
In PMD 6.55.0 the first parameter is sourceContents and the second is pathId (see https://github.com/pmd/pmd/blob/ef3455348603aa25f86894b9930f05f141f44d20/pmd-core/src/main/java/net/sourceforge/pmd/lang/document/FileCollector.java#L192).
This restores that argument order in PMD 7.
2023-04-11 18:57:53 +02:00
Andreas Dangel a4893b964b Upload sbom as release artifact
Uploads xml/json to sourceforge
and to Githu releases
2023-04-10 09:54:02 +02:00
wener 8830040d1b Extended grammar to recognize more tokens 2023-04-07 08:17:13 +02:00
Juan Martín Sotuyo Dodero 0313ffdedd Merge pull request #4461 from adangel/pmd-plugin-linkxref
Disable maven-pmd-plugin option linkXRef
2023-04-06 23:34:56 -03:00
Andreas Dangel ba6d3894a5 Update assembly descriptor XSD 2023-04-06 12:54:55 +02:00
Andreas Dangel ae0bf240d7 Provide Software Bill of Materials (SBOM)
- Add cyclonedx plugin to generate SBOM (Software Bill of Materials)
- The SBOM is attached and deployed into maven central
- The SBOM is also included in the binary distribution of PMD

See https://github.com/CycloneDX/cyclonedx-maven-plugin
2023-04-06 12:49:37 +02:00
Andreas Dangel 3d6e15b523 Disable maven-pmd-plugin option linkXRef
We don't have the jxr plugin and also don't create reports. Disabling this option avoids the many warnings like `[WARNING] Unable to locate Source XRef to link to - DISABLED`.
2023-04-06 11:57:37 +02:00
Andreas Dangel d77ebbe9b7 Fix assembly-plugin warnings
Don't override "finalName" anymore. This however changes the filenames of the generated binary distribution files.
2023-04-06 11:38:46 +02:00
Andreas Dangel 1c2d77fd6a Introduce a pmd-languages-deps module
This is kind of a [BOM](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms), but different: It defines hard dependencies and not just versions for dependencyManagement.
This new module depends on all languages modules and is used by pmd-cli and by pmd-dist. So, we have only one place to modify, when we add new language modules.
2023-04-06 10:20:42 +02:00
Clément Fournier fccde05646 restore file ids properly from cache 2023-04-05 00:39:14 +02:00
Clément Fournier cbd6368d54 Add tests 2023-04-04 23:33:13 +02:00
Clément Fournier 0b0a4ef0de Fix bug with FileId::fromPathLikeString 2023-04-04 23:09:35 +02:00
Clément Fournier aa0be20590 Cache path strings 2023-04-04 22:57:51 +02:00
Clément Fournier c385d58c40 Fix problem with paths on windows 2023-04-04 22:51:04 +02:00
Clément Fournier ccd364b065 Merge branch 'master' into pmd7-textfile-display-name 2023-04-04 22:44:20 +02:00
Clément Fournier 837c7952f5 Merge branch 'master' into clem.pmd7-refactor-cpd 2023-04-04 22:11:38 +02:00
Andreas Dangel 08260c4190 Fix PMD dogfood issues 2023-04-04 19:59:48 +02:00
Andreas Dangel acc6aa2681 [julia] Update for PMD 7 2023-04-04 19:48:32 +02:00
Andreas Dangel 1ef32e4a3f Merge branch 'master' into pr-4403 2023-04-04 19:37:53 +02:00
Andreas Dangel 46fb8b2adb [doc] Add language page for JavaScript/TypeScript 2023-04-04 19:27:52 +02:00
Andreas Dangel c134386898 [typescript] Exclude TypeScriptLexerBase from checkstyle, fix PMD issues 2023-04-04 19:27:47 +02:00
Andreas Dangel e4b9c30323 [typescript] Update lexer for PMD 7 2023-04-04 19:27:43 +02:00
Andreas Dangel 490e019307 Merge branch 'master' into pr-4402 2023-04-04 19:27:15 +02:00
Andreas Dangel 7a89f550d9 [java] Fix rule doc for SingularField
Closes pmd/pmd.github.io#14
Co-authored-by: Zustin <87302257+Zustin@users.noreply.github.com>
2023-04-04 18:30:00 +02:00
Andreas Dangel cf213fbbe3 [doc] Fix links to pmd_release_notes_pmd7.html 2023-04-04 18:18:58 +02:00
nwcm 702318a41d Update design.xml 2023-04-04 23:07:08 +10:00
Andreas Dangel 36efe64586 Merge pull request #4450 from mohui1999:master
[java] Fix #4449 AvoidAccessibilityAlteration: Correctly handle Lambda expressions in PrivilegedAction scenarios #4450
2023-04-03 20:17:12 +02:00
Andreas Dangel c71b3f5f3a [doc] Update release notes (#4450, #4449) 2023-04-03 20:15:13 +02:00
Andreas Dangel db84305c44 Add @mohui1999 as a contributor 2023-04-03 20:12:39 +02:00
Andreas Dangel 3052e0fac5 [java] Update rule test description (#4449) 2023-04-03 20:12:19 +02:00
Andreas Dangel 7ee28a1227 [java] Update rule test description (#4273) 2023-04-03 19:59:39 +02:00
Andreas Dangel 8896c3be32 Merge pull request #4444 from nirvikpatel:master
[java] CommentDefaultAccessModifier - ignore org.junit.jupiter.api.extension.RegisterExtension by default #4444
2023-04-03 19:53:55 +02:00
Andreas Dangel e73b011f9a [doc] Update release notes (#4444, #4273) 2023-04-03 19:53:18 +02:00
Andreas Dangel 435ae32f78 Add @nirvikpatel as a contributor 2023-04-03 19:52:15 +02:00
Andreas Dangel da63a6237e Merge branch 'master' into pr-4444 2023-04-03 19:49:01 +02:00
mohui1999 fd60aedd64 Support AvoidAccessibilityAlteration with Lambda 2023-04-02 22:13:57 +08:00
Andreas Dangel a9d8fe70a7 [doc] Fix github logo in footer 2023-03-31 09:27:04 +02:00
Andreas Dangel 36fcc2965a [doc] Add old logo as reference documentation 2023-03-31 09:25:45 +02:00
Andreas Dangel be19c6fe9b [doc] Add logos in square shape
Refs #4307
2023-03-31 09:18:17 +02:00
nirvik d9c0e874af pmd#4273 : Test Case Added 2023-03-30 21:34:17 +05:30
Andreas Dangel c9ef4531e9 Skip tests when doing a release build 2023-03-30 16:02:58 +02:00
Andreas Dangel 7e5b7c9869 Allow snapshot dependencies in release candidate builds 2023-03-30 15:59:15 +02:00
Andreas Dangel f7d0444d86 Replace more old URLs 2023-03-30 15:32:57 +02:00
Andreas Dangel 2e21c193fe Fix externalInfoURLs in rulesets 2023-03-30 15:05:14 +02:00
nirvik 6d247e643b #4273:new AnnotationDescriptor Added 2023-03-30 17:09:52 +05:30
Andreas Dangel 65a713a96d [doc] Update release notes (#4438) 2023-03-30 12:42:52 +02:00
Andreas Dangel 910d3178db [doc] Fix urls for documentation
- Don't publish the doc anymore to pmd.github.io - the docs are now hosted at docs.pmd-code.org
- Update sitemap.xml - no extra sitemap generation anymore
2023-03-30 12:35:21 +02:00
Andreas Dangel 1c0d6c6a4f [doc] Fix base url for documentation 2023-03-30 11:52:18 +02:00
Andreas Dangel 08e7afc252 [doc] Restore release notes for next rc 2023-03-30 11:47:17 +02:00
Andreas Dangel 8f240ba11d Prepare next development version [skip ci] 2023-03-25 12:51:17 +01:00
Andreas Dangel d9b2444d7e [release] prepare for next development iteration 2023-03-25 12:47:33 +01:00
Andreas Dangel 356af8b636 [release] prepare release pmd_releases/7.0.0-rc1 2023-03-25 12:30:51 +01:00
Andreas Dangel 103beed66d Prepare pmd release 7.0.0-rc1 2023-03-25 12:30:40 +01:00
Andreas Dangel b8e1c114b9 [doc] Fix release notes
Can't use jekyll includes outside of jekyll...
Can't use markdown in jekyll inside html...
2023-03-25 10:52:47 +01:00
Andreas Dangel 01617c4c7b Don't use maven-release-plugin for release candidates
This allows us to use 7.0.0-SNAPSHOT for the designer
2023-03-25 10:46:52 +01:00
Andreas Dangel 0cfa71162c Bump build-tools from 20 to 21 2023-03-25 09:53:29 +01:00
Wener 6c24e77847 Delete .vscode directory
remove accidentally checked in .vscode folder
2023-03-23 11:58:33 +01:00
wener fa1c51caef Added Coco language 2023-03-23 11:55:16 +01:00
Andreas Dangel c3bc33e8a2 Configure propertiesEncoding for maven-resources-plugin 2023-03-23 10:47:10 +01:00
Andreas Dangel e320048700 Merge pull request #4389 from adangel:pmd7-kotlin-update-grammar-1.8
[kotlin] Update grammar to version 1.8 #4389
2023-03-23 10:30:23 +01:00
Andreas Dangel 40fe60a594 [doc] Update release notes (#4389) 2023-03-23 10:29:54 +01:00
Andreas Dangel b41a4f9cdd Merge branch 'master' into pr-4389 2023-03-23 10:28:39 +01:00
Andreas Dangel 545bc0adc5 Merge pull request #4428 from sfdcsteve:master
[apex] ApexBadCrypto bug fix for #4427 - inline detection of hard coded values #4428
2023-03-23 10:27:37 +01:00
Andreas Dangel 638212af72 [doc] Update release notes (#4427, #4428) 2023-03-23 10:27:07 +01:00
Andreas Dangel ff8d8e1462 Add @sfdcsteve as a contributor 2023-03-23 10:26:36 +01:00
Andreas Dangel dd9d64a475 Merge branch 'master' into pr-4428 2023-03-23 10:25:00 +01:00
Andreas Dangel 919b1d246a Merge pull request #4417 from oowekyala:pmd7.micro-opts
[core] [java] More micro opts #4417
2023-03-23 10:24:26 +01:00
Andreas Dangel 6179982002 [doc] Fix dead links 2023-03-23 10:21:10 +01:00
Andreas Dangel 14e29b59c2 Merge pull request #4429 from oowekyala:pmd7-warn-debug
[java] Make missing class warnings debug level #4429
2023-03-23 09:51:10 +01:00
Andreas Dangel 8d9e5553b9 Merge pull request #4422 from adangel:pmd7-warning-without-debug
[core] Log semantic error warnings without debug note #4422
2023-03-23 09:49:32 +01:00
Andreas Dangel a93a94bce2 Merge pull request #4423 from adangel:pmd7-cli-file-list
[cli] Fix NPE when only --file-list is specified #4423
2023-03-23 09:48:11 +01:00
Andreas Dangel 78a7a5a445 Merge pull request #4373 from adangel:pmd7-update-release-notes
[doc] Update release notes for PMD 7.0.0-rc1 #4373
2023-03-23 09:46:56 +01:00
Andreas DangelandClément Fournier 5f01e8b79f Update release notes regarding release candidate
[skip ci]

Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2023-03-23 09:43:04 +01:00
Clément Fournier 8307d8f5fa make missing class warnings debug level
Ref #3914
2023-03-21 21:22:19 +01:00
Clément Fournier c222173234 Also add an optimized forEach impl
Benchmark                                   (sourceFname)  Mode  Cnt   Score   Error  Units
StreamBench.foreachOnChildrenStream     /PLSQLParser.java  avgt    4  14,992 ± 0,169  ms/op
StreamBench.foreachOnChildrenStreamOpt  /PLSQLParser.java  avgt    4   8,179 ± 0,141  ms/op
StreamBench.loopOnChildrenStream        /PLSQLParser.java  avgt    4   9,694 ± 0,549  ms/op
StreamBench.optimizedLoop               /PLSQLParser.java  avgt    4   7,631 ± 0,143  ms/op

"foreachOnChildrenStreamOpt" is the new implementation, the old is "foreachOnChildrenStream".
For comparison, this new impl of forEach with a lambda appears slightly faster than using a
for-each loop on the children stream, and using a manually indexed loop (with getChild) is
slightly faster.
2023-03-21 20:06:00 +01:00
Steve Stearns ba297a2a8e Fine tuning style issues 2023-03-20 09:45:22 -05:00
Steve Stearns e922278497 Fixing imports for code style issues 2023-03-20 09:28:48 -05:00
Clément Fournier f2dc3805af Cleanups 2023-03-20 15:18:12 +01:00
Steve Stearns d181b565b3 Fixing a bug in ApexBadCrypto related to inline detection 2023-03-20 09:09:23 -05:00
Clément Fournier 6eabac7d44 Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd 2023-03-20 15:00:23 +01:00
Clément Fournier 194650832f Fix VF impl 2023-03-20 14:57:26 +01:00
Clément Fournier 344b2cc17b Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd 2023-03-20 14:41:17 +01:00
Clément Fournier 9eb5ac9a1f Fix checkValidity call 2023-03-20 13:56:04 +01:00
Clément Fournier b71e1711e5 Cleanups and renamings 2023-03-20 13:31:00 +01:00
Clément Fournier ad219c9967 Move members around 2023-03-20 12:17:14 +01:00
Clément Fournier 7bcb7026dc Lint 2023-03-20 12:10:08 +01:00
mohan-chinnappan-n 41bb91549e Merge pull request #1 from mohan-chinnappan-n/mohan-chinnappan-n-patch-1
New version of XML to HTML transformer
2023-03-19 19:51:08 -04:00
mohan-chinnappan-n 28a7aab8fd New version of XML to HTML transformer
Adding new version of XML to HTML transformer
Has optoin to use datatable view with url parameter d
    Example: cpd.html?d
2023-03-19 19:41:20 -04:00
Clément Fournier a09532e174 Move out into own class 2023-03-19 23:36:07 +01:00
Clément Fournier a8c481e2ac Move getFileNameRenderer from FileCollector 2023-03-19 23:29:45 +01:00
Clément Fournier 129b111ee6 Rename PathId -> FileId 2023-03-19 23:20:49 +01:00
Clément Fournier 37e2f8f208 Improve jjt error messages 2023-03-19 22:57:51 +01:00
Clément Fournier a4024c0021 Fix more things 2023-03-19 21:55:05 +01:00
Clément Fournier b88297ea7e Fix cache tests 2023-03-19 19:58:55 +01:00
Clément Fournier f7ec779f94 Fix renderers 2023-03-19 19:52:49 +01:00
Clément Fournier 28f6c01d51 Fix tests in pmd-core 2023-03-19 19:22:00 +01:00
Clément Fournier 82df565ccc Fix displayname logic in FileCollector 2023-03-19 18:35:10 +01:00
Clément Fournier 2d7e200db1 add PathId class 2023-03-19 13:08:14 +01:00
Andreas Dangel 013ada5def [ci] Render release notes also for snapshots
This updates ReadMe.md on sourceforge for snapshots as well:
https://sourceforge.net/projects/pmd/files/pmd/7.0.0-SNAPSHOT/
2023-03-19 11:42:38 +01:00
Clément Fournier 8c448f2fd8 Make children more efficient on AbstractNode 2023-03-18 16:48:34 +01:00
Clément Fournier 386d77fb68 Move invoke=true 2023-03-18 15:20:46 +01:00
Clément Fournier d1816619c6 Replace 139 with 31 2023-03-18 15:17:54 +01:00
Clément Fournier 6010674e69 Merge branch 'master' into pmd7.micro-opts 2023-03-18 15:17:00 +01:00
Andreas Dangel 6621603908 [cli] Fix NPE when only --file-list is specified 2023-03-18 11:02:08 +01:00
Clément Fournier 5db8be42a3 Merge remote-tracking branch 'upstream/master' into clem.pmd7-refactor-cpd 2023-03-17 15:39:01 +01:00
Clément Fournier 24a089bfd3 Remove duplicated dependency declaration
Causing a maven warning
Same dependency is declared 20 lines above.
2023-03-17 14:55:09 +01:00
Clément Fournier 590c46bac8 Fix reported CPD languages test 2023-03-17 14:30:01 +01:00
Andreas Dangel 3eb396b04f [core] Log semantic error warnings without debug note 2023-03-17 11:25:27 +01:00
Andreas Dangel 11e2a8687e Update gems
Fixes https://github.com/pmd/pmd/security/dependabot/37
Fixes CVE-2023-28120
Fixes https://github.com/advisories/GHSA-pj73-v5mw-pm9j
2023-03-17 10:40:15 +01:00
Andreas Dangel 4a14cb7ad7 Merge pull request #4420 from oowekyala:clem.pmd7-remove-pmd-eol
[core] Remove PMD.EOL #4420
2023-03-17 10:30:58 +01:00
Andreas Dangel ee850736f4 Merge branch 'master' into clem.pmd7-remove-pmd-eol 2023-03-17 09:40:54 +01:00
Andreas Dangel 2922221191 [doc] Update release notes (#4420) 2023-03-17 09:37:48 +01:00
Andreas Dangel 710f9cf2b6 Use AbstractRendererTest#EOL 2023-03-17 09:37:35 +01:00
Andreas Dangel 0b6c349db9 Use \R for line breaks 2023-03-17 09:37:01 +01:00
Andreas Dangel 4ab91cb6ea Merge pull request #4416 from oowekyala:clem.fix-comment-content
[java] Fix reported line number in CommentContentRule #4416
2023-03-17 08:23:16 +01:00
Andreas Dangel 7e3c92193a [doc] Update release notes (#4416) 2023-03-17 08:22:29 +01:00
Andreas Dangel 5096cab794 [java] CommentSize/CommentContent - update tests 2023-03-17 08:17:53 +01:00
Andreas Dangel 5ab95a3e59 Revert changes to BinaryDistributionIT, only add kotlin-1.8 2023-03-16 11:38:54 +01:00
Andreas Dangel e5b14532ef [doc] Fix github logo 2023-03-16 11:24:09 +01:00
Andreas Dangel 06fee00b16 [doc] Restructure release notes, add detailed page
Main release notes are much shorter.
The full details is in a separate page.
Started to migrated Java Clean Changes from wiki.
2023-03-16 11:00:00 +01:00
Andreas Dangel 833afabfea [doc] Update Release Notes
- fix baseurl
- fix "pmd designer" call
- clarify release candidates
2023-03-16 08:30:08 +01:00
Clément Fournier e483f5846d Lint 2023-03-15 22:37:19 +01:00
Clément Fournier 69dba12e6c Fix test 2023-03-14 22:38:19 +01:00
Clément Fournier 5a662ecb3e Merge branch '7.0.x' into clem.pmd7-remove-pmd-eol 2023-03-14 21:54:45 +01:00
Clément Fournier f55c01ac1f Merge branch '7.0.x' into port-properties 2023-03-14 21:07:35 +01:00
Clément Fournier fae08a8e08 delete leftover file 2023-03-14 20:50:44 +01:00
Clément Fournier d6de5ca52b Fix VF module 2023-03-14 20:49:43 +01:00
Clément Fournier 0f17cc83f6 Add back default version for CPD languages 2023-03-11 17:17:43 +01:00
Clément Fournier 6cbfc7d773 Fix HTML test 2023-03-11 15:49:13 +01:00
Clément Fournier 6bc57b47c8 Reduce cache size 2023-03-11 15:34:25 +01:00
Clément Fournier 25843562fc Fix CommentContentRule 2023-03-11 15:14:31 +01:00
Clément Fournier d544dc5878 Fix tests 2023-03-11 15:07:48 +01:00
Clément Fournier 1c15f8285a Remove list trick in Attribute 2023-03-11 14:10:21 +01:00
Clément Fournier ba2d10c8e2 Change algo to fetch node
make better use of the cache
2023-03-11 14:01:48 +01:00
Clément Fournier eb8b3f570f Use method handles 2023-03-11 13:52:25 +01:00
Clément Fournier 419b5bae51 New micro opts
-5% runtime on openjdk (all java rules).
2023-03-11 13:52:25 +01:00
Andreas Dangel da8b854a4a Add section "notes for integrators" 2023-03-09 10:31:41 +01:00
Andreas Dangel c267809486 Reformat long lines 2023-03-09 10:18:32 +01:00
Andreas Dangel 0e4576db35 Add rule links (section Revamped Java module) 2023-03-09 10:18:31 +01:00
Andreas Dangel f72df8785e Move back to release_notes.md 2023-03-09 10:18:29 +01:00
Andreas Dangel 90bcd76203 Update urls, introduce baseurl 2023-03-09 10:16:52 +01:00
Andreas Dangel 26676da7d8 Update section "Compatibility and migration notes" 2023-03-09 10:16:52 +01:00
Andreas Dangel 6ea5252491 Simplify section about language lifecycle/properties 2023-03-09 10:16:51 +01:00
Andreas Dangel 8a070499a0 Add section "Language versions" 2023-03-09 10:16:51 +01:00
Andreas Dangel 2c96a54854 Update pmd-demo.gif 2023-03-09 10:16:51 +01:00
Andreas Dangel c68f4e3d02 Add #2435 to release notes 2023-03-09 10:16:51 +01:00
Andreas Dangel f79b05effd Minimum requirement is java 8 or above 2023-03-09 10:16:50 +01:00
Andreas Dangel ca3e47b60b Add emoticons 2023-03-09 10:16:50 +01:00
Andreas Dangel 0979dc3710 Move section node stream API 2023-03-09 10:16:50 +01:00
Andreas DangelandJuan Martín Sotuyo Dodero 4145865b97 Apply suggestions from code review
Co-authored-by: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2023-03-09 10:16:50 +01:00
b81bd618f9 Apply suggestions from code review
Co-authored-by: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2023-03-09 10:16:49 +01:00
Andreas Dangel c8bd23c13c [doc] Update release notes - add removed rules
Note: not all rules have been removed yet
2023-03-09 10:16:49 +01:00
Andreas Dangel bb8259b70b [doc] Update release notes - add removed rules
Note: not all rules have been removed yet
2023-03-09 10:16:49 +01:00
Andreas Dangel 7e4882591d [doc] Update release notes - complete highlights 2023-03-09 10:16:48 +01:00
Andreas Dangel a7db4df6b3 [doc] Update release notes - add more issues/prs 2023-03-09 10:16:48 +01:00
Andreas Dangel 03454437b3 [doc] Update release notes - consistent indentation 2023-03-09 10:16:48 +01:00
Andreas Dangel 05cfbe541c [doc] Update release notes, add missing rule fixes 2023-03-09 10:16:48 +01:00
Andreas Dangel 96389a44b6 Fix tests 2023-03-09 10:15:12 +01:00
Andreas Dangel 0c0d6f33ad [kotlin] Update grammar to version 1.8 2023-03-09 09:35:40 +01:00
Andreas Dangel a186c122a1 Merge pull request #4400 from oowekyala:clem.pmd7-public-noop-reporter
[core] Add public noop message reporter #4400
2023-03-04 21:49:03 +01:00
Clément Fournier 255fdf050b Fix compil 2023-03-04 15:38:40 +01:00
Clément Fournier c44ce2633f Revert forgotten thing 2023-03-04 15:27:49 +01:00
Clément Fournier b00e152026 Merge branch 'master' into clem.pmd7-refactor-cpd 2023-03-04 15:14:47 +01:00
Clément Fournier 67db1dc9d7 Rename noop reporter to QuietReporter 2023-03-04 15:06:09 +01:00
Clément Fournier c3b88ee5cd Merge branch 'master' into clem.pmd7-public-noop-reporter 2023-03-04 15:04:17 +01:00
Andreas Dangel fb50649b92 Merge pull request #4412 from AliAsbai:prBranchKTHProject
[doc] Added new error msg to ConstantsInInterface #4412
2023-03-03 18:58:18 +01:00
Andreas Dangel 39fc882085 [doc] Update release notes (#1205, #4412) 2023-03-03 18:57:44 +01:00
Andreas Dangel a24aeb1b40 Merge pull request #4410 from all-contributors/add-dague1
[doc] add dague1 as a contributor for doc #4410
2023-03-03 18:49:51 +01:00
Andreas Dangel a6c33659cb [ci] Disable builds for branch pmd/7.0.x 2023-03-03 18:39:48 +01:00
Andreas Dangel 45e7830f8a Merge branch 'pmd/7.0.x' 2023-03-03 18:16:36 +01:00
David Ljunggren 2ed3737e75 Doc #13: Shortened the message, and changed the description 2023-03-02 17:05:46 +01:00
Andreas Dangel 9f05cf9d8d [ci] Prepare scripts for rc1 release [skip ci]
- allow to set RELEASE_VERSION, LAST_VERSION and DEVELOPMENT_VERSION manually
- backport build.sh - to be in sync with pmd7 branch
- allow to deploy SNAPSHOT doc after release with same version
2023-03-02 16:45:31 +01:00
David Ljunggren 8d6999b61b Doc #13: added new error msg and updated wiki text 2023-03-02 13:12:05 +01:00
allcontributors[bot] 6b8a729f85 update .all-contributorsrc [skip ci] 2023-03-01 18:23:35 +00:00
allcontributors[bot] a71a815588 update docs/pages/pmd/projectdocs/credits.md [skip ci] 2023-03-01 18:23:34 +00:00
Clément Fournier 0b2f1517ba Merge branch '7.0.x' into clem.pmd7-refactor-cpd 2023-02-27 00:41:11 +01:00
Clément Fournier f2f83576ed Merge pull request #4387 from adangel/pmd7-language-versions 2023-02-26 23:49:06 +01:00
Clément Fournier bf2c69921e Fix merge 2023-02-26 16:23:12 +01:00
Clément Fournier 65725c13aa Merge branch '7.0.x' into pr/4387 2023-02-26 16:17:30 +01:00
Clément Fournier a8a6dd2586 Merge branch '7.0.x' into clem.pmd7-refactor-cpd 2023-02-26 16:11:13 +01:00
Clément Fournier 22871ad03c add a test for display name in the cache 2023-02-26 16:06:01 +01:00
Clément Fournier 9e43640834 Change cache log messages to be debug/trace 2023-02-26 15:44:16 +01:00
Clément Fournier 778d5e843a Cleanups 2023-02-26 15:40:14 +01:00
Clément Fournier 6c1fa1fe4f Merge branch '7.0.x' into pr/4361 2023-02-26 15:37:59 +01:00
Clément Fournier 71dbeb2acd Revert version change 2023-02-26 15:35:28 +01:00
Clément Fournier 50577f2b40 Rewrite binaryDistributionIt to be easier to maintain 2023-02-26 15:33:36 +01:00
Clément Fournier 95b7ca32ad Merge branch '7.0.x' into pr/4387 2023-02-26 15:07:53 +01:00
Clément Fournier fd6d825ede Merge pull request #4370 from Monits/rule-improvements
[java] Rule improvements
2023-02-26 14:02:22 +00:00
Clément Fournier ee9f1c00c5 Merge pull request #4362 from Monits/xpath-properties-rulechain
[core] Allow more XPath rules to use the rulechain
2023-02-26 14:02:00 +00:00
Clément Fournier aed9e12c34 Merge branch 'master' into 7.0.x 2023-02-26 14:59:12 +01:00
Clément Fournier a1712cea98 Adapt CI to build in merge queue
See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue
2023-02-26 14:58:21 +01:00
Clément Fournier 8770ad615f Merge branch '7.0.x' into clem.pmd7-refactor-cpd 2023-02-26 14:39:35 +01:00
Juan Martín Sotuyo Dodero 72ce6c5dc0 Merge pull request #4399 from oowekyala/clem.pmd7-remove-dummy-lang
[test] Remove dummy language module from pmd-test
2023-02-25 14:16:35 -03:00
Juan Martín Sotuyo DoderoandClément Fournier 2b35ef2985 Simplify top-level class expression
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2023-02-25 13:46:30 -03:00
Andreas Dangel 132cb61511 Merge branch 'master' into pmd/7.0.x 2023-02-25 12:03:42 +01:00
Andreas Dangel be4dd9cef0 Bump pmd from 6.54.0 to 6.55.0 2023-02-25 11:55:26 +01:00
Andreas Dangel 39f26bdd0b Prepare next development version [skip ci] 2023-02-25 11:52:24 +01:00
Andreas Dangel 2fc85cfe24 [maven-release-plugin] prepare for next development iteration 2023-02-25 11:50:54 +01:00
Andreas Dangel ef34553486 [maven-release-plugin] prepare release pmd_releases/6.55.0 2023-02-25 11:50:49 +01:00
Andreas Dangel b491afc628 Prepare pmd release 6.55.0 2023-02-25 11:38:40 +01:00
Andreas Dangel 1abf8e063a Merge pull request #4407 from adangel:pmd6-release-notes-6.55.0
[doc] Update release notes - last pmd6 release, pmd7 development #4407
2023-02-25 11:33:31 +01:00
Andreas Dangel 788f209649 Merge pull request #4379 from adangel:pmd7-java-20
[java] Add support for java 20 (pmd7) #4379
2023-02-23 11:50:05 +01:00
Andreas Dangel 851c34dbca Merge branch 'master' into pr-4379 2023-02-23 11:49:29 +01:00
Andreas Dangel fea41bcc8a Merge branch 'pmd/7.0.x' into pr-4379 2023-02-23 11:48:43 +01:00
Andreas Dangel d0bb4361c6 Merge branch 'master' into pmd/7.0.x 2023-02-23 11:47:14 +01:00
Paul Guyot 5660d262b4 CPD: add support for Typescript using antlr4 grammar 2023-02-23 11:44:01 +01:00
Andreas Dangel 8bdfc9538b Merge pull request #4377 from adangel:pmd6-java-20
[java] Add support for java 20 #4377
2023-02-23 11:34:37 +01:00
Andreas Dangel 2db7255035 Merge pull request #4395 from adangel:pmd6-support-env-CLASSPATH
[core] Support environment variable CLASSPATH with pmd.bat under Windows #4395
2023-02-23 11:26:51 +01:00
Andreas Dangel 794263c463 [doc] Update release notes - last pmd6 release, pmd7 development 2023-02-23 11:23:38 +01:00
Wener e2af5737e4 Update Julia.g4
Removed reintroduced comments
2023-02-22 11:41:36 +01:00
Wener dd703f65c5 Update mathExample.txt
Updated grammar. Updated unittest accordingly.
2023-02-22 11:34:40 +01:00
Wener 8d739cdcec Update Julia.g4 2023-02-22 11:33:57 +01:00
Wener cb35a04394 Update Julia.g4
Removed unneeded comments
2023-02-22 05:40:49 +01:00
Wener 027248e5e6 Update julia.md 2023-02-22 05:36:48 +01:00
Wener 21fea8fd74 Update pom.xml
Replaced tab with spaces
2023-02-22 05:36:11 +01:00
Juan Martín Sotuyo Dodero 67c8daaf25 Merge pull request #4398 from adangel/pmd6-cpd-usage-text
[doc] CPD - use non deprecated `--dir` cli option
2023-02-21 19:22:06 -03:00
Clément Fournier 48664cf32b Also remove default dependency 2023-02-21 22:05:44 +01:00
Clément Fournier e5f91ea57b Add back javacc dep to antrun plugin 2023-02-21 22:01:47 +01:00
wener 636cf15009 Added support for Julia code duplication. 2023-02-21 19:30:28 +01:00
Juan Martín Sotuyo Dodero 057e02f279 Merge branch 'pmd/7.0.x' into rule-improvements 2023-02-21 01:14:24 -03:00
Juan Martín Sotuyo Dodero 3a5d2cb3ee Add more tests 2023-02-21 00:57:57 -03:00
Juan Martín Sotuyo Dodero c041fa4bd3 Fix xpath expression 2023-02-21 00:57:32 -03:00
Clément Fournier 8736174f09 Remove forgotten things from pmd-core/pom.xml 2023-02-20 21:47:03 +01:00
Clément Fournier 4ebc48c2a2 Remove more deprecated stuff from PMD.java 2023-02-20 15:19:09 +01:00
Clément Fournier b25c16f94d Remove usages of PMD.EOL 2023-02-20 15:17:41 +01:00
Clément Fournier 6eb50863b8 Fix last tests 2023-02-20 15:03:46 +01:00
Clément Fournier 40aa9de6e1 Checkstyle 2023-02-20 14:55:21 +01:00
Clément Fournier 60f28c5c35 Fix cli tests 2023-02-20 14:30:44 +01:00
Clément Fournier 11e2a97c5f Introduce ts language module 2023-02-20 14:09:07 +01:00
Juan Martín Sotuyo Dodero 24311796d1 Fix the equality check
- Guess at some point someone does a copy even if it's the original…
2023-02-19 17:21:10 -03:00
Juan Martín Sotuyo Dodero 5400dddc7d Improve documentation and revise impl
- No need to copy the subexpression
 - Improve the check for needing to copy
2023-02-19 14:33:14 -03:00
Clément Fournier a12bbf8dde Remove duplicated options in AbstractConfiguration
Fix logging issue
2023-02-19 16:51:53 +01:00
Clément Fournier a3831e95dc move more things into AbstractConfiguration 2023-02-19 15:39:47 +01:00
Clément Fournier 0134f5e060 Use Path instead of File in CPDConf 2023-02-19 15:02:05 +01:00
Juan Martín Sotuyo Dodero 9a3a5f5cfe Use proper separator 2023-02-18 23:38:39 -03:00
Juan Martín Sotuyo Dodero 79d9c90d18 Fix style error 2023-02-18 23:17:30 -03:00
Juan Martín Sotuyo Dodero 2b58f285e8 Be OS agnostic 2023-02-18 22:53:33 -03:00
Clément Fournier 046812cf51 Remove useless methods on Match 2023-02-19 01:24:47 +01:00
Clément Fournier de7ff21c1a Fix bug with renderer encoding 2023-02-19 01:24:38 +01:00
Juan Martín Sotuyo Dodero 4f1a307962 Fix broken call 2023-02-18 21:21:01 -03:00
Juan Martín Sotuyo Dodero 7cab83ae97 Style fixes 2023-02-18 19:20:25 -03:00
Juan Martín Sotuyo Dodero f4d1c14283 Actually ensure the path ids are consistent 2023-02-18 19:20:25 -03:00
Juan Martín Sotuyo Dodero a55cdbbcb7 Add Incremental Analysis integration tests 2023-02-18 19:20:25 -03:00
Juan Martín Sotuyo Dodero 34c4f17572 Copy over results automatically
- Don't expect cached results to be reported over the listener back
   into the cache
2023-02-18 15:16:32 -03:00
Clément Fournier eb373881bd Fix problem on windows 2023-02-18 17:24:18 +01:00
Clément Fournier 55d8953afe Fix tests 2023-02-18 17:14:37 +01:00
Clément Fournier 62beb2b5fb Update TSQL module 2023-02-18 17:08:20 +01:00
Clément Fournier b7a3f800ec Merge branch '7.0.x' into clem.pmd7-refactor-cpd 2023-02-18 17:03:46 +01:00
Clément Fournier 214e80a5f1 Add public MessageReporter#noop 2023-02-18 17:02:36 +01:00
Clément Fournier abc0b3c94e Delete pmd-test/DummyLanguageModule
Refs #2436
2023-02-18 15:55:11 +01:00
Clément Fournier 6c27d46b6b Cleanup 2023-02-18 14:03:30 +01:00
Clément Fournier 10fcc1af89 Add support for range constraints in XML-defined properties 2023-02-17 21:18:10 +01:00
Clément Fournier 0ba2460f92 Merge branch '7.0.x' into port-properties 2023-02-17 16:27:42 +01:00
Clément Fournier 5c975bd08c Merge branch 'master' into 7.0.x 2023-02-17 16:24:03 +01:00
Andreas Dangel c1209263fc [tsql] Update test to JUnit5 and fix it 2023-02-17 12:09:51 +01:00
Andreas Dangel 17364a997b [doc] CPD - use non deprecated --dir cli option 2023-02-17 11:39:03 +01:00
Andreas Dangel be6a46ccff [vf] Refactor dependency to apex language module 2023-02-17 11:22:52 +01:00
Andreas Dangel eebe9088a7 [doc] Update language versions doc 2023-02-17 09:42:45 +01:00
Andreas Dangel 56dbdd1c95 [core] Don't allow languages without versions 2023-02-17 09:41:52 +01:00
Andreas Dangel a74bf9665f [doc] Update gitter urls, update codacy badge 2023-02-17 09:12:32 +01:00
Andreas Dangel a283615299 Refactor LanguageMetdata::extensions usages 2023-02-17 09:04:16 +01:00
Andreas Dangel 8aaef01ed8 [doc] Update release notes (#4120) [skip ci] 2023-02-17 09:04:15 +01:00
Andreas Dangel ee3f08a498 [doc] Update release notes regarding ecmascript version 2023-02-17 09:04:15 +01:00
Andreas Dangel e2bb0c8480 Reuse names and extensions for CPD language 2023-02-17 09:04:15 +01:00
Andreas Dangel d7d2ad541e Add explicit language versions (#4120) 2023-02-17 09:04:12 +01:00
Andreas Dangel 6c95689ed3 [core] Require explicit language versions (#4120) 2023-02-17 08:44:24 +01:00
Andreas Dangel 2c3f945b4d Merge branch 'master' into pmd/7.0.x 2023-02-16 20:53:46 +01:00
Clément Fournier 2ef44be5b6 Update doc 2023-02-16 20:44:17 +01:00
Clément Fournier 30a7f07d1c Cleanups 2023-02-16 20:44:17 +01:00
Andreas Dangel af6d502afb Merge pull request #4390 from pguyot:w06/add_support_for_tsql
Add support for T-SQL using Antlr4 lexer #4390
2023-02-16 19:43:52 +01:00
Andreas Dangel 961c96d447 [doc] Update release notes (#4390) 2023-02-16 19:24:32 +01:00
Andreas Dangel f2cae1d383 Merge branch 'master' into pr-4390 2023-02-16 18:58:54 +01:00
Andreas Dangel d4d7f4b75b Add CaseChangingCharStream for t-sql, downgrade antlr 2023-02-16 18:55:47 +01:00
Andreas Dangel b5ea31d53f [core] Support environment variable CLASSPATH with pmd.bat under Windows 2023-02-16 16:40:24 +01:00
Andreas Dangel 62f2970946 Merge pull request #4392 from dawiddc:issue4224
[java] Fix #4393 MissingStaticMethodInNonInstantiatableClass: Fix false-positive for field-only class #4392
2023-02-16 10:53:52 +01:00
Andreas Dangel d129e29fc8 [doc] Update release notes (#4393, #4392) 2023-02-16 10:52:09 +01:00
Andreas Dangel 1eeb045e17 Add @dawiddc as a contributor 2023-02-16 10:49:29 +01:00
Dawid Ciok af7640f136 [java] Fix #4393 MissingStaticMethodInNonInstantiatableClass: Fix false-positive for field-only class 2023-02-16 10:48:32 +01:00
Paul Guyot c9b19b680a [TSql] Move files & classes according to new layout 2023-02-16 08:24:03 +01:00
Andreas Dangel 9bcab3c820 Fix integration test 2023-02-14 19:35:51 +01:00
Clément Fournier c572cb88d7 Rename package cpd.internal to cpd.impl 2023-02-13 15:18:37 +01:00
Clément Fournier 9c3434a07b Split cpd/pmd specific methods into...
subinterfaces of Language
2023-02-13 15:16:48 +01:00
Clément Fournier d6ec427aa8 Doc 2023-02-13 14:37:05 +01:00
Clément Fournier 51b5016163 Cleanups 2023-02-12 20:47:09 +01:00
Clément Fournier 519e9d366f Fix java tests 2023-02-12 20:20:12 +01:00
Clément Fournier ddbfc90c14 Fix build 2023-02-12 20:06:28 +01:00
Clément Fournier fb9f49624d Delete old CPD Language interface
reorganize cpd modules
2023-02-12 18:03:58 +01:00
Clément Fournier 8fbd830daa Style and renamings 2023-02-12 17:24:02 +01:00
Clément Fournier 8541fb75fd Fix pmd-core 2023-02-12 17:07:30 +01:00
Clément Fournier 9f35966ec6 Refactor EOF handling
Mandate that no coordinate is missing in a TokenEntry.
2023-02-12 15:59:14 +01:00
Clément Fournier add597026c Don't forget EOF token 2023-02-12 15:28:34 +01:00
Clément Fournier 1828faeadc Fix some modules 2023-02-11 19:27:46 +01:00
Clément Fournier 9e9de580a2 Delete CPD 2023-02-11 19:13:22 +01:00
Clément Fournier d972e4aabe Fix scala module 2023-02-11 18:47:29 +01:00
Clément Fournier f2cfd8f5a6 More refactorings 2023-02-11 18:43:37 +01:00
Clément Fournier e7503d9d98 Fix CPDReport 2023-02-11 18:33:21 +01:00
Clément Fournier 0cab976fc5 Remove SourceCode 2023-02-11 18:22:30 +01:00
Clément Fournier 65d953bfb4 Progress 2023-02-11 18:10:35 +01:00
Clément Fournier 27a4aba871 Progress 2023-02-11 16:34:24 +01:00
Clément Fournier cf81809990 Change a ton of stuff in CPD 2023-02-10 18:21:23 +01:00
Clément Fournier d4c05d1fb5 Make pmd language have a hook to launch CPD
This allows removing the CPD language instances,
sharing more logic between CPD and PMD, and using
language properties to configure CPD and PMD uniformly.
2023-02-10 16:45:52 +01:00
Andreas Dangel 7f543c6ff4 Merge branch 'pmd/7.0.x' into pmd7-java-20 2023-02-10 13:40:52 +01:00
Paul Guyot d20592ba63 Add support for T-SQL using Antlr4 lexer 2023-02-10 11:33:58 +01:00
Andreas Dangel eee8b95a68 Merge pull request #4060 from oowekyala:pmd7-language-lifecycle
[core] Language lifecycle #4060
2023-02-10 10:34:38 +01:00
Andreas Dangel e7ff4a36cf [swift] Fix CPD tests 2023-02-10 10:29:53 +01:00
Andreas Dangel 851300acba Merge branch 'master' into pmd/7.0.x 2023-02-10 10:11:54 +01:00
Andreas Dangel c4ee830721 Merge pull request #4386 from adangel:pmd6-update-version
Update versions #4386
2023-02-10 09:36:33 +01:00
Juan Martín Sotuyo Dodero bc3d9b24ad Merge pull request #4374 from adangel/pmd6-deprecate-go-language-module
[go] Deprecate GoLanguageModule
2023-02-09 13:40:02 -03:00
Andreas Dangel de9d3959ea [doc] Update release notes (#4359) 2023-02-09 10:59:01 +01:00
Andreas Dangel e10cf6a4ff Merge pull request #4384 from openium:master
[swift] Add more swift 5.x support (#unavailable mainly) #4384
2023-02-09 10:54:04 +01:00
Andreas Dangel 300c32a1a4 [doc] Update release notes (#4384) 2023-02-09 10:53:31 +01:00
Andreas Dangel ea0b8ff904 Fixups from #4384 2023-02-09 10:51:24 +01:00
Andreas Dangel c1170e76e2 Bump maven-gpg-plugin from 1.6 to 3.0.1 2023-02-09 09:48:09 +01:00
Andreas Dangel 8e7e4a46bb Bump maven-deploy-plugin from 3.0.0 to 3.1.0 2023-02-09 09:48:09 +01:00
Andreas Dangel 36ad68eb58 Remove reporting section
The site lifecycle is not used for a long time now
in PMD, so we don't need to configure a reporting
section.
2023-02-09 09:48:03 +01:00
Andreas Dangel 427f0cab43 Bump maven-enforcer-plugin from 3.1.0 to 3.2.1 2023-02-09 09:22:09 +01:00
Andreas Dangel b859115627 Bump ant from 1.10.12 to 1.10.13 2023-02-09 09:21:47 +01:00
Andreas Dangel bc33a222ea Bump checkstyle from 10.6.0 to 10.7.0 2023-02-09 09:21:29 +01:00
Andreas Dangel 34add58c41 Bump kotest from 5.5.4 to 5.5.5 2023-02-09 09:21:13 +01:00
Andreas Dangel e779e8676f Bump maven from 3.8.6 to 3.9.0 2023-02-09 09:10:23 +01:00
Clément Fournier 64a3ec45a5 Remove forgotten log call 2023-02-08 12:49:58 +01:00
Clément Fournier d31b8f618c Fix #4359 2023-02-08 12:43:37 +01:00
Clément Fournier a7b8d8ffae Merge branch 'pr/4355' into 7.0.x 2023-02-08 12:25:11 +01:00
Clément Fournier 00cc3ba9b2 Add tests
Refs #4355
2023-02-08 12:24:45 +01:00
kenji a10662731b Add more swift 5.x support (#unavalaible mainly) 2023-02-07 20:50:08 +01:00
Clément Fournier 9401208c97 Merge branch '7.0.x' into pr/4355 2023-02-07 19:34:09 +01:00
Andreas Dangel ba799f74c6 [java] Update parser messages for preview features
- These are more aligned to the official javac -Xlint:preview messages.
- Update URLs to openjdk.org
2023-02-06 20:49:25 +01:00
Clément Fournier 1de1177a5a Fix bug 2023-02-06 16:28:43 +01:00
Clément Fournier d5819db600 Cleanup 2023-02-05 21:03:18 +01:00
Clément Fournier 13cd1e4a5b Update tests in doc module 2023-02-05 20:45:48 +01:00
Clément Fournier ebe4610389 Remove ability to set custom delimiter 2023-02-05 20:37:45 +01:00
Clément Fournier 552b9e4bc0 Find problem with delimiter 2023-02-05 19:59:17 +01:00
Clément Fournier a586a9bf11 Merge branch '7.0.x' into port-properties 2023-02-05 19:41:51 +01:00
Clément Fournier 283e516bb0 Test LanguageModuleBase 2023-02-05 19:15:45 +01:00
Clément Fournier db40a769f1 Details 2023-02-04 20:25:16 +01:00
Clément Fournier 872a41b4e9 Make ApexProcessor not implement LVH 2023-02-04 20:22:49 +01:00
Andreas Dangel 471f2507aa Merge branch 'pmd6-java-20' into pmd7-java-20 2023-02-04 20:15:03 +01:00
Andreas Dangel cac5b15b56 [java] Fix build errors, update LanguageLevelChecker
- Update Java20PreviewTreeDumpTest to JUnit5
- Remove GuardedPatterns
- Don't use PatternExpression in case labels
- Update javadocs
2023-02-04 20:14:40 +01:00
Clément Fournier 074a0ff399 Doc 2023-02-04 20:11:38 +01:00
Andreas Dangel ae55297984 Update javadoc 2023-02-04 20:09:21 +01:00
Clément Fournier 18e424ee8a Improve debug messages 2023-02-04 20:02:25 +01:00
Clément Fournier b0b2b35fed Use cleaner casing convention for lang properties 2023-02-04 20:02:11 +01:00
Clément Fournier 374150b592 Merge remote-tracking branch 'origin/pmd7-language-lifecycle' into pmd7-language-lifecycle 2023-02-04 19:54:48 +01:00
Clément Fournier 7a31f67ee5 Fix some details 2023-02-04 19:53:38 +01:00
Andreas Dangel f30f904f9d Merge 'pmd6-java-20' into pmd7-java-20 2023-02-04 19:10:37 +01:00
Andreas Dangel 2e0b6292b6 [doc] Update release notes (#4333) 2023-02-03 20:05:25 +01:00
Andreas Dangel e80e4cf204 [java] Fix javadoc warnings 2023-02-03 20:03:32 +01:00
Andreas Dangel 3ac021da02 [java] Remove support for named record patterns 2023-02-03 19:54:19 +01:00
Andreas Dangel 4ec06b71fe [java] Add more examples for record patterns 2023-02-03 19:48:12 +01:00
Andreas Dangel 600ad870db [java] Support record patterns in for-each loops 2023-02-03 19:37:28 +01:00
Andreas Dangel 50cdb99a7f [java] Update sample files for Pattern Matching for switch 2023-02-03 18:49:50 +01:00
Andreas Dangel 36fb459bd9 [java] Correct grammar regarding default case label
Update ExhaustiveSwitch so that it compiles with java 20. "case default" is not allowed anymore.
2023-02-03 17:09:58 +01:00
Andreas Dangel 1843ff51c7 [java] Simplify null case label grammar
Update DealingWithNull to that it compiles with java 20. Some cases are not allowed anymore.
2023-02-03 16:41:19 +01:00
Andreas Dangel b07c5ae152 Remove old exclusions in all-java.xml 2023-02-03 15:52:44 +01:00
Andreas Dangel 35a11574ed [java] Remove language version 18-preview 2023-02-03 15:49:19 +01:00
Andreas Dangel 6f89a7f4a4 Bump org.ow2.asm:asm from 9.3 to 9.4 2023-02-03 15:01:28 +01:00
Andreas Dangel c46a2d31bf [java] Add new language versions 20 and 20-preview 2023-02-03 14:55:43 +01:00
Andreas Dangel 016afb96e3 [go] Deprecate GoLanguageModule 2023-02-03 14:29:11 +01:00
Andreas Dangel a864087fee [doc] Update release notes (#4060, #2518, #3782) 2023-02-02 18:26:47 +01:00
Andreas Dangel 058b4ddab7 [doc] Update adding_a_new_{javacc|antlr}_based_language.md 2023-02-02 18:04:41 +01:00
Andreas Dangel 988d70cb65 [doc] Add language configuration to sidebar 2023-02-02 18:04:16 +01:00
Andreas Dangel eac11165e6 [doc] Finish language_properties.md 2023-02-02 17:00:34 +01:00
Andreas Dangel 94c8c4ba0c Fix unit tests 2023-02-02 10:45:26 +01:00
Andreas Dangel 6973a68f99 Fix PMD issues (JUnit5TestShouldBePackagePrivate) 2023-02-02 10:17:38 +01:00
Andreas Dangel c3b1317a77 Update gems 2023-02-02 09:37:17 +01:00
Clément Fournier ef365cd9aa Merge branch '7.0.x' into pmd7-language-lifecycle 2023-02-02 01:04:53 +01:00
Clément Fournier 1077ebac30 Merge branch 'pr/4155' into 7.0.x 2023-02-02 00:44:12 +01:00
Clément Fournier a7cf226dae Merge branch '7.0.x' into pmd7-language-lifecycle 2023-01-30 16:28:19 +01:00
Andreas Dangel 4d0004f3af [doc] Update release notes (#3797) 2023-01-30 14:12:20 +01:00
Andreas Dangel 97d05dc87d [test] Remove unused JavaUtilLoggingRule
This class was added in PMD 7 only and doesn't exist in PMD 6.
2023-01-30 14:11:59 +01:00
Andreas Dangel 19423ec4a1 [test] Remove junit/system-rules dependencies 2023-01-30 14:11:59 +01:00
Andreas Dangel f08beadc25 [test] Remove deprecated/old (base) classes 2023-01-30 13:54:36 +01:00
Andreas Dangel 014c28bb1e Merge branch 'pmd/7.0.x' into pmd7-junit5-part3 2023-01-30 13:36:15 +01:00
Andreas Dangel 643b78757d Merge pull request #4371 from oowekyala:diagnostic-ruleset
[java] Move TypeResTest rule out of security.xml #4371
2023-01-30 12:33:53 +01:00
Andreas Dangel f9bd34ac21 [doc] Update release notes (#4367) 2023-01-30 12:32:51 +01:00
Andreas Dangel 0547d907b0 Merge pull request #4356 from fix-closeresource-rule
[java] Fix NPE in CloseResourceRule #4356
2023-01-30 11:22:35 +01:00
Andreas Dangel a4ecbe8d67 Merge pull request #4354 from oowekyala:pmd7-utility-classes
[core] Move utility classes around #4354
2023-01-30 11:12:28 +01:00
Andreas Dangel bac878f884 [doc] Update release notes (#2873) 2023-01-30 11:10:32 +01:00
Andreas Dangel 78d7033dc4 Fix compile errors 2023-01-30 10:45:52 +01:00
Andreas Dangel adf6766288 Fix unit tests 2023-01-30 10:42:26 +01:00
Andreas Dangel 0469719424 Fix compile errors 2023-01-30 10:30:44 +01:00
Andreas Dangel d8b41bab6e Merge branch 'pmd/7.0.x' into pr-4354 2023-01-30 10:21:50 +01:00
Andreas Dangel 7d272115fd Merge pull request #4351 from oowekyala:pmd7.java-typenodes
[java] Make ASTVariableDeclarator not be a TypeNode #4351
2023-01-30 09:51:33 +01:00
Andreas Dangel ecd8acf3b1 [doc] Update release notes (#4317) 2023-01-30 09:50:48 +01:00
Andreas Dangel bfba220219 Fix unit test 2023-01-30 09:40:32 +01:00
Andreas Dangel d2db3954e1 Merge branch 'pmd/7.0.x' into pr-4351 2023-01-30 09:27:25 +01:00
Clément Fournier cde72a6367 Merge branch '7.0.x' into pr/4365 2023-01-29 16:37:09 +01:00
Juan Martín Sotuyo Dodero c2601b37b7 Simplify DoNotUseThreads rule
- No point in filterint out constructor calls, and then immediately search for them
 - If we already checked for the fiel / local var declaration type, no need to do it again
2023-01-28 14:20:46 -03:00
Juan Martín Sotuyo Dodero c93f4cad9b Revamp MissingStaticMethodInNonInstantiatableClass
- Somewhat simplify the XPath
 - Make it more robust:
   - private static methods are not ok
   - Check actual return statement types rather than the method signature, as inheritance may muddy the waters
   - We don't need the methods from the nested class to be public, just not private
   - Same applies to the nested class itself
2023-01-28 14:15:18 -03:00
Juan Martín Sotuyo Dodero 648d4e9a24 Avoid re-parsing the method signature 2023-01-28 14:13:59 -03:00
Juan Martín Sotuyo Dodero bbd898549e Remove dead container
- The values were stored but never read
2023-01-28 14:13:30 -03:00
Juan Martín Sotuyo Dodero 4eaae9ab4e Simplify rule applicability check
- We only need to do it once per AST
 - If it fails, there is no need to even try and apply it
2023-01-28 14:12:22 -03:00
Andreas Dangel 181f9066ac Merge branch 'master' into pmd/7.0.x 2023-01-28 11:04:08 +01:00
Andreas Dangel 49d35d0973 Bump pmd from 6.53.0 to 6.54.0 2023-01-28 10:55:19 +01:00
Andreas Dangel 625a1cc7f0 Prepare next development version [skip ci] 2023-01-28 10:51:02 +01:00
Andreas Dangel 5772440a79 [maven-release-plugin] prepare for next development iteration 2023-01-28 10:31:53 +01:00
Andreas Dangel de1b12b060 [maven-release-plugin] prepare release pmd_releases/6.54.0 2023-01-28 10:31:46 +01:00
Andreas Dangel cb031625e8 Prepare pmd release 6.54.0 2023-01-28 10:18:27 +01:00
Juan Martín Sotuyo Dodero 9e9437cdff Add missing test cases for zip fingerprinting 2023-01-27 23:47:04 -03:00
Juan Martín Sotuyo Dodero a46629054a Properly restore file names from violations
- The change to pathid adds proper support for zips and avoids conflicts,
and allows cache hits even when using absolute / relativized paths.
 - However, the restored rules where using the pathid as a displayname, which was never accurate.
 - Furthermore, the new implementation allows to honor relativized paths
in the current run, being different to the original one that created the cache
2023-01-27 23:12:14 -03:00
Juan Martín Sotuyo Dodero e1cb727048 Fix rule violation location storage 2023-01-27 23:11:42 -03:00
Juan Martín Sotuyo Dodero bdbbcac37d Add checks for the cached values 2023-01-27 23:10:57 -03:00
Juan Martín Sotuyo Dodero 85b41623cf Merge pull request #4353 from oowekyala/pmd7.micro-opts
[core] Micro optimizations for Node API
2023-01-27 19:44:44 -03:00
Juan Martín Sotuyo Dodero 0e19c2aaed Merge pull request #4369 from oowekyala/pmd7.fix-commentsize
[java] Improve CommentSize
2023-01-27 19:11:12 -03:00
Clément Fournier ba18f3b364 Improve CommentSize 2023-01-27 16:45:03 +01:00
Clément Fournier a9c61cc49d Move TypeResTest rule out of security.xml
Fix #4367
2023-01-27 16:43:42 +01:00
Clément Fournier 3e30e67680 Revert changes to CommentSize 2023-01-27 16:12:55 +01:00
Clément Fournier 8834c6e981 Improve CommentSize 2023-01-27 16:09:46 +01:00
Clément Fournier ad198cbcf9 Dogfood 2023-01-27 15:52:55 +01:00
Clément Fournier 1a366e3683 Merge branch '7.0.x' into pmd7.micro-opts 2023-01-27 15:48:17 +01:00
Clément Fournier 55eabe2de1 Add back named versions 2023-01-27 15:12:14 +01:00
Clément Fournier 29c2944402 Fix java module 2023-01-27 14:15:31 +01:00
Clément Fournier 6e02e4f2fd Fix apex module 2023-01-27 14:06:58 +01:00
Clément Fournier 32d95a46e8 Merge branch '7.0.x' into pmd7-language-lifecycle 2023-01-27 13:55:39 +01:00
Andreas Dangel 915fca25ba Remove JUnitParams 2023-01-27 12:12:47 +01:00
Andreas Dangel 3e504da34e Remove extra surefire configuration 2023-01-27 11:55:40 +01:00
Andreas Dangel 3d530458bb Remove junit and related dependencies 2023-01-27 11:49:03 +01:00
Andreas Dangel 1257eaff0d Fix test BinaryDistributionIT#testPmdHelp 2023-01-27 10:35:02 +01:00
Andreas Dangel f1ee39b1f5 Migrate remaining tests to JUnit5 2023-01-27 10:26:49 +01:00
Andreas Dangel 0d2acf6000 Merge branch 'pmd/7.0.x' into pmd7-junit5-part3 2023-01-27 10:02:58 +01:00
Andreas Dangel 120e89f81b Merge 'master' into pmd/7.0.x 2023-01-27 09:18:07 +01:00
Andreas Dangel aa64a5e3f0 Add @hassanalamibmx as a contributor 2023-01-27 09:12:36 +01:00
Andreas Dangel c473634e26 Add @liamsharp as a contributor 2023-01-27 09:11:49 +01:00
Andreas Dangel 8d6068b123 Merge pull request #4366 from Monits:fix-4346
[java] Fix broken TextBlock grammar #4366
2023-01-27 09:10:29 +01:00
Juan Martín Sotuyo Dodero ea17dd9a67 Merge pull request #4363 from adangel/pmd7-pr-4214
[cli] Add --relativize-paths-with option (pmd7)
2023-01-26 19:49:53 -03:00
Juan Martín Sotuyo Dodero 3e29407ebe Update changelog 2023-01-26 19:40:24 -03:00
Juan Martín Sotuyo Dodero 0883b186ee Update token id
- The grammar now produces IDENTIFIER as token 74, and TEXT_BLOCK as 72
2023-01-26 19:36:37 -03:00
Juan Martín Sotuyo Dodero 312ebc173d Allow the escapes new line sequence 2023-01-26 19:36:20 -03:00
Juan Martín Sotuyo Dodero 619e014d0d Properly define TEXT_BLOCK tokens 2023-01-26 18:59:55 -03:00
Andreas Dangel f0c285e3ae Merge branch 'pmd/7.0.x' into pmd7-pr-4214 2023-01-26 21:25:35 +01:00
Juan Martín Sotuyo Dodero 390b040432 Fix TextBlock grammar 2023-01-26 16:43:30 -03:00
Juan Martín Sotuyo Dodero 146f9077d2 Add failing test case for #4364 2023-01-26 16:42:49 -03:00
Andreas Dangel 4e56cd70be [apex] Fix apexlink integration under Windows 2023-01-26 20:34:28 +01:00
Andreas Dangel abf86e6344 Merge branch 'master' into pmd7-pr-4214 2023-01-26 18:18:36 +01:00
Andreas Dangel 8e558eaeaf Fixes from review (#4363) 2023-01-26 18:16:39 +01:00
Andreas Dangel 5c9893431f Merge branch 'pmd/7.0.x' into pmd7-pr-4214 2023-01-26 18:07:54 +01:00
Juan Martín Sotuyo Dodero 30a01c4f33 Merge branch 'pr-4214' 2023-01-26 13:16:54 -03:00
Andreas Dangel 6ff8bda8bc Merge pull request #4235 from oowekyala:clem.pmd7-cpd-deprecations
[core,cli] Move some tests into pmd-cli #4235
2023-01-26 17:15:39 +01:00
Andreas Dangel 247111ca6d Merge 'master' into pmd/7.0.x 2023-01-26 17:14:58 +01:00
Andreas Dangel 8bc888131b Merge branch 'pmd/7.0.x' into pr-4235 2023-01-26 16:58:15 +01:00
Andreas Dangel 3ab73b7d50 Re-add some cli tests 2023-01-26 16:53:41 +01:00
Juan Martín Sotuyo Dodero 34c00c5b1a Fix PMD warning 2023-01-26 12:43:33 -03:00
Andreas Dangel 614a574292 Bump build-tools from 19/20-SNAPSHOT to 20 2023-01-26 15:32:15 +01:00
Andreas Dangel 7d56432d53 Fix release notes 2023-01-26 14:38:23 +01:00
Andreas Dangel 4208182058 Bump maven-release-plugin from 3.0.0-M1 to 3.0.0-M7 2023-01-26 14:22:37 +01:00
Andreas Dangel 5e023b097a Bump maven-dependency-plugin from 3.1.2 to 3.5.0 2023-01-26 14:22:05 +01:00
Andreas Dangel 10150667b7 Bump maven-assembly-plugin from 3.2.0 to 3.4.2 2023-01-26 14:21:38 +01:00
Andreas Dangel cdb64ff1c5 Bump maven-antrun-plugin from 1.8 to 3.1.0 2023-01-26 14:21:18 +01:00
Andreas Dangel e1077ae1e3 Bump maven-clean-plugin from 3.1.0 to 3.2.0 2023-01-26 13:50:13 +01:00
Andreas Dangel 4d072aabc9 Bump maven-project-info-reports-plugin from 2.9 to 3.4.2 2023-01-26 13:35:12 +01:00
Andreas Dangel aae7e544ab Bump maven-jxr-plugin from 2.5 to 3.3.0 2023-01-26 13:34:23 +01:00
Andreas Dangel 91a3aea133 Bump jacoco-maven-plugin from 0.8.5 to 0.8.8 2023-01-26 13:33:45 +01:00
Andreas Dangel 96b7f47daf Bump nexus-staging-maven-plugin from 1.6.8 to 1.6.13 2023-01-26 13:33:17 +01:00
Andreas Dangel 60ff1746a5 Bump versions-maven-plugin from 2.5 to 2.14.2 2023-01-26 13:32:41 +01:00
Andreas Dangel 6c83e2a0c3 Bump maven-site-plugin from 4.0.0-M1 to 4.0.0-M4 2023-01-26 13:32:01 +01:00
Andreas Dangel 09d10ae51d Bump maven-failsafe-plugin from 2.19.1 to 3.0.0-M8 (surefire.version) 2023-01-26 13:31:30 +01:00
Andreas Dangel 9b2e9b2696 Bump maven-enforcer-plugin from 3.0.0 to 3.1.0 2023-01-26 13:30:09 +01:00
Andreas Dangel d6f6d73f1c Bump build-helper-maven-plugin from 3.0.0 to 3.3.0 2023-01-26 13:29:14 +01:00
Andreas Dangel 3ef506f9be Bump maven-shade-plugin from 3.2.3 to 3.4.1 2023-01-26 13:28:00 +01:00
Andreas Dangel f60ce583f2 Bump maven-resources-plugin from 3.1.0 to 3.3.0 2023-01-26 13:27:35 +01:00
Andreas Dangel ecb7b17bae Bump maven-jar-plugin from 3.2.0 to 3.3.0 2023-01-26 13:27:12 +01:00
Andreas Dangel 647cfe9d91 Bump maven-install-plugin from 2.5.2 to 3.1.0 2023-01-26 13:26:43 +01:00
Andreas Dangel d239b8b0a9 Bump maven-deploy-plugin from 2.8.2 to 3.0.0 2023-01-26 13:26:15 +01:00
Andreas Dangel 7f89335f6d Bump maven-compiler-plugin from 3.8.1 to 3.10.1 2023-01-26 13:25:54 +01:00
Andreas Dangel 84d2a1f9ac Bump checkstyle from 10.3.3 to 10.6.0 2023-01-26 13:25:05 +01:00
Andreas Dangel 54e300dc01 Bump maven-javadoc-plugin from 3.2.0 to 3.4.1 2023-01-26 13:24:28 +01:00
Andreas Dangel 2d7049eae3 Bump maven-checkstyle-plugin from 3.2.0 to 3.2.1 2023-01-26 13:24:19 +01:00
Andreas Dangel d1fe9e1429 Bump maven-pmd-plugin from 3.19.0 to 3.20.0 2023-01-26 13:22:44 +01:00
Andreas Dangel 2ec7838dbe Merge branch 'pmd/7.0.x' into pmd7-pr-4214 2023-01-26 13:14:33 +01:00
Andreas Dangel 6e2b2cb579 Fix dogfood issues - SimplifyBooleanReturns 2023-01-26 13:10:29 +01:00
Andreas Dangel 436dce2641 [scala] Fix javadoc configuration for dokka/pmd-lang-test 2023-01-26 11:33:35 +01:00
Andreas Dangel 712e5b56d9 Merge branch 'master' into pmd/7.0.x 2023-01-26 11:26:12 +01:00
Andreas Dangel 473241b241 Merge pull request #4329 from adangel:refactor-snakeyml
[core] Refactor usage of snakeyaml #4329
2023-01-26 11:16:17 +01:00
Andreas Dangel f5cb8d97d7 Merge pull request #4125 from mohan-chinnappan-n:master
[core] New report format html-report-v2.xslt to provide html with datatable and chart features #4125
2023-01-26 11:13:49 +01:00
Andreas Dangel 1b6cba7f16 [doc] Update release notes (#4125) 2023-01-26 11:12:51 +01:00
Andreas Dangel 540a7374fb Merge pull request #4110 from tprouvot:feature/unusedVariableBindFalsePositive
[apex] Feature/unused variable bind false positive with dynamic SOQL #4110
2023-01-26 11:03:06 +01:00
Andreas Dangel aa24ae7d25 [doc] Update release notes (#2669, #4110) 2023-01-26 11:02:33 +01:00
Andreas Dangel 047d8db8e2 Fix tests under Windows 2023-01-26 10:40:13 +01:00
Andreas Dangel 51dd5c5354 Merge branch 'pmd/7.0.x' into pmd7-pr-4214 2023-01-26 10:12:25 +01:00
Andreas Dangel 9f04ae8c70 Merge branch 'pr-4214' into pmd7-pr-4214 2023-01-26 10:11:48 +01:00
Andreas Dangel 1861ae5b5f Move tests from CoreCliTest to PmdCliTest related to --relativize-paths-with 2023-01-26 10:10:22 +01:00
Andreas Dangel c659e86bea Add new option --relativize-paths-with to new cli 2023-01-26 10:10:15 +01:00
Andreas Dangel 8fa35ae10d Remove old --short-names option (cli + ant) 2023-01-26 10:10:09 +01:00
Juan Martín Sotuyo Dodero 1102f936c8 Add test case 2023-01-26 02:53:48 -03:00
Juan Martín Sotuyo Dodero 49cd0b3e16 [core] Allow more XPath rules to use the rulechain
- When a rule uses a property Saxon produces a top-level LetExpression
 - Since LetExpressions can also be used to "cache" expensive operations during rule evaluation
we generally ignored them, but we don't anymore.
 - If a LetExpression was for an expensive operation, we still refrain from using the rulechain
so it's only evaluated once
2023-01-26 02:19:35 -03:00
Juan Martín Sotuyo Dodero 0d71f605d1 Ensure file processing time doesn't go unaccounted
- Unnacounted time was significantly larger than it used to be,
and in proportion tok about 10% of total execution time. Properly account
attaining ruleset copies, TextDocuments, and overal parser and rule setup
as processing time.
2023-01-25 19:45:24 -03:00
Juan Martín Sotuyo Dodero 7a61c431d7 Update test to reflect the actual invocation order
- This reproduces the issue without the fix
2023-01-25 19:27:23 -03:00
Juan Martín Sotuyo Dodero 4f947b46e0 [core] Fix the cache
- The cache listener was broken, and violations never actually made it to the cache
2023-01-25 19:19:10 -03:00
Juan Martín Sotuyo Dodero 521e020100 Prevent double counting time
- First off, all LPS are benchmarked in the AstProcessor, having this here was inconsistent
 - Since these passes can be triggered by the symbol table LPS phase, we ended up double counting total time.
 - This however puts all disambiguation passes done for symbol table as symbol table cost, which although accurate,
may not help to identify speed up opportunities as clearly, but the benchmark is not a profiling tool.
2023-01-25 17:52:53 -03:00
Juan Martín Sotuyo Dodero c5d410367a Remove numbers from Java LPS names
- The numbers relate to how they are executed, but don't necessarilly imply a required order
(ie: Comment Assignment could be done at any point)
 - Since the benchmark report sorts by time spent on each one, the numbered labels are simply confusing
2023-01-25 17:06:24 -03:00
Juan Martín Sotuyo Dodero 4aceb42e9c Fix rule benchmark counting
- Recover the old behavior, where the number of rule applications is split from
the number of tree transversals.
 - This means that rules that are applied, but didn't match any node where previously
unlisted, but know show they were applied to all files, and evaluated 0 nodes.
 - We also count towards the rule's benchmark the cost of getting to the nodes it want's
to evaluate, so poor xpath selectors actually show for the particular rule.
2023-01-25 17:00:37 -03:00
Clément Fournier 310637f357 Merge remote-tracking branch 'origin/clem.pmd7-cpd-deprecations' into clem.pmd7-cpd-deprecations 2023-01-25 17:54:42 +01:00
Clément Fournier 89f959200a Merge branch '7.0.x' into clem.pmd7-cpd-deprecations 2023-01-25 17:00:10 +01:00
Clément Fournier 02f3e8e8e6 Fix test 2023-01-25 16:57:28 +01:00
Andreas Dangel cc4d83d279 Deprecate PMDConfiguration#reportShortNames 2023-01-25 16:40:04 +01:00
Juan Martín Sotuyo Dodero 87220c05e6 Merge pull request #4336 from adangel/deprecations-for-4235
[core] Deprecations in CPDConfiguration, Base(CPD)CLITest, AbstractAntTestHelper
2023-01-25 12:18:26 -03:00
Andreas Dangel cc8d845b6b Fix tests 2023-01-25 15:33:26 +01:00
Andreas Dangel dd7dedba5b Merge branch 'pr-4214' into pmd7-pr-4214 2023-01-25 14:50:41 +01:00
Juan Martín Sotuyo Dodero 596cc2694d Merge pull request #4357 from pmd/fix-usediamongoperator-rule
[java] Fix IllegalStateException in UseDiamongOperator rule
2023-01-25 10:19:29 -03:00
Andreas Dangel 8eabce2f6f Follow symlinks when collecting source files
Verify behavior with symlinks and relativize paths with.
2023-01-25 13:33:43 +01:00
Andreas Dangel a93b45c040 [doc] Update doc for --relativize-paths-with regarding absolute paths 2023-01-25 13:02:06 +01:00
Clément Fournier 869752bc34 Shortcut equivalence check if ctdecl is unresolved 2023-01-25 12:09:08 +01:00
Andreas Dangel 8a85295e49 Verify behavior with no relativize paths and absolute/relative src dirs 2023-01-25 12:07:07 +01:00
Andreas Dangel 7619693102 Revert "Update gems, update activesupport"
This reverts commit 460d6a0809.
2023-01-25 10:30:35 +01:00
Andreas Dangel b6062ca1fd Fixups from review (#4336) 2023-01-25 09:53:43 +01:00
Andreas Dangel 460d6a0809 Update gems, update activesupport
Fixes https://github.com/pmd/pmd/security/dependabot/35
Fixes https://github.com/advisories/GHSA-j6gc-792m-qgm2
2023-01-25 09:46:26 +01:00
Andreas Dangel 9d92528587 Update bundler 2023-01-25 08:56:17 +01:00
Andreas Dangel 6b2f1be14e Update gems
Fixes https://github.com/pmd/pmd/security/dependabot/35
Fixes CVE-2023-22796
Fixes https://github.com/advisories/GHSA-j6gc-792m-qgm2

Fixes https://github.com/pmd/pmd/security/dependabot/36
Fixes https://github.com/advisories/GHSA-636f-xm5j-pj9m
2023-01-25 08:48:34 +01:00
Andreas Dangel 599e0b6a75 [doc] Update release notes (#4236) 2023-01-25 08:44:02 +01:00
Juan Martín Sotuyo Dodero 8ef6042eb4 Suppress the overload resolution failure and continue
- This is probably not the best solution (maybe the Infer logic needs to remove
the check and handle it seamlessly?) but that code is too complex for me to make that call
2023-01-25 01:55:59 -03:00
Juan Martín Sotuyo Dodero 378ba33f59 Add failing test for UseDiamongOperatorRule
- An IllegalStateException is produced when the inference context corresponds
to an invocation of an unresolved method.
 - The rule effectively can't determine if the diamond oeprator can be used, but the current message of
"overload resolution is not complete" is noisy, not actionable to the user
(the issue is a missing class in the auxclasspath, not the overload resolution),
and prevents the rule from continuing to analyze the current file.
2023-01-25 01:52:09 -03:00
Juan Martín Sotuyo Dodero 25afa04d76 Fix failing test
- Type inference now leads to runtime types being used, even if it's on a MethodCall expression
2023-01-25 01:47:02 -03:00
Juan Martín Sotuyo Dodero fe568a0161 Add failing test using type inference 2023-01-25 01:46:35 -03:00
Juan Martín Sotuyo Dodero bbacf3c8b1 Avoid NPEs during type inference
- Since annotated primitives are now stand-alone instances,
ensure they share the supertypes for the unnanotated version,
otherwise, NPEs occur during inference.
2023-01-25 01:41:56 -03:00
Clément Fournier 2078692d39 Merge branch '7.0.x' into pmd7-language-lifecycle 2023-01-25 00:48:36 +01:00
Clément Fournier 74cbba5f61 Merge branch 'master' into 7.0.x 2023-01-24 22:35:10 +01:00
Juan Martín Sotuyo Dodero 661abf024d Merge pull request #4342 from adangel/pmd7-issue-881-deprecation-removals
[core] Remove deprecated classes/methods (finish #881)
2023-01-24 17:16:58 -03:00
Juan Martín Sotuyo Dodero 39c62fca7f Merge pull request #4343 from adangel/cpd-renderer
[core] CPD - implement CPDReportRenderer for all renderers
2023-01-24 16:53:37 -03:00
Juan Martín Sotuyo Dodero e6696a3f7e Merge branch 'pr-4341' 2023-01-24 12:51:18 -03:00
Juan Martín Sotuyo Dodero 453d2282fc Merge branch 'pr-4300' 2023-01-24 12:39:24 -03:00
Juan Martín Sotuyo Dodero d3c576fd0d Update release notes 2023-01-24 12:39:10 -03:00
Andreas Dangel e65fddff82 [core] FileCollector - add back addZipFile() as deprecated method 2023-01-24 16:37:06 +01:00
Juan Martín Sotuyo Dodero 61ecf4c500 Merge pull request #4346 from adangel/issue-4236-kotest
[testing] Use custom surefire console reporter
2023-01-24 12:32:55 -03:00
Andreas Dangel cf1dd6e902 Small fixes in PMDParameters 2023-01-24 16:13:22 +01:00
Andreas Dangel 0b4cc1e5bb [ant] Make relativizePathsWith a path-like structure
Update documentation
2023-01-24 15:52:36 +01:00
Andreas Dangel 74e6f85a50 Fix tests under Windows 2023-01-24 12:10:05 +01:00
Andreas Dangel fed44709c7 Test deprecation warning for --short-names 2023-01-24 11:41:51 +01:00
Andreas Dangel e9baa5b931 [doc] Update CLI reference for new --relativize-paths-with 2023-01-24 11:35:55 +01:00
Andreas Dangel 81bfed2ef7 Fix unit tests 2023-01-24 10:55:11 +01:00
Andreas Dangel faf3b6ebf9 Merge branch 'master' into pr-4214 2023-01-24 10:46:14 +01:00
Andreas Dangel e2d6325841 Update dependencies 2023-01-24 10:17:49 +01:00
Andreas Dangel e05bc041f7 Added category other 2023-01-24 09:42:41 +01:00
Clément Fournier 403fcdae82 [core] Move utility classes around 2023-01-23 18:47:52 +01:00
Clément Fournier ea4c827116 Convert AddEmptyString to java rule 2023-01-23 18:07:45 +01:00
Clément Fournier 056516bee4 Micro-opts 2023-01-23 18:07:45 +01:00
Andreas Dangel cc4c672f43 Add example of html-report-v2 for documentation 2023-01-23 16:38:38 +01:00
Andreas Dangel c99e9cff81 Use jQuery to count violations 2023-01-23 16:29:14 +01:00
Andreas Dangel 6c76387112 Rename rule/ruleset -> category, display rule name 2023-01-23 15:36:31 +01:00
Andreas Dangel d4ee2a6f33 [cli] Use non-deprecated long options for PMD cli examples 2023-01-23 15:27:36 +01:00
Andreas Dangel 85375d0850 Remove previous pmd-report-v2.xslt 2023-01-23 15:12:06 +01:00
Andreas Dangel cfddd700e9 Fix indentation 2023-01-23 15:10:38 +01:00
Andreas Dangel 25e0a7bd30 Fix mapping of rulesets 2023-01-23 15:10:14 +01:00
Andreas Dangel a03a55ba44 [apex] Enhance UnusedLocalVariable to consider SOQL binding vars
Fixes #2669
2023-01-23 14:47:35 +01:00
Thomas Prouvot cd88b367ab Add test to check if false positive is fixed 2023-01-23 14:46:38 +01:00
Andreas Dangel d1d10d1426 [cli] Add "--no-progress" back to PmdCliTest
When running the tests under cygwin, initializing the progressbar fails: The tests stall when executing "tty.exe" to determine the terminal type.
2023-01-22 18:33:26 +01:00
Andreas Dangel b59808f04f Use custom surefire console reporter from build tools 2023-01-20 20:17:58 +01:00
Andreas Dangel de1c886c2a Bump build-tools from 19 to 20-SNAPSHOT 2023-01-20 20:17:57 +01:00
Andreas Dangel eff73bdb0b Fix wrong junit-platform-commons version 2023-01-20 20:17:57 +01:00
Andreas Dangel ac2e4d881b Bump maven-surefire-plugin from 3.0.0-M7 to 3.0.0-M8
Remove forkMode option as it doesn't exist anymore
2023-01-20 20:17:42 +01:00
Andreas Dangel 67c04ef42b Refactor ParserTestSpec to not depend on internal kotest API
This adds custom test scopes and makes the ParserTestCtx a container.
2023-01-20 20:10:38 +01:00
Andreas Dangel bc7b0f8e2f Fix missing package for Java11Test 2023-01-20 20:09:05 +01:00
Andreas Dangel d6ef489dd1 Fix ASTPatternTest to have leaf test nodes 2023-01-19 20:18:13 +01:00
Andreas Dangel 125edb4fed [core] CPD - implement CPDReportRenderer for all renderers 2023-01-19 16:24:55 +01:00
Andreas Dangel 774a8fbadf [ci] Add additional repository for spring-framework-build
Add https://maven.repository.redhat.com/ga/ as repository in order to resolve
dependency com.ibm.websphere/uow/6.0.2.17
See https://spring.io/blog/2020/10/29/notice-of-permissions-changes-to-repo-spring-io-fall-and-winter-2020
2023-01-19 14:02:16 +01:00
Andreas Dangel fbc4187d95 [ci] Use new m-pmd-p 3.20.1-pmd-7-SNAPSHOT 2023-01-19 10:23:07 +01:00
Andreas Dangel 2b1b1c6ac8 Remove viewer_strings.properties (#881)
It was only used be the old ui viewer, which was removed with #1431 already
2023-01-19 10:19:35 +01:00
Andreas Dangel f2ab6ebeb4 Remove default ctor of RuleReference (#881) 2023-01-18 13:45:38 +01:00
Andreas Dangel e4ea224316 Remove RuleSetWriter#RULESET_NS_URI (#881) 2023-01-18 13:40:32 +01:00
Andreas Dangel c5784c3f50 Remove PMDParameters.RulePriorityConverter (#881) 2023-01-18 13:30:48 +01:00
Andreas Dangel 26a57156a1 [core] Add CPDReport#filterMatches
Fixes #4340
2023-01-18 09:38:59 +01:00
Andreas Dangel 98a3b9216c Fix test under Windows
line endings...
2023-01-17 15:55:51 +01:00
Andreas Dangel 1dc982bb69 Enable maven-pmd-plugin for test sources
Needs build-tools 20-SNAPSHOT
Uses new ruleset "pmd-test-dogfood-config.xml"
2023-01-17 15:42:39 +01:00
Andreas Dangel c23ecab2c6 Make test classes and methods package-private 2023-01-17 15:41:31 +01:00
Andreas Dangel d5b3478c8a [core] Make test classes package-private
This moves some utility methods around, that are used by
more than one test class.
2023-01-17 15:14:06 +01:00
Andreas Dangel 1486460f86 Fix pmd dogfood - AbstractAntTestHelper.AntBuildListener should be final 2023-01-17 14:02:44 +01:00
Andreas Dangel 125a016b36 [doc] Update "Testing your rules" for JUnit5 2023-01-17 13:57:59 +01:00
Andreas Dangel d05148e4bd [test] RuleTst - make runTestFromString private 2023-01-17 13:57:12 +01:00
Andreas Dangel dc0f4dbfee [test] Refactor RuleTst to use only RuleTestDescriptor
Only use RuleTestDescriptor instead of TestDescriptor.
TestDescriptor can be removed then.
Remove previously internalized methods or make them private.
2023-01-17 13:25:36 +01:00
Andreas Dangel 78f1aa61ad Migrate remaining junit usages 2023-01-17 12:05:08 +01:00
Andreas Dangel a4f353d580 cleanup: remove AbstractTokenizerTest 2023-01-17 12:03:38 +01:00
Andreas Dangel 8fb578866c Merge branch 'pmd/7.0.x' into pmd7-junit5-part3 2023-01-17 11:54:18 +01:00
Andreas Dangel bab2e6f9ab [core] Deprecate some fields in AbstractAntTestHelper
Refs #4155
2023-01-17 11:53:10 +01:00
Andreas Dangel 234f9fe679 Migrate remaining ant tests to JUnit5 2023-01-17 11:51:28 +01:00
Andreas Dangel aa06344d87 [core] Deprecate BaseCPDCLITest 2023-01-17 10:58:53 +01:00
Andreas Dangel 3dcecb6b55 [test] Deprecate BaseCLITest 2023-01-17 09:00:48 +01:00
Andreas Dangel 7c428db062 [core] Deprecate get/setEncoding on CPDConfiguration 2023-01-17 09:00:28 +01:00
mohan-chinnappan-n cd59f45023 Create html-report-v2.xslt
XLST for creating HTML reports
2023-01-16 20:42:28 -05:00
mohan-chinnappan-n 6d142a445a Merge branch 'pmd:master' into master 2023-01-16 20:40:39 -05:00
Andreas Dangel 7494fc9ecd Fixes from review 2023-01-16 15:35:32 +01:00
Andreas Dangel 3afe1aa6d2 Merge branch 'pmd/7.0.x' into pr-4235 2023-01-16 15:07:50 +01:00
Andreas Dangel 9bc62266a2 Merge pull request #4233 from Monits:progressbar-revamp
[cli] Move CLI progressbar rendering to pmd-cli #4233
2023-01-16 13:25:17 +01:00
Andreas Dangel 0ad3755a2b Log debug through slf4j directly 2023-01-16 13:23:30 +01:00
Andreas Dangel 478f6dfb09 Fix unit tests 2023-01-16 13:13:30 +01:00
Andreas Dangel f482bbb5a1 Merge branch 'pmd/7.0.x' into pr-4233 2023-01-16 12:27:40 +01:00
Andreas Dangel a220b2c2d2 Merge 'master' into pmd/7.0.x 2023-01-16 11:42:20 +01:00
Andreas Dangel 77b4970de8 Add webrick as gem dependency (jekyll/jekyll#8523) 2023-01-16 11:34:41 +01:00
Andreas Dangel 276a674509 Merge pull request #4050 from oowekyala:violation-decorators
[core] Implement violation decorators #4050
2023-01-16 11:05:13 +01:00
Andreas Dangel 7b64453a99 [doc] Update release notes (#3203, #3902) 2023-01-16 11:04:29 +01:00
Andreas Dangel be9f22ab52 Mark RuleViolation::getPackageName etc. as DeprecatedUntil700 2023-01-16 11:02:37 +01:00
Andreas Dangel 084a262071 Rename extraData to additionalInfo consistently 2023-01-16 11:01:37 +01:00
Andreas Dangel 8b7b0c7d5c [core] Internalize CSVWriter 2023-01-16 10:47:34 +01:00
Andreas Dangel 10c281824e [java] Verify rule violation message for JUnitTestContainsTooManyAsserts and RedundantFieldInitializer
These contain placeholder like ${variableName} which should
be replaced by the actual value.
2023-01-16 10:01:56 +01:00
Andreas Dangel 0849b42865 Merge branch 'pmd/7.0.x' into pr-4050 2023-01-16 08:18:34 +01:00
mohan-chinnappan-n dc0f816098 Merge branch 'pmd:master' into master 2023-01-14 12:08:20 -05:00
Clément Fournier 1a7699035c Make ASTVariableDeclarator not be a TypeNode 2023-01-14 17:18:01 +01:00
Andreas Dangel d73095a69f [ci] Build and create baseline for experimental-apex-parser branch 2023-01-14 11:45:48 +01:00
Andreas Dangel 5a8f8f06e7 Merge pull request #4280 from aaronhurst-google:deprecate-apex-version
[apex] Deprecate ApexRootNode.getApexVersion #4280
2023-01-14 11:00:53 +01:00
Andreas Dangel 8985c9dbf3 [doc] Update release notes (#4280) 2023-01-14 11:00:27 +01:00
Andreas Dangel 1262034650 [doc] Update release notes [skip ci]
- #2716 has been done with PMD 6.32.0 already
- #2528 was listed twice
2023-01-13 10:47:16 +01:00
Andreas Dangel 33315c498e [core] Refactor usage of snakeyaml
It was a dependency via apex-jorje, but there snakeyaml is actually not needed.

During generating doc, we use snakeyaml to load the sidebar and modify it. The code has been adjusted to use SafeConstructor to mitigate the risk.

Fixes https://github.com/pmd/pmd/security/dependabot/33
Fixes CVE-2022-1471
Fixes https://github.com/advisories/GHSA-mjmj-j48q-9wg2
2023-01-12 19:18:27 +01:00
Andreas Dangel 408d6d557e Cleanup duplicated license header 2023-01-11 14:08:43 +01:00
Andreas Dangel 611cb94b7a [core] Allow empty values for rule properties
Fixes #4279
2023-01-11 09:11:43 +01:00
Andreas Dangel 12efd48c8b [java] Migrate tests to JUnit5 2023-01-10 14:08:47 +01:00
Andreas Dangel 8ff7b18439 [core] Migrate tests to JUnit5 2023-01-10 14:00:21 +01:00
Andreas Dangel c5a9e785ff Merge branch 'pmd/7.0.x' into pmd7-junit5-part3 2023-01-10 12:58:51 +01:00
Andreas Dangel 89b947bec5 Update gems
Fixes https://github.com/pmd/pmd/security/dependabot/34
Fixes CVE-2022-46648
Fixes https://github.com/advisories/GHSA-pfpr-3463-c6jh
2023-01-10 12:21:27 +01:00
Andreas Dangel 86c2ca5578 Suppress MissingOverride for Chars::isEmpty (#4291) 2023-01-10 12:09:46 +01:00
Andreas Dangel a856b622ec Bump mockito from 2.28.2 to 4.11.0
This fixes the build with Java 17
2023-01-10 12:09:01 +01:00
Andreas Dangel 81ece009e1 [java] Ignore synthetic methods and fields in tests
When running PMD build for sonar and coveralls, the jacoco agent will insert a synthetic method "$jacocoInit()" and synthetic field "$jacocoData".
Both are not present in the class files on disk, which
are used for the asm-based symbol analyzer.

For now, all synthetic methods and fields are ignored
and not just the two jacoco specific ones.
2023-01-10 11:22:57 +01:00
Andreas Dangel 6c336b37e4 Merge pull request #4285 from mluckam:elasticsearch_visiblefortesting
[java] CommentDefaultAccessModifier - add co.elastic.clients.util.VisibleForTesting as default suppressed annotation #4285
2023-01-10 10:26:00 +01:00
Andreas Dangel 11a33a536d [java] CommentDefaultAccessModifier - extend test case for junit5
Refs #3859
2023-01-10 10:24:47 +01:00
Andreas Dangel 60d46d4234 [doc] Update release notes (#4285) 2023-01-10 09:51:59 +01:00
Andreas Dangel a388d8466f Add @mluckam as a contributor 2023-01-10 09:50:01 +01:00
Matthew LuckamandAndreas Dangel f6504a6875 add more accurate test description
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2023-01-09 10:17:47 -05:00
Matthew Luckam de4fb8239f add co.elastic.clients.util.VisibleForTesting to collection of default
suppressed annotations for rule CommentDefaultAccessModifierRule
2023-01-09 10:17:37 -05:00
Clément Fournier 9964f116a4 Merge branch 'clem.type-annots-in-infer' into 7.0.x 2023-01-08 18:31:16 +01:00
Clément Fournier d60145e703 Merge branch '7.0.x' into clem.type-annots-in-infer 2023-01-08 18:31:03 +01:00
Clément Fournier 6a5888cb8b Merge branch '7.0.x' into violation-decorators 2023-01-08 18:28:14 +01:00
Clément Fournier 089e9b1f23 Merge branch '7.0.x' into pmd7-language-lifecycle 2023-01-08 18:26:25 +01:00
Clément Fournier c6f18c4806 Merge branch '7.0.x' into clem.pmd7-cpd-deprecations 2023-01-08 18:25:01 +01:00
Aaron Hurst 0715bd91d5 Remove unused imports. 2023-01-05 13:39:17 +00:00
Aaron Hurst f0137f2907 Deprecate ApexRootNode.getApexVersion.
Assume Apex version is >= V176.
2023-01-03 22:42:49 +00:00
Andreas Dangel ad87340729 Fix dogfood pmd violations 2023-01-01 16:56:49 +01:00
Andreas Dangel a653fb498c Fix dogfood pmd violations 2022-12-31 18:47:39 +01:00
Andreas Dangel 841907907a Merge 'master' into pmd/7.0.x 2022-12-31 18:33:25 +01:00
Andreas Dangel 14b39cee83 Bump pmd from 6.52.0 to 6.53.0 2022-12-31 18:25:42 +01:00
Andreas Dangel 3cdf1f2c74 Prepare next development version [skip ci] 2022-12-31 18:23:24 +01:00
Andreas Dangel 6a6acb9b43 [maven-release-plugin] prepare for next development iteration 2022-12-31 18:22:10 +01:00
Andreas Dangel 37103451bf [maven-release-plugin] prepare release pmd_releases/6.53.0 2022-12-31 18:22:04 +01:00
Andreas Dangel 349c89240a Prepare pmd release 6.53.0 2022-12-31 18:07:28 +01:00
Andreas Dangel 94a57d7095 [doc] Fix old rule references 2022-12-31 17:32:26 +01:00
Andreas Dangel 597e30cfd7 Merge pull request #4276 from kdebski85:issue-4266-compact-constructor-with-lambda-pmd7
[java] Add test for lambda in record compact constructor (pmd7) #4276
2022-12-31 17:16:07 +01:00
Andreas Dangel 94b3793d9d Fix rule tests 2022-12-31 17:11:02 +01:00
Andreas Dangel ebe4ebe71c Fix compile errors 2022-12-31 16:26:31 +01:00
Andreas Dangel 44914419e2 Merge branch 'master' into pmd/7.0.x 2022-12-31 16:17:32 +01:00
Andreas Dangel 583257c3e2 Merge pull request #4259 from adangel:pmd7-issue-4248-zip-files
[core] Use jar filesystem provider for zip files (pmd7) #4259
2022-12-31 15:45:09 +01:00
Andreas Dangel cd3128e7d1 Add TODO comment for deleting PathDataSource 2022-12-31 15:44:17 +01:00
Andreas Dangel f0e113c376 Merge pull request #4274 from kdebski85:issue-4266-compact-constructor-with-lambda
[java] Fix finding lambda scope in record compact constructor #4274
2022-12-31 15:35:47 +01:00
Andreas Dangel ebefb36c73 [doc] Update release notes (#4266, #4274) 2022-12-31 15:34:36 +01:00
Andreas Dangel d0367d0248 Add @kdebski85 as a contributor 2022-12-31 15:33:00 +01:00
Andreas Dangel 62d789526a [java] DoNotUseThreads: more tests 2022-12-31 15:30:57 +01:00
Andreas Dangel 11867b0d3d Merge pull request #4265 from adangel:issue-4164-AvoidAssertAsIdentifier
[java][doc] AvoidAssertAsIdentifier and AvoidEnumAsIdentifier - clarify use case #4265
2022-12-31 15:13:19 +01:00
Andreas Dangel 3dd0f84ef6 Merge pull request #4264 from adangel:issue-4250-WhileLoopWithLiteralBoolean
[java] WhileLoopWithLiteralBoolean - don't limit to two bool literals #4264
2022-12-31 15:11:09 +01:00
Andreas Dangel b81df9681e Merge pull request #4262 from adangel:issue-2127-deprecate-excessive-length-rules
[java] Deprecate rules ExcessiveClassLength and ExcessiveMethodLength #4262
2022-12-31 15:09:40 +01:00
Andreas Dangel 67230ed7b0 Merge pull request #4260 from adangel:issue-4166-UnusedPrivateField-annotations
[java] UnusedPrivateField - add new property reportForAnnotations #4260
2022-12-31 15:07:12 +01:00
Andreas Dangel 0dcefd174c Merge pull request #4249 from adangel:issue-4248-zip-files
[core] Use jar filesystem provider for zip files #4249
2022-12-31 15:05:09 +01:00
Andreas Dangel 15cba772ac Merge pull request #4247 from adangel:issue-4210-DoNotUseThreads-duplicated-violations
[java] DoNotUseThreads: Fix duplicated violations reporting #4247
2022-12-31 15:03:13 +01:00
Krzysztof Debski 8226d117cf [java] Add test for lambda in record compact constructor 2022-12-29 11:09:54 +01:00
Krzysztof Debski c714806447 [java] Fix finding lambda scope in record compact constructor 2022-12-28 10:37:58 +01:00
Juan Martín Sotuyo DoderoandClément Fournier 729ce9c3b0 Use shorthand method
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2022-12-21 12:17:43 -03:00
Andreas Dangel 29ee6a0f3c Merge pull request #4263 from oowekyala:issue4234-reset-loggers
[test] Properly reset log level in slf4j-simple #4263
2022-12-20 17:49:03 +01:00
Andreas Dangel 51c688f142 Disable progressbar in cli tests to fix builds under Windows 2022-12-20 16:32:01 +01:00
Andreas Dangel a76603b026 Merge pull request #4244 from Tarush-Singh35:#4146
[apex] ApexCRUDViolation: user mode and system mode with test cases added #4244
2022-12-19 16:17:45 +01:00
Andreas Dangel 2cdef852c5 [java][doc] AvoidAssertAsIdentifier and AvoidEnumAsIdentifier - clarify use case
Fixes #4164
2022-12-19 16:13:11 +01:00
Andreas Dangel 87c991f31d [java] DoNotUseThreads: Fix false negatives with field declarations
in anonymous classes
2022-12-19 15:55:22 +01:00
Andreas Dangel c2de15e4c5 [java] WhileLoopWithLiteralBoolean - fix false positives 2022-12-19 15:26:43 +01:00
Andreas Dangel d7bab260b3 [java] WhileLoopWithLiteralBoolean - don't limit to two bool literals
Fixes #4250
2022-12-17 19:58:47 +01:00
Andreas Dangel 8e72aaf9ab PR review fixups 2022-12-17 18:38:20 +01:00
Andreas Dangel bef608058b [java] UnusedPrivateField - rename property "reportForAnnotations"
And other PR review fixups
2022-12-17 18:20:14 +01:00
Clément Fournier ca216efd0f Properly reset log level in slf4j-simple
Fix #4234
2022-12-17 16:32:03 +01:00
Andreas Dangel 03db70602f [doc] Update release notes (#4146, #4244) 2022-12-16 19:19:59 +01:00
Andreas Dangel 4efbbdd41a Add @Tarush-Singh35 as a contributor 2022-12-16 19:19:36 +01:00
Andreas Dangel 930b77876b [apex] ApexCRUDViolation - support AccessLevel
Also support more DML methods: *async and *immediate
2022-12-16 18:58:31 +01:00
Andreas Dangel 93e768319c [apex] ApexCRUDViolation - no violation for explicit system mode 2022-12-16 17:45:58 +01:00
Andreas Dangel 637663212e [apex] ApexCRUDViolation - fix rule tests 2022-12-16 16:06:11 +01:00
Clément Fournier f850049ff7 Fix tests 2022-12-16 12:49:16 +01:00
Clément Fournier 036ca0aacc Cache annotations on symbols 2022-12-16 12:48:59 +01:00
Andreas Dangel 47128c8b99 Bump build-tools from 18 to 19 2022-12-15 18:45:04 +01:00
Tarush Singh 1ce1a2fcef Simple change in voilation check 2022-12-15 00:58:59 +05:30
Clément Fournier be67448edb Simplify tests 2022-12-10 14:34:48 +01:00
Clément Fournier d9db994fcd Reuse built annotations by caching them on the node 2022-12-10 13:50:58 +01:00
Andreas Dangel 0f9a0f4876 [java] Update quickstart.xml - remove deprecated Excessive*Length rules 2022-12-09 20:37:44 +01:00
Andreas Dangel 7237d0c076 [doc] Consistently document deprecated and renamed rules 2022-12-09 20:37:23 +01:00
Andreas Dangel e8510fa7da [java] Deprecate base class ExcessiveLengthRule 2022-12-09 20:32:58 +01:00
Clément Fournier a6f9ef06dc Merge branch '7.0.x' into clem.type-annots-in-infer 2022-12-09 19:01:00 +01:00
Clément Fournier 51c4e31dbf Merge branch 'pr/4261' into 7.0.x 2022-12-09 18:37:16 +01:00
Andreas Dangel 330594d51d [java] Deprecate rules ExcessiveClassLength and ExcessiveMethodLength
Fixes #2127
2022-12-09 15:23:56 +01:00
Andreas Dangel ac7373bbc0 [java] Compile test sources only once
In the parent pom, the "default-testCompile" execution
is disabled in favor of "java-test-compile". Just
override the configuration for "java-test-compile"
instead of re-adding the default execution.
2022-12-08 21:06:07 +01:00
Andreas Dangel cf2cf60fb0 [java] Ignore synthetic methods and fields in tests
When running PMD build for sonar and coveralls, the jacoco agent will insert a synthetic method "$jacocoInit()" and synthetic field "$jacocoData".
Both are not present in the class files on disk, which
are used for the asm-based symbol analyzer.

For now, all synthetic methods and fields are ignored
and not just the two jacoco specific ones.
2022-12-08 21:04:33 +01:00
Andreas Dangel 5a3ff840aa [java] UnusedPrivateField - add new property "annotations"
Fixes #4166
2022-12-08 19:03:29 +01:00
Andreas Dangel f011056aa9 Fix path name handling under Windows 2022-12-08 17:36:27 +01:00
Andreas Dangel 130f8c2719 Fix unit tests
We use the URI now as the pathId for TextFiles.
Therefore, we can't use this for ruleset exclusion patterns anymore.
2022-12-08 12:09:34 +01:00
Andreas Dangel d9538b0297 Merge remote-tracking branch 'adangel/issue-4248-zip-files' into pmd7-issue-4248-zip-files 2022-12-08 11:55:56 +01:00
Andreas Dangel 9f5bd42d43 Update gems
Fixes https://github.com/pmd/pmd/security/dependabot/31
Fixes CVE-2022-23476
Fixes https://github.com/advisories/GHSA-qv4q-mr5r-qprj
2022-12-08 11:41:02 +01:00
Andreas Dangel 124c4fd281 [doc] Update release notes (#4248) 2022-12-08 11:38:11 +01:00
Andreas Dangel 827221d874 [doc] Clarify documentation about analyzing zip files 2022-12-08 11:37:56 +01:00
Andreas Dangel ce12835d36 Add integration tests for zip/jar files 2022-12-08 11:37:35 +01:00
Andreas Dangel a9fb6f604e Add additional test for jar files 2022-12-08 11:37:16 +01:00
Andreas Dangel 94e6fb55e3 Fix test under Windows (again) 2022-12-08 10:20:08 +01:00
Clément Fournier fd8ab45dea Fix build 2022-12-08 00:25:37 +01:00
Clément Fournier bccbd18b54 Fix more comments 2022-12-07 23:53:20 +01:00
Clément Fournier dd58f3ba27 Type vars now have separate annotations from tparams
This was an implementation bug, type param annotations
are now correctly reflected only on the symbol. They
need to be merged with the type annots of the usage when
doing inference though - todo for later
2022-12-07 23:49:49 +01:00
Clément Fournier 7c8aa8e5e3 try to figure out type annots on tvars 2022-12-07 23:40:05 +01:00
Clément Fournier 4e59e8ae23 Fix isTop for annotated Object 2022-12-07 23:10:40 +01:00
Clément Fournier af59ca77f9 Address some review comments 2022-12-07 22:58:02 +01:00
Clément Fournier aeb4978676 Make isUpperBound return true for unbounded wildcard 2022-12-07 22:51:02 +01:00
Juan Martín Sotuyo Dodero 3f525dfdbb Merge pull request #4256 from pmd/doc-fix-use-version
[doc] Fix doc showing deprecated CLI switches
2022-12-07 10:37:27 -03:00
Clément Fournier a377f07b9c Fix doc showing deprecated CLI switches 2022-12-07 11:14:40 +01:00
Clément Fournier 521f80591e Merge remote-tracking branch 'upstream/pmd/7.0.x' into clem.type-annots-in-infer 2022-12-05 23:32:39 +01:00
Clément Fournier d814110ba0 Fix AssertionError 2022-12-05 11:29:54 +01:00
Clément Fournier b174e8c8fb PMD warning 2022-12-05 10:56:48 +01:00
Clément Fournier 077a53d248 Fix bug with several Object types being created 2022-12-04 23:21:54 +01:00
Clément Fournier 8cdfe24277 Review comments 2022-12-04 18:26:21 +01:00
Clément Fournier 730b298c7f Merge branch '7.0.x' into clem.pmd7-cpd-deprecations 2022-12-04 18:23:49 +01:00
Clément Fournier 9c2113fc69 Fix tvar identity when tvars are annotated 2022-12-04 18:14:16 +01:00
Clément Fournier 58121c2eb7 Doc 2022-12-04 17:47:33 +01:00
Clément Fournier c640e7ebe7 Add typeGenericity enum 2022-12-04 17:43:01 +01:00
Clément Fournier 0e39a398e4 Cleanup the type inf stress test 2022-12-04 16:12:00 +01:00
Clément Fournier fbb38cb219 Fix bug in generic ctor of generic class 2022-12-04 16:11:38 +01:00
Clément Fournier 41a4fefbe9 Fix wrong reference file 2022-12-03 18:59:49 +01:00
Clément Fournier f87fb99cb3 Improve annot toString 2022-12-03 18:46:39 +01:00
Clément Fournier 38673f7f3c Fix hashcode bug 2022-12-03 18:40:35 +01:00
Clément Fournier c2ab0e2ab5 Fix bug, filter out wrong annots 2022-12-03 15:54:59 +01:00
Andreas Dangel 5c935b8cae Fix test under Windows 2022-12-02 17:41:25 +01:00
Andreas Dangel 9942be4107 [core] Better handle display name for zip files
Hopefully restored backwards compatible behavior
for File based data sources (see getNiceFileName).
2022-12-02 17:04:24 +01:00
Clément Fournier 735e494768 Lint 2022-12-02 11:58:52 +01:00
Clément Fournier 67240f9863 Simplify tests 2022-12-02 11:56:56 +01:00
Andreas Dangel dc4f8d4cac [core] Better handle display name for zip files
Now the reporting format is "file.zip!/path/inside".
Previously it was "file.zip:path/inside"
(see ZipDateSource::getNiceFilename)
2022-12-01 22:41:33 +01:00
Andreas Dangel eb7c2e5468 [java] DoNotUseThreads: Fix false negatives with field declarations 2022-12-01 21:48:30 +01:00
Clément Fournier eacaa6e208 Allow AST annotations to fetch default values 2022-12-01 20:08:19 +01:00
Andreas Dangel 9d0bf66ee1 [core] Use jar filesystem provider for zip files
Fixes #4248
2022-12-01 18:40:36 +01:00
Andreas Dangel a3b95bec47 [java] DoNotUseThreads: Fix duplicated violations reporting
Fixes #4210
2022-12-01 17:31:00 +01:00
Andreas Dangel 19757ad7dc Merge pull request #4238 from oowekyala:fix-lawofdemeter-ordering
[java] Make LawOfDemeter not use the rulechain #4238
2022-12-01 16:28:25 +01:00
Andreas Dangel 8f47e2153c Merge pull request #4237 from oowekyala:text-utils-comments
[java] Cleanup handling of Java comments #4237
2022-12-01 16:26:34 +01:00
Andreas Dangel 5b6b7a2222 [doc] Update release notes (#4237) 2022-12-01 16:25:51 +01:00
Tarush Singh efd83665dc Simple change in voilation check 2022-12-01 17:52:48 +05:30
Tarush Singh bce0331fe7 check added for User and system mode in validateCRUDCheckPresent 2022-12-01 16:51:43 +05:30
Tarush Singh 73b95b2e92 check added for User and system mode in validateCRUDCheckPresent 2022-12-01 16:49:42 +05:30
Clément Fournier 7282690b42 Address review comment 2022-12-01 12:15:47 +01:00
Clément Fournier 7791fa1c5b Simplify impls of SymAnnot 2022-12-01 12:14:39 +01:00
Clément FournierandJuan Martín Sotuyo Dodero 9afb40432f Fix default behavior of annotationAppliesTo
Co-authored-by: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2022-12-01 11:56:52 +01:00
Tarush Singh 1ce646a535 check added for User and system mode in validateCRUDCheckPresent 2022-12-01 16:17:11 +05:30
Clément Fournier 9da341acc4 Save space 2022-11-29 21:31:27 +01:00
Clément Fournier e197852b28 Merge branch '7.0.x' into clem.type-annots-in-infer 2022-11-29 21:31:16 +01:00
Clément Fournier 5848e51589 Merge remote-tracking branch 'Monits/cle-typeres-annotations' into 7.0.x 2022-11-29 21:18:47 +01:00
Clément Fournier 02d47843f9 Fix more tests 2022-11-29 21:17:03 +01:00
Clément Fournier cceee3293e Fix bug with convertibility of capture vars 2022-11-29 20:28:14 +01:00
Clément Fournier eeed82ae4e Add a test case 2022-11-29 19:50:59 +01:00
Clément Fournier b90e46a449 Filter annotations that apply to type use 2022-11-29 17:43:58 +01:00
Clément Fournier 41bc5ac309 Fix test with capture 2022-11-29 17:25:33 +01:00
Clément Fournier c2d738db42 Add tests for type inference with type annots 2022-11-29 16:44:39 +01:00
Juan Martín Sotuyo Dodero 671fe3d99d Remove param annotations form signature 2022-11-29 12:41:44 -03:00
Clément Fournier 71b4e4459e Add a test for annotated array type 2022-11-29 16:17:16 +01:00
Clément Fournier dd657bad4a Lint 2022-11-29 15:45:48 +01:00
Clément Fournier e401801d15 Merge remote-tracking branch 'Monits/cle-typeres-annotations' into clem.type-annotations-support 2022-11-29 15:44:22 +01:00
Clément Fournier 6d55c6af27 Lint 2022-11-29 15:42:48 +01:00
Clément Fournier 4621d27dfe Refactor test, use junit 5 2022-11-29 15:39:51 +01:00
Clément Fournier 42cbc84b11 Fix AST type annots 2022-11-29 15:18:16 +01:00
Clément Fournier c8f2a8db14 Use PSet<SymAnnot> instead of List
This is because iteration order is
not defined, also in some places we
have to merge annotations from a
declaration with another set of annots
and there may be duplicates.
2022-11-29 14:46:38 +01:00
Juan Martín Sotuyo Dodero 43d2c3ddf4 Fix build 2022-11-29 10:25:56 -03:00
Clément Fournier 88c3572f7c Factorize tests to test AST impl as well 2022-11-29 14:01:17 +01:00
Juan Martín Sotuyo DoderoandClément Fournier 1a5a576965 Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/ast/AbstractAstVariableSym.java
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2022-11-29 09:59:21 -03:00
Juan Martín Sotuyo DoderoandClément Fournier bdcca5698f Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/ast/AstClassSym.java
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2022-11-29 09:59:12 -03:00
Juan Martín Sotuyo DoderoandClément Fournier 0443e8a7c4 Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/ast/AbstractAstExecSymbol.java
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2022-11-29 09:58:57 -03:00
Clément Fournier 2df039f487 Merge remote-tracking branch 'Monits/cle-typeres-annotations' into clem.type-annotations-support 2022-11-29 13:07:27 +01:00
Tarush Singh 0253929cc5 user mode and System mode with test cases added 2022-11-29 17:05:33 +05:30
Juan Martín Sotuyo Dodero cc4da08d86 Fix pom configuration 2022-11-29 02:25:45 -03:00
Juan Martín Sotuyo Dodero f5b059fadd Finalize tests 2022-11-29 02:17:52 -03:00
Juan Martín Sotuyo Dodero 9e84c8748a Fix missing functionality 2022-11-29 00:42:31 -03:00
Juan Martín Sotuyo Dodero 3e42086e96 Have maven tests provide parameter metadata 2022-11-29 00:26:09 -03:00
Juan Martín Sotuyo Dodero 71ab585220 Revamp symbol testing 2022-11-29 00:25:29 -03:00
Clément Fournier acc7721203 Support receiver type 2022-11-29 03:35:32 +01:00
Clément Fournier d5c446a292 Doc 2022-11-29 02:40:00 +01:00
Clément Fournier d8e907e900 Merge branch 'typeres-annotations' into clem.type-annotations-support 2022-11-29 02:23:37 +01:00
Clément Fournier 71cf4ad808 Lint 2022-11-29 02:22:33 +01:00
Clément Fournier 0ce831fc5c Support annotating type parameter bounds 2022-11-29 02:12:58 +01:00
Juan Martín Sotuyo Dodero c431b56f97 Add test for Target.PARAMETER annotations in ASM 2022-11-28 18:33:34 -03:00
Juan Martín Sotuyo Dodero b783443835 Fix parameter annotation accessing 2022-11-28 18:32:55 -03:00
Juan Martín Sotuyo Dodero 648729a980 Aggressively skip visiting as much as possible
- Improve ASM parsing speed
2022-11-28 18:32:25 -03:00
Juan Martín Sotuyo Dodero e957ac661d Parse annotation in classes under AST 2022-11-28 17:13:43 -03:00
Juan Martín Sotuyo Dodero 8980a8da9f Parse annotations in ctors/methods in AST 2022-11-28 17:05:01 -03:00
Juan Martín Sotuyo Dodero cbe551fb4d Parse annotations for field/param/locals in AST 2022-11-28 17:00:07 -03:00
Juan Martín Sotuyo Dodero 83070f89f9 Parse formal param annotations in ASM
- Only type annotations are missing from ASM, but those are a world of pain…
2022-11-28 16:56:15 -03:00
Clément Fournier 4ec253a439 Support type parameters 2022-11-28 18:41:54 +01:00
Clément Fournier ab9e8de31c Support annot on throws clause 2022-11-28 17:40:53 +01:00
Clément Fournier 407543fd41 Support some type annots on methods 2022-11-28 17:13:37 +01:00
Clément Fournier bf6e64a1e1 Simplify impl 2022-11-28 15:49:53 +01:00
Clément Fournier a85e5c867d Support wildcards
All TypePaths are now handled
2022-11-28 15:19:59 +01:00
Clément Fournier b5c91016eb pmd warnings 2022-11-28 04:27:57 +01:00
Clément Fournier 47dc6d1c96 More tests, pretty print 2022-11-28 02:32:57 +01:00
Clément Fournier 184f42e153 Handle array and inner types 2022-11-27 22:40:04 +01:00
Clément Fournier 0be034b3db Support reading type annotations from ASM for fields
Missing pieces:
- other declarations
- some type annot paths
2022-11-27 16:40:15 +01:00
Clément Fournier 994b8402d5 Add type annotations to JTypeMirror 2022-11-27 15:02:22 +01:00
Clément Fournier c488af3153 pmd warnings 2022-11-27 01:27:43 +01:00
Clément Fournier 457568a05c Factorize equality routines for SymAnnot 2022-11-27 01:25:00 +01:00
Clément Fournier a3bdd62c40 checkstyle 2022-11-27 01:24:39 +01:00
Clément Fournier d29a2b093f Fix merge 2022-11-27 01:09:40 +01:00
Clément Fournier 191f14e6c0 Merge branch '7.0.x' into typeres-annotations 2022-11-27 00:40:19 +01:00
Juan Martín Sotuyo Dodero 20d538d49b Actually close initializers 2022-11-26 15:48:17 -03:00
Juan Martín Sotuyo Dodero a653ab888e Fix short-circuit checks for tee listeners 2022-11-26 15:45:36 -03:00
Juan Martín Sotuyo Dodero 1042781aa3 Rework to use an initializer class for expansion 2022-11-26 15:34:02 -03:00
Clément Fournier c71756a4c1 Merge branch '7.0.x' into pmd7-language-lifecycle 2022-11-26 18:42:34 +01:00
Clément Fournier e70ce39b62 Make LawOfDemeter not use the rulechain 2022-11-26 18:36:06 +01:00
Clément Fournier 3bfb61c037 Cleanups 2022-11-26 18:25:46 +01:00
Clément Fournier 98f515b92c Merge branch '7.0.x' into port-properties 2022-11-26 18:12:38 +01:00
Clément Fournier 49c7f421f3 cleanups 2022-11-26 18:03:57 +01:00
Clément Fournier 20d3d90fb0 Add some tests 2022-11-26 16:35:13 +01:00
Clément Fournier 08284c2af5 Merge branch '7.0.x' into text-utils-comments 2022-11-26 16:04:21 +01:00
Clément Fournier 0fd5b3d1e1 Merge remote-tracking branch 'origin/violation-decorators' into violation-decorators 2022-11-26 15:41:07 +01:00
Clément Fournier 5400bb40e9 Fix regression with variableName not being populated 2022-11-26 15:39:47 +01:00
Clément Fournier a92e63c477 Merge branch '7.0.x' into violation-decorators 2022-11-26 15:28:11 +01:00
Clément Fournier bb31553e8c Delete lots of deprecated stuff in CPD core
This includes its CLI
2022-11-26 14:54:09 +01:00
Andreas Dangel 208f190d2c Merge branch 'master' into pmd/7.0.x 2022-11-26 10:38:50 +01:00
Andreas Dangel 30b78ddec3 Bump pmd from 6.51.0 to 6.52.0 2022-11-26 10:31:25 +01:00
Andreas Dangel c1390d219f Prepare next development version [skip ci] 2022-11-26 10:27:01 +01:00
Andreas Dangel 1634bd0043 [maven-release-plugin] prepare for next development iteration 2022-11-26 10:24:58 +01:00
Andreas Dangel e90bf0f11b [maven-release-plugin] prepare release pmd_releases/6.52.0 2022-11-26 10:24:53 +01:00
Andreas Dangel 6f64edf714 Prepare pmd release 6.52.0 2022-11-26 10:10:14 +01:00
Andreas Dangel be4d09b5c0 Merge branch 'master' into pmd/7.0.x 2022-11-25 19:52:59 +01:00
Andreas Dangel eff0168631 [vf] Fix compile error 2022-11-25 19:49:33 +01:00
Juan Martín Sotuyo Dodero eddb8f5911 Checkstyle 2022-11-25 15:48:09 -03:00
Andreas Dangel f7608332df [java] Fix rule tests after merge 2022-11-25 19:43:17 +01:00
Andreas Dangel 9c42eba8b5 Add @nvervelle as a contributor 2022-11-25 19:26:15 +01:00
Andreas Dangel 335a12fe1b Add @mihalyr as a contributor 2022-11-25 19:25:41 +01:00
Andreas Dangel 8f2ce2408e Add @ctoomey as a contributor 2022-11-25 19:25:16 +01:00
Juan Martín Sotuyo Dodero b836a35c8c [cli] Move CLI progressbar rendering to pmd-cli
- Took the chance to improve how we render it
 - Added support for interactive terminals
 - Improved the overall performance / thread-safety of report rendering to STDOUT
2022-11-25 15:24:57 -03:00
Andreas Dangel fc05c9fef1 Merge pull request #4230 from adangel:pmd7-issue-4177-InvalidJavaBean
[java] New Rule InvalidJavaBean (pmd7) #4230
2022-11-25 19:14:19 +01:00
Andreas Dangel 916ecfa105 Merge pull request #4221 from adangel:pmd7-issue-4176-NonSerializableClass
[java] Implement rule NonSerializableClass (pmd7) #4221
2022-11-25 19:13:26 +01:00
Andreas Dangel fcfbb33386 Merge branch 'master' into pmd/7.0.x 2022-11-25 19:05:06 +01:00
Andreas Dangel 8b71fe6fd6 Merge pull request #4231 from adangel:issue-4175-ImmutableField-deprecate-ignoredAnnotations
[java] ImmutableField - deprecate property ignoredAnnotations #4231
2022-11-25 18:44:59 +01:00
Clément Fournier cbe98ea71a Do that with CPD tests too 2022-11-25 18:39:34 +01:00
Andreas Dangel 93587f0b1f Merge pull request #4203 from adangel:issue-4177-InvalidJavaBean
[java] New Rule InvalidJavaBean #4203
2022-11-25 18:38:41 +01:00
Andreas Dangel 9be37acaeb Merge pull request #4196 from adangel:issue-4176-NonSerializableClass
[java] Implement rule NonSerializableClass #4196
2022-11-25 18:32:38 +01:00
Andreas Dangel 8a5d964176 [java] Restore BeanMembersShouldSerializeRule as deprecated class 2022-11-25 18:30:39 +01:00
Andreas Dangel 44cc43ce2b Merge pull request #4232 from deining:fix/typos
[doc] Fixing typos #4232
2022-11-25 18:26:02 +01:00
Andreas Dangel db6a30c88a [doc] Update release notes (#4232) 2022-11-25 18:25:07 +01:00
Andreas Dangel afa4e70c8a Add @deining as a contributor 2022-11-25 18:24:54 +01:00
Andreas Dangel a5cce75038 Merge pull request #4227 from LynnBroe:issue4225
[java] Fix #4225 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's @NoArgsConstructor annotation #4227
2022-11-25 18:14:25 +01:00
Andreas Dangel ddb60c51ac [doc] Update release notes (#4225, #4227) 2022-11-25 17:59:19 +01:00
Andreas Dangel 1cecabcec4 [java] MissingStaticMethodInNonInstantiatableClass - update test cases 2022-11-25 17:57:31 +01:00
Andreas Dangel cb7c07f365 Merge pull request #4228 from LynnBroe:issue4224
[java] Fix #4224 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's UtilityClass #4228
2022-11-25 17:51:17 +01:00
Andreas Dangel bc210b41b2 [doc] Update release notes (#4224, #4228) 2022-11-25 17:50:14 +01:00
Andreas Dangel 7b55f9360c [java] Refactor/reformat xpath query for MissingStaticMethodInNonInstantiatableClass 2022-11-25 17:47:45 +01:00
Andreas Deininger 5b2243aff1 Fixing typos 2022-11-25 17:32:49 +01:00
Andreas Dangel edcfe21131 Update pmdtester and other gems 2022-11-25 15:15:10 +01:00
Andreas Dangel 05a6daad2d Merge pull request #4226 from aaronhurst-google:feature/replace-jorje-for-visualforce
[visualforce] Replace uses of Jorje types in pmd-visualforce #4226
2022-11-25 15:12:22 +01:00
Andreas Dangel 3bd1283ab1 [doc] Update release notes (#4226) 2022-11-25 15:11:51 +01:00
Andreas Dangel faa5bf6e00 [doc] Document deprecated API 2022-11-25 15:10:30 +01:00
Andreas Dangel 07843120c2 [java] Fix rule tests after merge 2022-11-25 14:37:48 +01:00
Lynn cdaf0d2500 Merge branch 'master' into issue4225 2022-11-25 21:34:48 +08:00
Lynn 4c38c5df8b Merge branch 'master' into issue4224 2022-11-25 21:32:04 +08:00
Clément Fournier 20eb129dfe Move cli tests from lang modules to cli 2022-11-25 12:19:24 +01:00
Clément Fournier 675710d0e7 Cleanup Cli tests
Remove some deprecated things left over by #4059
2022-11-25 11:28:59 +01:00
Andreas Dangel 39cf581e3a Merge branch 'master' into pmd/7.0.x 2022-11-25 11:14:26 +01:00
Andreas Dangel 7f7498dfba Merge pull request #4213 from adangel:issue-4172-InvalidLogMessageFormat
[java] InvalidLogMessageFormat - check for formatted calls #4213
2022-11-25 10:56:21 +01:00
Andreas Dangel 08784bd9c4 Merge pull request #4209 from adangel:issue-4174-MissingStaticMethodInNonInstantiatableClass
[java] MissingStaticMethodInNonInstantiatableClass - check for alloca… #4209
2022-11-25 10:52:55 +01:00
Andreas Dangel 21f24207ff Merge pull request #4193 from adangel:issue-4189-AbstractClassWithoutAnyMethod
[java] AbstractClassWithoutAnyMethod - exclude lombok constructor annotations #4193
2022-11-25 10:50:27 +01:00
Andreas Dangel 7d954dc8b3 Merge pull request #4192 from adangel:issue-4188-ClassWithOnlyPrivateConstructorsShouldBeFinal
[java] ClassWithOnlyPrivateConstructorsShouldBeFinal: Exclude lombok annotations #4192
2022-11-25 10:34:25 +01:00
Andreas Dangel 366bb3c651 Merge pull request #4190 from adangel:issue-4183-AvoidArrayLoops
[java] Fix #4183 AvoidArrayLoops false positive #4190
2022-11-25 10:30:56 +01:00
Andreas Dangel ea02c57d1f Use new pmd-regression-tester 2022-11-25 10:08:32 +01:00
Andreas Dangel eb6e1a2521 [java] NonSerializableClass - exclude unresolved types 2022-11-25 10:08:00 +01:00
LynnBroe db8636c2ad revise 2022-11-25 16:33:22 +08:00
LynnBroe 7a30d7e2b4 support RequiredArgsConstructor and AllArgsConstructor 2022-11-25 14:48:11 +08:00
Juan Martín Sotuyo Dodero e38326844a Fix compilation errors
- Due to multiple paths ending up with the same interface being implemented with differing generic restrictions
and erasure, compilation errors arose depending on how the compiler picks them up.
2022-11-24 19:47:50 -03:00
Clément Fournier cef4c30af6 Merge branch '7.0.x' into pmd7-language-lifecycle 2022-11-24 22:39:59 +01:00
Aaron Hurst 1029d6b24d Fix checkstyle violations.
Change-Id: I0aa6ecfeb343f2e0b48d2ebfd176a877a72f40f6
2022-11-24 20:35:42 +00:00
Clément Fournier d3ffc1d212 Merge branch '7.0.x' into pmd7-language-lifecycle 2022-11-24 20:22:58 +01:00
Andreas Dangel abee4707b2 [java] NonSerializableClass - fix handling of generic type vars 2022-11-24 18:06:55 +01:00
Andreas Dangel 96378512a2 Merge branch 'pmd/7.0.x' into pmd7-issue-4176-NonSerializableClass 2022-11-24 17:13:15 +01:00
Aaron Hurst e62b71f89a Add back DataType.fromBasicType(BasicType) and test.
Isolate references to BasicType inside method implementation.

Change-Id: I4be2ad5b8b42fb7a84da0755106d8f0b08034690
2022-11-24 15:55:43 +00:00
Clément Fournier 4b5575ea94 Merge remote-tracking branch 'origin/violation-decorators' into violation-decorators 2022-11-24 15:30:50 +01:00
Andreas Dangel a28705a379 [java] ImmutableField - deprecate property ignoredAnnotations
Fixes #4175
2022-11-24 15:19:46 +01:00
Clément Fournier f603e45de0 Merge branch '7.0.x' into violation-decorators 2022-11-24 15:15:34 +01:00
Andreas Dangel 988c2a5220 Fix pmd dogfood (SimplifyBooleanReturns) 2022-11-24 14:32:42 +01:00
Clément Fournier 704102cd80 Merge branch 'pmd7-junit5-part2' into 7.0.x 2022-11-24 14:08:22 +01:00
Clément Fournier a1a580ac66 Merge branch '7.0.x' into pmd7-junit5-part2 2022-11-24 14:07:31 +01:00
Andreas Dangel f0358f069b [java] Migrate InvalidJavaBeanRule to pmd7 2022-11-24 12:20:51 +01:00
Andreas Dangel 41a13a4c4b Merge branch 'pr-4203' into pmd7-issue-4177-InvalidJavaBean 2022-11-24 11:19:57 +01:00
Andreas Dangel 8a0a196886 Merge branch 'master' into issue-4177-InvalidJavaBean 2022-11-24 11:19:36 +01:00
Andreas Dangel 112ee6fd2f [doc] Update release notes (#2234, #4079) 2022-11-24 11:11:24 +01:00
Clément Fournier 4b6a54258f Merge branch '7.0.x' into violation-decorators 2022-11-23 21:56:14 +01:00
Clément Fournier 251fa45020 Merge branch '7.0.x' into pr/4028 2022-11-23 21:52:18 +01:00
Clément Fournier 2f6ec4045b Merge branch 'pr/4059' into 7.0.x
Refs #4059
Thanks Juan!
2022-11-23 21:45:04 +01:00
Juan Martín Sotuyo Dodero 510f41ae19 Merge pull request #4 from oowekyala/picocli
Merge latest pmd 7
2022-11-23 15:29:19 -03:00
LynnBroe 45a3d451af fix #4224 2022-11-23 16:30:55 +08:00
LynnBroe 376d4fbfb8 fix #4225 2022-11-23 16:11:05 +08:00
Aaron Hurst c9e21cd4eb Tweak terminology: the map is case-normalized not case-insensitive.
Change-Id: I3499dc615262612b6c220b7840d3ab8cca87c226
2022-11-22 21:38:03 +00:00
Aaron Hurst 5ad37f6757 Replace uses of Jorje types in pmd-visualforce.
Summary: store and compare primitive type names instead of using BasicType enum.

Udpate unit tests and add a few more cases.

Change-Id: If4e5bb33d11793813839b82cf8beb043aad2ce34
2022-11-22 20:15:39 +00:00
Andreas Dangel e3e59bdae7 [java] NonSerializableClass - fix tests 2022-11-19 11:53:34 +01:00
Andreas Dangel 039c1af4de Merge branch 'pr-4196' into pmd7-issue-4176-NonSerializableClass 2022-11-19 11:12:38 +01:00
Andreas Dangel 311545d8ba [doc] Fix sidebar 2022-11-19 10:33:48 +01:00
Andreas Dangel db966c574c Fix rule doc generator 2022-11-18 16:26:00 +01:00
Andreas Dangel 39dab4d5e8 Merge branch 'master' into pmd/7.0.x 2022-11-18 16:04:25 +01:00
Andreas Dangel 184f2031e2 Merge pull request #4207 from adangel:doc-add-scala-sidebar
[doc] List all languages in rule doc #4207
2022-11-18 15:59:29 +01:00
Andreas Dangel 1f9691b7f3 [doc] Update release notes (#4207) 2022-11-18 15:59:10 +01:00
Clément Fournier 5a4205a877 Merge branch '7.0.x' into pr/4059 2022-11-18 11:47:18 +01:00
Andreas Dangel 78ac4bc387 [java] NonSerializableClass - Fix NPE 2022-11-18 11:19:23 +01:00
Andreas Dangel 7d0f60891c [java] NonSerializableClass - support serialPersistentFields 2022-11-18 10:12:27 +01:00
Andreas Dangel f6e51b1457 [java] NonSerializableClass - new property "checkAbstractTypes"
By default, ignore abstract types like abstract classes, interfaces, generic types and java.lang.Object.
2022-11-17 17:09:43 +01:00
Andreas Dangel aed682453b Merge branch 'master' into issue-4176-NonSerializableClass 2022-11-17 16:29:25 +01:00
Andreas Dangel c70f89417f [doc] Update release notes (#4215) [skip ci] 2022-11-17 11:07:21 +01:00
Clément Fournier 0710b5a153 Merge branch 'pr/4194' into 7.0.x 2022-11-16 18:51:50 +01:00
Clément Fournier cfad2420c4 Fix CommentDefaultAccessModifier
Now reports nested types properly
Now reperts records properly
2022-11-16 18:15:02 +01:00
Clément Fournier 9a5c2523f6 Fix pmd-java 2022-11-16 14:51:33 +01:00
Clément Fournier be691c71bf Fix pmd-core 2022-11-16 14:29:27 +01:00
Clément Fournier d540f6fb14 Merge branch 'master' into pr/4194 2022-11-16 13:56:01 +01:00
Clément Fournier 384dec422d Merge branch 'pr/4173' 2022-11-16 13:01:04 +01:00
Clément Fournier 81ac22dd78 Merge branch 'master' into pr/4173 2022-11-16 13:00:52 +01:00
Clément Fournier 9d8ff6c4a6 Merge branch 'pr/4191' 2022-11-16 12:50:58 +01:00
Clément Fournier 382dea54ea Merge branch 'master' into pr/4191 2022-11-16 12:50:42 +01:00
Clément Fournier b45ab08021 Add tests for zip file paths 2022-11-13 18:42:00 +01:00
Clément Fournier e0c0bd9241 Test -z / 2022-11-13 15:20:31 +01:00
Clément Fournier 99b24b702f Add tests, dedup collected files 2022-11-13 14:36:36 +01:00
Clément Fournier d3e68d795b Add --relativize-paths-with 2022-11-13 00:08:35 +01:00
Andreas Dangel 69ccb693c0 [java] InvalidLogMessageFormat - check for formatted calls
Fixes #4172
2022-11-12 19:26:23 +01:00
Clément Fournier bdbeef6235 Merge branch 'pr/4195'
Refs #4195
2022-11-12 18:55:20 +01:00
Clément Fournier 2f06def8ae Apply suggestions from code review 2022-11-12 18:54:31 +01:00
Andreas Dangel 22cbae07fd [java] MissingStaticMethodInNonInstantiatableClass - check for allocations of the outer class
Fixes #4174
2022-11-11 17:37:17 +01:00
Andreas Dangel 8a51c56094 Merge branch 'master' into issue-2867-ClassNamingConventions-testClassPattern 2022-11-11 15:49:00 +01:00
Andreas Dangel 86eab418a9 [java] TestClassWithoutTestCases - don't consider nested TestNG classes 2022-11-11 15:43:31 +01:00
Andreas Dangel bbfb5eca6c Merge branch 'master' into issue-4177-InvalidJavaBean 2022-11-11 15:22:51 +01:00
Andreas Dangel a505bbf2ac [doc] Update release notes (#4177) 2022-11-11 15:21:21 +01:00
Andreas Dangel 9ced8ad63c [java] InvalidJavaBean - update rule doc 2022-11-11 15:18:09 +01:00
Andreas Dangel 7e8a886b93 [java] InvalidJavaBean - add property packages 2022-11-11 14:57:29 +01:00
Andreas Dangel 0d44e59f82 [java] InvalidJavaBean - support indexed getters and setters 2022-11-11 14:43:28 +01:00
Andreas Dangel 770b1f541e [java] InvalidJavaBean - consider properties not backed by fields
These are computed values.
2022-11-11 13:56:31 +01:00
Andreas Dangel 4ef342cd28 [doc] Fix jdoc links in release notes 2022-11-11 12:22:06 +01:00
Andreas Dangel 2092ea2b88 Merge pull request #4205 from Eldrick19:eldrick19-scala-clarification
[doc] Clarify Scala support (no built-in rules) #4205
2022-11-11 12:21:14 +01:00
Andreas Dangel 2bfc8da9d2 Add @Eldrick19 as a contributor 2022-11-11 12:20:09 +01:00
Andreas Dangel 43aa917687 [doc] Update release notes (#4205) 2022-11-11 12:19:54 +01:00
Andreas Dangel d842ea2a90 Revert package-lock.json 2022-11-11 12:19:00 +01:00
Andreas Dangel 02ad552445 [doc] List all languages in rule doc
Even without rules.

- Relates #4205
- Relates #4105
2022-11-11 12:14:28 +01:00
Andreas Dangel 57057f4749 Merge branch 'master' into pmd/7.0.x 2022-11-11 11:27:27 +01:00
Andreas Dangel 36d18aefc6 Merge pull request #4197 from oowekyala:pmd6-java-type-annotations
[java] Support type annotations properly #4197
2022-11-11 10:48:25 +01:00
Andreas Dangel c010561045 [doc] Update release notes (#3643, #4152, #4197) 2022-11-11 10:44:55 +01:00
Andreas Dangel e2a845e77d Merge pull request #4202 from LynnBroe:master
[java] Fix #4200 and #4201: ClassWithOnlyPrivateConstructorsShouldBeFinal, CommentDefaultAccessModifier: Exclude lombok @Value annotation #4202
2022-11-11 10:29:10 +01:00
Andreas Dangel f28bb76d35 [doc] Update release notes (#4200, #4201, #4202) 2022-11-11 10:28:28 +01:00
Andreas Dangel b1ce2da3b9 [doc] Fix rule doc generation when rule description is empty 2022-11-11 10:23:25 +01:00
Andreas Dangel feb1166ec7 [java] InvalidJavaBean - consider Lombok annotations 2022-11-11 10:08:57 +01:00
Andreas Dangel dea8d03ab2 [java] InvalidJavaBean - add property ensureSerialization 2022-11-11 09:35:35 +01:00
Andreas Dangel 038ef44e16 [java] InvalidJavaBean - use symbol table 2022-11-11 09:31:36 +01:00
LynnBroe 6234b15ce7 revise 2022-11-11 14:22:22 +08:00
Eldrick Wega ed1e84ec58 Provide Scala Update 2022-11-10 23:33:08 +00:00
Andreas Dangel 7d06d2ac2b [java] InvalidJavaBean - add more tests 2022-11-10 17:51:35 +01:00
Juan Martín Sotuyo Dodero c9492519aa Bump picocli
- This includes a PR I submitted to support suggestions of multi-word entries
2022-11-10 13:05:42 -03:00
Juan Martín Sotuyo Dodero 9c9f3ff80b Merge branch 'pmd/7.0.x' into picocli 2022-11-10 12:40:30 -03:00
Juan Martín Sotuyo Dodero 79e294b36e Merge pull request #4161 from Monits/prep-4059
[core] Backport to PMD6 changes to accomodate PicoCli in PMD7
2022-11-10 12:34:05 -03:00
Juan Martín Sotuyo Dodero c513d72d59 Fix typo 2022-11-10 12:33:52 -03:00
Juan Martín Sotuyo DoderoandClément Fournier 6c5c34bb03 Update docs/pages/pmd/userdocs/cli_reference.md
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2022-11-10 12:26:46 -03:00
Lynn d94e67d828 Merge branch 'pmd:master' into master 2022-11-10 20:40:15 +08:00
Andreas Dangel 1a344d8cb3 [java] New Rule InvalidJavaBean
Refs #4177
2022-11-10 12:01:21 +01:00
Andreas Dangel a6a4199287 Merge pull request #4198 from jvwilge:patch-1
[doc] Add supported CPD languages #4198
2022-11-10 11:14:01 +01:00
Andreas Dangel 81dd7e5688 [doc] Update release notes (#4198) 2022-11-10 11:13:26 +01:00
Andreas Dangel b2e580863b Add @jvwilge as a contributor 2022-11-10 11:13:12 +01:00
LynnBroe a6256f90a5 fix #4201 2022-11-10 18:00:07 +08:00
Andreas Dangel f21f63b905 [java] Improve ClassNamingConventions for testClassPatterns
Don't consider nested classes.
Add TestCase as valid pattern by default.
2022-11-10 10:57:19 +01:00
LynnBroe 3eb291c811 fix #4200 2022-11-10 17:52:34 +08:00
Jeroen van Wilgenburg 1b42676c1b Add supported languages
Languages were missing in the documentation
2022-11-09 10:18:18 +01:00
Andreas Dangel ffa852f426 [java] Improve NonSerializableClass
Use rulechain, consider inner classes/enums
Use fully qualified name for reporting
2022-11-08 19:19:13 +01:00
Clément Fournier eaa6d43eab fix invalid test code 2022-11-07 23:53:24 +01:00
Clément Fournier 735197cff4 Support other cases found in checkstyle 2022-11-07 00:44:22 +01:00
Clément Fournier 36f19eda92 Push actual annotation nodes
This is to avoid having rules like UnusedImports
fail to see an annotation usage. This makes the
tree rather messy when there are type annotations
though.
2022-11-06 22:39:38 +01:00
Clément Fournier 00c06343a5 Fix tests 2022-11-06 21:50:33 +01:00
Clément Fournier 2027d2f57f Support generic ctors 2022-11-05 17:05:46 +01:00
Clément Fournier 92ccf1b0ea Support array init with just a comma
Refs #3643
2022-11-05 16:31:17 +01:00
Clément Fournier b39ba3c560 Add new tests
Refs #3643
2022-11-05 16:30:01 +01:00
Clément Fournier cd075d2459 Fix #4152 - support type annotations in more places 2022-11-05 15:48:04 +01:00
Andreas Dangel 1824f523dc [java] ClassNamingConventions - change default testClassPattern 2022-11-04 20:10:37 +01:00
Andreas Dangel 51067c2c5e [java] Implement rule NonSerializableClass
Fixes #4176
Fixes #1668
2022-11-04 20:05:45 +01:00
Andreas Dangel 9b53bf444e [java] Rename rule BeanMembersShouldSerialize to NonSerializableClass 2022-11-04 18:43:01 +01:00
Andreas Dangel 94e8cbec56 [java] Use withClue in ConditionalTypeTest 2022-11-04 18:33:15 +01:00
Andreas Dangel 11a4940d6d [java] ClassNamingConventions - add new property testClassPattern
Fixes #2867
2022-11-04 18:15:32 +01:00
Andreas Dangel b6d33d8473 [java] Fix unit tests 2022-11-04 17:25:12 +01:00
Andreas Dangel 346dcd30ba [java] Fix test compile errors 2022-11-04 12:13:09 +01:00
Andreas Dangel 5445c4db6a Merge branch 'upgrade-kotlin-1.7.20' into pmd7-upgrade-kotlin-1.7.20 2022-11-04 11:26:37 +01:00
Andreas Dangel a5b6264ad7 Bump kotest from 5.5.3 to 5.5.4 2022-11-04 11:05:01 +01:00
Andreas Dangel 06bace1364 Merge branch 'master' into upgrade-kotlin-1.7.20 2022-11-04 11:04:31 +01:00
Andreas Dangel 87297f39f8 [java] AbstractClassWithoutAnyMethod - exclude lombok constructor annotations
Fixes #4189
2022-11-04 10:58:59 +01:00
Andreas Dangel 66b689375f [java] ClassWithOnlyPrivateConstructorsShouldBeFinal: Exclude lombok annotations
Fixes #4188
2022-11-04 10:45:56 +01:00
Andreas Dangel dcbc48b740 [java] Fix NPE in InvalidLogMessageFormat
Fixes #4185
2022-11-03 16:23:34 +01:00
Andreas Dangel 1a07963ea7 Merge pull request #4184 from valfirst:patch-1
[java][doc] TestClassWithoutTestCases - fix small typo in description #4184
2022-11-03 15:45:30 +01:00
Andreas Dangel 5d46939592 [doc] Update release notes (#4184) 2022-11-03 15:44:57 +01:00
Andreas Dangel 88c473498e Add @valfirst as a contributor 2022-11-03 15:43:29 +01:00
Andreas Dangel f061ab58d5 [java] Fix #4183 AvoidArrayLoops false positive 2022-11-03 15:40:12 +01:00
Valery Yatsynovich 6109aea217 [java] TestClassWithoutTestCases - fix small typo in description 2022-10-31 10:29:37 +03:00
Andreas Dangel 0b86bf124c Merge branch 'master' into pmd/7.0.x 2022-10-29 09:49:00 +02:00
Andreas Dangel d4eba4f456 Bump pmd from 6.50.0 to 6.51.0 2022-10-29 09:40:13 +02:00
Andreas Dangel ac76fa6f24 Prepare next development version [skip ci] 2022-10-29 09:36:33 +02:00
Andreas Dangel 5a4bf05493 [maven-release-plugin] prepare for next development iteration 2022-10-29 09:34:25 +02:00
Andreas Dangel 66e834049f [maven-release-plugin] prepare release pmd_releases/6.51.0 2022-10-29 09:34:19 +02:00
Andreas Dangel 22425a6d71 Prepare pmd release 6.51.0 2022-10-29 09:20:31 +02:00
Andreas Dangel 0ee8dd93e6 [java] Fix rule tests 2022-10-28 12:30:14 +02:00
Andreas Dangel d6b0068f7b Merge branch 'master' into pmd/7.0.x 2022-10-28 11:26:12 +02:00
Andreas Dangel 2792577da0 Bump kotest from 5.5.2 to 5.5.3 2022-10-28 10:46:16 +02:00
Andreas Dangel 0a10dad628 Add @tysonstewart as a contributor 2022-10-28 10:11:53 +02:00
Andreas Dangel e7013bb061 Add @rnveach as a contributor 2022-10-28 10:08:26 +02:00
Andreas Dangel 2f515e554a Merge pull request #4170 from adangel:issue-4140-doc-max-lang-version
[doc] Rule doc: add maximum language version #4170
2022-10-28 10:04:29 +02:00
Andreas Dangel 66d67c7fe4 Merge pull request #4169 from adangel:issue-4165-InaccurateNumericLiteral
[javascript] InaccurateNumericLiteral - consider underscores #4169
2022-10-28 10:02:45 +02:00
Andreas Dangel e59d25b697 Merge pull request #4162 from adangel:improve-TestClassWithoutTestCases
[java] Improve TestClassWithoutTestCases #4162
2022-10-28 10:01:22 +02:00
Andreas Dangel fc8c01aaaf Merge pull request #4160 from adangel:issue-4139-UnnecessaryFullyQualifiedName
[java] Fix UnnecessaryFullyQualifiedName for current package java.lang #4160
2022-10-28 09:59:31 +02:00
Andreas Dangel 59cfe99325 Merge pull request #4159 from adangel:AvoidArrayLoops-improvements
[java] AvoidArrayLoops improvements #4159
2022-10-28 09:39:41 +02:00
Andreas Dangel af013d61e1 Merge pull rquest #4156 from adangel:issue-4148-ArrayListVector
[java] Use type resolution for UseArrayListInsteadOfVector #4156
2022-10-28 09:36:45 +02:00
Andreas Dangel fddc47ed31 Merge pull request #4154 from adangel:StringToString-improvements
[java] StringToString improvements #4154
2022-10-28 09:34:52 +02:00
Andreas Dangel 71446164de [doc] Link 3rd party rulesets from making rulesets 2022-10-27 20:08:41 +02:00
Andreas Dangel 36c197f705 Merge pull request #4147 from yasarshaikh:master
[java] Added support for Do-While for AvoidArrayLoops #4147
2022-10-27 15:53:09 +02:00
Andreas Dangel 56b61f6a64 [doc] Update release notes (#4091, #4147) 2022-10-27 15:51:25 +02:00
Andreas Dangel d011996df9 Add @yasarshaikh as a contributor 2022-10-27 15:48:36 +02:00
Andreas Dangel a059986945 Bump kotest from 5.5.1 to 5.5.2 2022-10-27 15:47:07 +02:00
Andreas Dangel ea3b860d61 [java] Upgrade testing dsl for kotest 5.5.1 2022-10-21 15:23:15 +02:00
Andreas Dangel 0240c51ff0 Bump kotest from 4.4.3 to 5.5.1
Also update JUnit5 to 5.8.2
2022-10-21 12:14:32 +02:00
Andreas Dangel 3dc9d92833 Bump dokka from 1.6.21 to 1.7.20 2022-10-21 10:39:49 +02:00
Andreas Dangel e3fcd690a5 Bump kotlin from 1.7.0 to 1.7.20 2022-10-21 10:39:13 +02:00
Andreas Dangel 11764884c7 [java] TestClassWithoutTestCases - fix default pattern
To not match inner classes or a potential test class if the
inner class is not named test.
2022-10-21 09:29:06 +02:00
Andreas Dangel 21cca4b94d [java] AccessorClass/MethodGeneration: Document maximum language version
Fixes #4140
2022-10-20 17:34:03 +02:00
Andreas Dangel ebf3837199 [doc] Rule doc: add maximum language version
Fixes #4140
2022-10-20 17:25:09 +02:00
Andreas Dangel c7acac7f29 [javascript] InaccurateNumericLiteral - consider underscores
Fixes #4165
2022-10-20 17:15:18 +02:00
Andreas Dangel f54ca8b364 Update gems 2022-10-20 15:53:51 +02:00
Andreas Dangel 241e1e140a Bump pmdtester from 1.5.1 to 1.5.2 2022-10-20 15:53:32 +02:00
Andreas Dangel dd26af7f93 [java] TestClassWithoutTestCases - improve message 2022-10-20 15:47:07 +02:00
Andreas Dangel 5860f64648 [java] TestClassWithoutTestCases - improve nested class support 2022-10-20 15:33:28 +02:00
Andreas Dangel 0363c61b77 [java] TestClassWithoutTestCases - support JUnit5 nested tests 2022-10-20 14:59:24 +02:00
Juan Martín Sotuyo Dodero ecd7ab14ce Update CLI docs 2022-10-17 17:59:47 -03:00
Juan Martín Sotuyo Dodero 637b701778 Fix link to JavaFX 2022-10-17 01:10:41 -03:00
Juan Martín Sotuyo Dodero 21306f36db Add deprecations 2022-10-17 01:07:26 -03:00
Juan Martín Sotuyo Dodero 9e92ca3d76 Include CLI deprecations 2022-10-17 00:45:59 -03:00
Juan Martín Sotuyo Dodero 5a43ed5488 Fix wrong escape 2022-10-17 00:11:41 -03:00
Juan Martín Sotuyo Dodero 074217a570 Allow an empty line to indicate the start of output 2022-10-17 00:11:21 -03:00
Juan Martín Sotuyo Dodero 25ffe7a2c2 Make sure cpd docs reflect this too 2022-10-16 23:45:27 -03:00
Juan Martín Sotuyo Dodero 7ed57a7198 Don't use the -d in basic examples 2022-10-16 23:39:09 -03:00
Juan Martín Sotuyo Dodero 75450c7e9f Bump pmdtester 2022-10-16 23:33:07 -03:00
Andreas Dangel c8eecb53a4 [doc] Fix broken links for "Architecture Decisions"
Fixes #4163
2022-10-16 11:37:57 +02:00
Andreas Dangel 33ede7fbc2 [java] Improve TestClassWithoutTestCases
- Added new property "testClassPatterns" to property detect empty test classes
- Added support for different JUnit5 annotations (like ParameterizedTest)
- Added support for TestNG

- Fixes #929
- Fixes #2636
2022-10-15 18:50:36 +02:00
Juan Martín Sotuyo Dodero 75666d9c2d Rename command to check 2022-10-15 02:07:24 -03:00
Juan Martín Sotuyo Dodero aaa392b984 Improve release notes 2022-10-15 02:07:24 -03:00
Juan Martín Sotuyo Dodero 08e63b670e Fix JavaFX link 2022-10-15 02:07:24 -03:00
Juan Martín Sotuyo Dodero 1f43af7d83 Change pmd run to pmd check with no aliases 2022-10-15 02:07:24 -03:00
Juan Martín Sotuyo Dodero c506444043 Use bleeding edge pmdtester 2022-10-15 02:07:22 -03:00
Juan Martín Sotuyo Dodero 1bcc39d6a3 PMDConfiguration to use stricter types
- No more raw Strings going around
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero cedafa9e0d Allow positional parameters as equivalent to -d 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 805864dc02 Improve cli example 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 48c584c2cf Review feedback 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 65476303b3 Explicit default behavior 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 80f784edc7 Revamp all CLI examples 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 5ede9ee45f Create an include for command snippets
- This should improve how we give examples for different platforms throughout the docs.
 - I also improved the doc around adding PMD to PATH
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo DoderoandClément Fournier efc4144e2c Improve changelog
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo DoderoandClément Fournier 333b9c8d6d Typo
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo DoderoandClément Fournier db480352b5 Improve wording
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo DoderoandClément Fournier a4d029f2af Remove ./ from commands
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero e7c8d5e7d6 Ensure bash completion is part of the bin dist 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero e590f40d5a Ensure Windows can also find javafx.properties 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero c093ce73ac Cleanup module dependencies 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 0de5b8fb03 Fix checkstyle warnings 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 2b3d517581 Fix PMD warnings 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 0b7a4274b8 Ensure the new designer can find the properties
- JavaFX 17 at least has the properties file laying bare
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 3b42cf6ea3 Use system-dependent line separator 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 9567a439fb Fix integration tests for Windows 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero caa3295511 No need to have a default --use-version 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 4568c94f9e Use findstr instead of find 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero fdf76f22a3 Remove verbose flag for IT 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 50ae4ddeac Try to forcefully disable Picocli ANSI
- This is a blind test to see if this is the cause for Windows' failing the build
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero f1cdacf200 Unwire file separator 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero e093f19577 Unwire absolute paths 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero ee652286c6 Update test to latest changes 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 6c87c704c7 Adapt to latest changes from upstream 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero 90fba7a19c Add debug / verbose docs for CPD 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo DoderoandAndreas Dangel 20e441f87d Improve unified pmd.bat
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo DoderoandAndreas Dangel b7533169bf Update pmd-dist/src/main/resources/scripts/pmd.bat
Add all needed `--add-opens` for javaFX

Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero 51c0891e49 Update docs 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero 90e5c52295 Use only lang-version pairs
- no more default/ latest versions
 - this assumes all versions have names, which is till pending, but agreed on
2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero cd7e41a9cb Remove name normalization
- Terse names are becoming more strictly defined soon
2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo DoderoandClément Fournier 4beef145f6 Update docs/pages/pmd/userdocs/cli_reference.md
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero 366769cc81 Support languiage aliases in PMD CLI 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero ecbd2d51f9 Remove all pending references to the old scripts 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero a2ce1334fb Update docs 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero 411a0034d6 Update CLI docs 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero 4a6f838d67 Cleanup code 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero e567de3872 Update pmd bin IT 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero 24bbf538b7 Fix NPE 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero 5ed8fc81e8 Unify all bat files under a single one 2022-10-15 02:06:51 -03:00
Juan Martín Sotuyo Dodero e49e5d2ddb Update run.sh
- This is now plainly "pmd" and can drop lots of logic that is now part of the standard CLI
2022-10-15 02:06:03 -03:00
Juan Martín Sotuyo Dodero 924ca85ff5 Add ast-dump CLI test 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero a4a5affe83 Include everything in pmd-dist
- Include both the pmd-cli module and the completion script
2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero f60fd97ee4 Bring on pmd-cli into pmd-dist 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 3a9cf20323 Fix build 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 7824595603 Logging cleanups 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero afde91247f Make --no-progress negatable 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 7b416bc12d Clean up todos 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 6afe892073 Refactor Io.SYSTEM to avoid sticking
- This will help unit testing, as we get references to the streams when the
   process starts vs when the class loads, so different tests can tap / mock STD*
   without forking for each test.
2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero e898993ccf Deprecate the TreeExportCli
- This is an experimental class, so we may as well remove it, but will confer with other maintainers first
2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 78d046c7d1 Make fail on violation negatable
- Instead of doing `--fail-on-violation false` we now do `--no-fail-on-violation`
    or `--fail-on-violation` to be explicit about the default
2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 3230038bc2 Fix broken build 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 939369ecd7 Add missing license 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 029602abac Extract CpdLanguageTypeSupport 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 0641a9c316 Fix help text newlines 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero 3689456ebc Implement TreeExportCommand 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero f66ccd4bfd Rework TreeExportCli
- Extract a TreeExportConfiguration object
 - Move actual logic to a TreeExporter
 - TreeExportCli remains as a JCommander based CLI (to be deprecated),
    and usage from pmd-cli is now easier to achieeve
2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero ae1d00d513 Extract converter / iterable pairs
- This will allow better reuse / have consistency by keeping completion
    candidates and convertion tied together
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 4d083c1d2b Improve on help message for --ignore-list 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 90138b00c6 Extract encoding to a mixin 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 01781a3fa8 Rename CliMessages
- It was never used exclusively for CLI
 - It no longer references the CLI command
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 85e45dcfef Cleanup code 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero f250701c73 Add completion candidates for PMD report properties
- The help is still the only source of truth for which ones are valid
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 40f43954c5 Deprecate BaseCLITest from pmd-test
- Only the pmd-cli module should deal with the CLI anymore
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 4a0c735506 Add CpdCommandTest and refactor PmdCommandTest 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 301cd0ef34 Even better tests 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 5d7e2473f4 Add cpd CLI test 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 8e04737715 Add --use-version tests 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 15a654e2a6 Finalize unit test of PmdCommand 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 5651d772d8 Improve compatibility with PMD 6 CLI 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero a1359755a8 Parse test for PmdCommand 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 57701e679c Make tests successful 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 52d2616181 Add basic CLI test 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero ccf6adfcd6 Remove fixed TODO 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero af40487933 Add missing --no-progress flag 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 6d35c9189e Property descriptions should not include defaults
- The default is properly modeled and is up to the consumer to
    choose where / when to render it fopr consistency
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero a0dcf384bf Add report properties to help message 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 7da4668532 Fix message format 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 4ae3e993b9 Add CPD GUI command 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 1d8c8cbe17 Add Checkstyle suppressions 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 2c6cd6413c Checkstyle fixes 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero ad3aea173f PMD fixes 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero ae7ce6b1cb Remove usage of CloseShieldWriter
- commons-io was a test dependency, not worth including it for a single use of a single class
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 774f58f657 Make CPD easier to invoke
- We should probably introduce a CpdAnalysis and get rid of CPD altogether…
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 7f98592467 Accomodate DesignerSubcommand to pmd-ui 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero aceec768bc Use proper import, no shaded classes 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero f2a2eee71b Update DesignerCommand using enhanced pmd-ui
- this depends on https://github.com/pmd/pmd-designer/pull/52 being merged
    into master and then master merged onto compat-7.0
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 83418404c5 Draft DesignerCommand to identify gaps 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero df4f1615f8 Unify several flags for PMD and CPD
- start bringing together the way to invoke both processes
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 9b5a9dae8e Initial CpdCommand
- lots of opportunities still to shape up the code and unify the way we invoke PMD / CPD
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 9be4311a41 Deprecate CPD / PMD
- The entry points are no more, as CLI now have a unified interface
 - Everyone should use PmdAnalysis anyway. For CPD, I've plans of creating a CpdAnalysis
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero ddfa945226 Configure source encoding 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 844ae1fd7a More class name changes 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 924fa96c15 Fix javadoc 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 40803d2317 Implement PMD Analysis
- Do cleanup and actually implement the PMD Analysis logic
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero 912db372e8 Setup SLF4J for all subcommands
- Have the debug flag shared between all commands and get SLF4J init
2022-10-15 02:04:10 -03:00
Juan Martín Sotuyo Dodero 7006d7fc3d Move cache nagging into PmdAnalysis
- It was already done as part of the execution, so have it self-contained
 - The method runAndReturnStats is open up as public
2022-10-15 02:04:10 -03:00
Juan Martín Sotuyo Dodero adb08a9838 Rename classes 2022-10-15 02:04:10 -03:00
Juan Martín Sotuyo Dodero 34729c28e5 Properly handle languages and versions
- Add the candidates and converters for both objects
 - Properly validate the values and pass it to the configuration
 - `--use-version` can now be repeated to set multiple language versions
 - Revise arities of other options to avoid errors
2022-10-15 02:04:10 -03:00
Juan Martín Sotuyo Dodero 172db11114 Update pom autocomplete step 2022-10-15 02:04:09 -03:00
Juan Martín Sotuyo Dodero ef6c07c9fa Move everything to a separate pmd-cli module
- Have the CLI separate from the standard analysis engine.
 - This allows for easier integration to other tools (ie: IDEs and build toolchains)
 - This allows a self-contained way to setup the commands and have autocomplete scripts include all languages
 - This easily allows to include the pmd designer to expose under a standard command
2022-10-15 02:02:17 -03:00
Juan Martín Sotuyo Dodero f1861b8a92 Remove the mixin in favor of the abstract subcommand 2022-10-15 02:02:17 -03:00
Juan Martín Sotuyo Dodero cfe307ef7b Update autocomplete generation 2022-10-15 02:02:17 -03:00
Juan Martín Sotuyo Dodero ab035fa60d Create an abstract PMD subcommand 2022-10-15 02:02:17 -03:00
Juan Martín Sotuyo Dodero 5808194727 Rename base command to root command 2022-10-15 02:02:17 -03:00
Juan Martín Sotuyo Dodero 711e2c34dd Remove deprecated options 2022-10-15 02:02:17 -03:00
Juan Martín Sotuyo Dodero 311ca535a8 Cleanups 2022-10-15 02:02:17 -03:00
Juan Martín Sotuyo Dodero 8587fc2a6c Fix whitespace 2022-10-15 02:02:17 -03:00
Juan Martín Sotuyo Dodero 0b032bef85 Initial PoC of Autocomplete 2022-10-15 02:02:14 -03:00
Juan Martín Sotuyo Dodero 2da7c8c46e Initial PicoCli PoC
- Basic setup to test it's usage, but nonfunctional
2022-10-15 02:00:44 -03:00
Juan Martín Sotuyo Dodero e4f5d027b2 Cleanup access to supported Renderer formats 2022-10-15 02:00:44 -03:00
Juan Martín Sotuyo Dodero 9406b7747f Add PicoCli dependency 2022-10-15 02:00:44 -03:00
Juan Martín Sotuyo Dodero 7d0208f6ac Avoid NPEs 2022-10-14 23:56:11 -03:00
Juan Martín Sotuyo Dodero b9737e23b5 Backport to PMD6 changes to accomodate PicoCli in PMD7
- Companion PR for #4059
 - Add deprecations and path the way for the upcoming changes to the CLI in PMD7
2022-10-14 23:36:45 -03:00
Andreas Dangel 96a1ca0a13 [java] Fix UnnecessaryFullyQualifiedName for current package java.lang
Fixes #4139
2022-10-14 19:34:33 +02:00
Andreas Dangel d575586d1e Merge pull request #4150 from tprouvot:feature/addApexUnitShouldHaveRunAs
[apex] New rule ApexUnitTestClassShouldHaveRunAs #4149 #4150
2022-10-14 16:59:09 +02:00
Andreas Dangel 8834af16f6 [doc] Update release notes (#4149, #4150) 2022-10-14 16:58:40 +02:00
Andreas Dangel df2d1b806e [apex] ApexUnitTestClassShouldHaveRunAsRule - remove unnecessary constructor 2022-10-14 16:57:47 +02:00
Andreas Dangel a9f00ecadb [java] AvoidArrayLoops - enhance documentation
Fixes #2692
2022-10-14 14:04:12 +02:00
Andreas Dangel c8649b73e4 [java] AvoidArrayLoops - consider final variables
Fixes #3847
2022-10-14 12:06:29 +02:00
Andreas Dangel 30885b6212 [java] AvoidArrayLoops - ignore multi-dim array assignment 2022-10-14 11:51:57 +02:00
Andreas Dangel d1328b2ba7 [java] AvoidArrayLoops - rework XPath expression
Fixes #1167
2022-10-14 11:41:51 +02:00
Thomas ProuvotandAndreas Dangel a88ad1cd5d Update pmd-core/src/main/resources/rulesets/releases/6510.xml
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-10-14 11:01:01 +02:00
Andreas Dangel 173a41b712 [java] UseArrayListInsteadOfVector - use typeIsExactly 2022-10-14 10:26:18 +02:00
Thomas Prouvot a72f1332d4 Merge branch 'feature/addApexUnitShouldHaveRunAs' of https://github.com/tprouvot/pmd into feature/addApexUnitShouldHaveRunAs 2022-10-14 10:25:13 +02:00
Thomas Prouvot d0d2d2a6f7 Remove unused imports 2022-10-14 10:24:00 +02:00
Thomas ProuvotandAndreas Dangel 150f109db4 Update pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/ApexUnitTestClassShouldHaveRunAsRule.java
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-10-14 10:03:45 +02:00
Thomas ProuvotandAndreas Dangel bac0e6e999 Update pmd-apex/src/main/resources/category/apex/bestpractices.xml
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-10-14 09:52:52 +02:00
Thomas Prouvot 3cd67eabf3 Set default message and priority to the rule 2022-10-14 09:52:04 +02:00
Andreas Dangel 78a49175a5 [java] Use type resolution for UseArrayListInsteadOfVector
Fixes #4148
2022-10-14 09:48:36 +02:00
Thomas Prouvot ef48c7628c Add a test for a normal class 2022-10-14 09:36:53 +02:00
Thomas Prouvot d6f3b3c68e revert changes on deprecvated rule 2022-10-14 09:26:47 +02:00
Thomas ProuvotandAndreas Dangel 0da5cc9937 Update pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/ApexUnitTestClassShouldHaveRunAsRule.java
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-10-14 09:21:34 +02:00
Yasar ShaikhandAndreas Dangel 82e7da5d0e Added issue number in the Description for the AvoidArrayLoops
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-10-14 12:50:36 +05:30
Andreas Dangel 0170cc3073 [test-schema] Migrate test to JUnit5 2022-10-13 17:28:42 +02:00
Andreas Dangel 2d48dabcd0 Remove LocaleRule / DefaultLocale 2022-10-13 17:24:12 +02:00
Andreas Dangel 88b8209958 Migrate RuleSetFactoryTests to JUnit 5 2022-10-13 17:18:13 +02:00
Andreas Dangel 00924bea75 Migrate LanguageVersionTests to JUnit5
Also move LanguageVersionTests into their language packages
and add missing tests
2022-10-13 17:17:59 +02:00
Andreas Dangel 46e2007ce4 [java] StringToString - fix false positive 2022-10-13 15:08:57 +02:00
Andreas Dangel 896c7c6b78 [java] StringToString - update javadoc 2022-10-13 14:43:42 +02:00
Andreas Dangel 39c26d97f9 [doc] Update release notes (#2080, #3437, #3681, #3977) 2022-10-13 13:20:49 +02:00
Andreas Dangel 1f26319325 [java] Support class literal in type resolution
Fixes #3437
2022-10-13 13:17:53 +02:00
Andreas Dangel 5d08ecd5be [java] StringToString - use type resolution for field access
Fixes #2080
2022-10-13 12:25:34 +02:00
Andreas Dangel b26e0bda8c [java] StringToString - consider literals
Fixes #3681
2022-10-13 11:53:28 +02:00
Andreas Dangel 58b3f02a16 [java] StringToString - use type resolution 2022-10-13 11:46:30 +02:00
Andreas Dangel 3ee4926f64 [java] StringToString false-positive with local method name confusion
Fixes #3977
2022-10-13 11:08:42 +02:00
Thomas Prouvot a48b56b5c3 Add new apex rule ApexUnitTestClassShouldHaveRunAs 2022-10-11 16:47:16 +02:00
Andreas Dangel fd594f682c [doc] Update "Articles about PMD" 2022-10-10 18:13:19 +02:00
Andreas Dangel 4a7ba3e6c0 [doc] Update contributors, mention founders 2022-10-10 18:12:47 +02:00
Andreas Dangel 2954b486cf Add @tcopeland as a contributor 2022-10-10 18:00:58 +02:00
Thomas Prouvot c0f88d004d Merge branch 'pmd:master' into master 2022-10-10 16:32:38 +02:00
Yasar Shaikh 204bbacbdc [java] added unit test of do-while for AvoidArrayLoops 2022-10-09 22:23:37 +05:30
Yasar Shaikh 14b4a805d0 Added support for Do-While for "AvoidArrayLoops" 2022-10-07 20:11:39 +05:30
Juan Martín Sotuyo Dodero 5f2961f78f Merge pull request #4144 from adangel/doc-supported-languages
[doc] Update docs to reflect supported languages
2022-10-06 13:04:34 -03:00
Juan Martín Sotuyo Dodero e22a77699e Merge branch 'master' into doc-supported-languages 2022-10-06 13:03:52 -03:00
Juan Martín Sotuyo DoderoandAndreas Dangel 1063d6c224 Update docs/pages/release_notes.md
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-10-06 13:02:43 -03:00
Andreas Dangel d09aa48064 Merge pull request #4142 from LynnBroe:master
[java] fix #4141 Update UncommentedEmptyConstructor - ignore @Autowired annotations #4142
2022-10-06 17:46:49 +02:00
Andreas Dangel 38a0950fb9 [doc] Update release notes (#4141, #4142) 2022-10-06 17:46:13 +02:00
Andreas Dangel 78b69fdb96 Update @LynnBroe as a contributor 2022-10-06 17:45:38 +02:00
Andreas Dangel 17b8661dab [doc] Use java highlighting in issue templates by default 2022-10-06 17:41:39 +02:00
Andreas Dangel 9c182974e7 [doc] Fix ruledoc for POM: ProjectVersionAsDependencyVersion 2022-10-06 17:40:35 +02:00
Andreas Dangel 6faf6ed223 [doc] Update docs to reflect supported languages (#4143)
Refs #4059
2022-10-06 16:25:20 +02:00
Andreas Dangel d1fa989b3c Bump snakeyaml from 1.32 to 1.33 2022-10-06 10:11:33 +02:00
Andreas Dangel f9ccab3d7b Bump protobuf-java from 3.16.1 to 3.16.3
Fixes https://github.com/pmd/pmd/security/dependabot/29
Fixes https://github.com/advisories/GHSA-h4h5-3hr4-j3g2
Fixes CVE-2022-3171
2022-10-06 10:03:25 +02:00
LynnBroe a1bcad2db2 fix #4141 2022-10-05 13:54:41 +08:00
Andreas Dangel 11763cdc60 [doc] Show PMD 7 release notes 2022-10-04 19:32:29 +02:00
Andreas Dangel d2c4a0e7a2 Merge pull request #4089 from oowekyala:pmd7-ant-module
[ant] Move ant integration to a new pmd-ant module #4089
2022-10-04 19:11:14 +02:00
Andreas Dangel 98a46866a5 [doc] Update release notes (#4080, #4089) 2022-10-04 19:10:23 +02:00
Andreas Dangel c77a0f3219 [doc] Update CPD doc 2022-10-04 19:09:58 +02:00
Andreas Dangel 8688838190 Migrate leftover tests to JUnit5 2022-10-03 16:30:03 +02:00
Andreas Dangel 9cbdd4b588 [java] Migrate tests to JUnit5 2022-10-03 16:30:03 +02:00
Andreas Dangel e7a72df12e [java] Migrate tests to JUnit5 2022-10-03 16:30:02 +02:00
Andreas Dangel a934c5f12d [xml] Migrate tests to JUnit5 2022-10-03 16:30:02 +02:00
Andreas Dangel 5005ae56cb [velocity] Migrate tests to JUnit5 2022-10-03 16:30:02 +02:00
Andreas Dangel 008fe948c6 [visualforce] Migrate tests to JUnit5 2022-10-03 16:30:02 +02:00
Andreas Dangel 2d459d9813 [swift] Migrate tests to JUnit5 2022-10-03 16:30:01 +02:00
Andreas Dangel b260cd011b [scala] Migrate tests to JUnit5 2022-10-03 16:30:01 +02:00
Andreas Dangel bf8c41b06b [ruby] Migrate tests to JUnit5 2022-10-03 16:30:01 +02:00
Andreas Dangel f454e19ca7 [python] Migrate tests to JUnit5 2022-10-03 16:30:00 +02:00
Andreas Dangel a4422cf2e6 Merge branch 'pmd/7.0.x' into pmd7-junit5-part2 2022-10-03 09:08:59 +02:00
Andreas Dangel 327164cc3c Fix build 2022-09-30 16:28:47 +02:00
Andreas Dangel cfd2a02294 Merge branch 'master' into pmd/7.0.x 2022-09-30 16:15:52 +02:00
Andreas Dangel 905f1432f4 Bump pmd from 6.49.0 to 6.50.0 2022-09-30 16:08:44 +02:00
Andreas Dangel d69a292d16 [ci] Escape ampersand to avoid pattern substitution replacement [skip ci]
This is a new feature of bash 5.2...
See also shopt patsub_replacement
2022-09-30 16:04:15 +02:00
Andreas Dangel a9647edb63 [doc] Fix old release notes [skip ci] 2022-09-30 15:44:10 +02:00
Andreas Dangel 090af8c3a5 Prepare next development version [skip ci] 2022-09-30 15:40:54 +02:00
Andreas Dangel 13d9a9457f [maven-release-plugin] prepare for next development iteration 2022-09-30 15:39:14 +02:00
Andreas Dangel 37f6d8254c [maven-release-plugin] prepare release pmd_releases/6.50.0 2022-09-30 15:39:08 +02:00
Andreas Dangel 3f08ad70fe Prepare pmd release 6.50.0 2022-09-30 15:28:09 +02:00
Andreas Dangel f9f1e6c55e Merge branch 'master' into pmd/7.0.x 2022-09-30 15:08:46 +02:00
Andreas Dangel 62e2c910d9 [doc] Update contributors
* Add @koalalam as a contributor
* Update @OlegAndreych as a contributor
* Add @garydgregory as a contributor
* Add @vanguard-1024 as a contributor
* Update @abyss638 as a contributor
* Update @dykov as a contributor
* Add @ewantempero as a contributor
* Update @JerritEic as a contributor
* Add @cbfiddle as a contributor
* Add @MartGit as a contributor
* Update @gredler as a contributor
* Add @Alexx-G as a contributor
* Update @jborgers as a contributor
2022-09-30 15:06:21 +02:00
Andreas Dangel b7966798fa [java] Fix tests for ConstructorCallsOverridableMethodRule 2022-09-30 13:23:44 +02:00
Andreas Dangel f8e298dc22 [java] UnnecessaryFullyQualifiedName - add test for #4133
Fixes #4133
2022-09-30 12:49:01 +02:00
Andreas Dangel ad7ac9be5f [lua] Fix compile errors 2022-09-30 12:40:24 +02:00
Andreas Dangel c0dff0d75a Merge branch 'master' into pmd/7.0.x 2022-09-30 12:17:45 +02:00
Andreas Dangel be871350c0 Merge pull request #4072 from adangel:doc-adr
[doc] Add architecture decision records #4072
2022-09-30 11:34:29 +02:00
Andreas Dangel 398d05c3d3 [doc] Update release notes (#4072) 2022-09-30 11:33:09 +02:00
Andreas Dangel 146f86f552 Merge pull request #4138 from adangel:scala-upgrades
[scala] Upgrade scala-library to 2.12.7 / 2.13.9 and scalameta to 4.6.0 #4138
2022-09-30 11:31:29 +02:00
Andreas Dangel 9e5efcb09d [doc] Update release notes (#4138) 2022-09-30 11:30:40 +02:00
Andreas Dangel 545c4cd284 Merge pull request #4135 from adangel:issue-3431
[java] Add java-regression-tests for regression testing #4135
2022-09-30 11:29:26 +02:00
Andreas Dangel a46bea27f0 Merge pull request #4130 from sashashura:patch-1
[ci] GitHub Workflows security hardening #4130
2022-09-30 11:27:31 +02:00
Andreas Dangel 8fa94cf2f5 [doc] Update release notes (#4130) 2022-09-30 11:25:21 +02:00
Andreas Dangel c75a4795d3 Add @sashashura as a contributor 2022-09-30 11:25:01 +02:00
Andreas Dangel 7d58fc8551 Merge pull request #4101 from adangel:issue-4099-constructorcallsoverridable
[java] ConstructorCallsOverridableMethod should consider method calls… #4101
2022-09-30 11:22:57 +02:00
Andreas Dangel 94410916c2 Merge pull request #4100 from LynnBroe:master
[java] Update UnusedPrivateFieldRule - ignore any annotations #4100
2022-09-30 11:21:18 +02:00
Andreas Dangel 2105bde614 [doc] Update release notes (#4100, #4033, #4037) 2022-09-30 11:20:51 +02:00
Andreas Dangel 1d6aeb0a95 Add @LynnBroe as a contributor 2022-09-30 11:20:23 +02:00
Andreas Dangel 9056204317 [ci] Execute danger and dogfood only for pull requests in our own repository 2022-09-30 11:15:26 +02:00
Andreas Dangel d7de6f59d2 [doc] Accept ADR-1 and ADR-2 2022-09-30 11:00:06 +02:00
Andreas Dangel 81a8ba0c87 [ci] Add permission contents:write for build job 2022-09-30 10:48:42 +02:00
Andreas Dangel 16bb510cca Fix release notes 2022-09-30 10:32:22 +02:00
Andreas Dangel 4fc12f031c [java] Fix rule tests with dysfunctional rule configurations 2022-09-30 10:21:25 +02:00
Andreas Dangel 1cc0fbb047 [java] UnusedPrivateFieldRule - remove ignoredAnnotations from rule tests 2022-09-30 10:03:11 +02:00
Andreas Dangel e712b89fa0 [java] UnusedPrivateFieldRule - improve rule doc 2022-09-30 10:00:23 +02:00
Andreas Dangel 45f3f6e5bb [scala] Bump scalameta from 4.2.0 to 4.6.0 2022-09-30 09:24:22 +02:00
Andreas Dangel 167dd635ed [scala] Bump scala-library from 2.12.10 to 2.12.17 2022-09-30 09:23:54 +02:00
Andreas Dangel 2f2b6a2476 [scala] Bump scala-library from 2.13.3 to 2.13.9
Fixes https://github.com/pmd/pmd/security/dependabot/28
Fixes https://github.com/advisories/GHSA-8qv5-68g4-248j
Fixes CVE-2022-36944
2022-09-30 09:23:24 +02:00
Andreas Dangel 306db99400 [java] UnusedPrivateField - ignore any annotations
Deprecate "ignoreAnnotations" property
2022-09-29 19:12:04 +02:00
Andreas Dangel a66cffa55d Merge branch 'master' into pr-4100 2022-09-29 18:31:42 +02:00
Andreas Dangel 9c215e9722 [doc] Update release notes 2022-09-29 16:41:59 +02:00
Andreas Dangel 8cddfc73ad Merge pull request #4137 from lfalcantar:java-3858-junit5-comment-default-access-modifier
[java] Fixes 3859: Exclude junit5 test methods from the commentDefaultAccessModifierRule #4137
2022-09-29 16:32:58 +02:00
Andreas Dangel 38955b5c8d Add @lfalcantar as a contributor 2022-09-29 16:28:43 +02:00
Andreas Dangel ec97933e99 Remove old comment 2022-09-29 16:28:09 +02:00
Andreas Dangel b916113c9e Merge pull request #4134 from adangel:issue-4090
[java] FinalFieldCouldBeStatic - ignore synchronized statements in no… #4134
2022-09-29 16:26:04 +02:00
Andreas Dangel 5a08ad736a Merge pull request #4128 from OlegAndreych:Fix_#4103
[java] Fix False-positive UnnecessaryFullyQualifiedName when nested and non-nest… #4103 #4128
2022-09-29 16:24:15 +02:00
Andreas Dangel 94d343e63b [doc] Update release notes (#4085, #4128) 2022-09-29 16:21:32 +02:00
Andreas Dangel 491e8bec6c Add @OlegAndreych as a contributor 2022-09-29 16:21:02 +02:00
Andreas Dangel def6449d01 Merge pull request #4124 from pzygielo:typos
[doc] Fix typos in Java rule docs #4124
2022-09-29 16:16:09 +02:00
Andreas Dangel cb85a01a88 [doc] Update release notes (#4124) 2022-09-29 16:13:41 +02:00
Andreas Dangel 00201ae9f7 Update @pzygielo as a contributor 2022-09-29 16:13:07 +02:00
Andreas Dangel 3750f6f652 Merge pull request #4119 from adangel:fix-java-version-script
[cli] Fix java version in run.sh script #4119
2022-09-29 16:10:56 +02:00
Andreas Dangel 8d7a6503a7 Merge pull request #4109 from adangel:doc-3rd-party-rulesets
[doc] Add page for 3rd party rulesets #4109
2022-09-29 16:08:58 +02:00
Andreas Dangel fe1222abfe [doc] Update release notes (#4109) 2022-09-29 16:08:08 +02:00
Andreas Dangel 560a9a0781 [doc] Update release notes 2022-09-29 16:05:43 +02:00
Andreas Dangel f72a049924 Add @osiegmar as a contributor 2022-09-29 16:03:11 +02:00
Andreas Dangel 792fe44d0b Fixups from review (#4128) 2022-09-29 15:54:50 +02:00
Andreas Dangel defb0cd47c [doc] Update release notes (#1718, #2348) 2022-09-29 15:42:05 +02:00
Andreas Dangel dbe2881d6d [doc] CommentDefaultAccessModifier - update rule description 2022-09-29 15:13:55 +02:00
Andreas Dangel c9dfbffb66 [doc] Update release notes (#3859, #4137) 2022-09-29 15:06:20 +02:00
Andreas Dangel 3ba63285ac [java] CommentDefaultAccessModifier - configure JUnit5 annotations to be ignored 2022-09-29 15:04:35 +02:00
Andreas Dangel d21a562e90 [java] ConstructorCallsOverridableMethod - fix message for call chains
First method in the chain was missing
2022-09-29 14:19:51 +02:00
Andreas Dangel 5840afe39a [java] ConstructorCallsOverridableMethod - improve message for call chains 2022-09-29 12:21:56 +02:00
Andreas Dangel d94a943911 [java] ConstructorCallsOverridableMethod - fix false negatives
- Identify method calls of generic methods
2022-09-29 11:15:02 +02:00
Luis Alcantar 58c9f361d3 [java] issue#3859: Exclude junit5 test methods from the commentDefaultAccessModifierRule
There was a conflict between the CommentDefaultAccessModifier and the JUnit5TestShouldBePackagePrivate rule. while the JUnit5TestShouldBePackagePrivate rule passed, the CommentDefaultAccessModifier complained about the lack of a comment on the method encapsulation generating a false alert.

example "@org.junit.jupiter.api.Test void MissingCommentMethod {}", missing " /* default */" but not required in junit5.

The changes will exclude methods with junit5 @Test or @ParameterizedTest annotation for the commentDefaultAccessModifierRule.
2022-09-28 12:02:16 -07:00
Andreas Dangel b59ceb6c60 [java] ConstructorCallsOverridableMethod - fix false negatives
- Use type of the method call result
- Do not consider super method calls,
  but this references
2022-09-27 20:55:25 +02:00
Andreas Dangel adec817908 Merge branch 'master' into issue-4099-constructorcallsoverridable 2022-09-27 19:49:14 +02:00
Andreas Dangel 1ea82f1ee6 Fix git connection for java-regression-tests 2022-09-27 19:38:25 +02:00
Andreas Dangel d30edd618e Change something in pmd-core to let the regression tester run 2022-09-26 20:45:49 +02:00
Andreas Dangel dd82e5e19f Add java-regression-tests for regression testing
Fixes #3431
2022-09-26 19:47:05 +02:00
Andreas Dangel a44c328732 [java] FinalFieldCouldBeStatic - ignore synchronized statements in non-static methods
Fixes #4090
2022-09-26 18:39:49 +02:00
Andreas Dangel 0dcff72455 Update gems
Fixes https://github.com/pmd/pmd/security/dependabot/26
Fixes https://github.com/advisories/GHSA-4qw4-jpp4-8gvp
2022-09-24 17:52:56 +02:00
Andreas Dangel b56e697b28 Bump org.yaml:snakeyaml from 1.31 to 1.32
Fixes https://github.com/pmd/pmd/security/dependabot/25
Fixes https://github.com/advisories/GHSA-9w3m-gqgf-c4p9
Fixes CVE-2022-38752
2022-09-24 17:50:55 +02:00
Andreas Dangel 90e38ecab1 Merge pull request #4131 from Suvashri:patch-1
[doc] TooFewBranchesForASwitchStatement - Use if-else instead of if-then #4131
2022-09-24 17:47:23 +02:00
Andreas Dangel d6b5f1cf52 Add @Suvashri as a contributor 2022-09-24 17:46:14 +02:00
Andreas Dangel f23f5c2f2b [doc] Update release notes (#4131) 2022-09-24 17:45:48 +02:00
Andreas Dangel 993c5f809a Update pmd-java/src/main/resources/category/java/performance.xml 2022-09-24 17:35:55 +02:00
Andreas Dangel ea2f4fb649 Merge pull request #4066 from matthargett:lua-types
[lua] Support Luau, a gradually typed language based on Lua #4066
2022-09-24 17:30:32 +02:00
Andreas Dangel 4d630031c4 Add missing test files 2022-09-24 17:29:00 +02:00
Andreas Dangel 746fcbf086 [lua] Fixups from #4066 2022-09-24 17:18:32 +02:00
Andreas Dangel dcd8ff0ac0 [lua] Fix parsing of short/long comments 2022-09-24 17:13:29 +02:00
Clément Fournier b2c84fb9d8 Merge branch '7.0.x' into pmd7-language-lifecycle 2022-09-21 23:04:12 +02:00
Suvashri 9d7c37cef7 Update performance.xml 2022-09-21 15:28:51 +05:30
Alex 4966e99082 build: harden git-repo-sync.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-09-19 21:10:13 +02:00
Alex 600561e44c build: harden build.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-09-19 21:02:02 +02:00
mohan-chinnappan-n e91427bed0 pmd report: added exports and summary table 2022-09-18 20:04:43 -04:00
Oleg Andreych af30f4cef9 False-positive UnnecessaryFullyQualifiedName when nested and non-nested classes with the same name and in the same package are used together #4085
* Regression fix;
2022-09-18 15:29:50 +05:00
Oleg Andreych 7f7f8f7b6a False-positive UnnecessaryFullyQualifiedName when nested and non-nested classes with the same name and in the same package are used together #4085 2022-09-17 11:07:12 +05:00
Matt Hargett 05c30a1053 Update documentation and changelog 2022-09-13 22:52:14 -07:00
Matt Hargett f7a5f9cad9 fix incorrect comments 2022-09-13 22:17:43 -07:00
Matt Hargett 936cbafd36 remove unused param 2022-09-13 21:58:02 -07:00
Matt Hargett 6b1658116f Merge branch 'master' of github.com:pmd/pmd into lua-types 2022-09-12 17:11:24 -07:00
mohan-chinnappan-n a8a4f1c19e CLI xslt line doc line added 2022-09-12 19:13:39 -04:00
mohan-chinnappan-n 2872a76ad5 pmd-report-v2.xslt cleanup 2022-09-12 18:50:22 -04:00
mohan-chinnappan-n 7598d43bbf v2 pmd-report xslt added 2022-09-12 18:21:17 -04:00
Piotrek Żygieło a3ea6be9ca Fix it's -> its 2022-09-12 20:29:00 +02:00
Piotrek Żygieło f4a0dff0c9 Add missing 'to' and agree verb with subject 2022-09-12 20:27:27 +02:00
Piotrek Żygieło 57138dc1c7 Fix punctuation/use full stop in sentence 2022-09-12 20:27:13 +02:00
Piotrek Żygieło 0962a33e14 Fix typo 2022-09-12 20:27:12 +02:00
Andreas Dangel 4ec6a1674f Fix compile errors 2022-09-12 19:53:41 +02:00
Andreas Dangel bc7a45699f Merge branch 'pmd/7.0.x' into pmd7-junit5-part2 2022-09-12 19:34:11 +02:00
Andreas Dangel f6176f37bc Merge pull request #4068 from oowekyala:pmd7-token-kinds-internal
[javacc] Make token constants file internal API #4068
2022-09-12 18:45:34 +02:00
Clément Fournier 99e03114fc checkstyle 2022-09-11 23:50:46 +02:00
Clément Fournier 37dae326a1 Doc 2022-09-11 17:28:53 +02:00
Clément Fournier a10a73c42a Move nspmd.processor package to nspmd.lang.impl 2022-09-11 17:25:25 +02:00
Clément Fournier 11274d5651 Doc 2022-09-11 17:21:01 +02:00
Clément Fournier cf6c947577 try to disable logs in tests 2022-09-11 16:39:36 +02:00
Clément Fournier 1187a9a977 Merge branch '7.0.x' into pmd7-language-lifecycle 2022-09-11 13:37:28 +02:00
Andreas Dangel cb9a660d23 Merge pull request #4116 from mohan-chinnappan-n:master
[core] Fix missing --file arg in TreeExport CLI example #4116
2022-09-11 11:10:38 +02:00
Andreas Dangel 91d8930e91 [doc] Update release notes (#4116) 2022-09-11 11:09:46 +02:00
Andreas Dangel dba3a76312 Add @mohan-chinnappan-n as a contributor 2022-09-11 11:09:29 +02:00
Clément Fournier 072a932f27 Merge branch '7.0.x' into pmd7-token-kinds-internal 2022-09-11 01:44:39 +02:00
Andreas Dangel d2d3a72c9a Merge pull request #4049 from oowekyala:pmd7-lang-registry-non-static
[core] Make LanguageRegistry not static #4049

Fixes #3918
2022-09-10 20:26:50 +02:00
Andreas Dangel 8cc3e47ce4 Fix compile errors 2022-09-10 20:17:40 +02:00
Andreas Dangel 8387cd6409 Merge branch 'pmd/7.0.x' into pr-4049 2022-09-10 20:08:30 +02:00
Andreas Dangel 2072c8e08b Fix javadoc 2022-09-10 20:07:33 +02:00
Andreas Dangel ba262675af Bump org.yaml:snakeyaml from 1.30 to 1.31
Fixes https://github.com/advisories/GHSA-3mc7-4q67-w48m
Fixes https://github.com/pmd/pmd/security/dependabot/24
Fixes CVE-2022-25857
2022-09-10 17:14:59 +02:00
Andreas Dangel 940252bafc Bump checkstyle from 9.3 to 10.3.3 2022-09-10 16:55:03 +02:00
Andreas Dangel 1510010442 Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 2022-09-10 16:54:52 +02:00
Andreas Dangel 9a46adf8a9 Bump maven-pmd-plugin from 3.18.0 to 3.19.0 2022-09-10 16:54:24 +02:00
Andreas Dangel 48269572eb Use the same jversion convention in designer.bat
java 1.8.0: 80
java 9.0: 90
java 17.0: 170
2022-09-10 15:41:58 +02:00
Andreas Dangel 0b6a9ce0a7 Add manual test script 2022-09-10 10:46:04 +02:00
Andreas Dangel 01ea52f90c [cli] Fix java version detection in run.sh
Fixes #4118
2022-09-10 10:34:25 +02:00
Matt Hargett 7d9a84fdde Format to have more consistent style with itself. Most other files appear to have mixed formatting. 2022-09-09 16:51:33 -07:00
Matt Hargett b8b4e513ac Support multi-line 'normal' strings. Support skipping literal sequences. More minor adjustments to make the testing corpus tokenize without errors. 2022-09-09 16:42:18 -07:00
Andreas Dangel eec3959e75 Merge pull request #4044 from oowekyala:text-utils-javacc
[core] Text documents escapes #4044
2022-09-09 16:19:47 +02:00
Andreas Dangel f3dbdb700c Fixups from #4044 2022-09-09 16:18:29 +02:00
mohan-chinnappan-n 9ebabbe82d Merge pull request #3 from mohan-chinnappan-n/mohan-chinnappan-n-patch-1
Update TreeExportCli.java
2022-09-09 04:35:28 -04:00
mohan-chinnappan-n 11b7bda871 Update TreeExportCli.java
missing --file arg in "Example: ast-dump --format xml --language java --file MyFile.java" added
2022-09-09 04:21:56 -04:00
Matt Hargett 7747b75091 Cleanups and minor tweaks for issues found in testing across 500KLOC of open source Lua code. 2022-09-08 12:46:43 -07:00
Matt Hargett 7cf9c6571e add an if-expression twist 2022-09-07 19:37:13 -07:00
Matt Hargett 026015954a Move rules from lexer to parser. Fix some bugs found in manual testing. Add bugs found via manual testing to new lua test file. 2022-09-07 19:29:55 -07:00
Matt Hargett c59ee1d55d Merge branch 'master' of github.com:pmd/pmd into lua-types 2022-09-07 17:00:14 -07:00
Andreas Dangel 898454510d [doc] Update ADRs from PR review comments 2022-09-06 19:28:11 +02:00
Andreas Dangel 0f99ef0c3c [html] Bump jsoup from 1.14.3 to 1.15.3
Fixes https://github.com/pmd/pmd/security/dependabot/23
CVE-2022-36033
https://github.com/advisories/GHSA-gp7f-rwcx-9369
2022-09-06 18:33:26 +02:00
LynnBroe ba0f2a2bfd Update UnusedPrivateField.xml 2022-09-05 21:16:13 +08:00
Lynn bd0a2e3258 Merge branch 'pmd:master' into master 2022-09-05 15:28:54 +08:00
Thomas Prouvot 5d4457bc3f Merge branch 'pmd:master' into master 2022-09-02 11:24:51 +02:00
Andreas Dangel ca2ee05562 [doc] Add page for 3rd party rulesets 2022-09-01 10:49:48 +02:00
Andreas Dangel c374d3934f Bump pmd from 6.48.0 to 6.49.0 2022-08-31 19:52:02 +02:00
Andreas Dangel 42523825d5 Merge branch 'master' into pmd/7.0.x 2022-08-31 19:29:32 +02:00
Andreas Dangel 76be7ba669 Prepare next development version [skip ci] 2022-08-31 19:20:51 +02:00
Andreas Dangel 90663d746b [maven-release-plugin] prepare for next development iteration 2022-08-31 19:19:27 +02:00
Andreas Dangel eba30d1897 Cleanup 2022-08-31 18:40:44 +02:00
Andreas Dangel f225ee5ff1 Fix checkstyle, PMD 2022-08-31 18:40:07 +02:00
Andreas Dangel 7abe14fffc Merge branch 'master' into pmd/7.0.x 2022-08-30 22:12:09 +02:00
Thomas Prouvot 986192b2c1 Add new Assert class updates 2022-08-30 09:11:31 +02:00
Andreas Dangel e3145b0e36 Fix PMD - unused local variables 2022-08-24 16:38:04 +02:00
Andreas Dangel f58719f7a6 Fix NPE 2022-08-24 16:33:38 +02:00
Andreas Dangel 5f0cb7d757 Support subtyping 2022-08-24 16:18:09 +02:00
Andreas Dangel a4afb59667 Fix handling of varargs 2022-08-24 15:53:13 +02:00
Andreas Dangel 64675dc600 Fix handling of array types 2022-08-24 15:35:44 +02:00
Andreas Dangel 596f129600 Fix False positive with public method call on new instance 2022-08-24 15:04:43 +02:00
Andreas Dangel bc21be4072 Fix handling of reference types 2022-08-24 12:18:48 +02:00
Andreas Dangel 292ec89833 [java] ConstructorCallsOverridableMethod should consider method calls with var access
Fixes #4099
2022-08-24 11:23:56 +02:00
Lynn 738c19b398 Update UnusedPrivateFieldRule.java
revise SpyBean about unusedprivatefield
2022-08-24 14:41:50 +08:00
Matt Hargett ba77fa19e5 Merge branch 'master' of github.com:pmd/pmd into lua-types 2022-08-14 09:35:20 -07:00
Clément Fournier 41c924545c Remove deprecated attribute usages in test files 2022-08-10 00:17:13 +02:00
Clément Fournier 6920d248b9 ant: cleanup 2022-08-09 22:38:58 +02:00
Clément Fournier c95d970aab doc: update release notes 2022-08-09 21:07:05 +02:00
Clément Fournier 4d59a1f0a1 ant: doc 2022-08-09 21:02:10 +02:00
Clément Fournier ef201d110b ant: add to pmd-dist 2022-08-09 20:57:41 +02:00
Clément Fournier dcc3dd5654 core: share test classes with ant module
This is to avoid duplicating dummy language module and dummy rules
2022-08-09 20:51:07 +02:00
Clément Fournier 537a7e203a ant: create pmd-ant module 2022-08-09 20:35:36 +02:00
Andreas Dangel 68d0b7adcf Merge branch 'master' into pmd/7.0.x 2022-07-30 12:31:43 +02:00
Andreas Dangel afaeeb9684 [core] Fix old ruleset 35.xml 2022-07-30 11:15:56 +02:00
Andreas Dangel b35454a484 [core] Fix CPD logging unit tests 2022-07-30 10:55:13 +02:00
Andreas Dangel 0e7f33f349 Merge branch 'master' into pmd/7.0.x 2022-07-30 10:15:59 +02:00
Andreas Dangel 67cc06e60d [plsql] Migrate tests to Junit5 2022-07-29 18:17:42 +02:00
Andreas Dangel 3da4f37744 [php] Migrate tests to Junit5
well there are no tests...
2022-07-29 17:34:58 +02:00
Andreas Dangel cd9d5b4e58 [perl] Migrate tests to Junit5 2022-07-29 17:32:47 +02:00
Andreas Dangel f667e3990d [objectivec] Migrate tests to Junit5 2022-07-29 17:31:33 +02:00
Andreas Dangel 5f994dfda9 [modelica] Migrate tests to Junit5 2022-07-29 17:29:42 +02:00
Andreas Dangel cded733c9b [matlab] Migrate tests to Junit5 2022-07-29 17:24:46 +02:00
Andreas Dangel 394c0cbf3b [lua] Migrate tests to Junit5 2022-07-29 17:23:17 +02:00
Andreas Dangel 64c8ac9d23 [kotlin] Migrate tests to Junit5 2022-07-29 17:21:34 +02:00
Andreas Dangel f34c182f06 [jsp] Migrate tests to Junit5 2022-07-29 17:04:28 +02:00
Andreas Dangel d6d53ed2dd Merge branch 'pmd/7.0.x' into pmd7-junit5-part2 2022-07-29 16:21:23 +02:00
Andreas Dangel cbbe0e0cb0 [doc] Add "ADR 2 - Policy on the use of Kotlin for development" 2022-07-28 14:29:02 +02:00
Andreas Dangel 68eaf06e1a [doc] Add proposal for architecture decision records 2022-07-28 11:55:51 +02:00
Clément Fournier ff79d2e78f Fix build 2022-07-27 23:08:43 +02:00
Clément Fournier cfae0a13f9 Use exceptions to validate PropertyConstraint 2022-07-27 22:54:55 +02:00
Clément Fournier 9295f817da Fix tests 2022-07-27 22:21:34 +02:00
Clément Fournier 9688cf7d92 Remove errorFor 2022-07-27 22:01:21 +02:00
Clément Fournier 84cba78e64 wip: tear down new property syntax 2022-07-27 21:55:11 +02:00
Clément Fournier 561732b539 [doc] update doc tests 2022-07-27 19:11:40 +02:00
Clément Fournier 19da46d5ce remove regex property list 2022-07-27 18:01:51 +02:00
Clément Fournier b216903668 Merge branch '7.0.x' into port-properties 2022-07-27 17:59:30 +02:00
Clément Fournier df90c48676 fix duplicated log message 2022-07-27 16:19:24 +02:00
Clément Fournier acc4979a85 fix tests 2022-07-27 15:07:49 +02:00
Clément Fournier 815cc2912e Merge branch '7.0.x' into pmd7-language-lifecycle 2022-07-27 14:51:28 +02:00
Clément Fournier e9ecc8aaa7 [java] Remove usage of JavaTokenKinds...
outside of AST and CPD packages
2022-07-27 11:51:20 +02:00
Clément Fournier b045745269 [javacc] Make token constants file internal API 2022-07-27 11:49:14 +02:00
Matt Hargett 3d6fab0782 rename new snapshot artifact to better express intent 2022-07-26 13:29:19 -07:00
Matt Hargett cfb8374611 Capture more syntax scenarios in the regression test, update the snapshot. 2022-07-26 13:25:14 -07:00
Clément Fournier 10698508ae Merge branch 'pr/4057' into 7.0.x 2022-07-26 19:18:30 +02:00
Clément Fournier 131cb3a120 Merge branch '7.0.x' into pr/4057 2022-07-26 18:39:49 +02:00
Clément Fournier 7809dcc228 Merge branch 'pmd7-delete-old-typeres' into 7.0.x 2022-07-26 17:13:29 +02:00
Clément Fournier ceddb93fb5 [java] Cleanup in designer bindings 2022-07-26 16:43:45 +02:00
Clément Fournier 9602343b0b [java] improve test coverage a bit 2022-07-26 16:39:31 +02:00
Clément Fournier 6688165ee3 [java] Delete old typeres 2022-07-26 16:02:05 +02:00
Matt Hargett 8aaa1302cc Support all Luau type extension syntax available in all test corpus sources. Add a regression test for a few of the things that required tweaks. 2022-07-26 00:13:35 -07:00
Matt Hargett 65fef39a4c Initial Lua type grammar 2022-07-25 21:43:54 -07:00
Andreas Dangel 41eb096dbd Merge branch 'master' into pmd/7.0.x 2022-07-25 20:07:11 +02:00
Andreas Dangel a24628f6e1 Fix PMD issues 2022-07-23 20:16:18 +02:00
Andreas Dangel 27de000420 Merge branch 'master' into pmd/7.0.x 2022-07-23 20:01:58 +02:00
Clément Fournier 17040599ef Fix global state in apex module 2022-07-23 12:43:33 +02:00
Clément Fournier 12bf4cf521 Add doc page 2022-07-23 12:38:37 +02:00
Clément Fournier 0781a261a2 style: fix warnings 2022-07-23 01:22:18 +02:00
Clément Fournier 019169d69d make language of parser task more important than the lang property 2022-07-23 00:12:27 +02:00
Andreas Dangel 7ef6198a3b Merge branch 'pmd/7.0.x' into pmd7-junit5-part2 2022-07-22 21:22:45 +02:00
Clément Fournier 2ec6b6c648 Merge branch 'pmd7-lang-registry-non-static' into pmd7-language-lifecycle 2022-07-22 17:39:39 +02:00
Clément Fournier 29d31ec8d2 Disable progress bar in some tests 2022-07-22 17:39:15 +02:00
Clément Fournier 59b417b552 Cleanups and doc 2022-07-22 17:02:24 +02:00
Clément Fournier c562f540c0 Merge branch 'pmd7-lang-registry-non-static' into pmd7-language-lifecycle 2022-07-22 15:53:47 +02:00
Clément Fournier 44d59fd4e3 Merge branch '7.0.x' into pmd7-lang-registry-non-static 2022-07-22 15:53:10 +02:00
Andreas Dangel 2f1462b621 [core] Fix lazy init for allSuppressors in DefaultRuleViolationFactory
Fixes #4035
2022-07-22 12:23:13 +02:00
Andreas Dangel 8bf54b8a68 Merge branch 'master' into pmd/7.0.x 2022-07-21 23:41:40 +02:00
Andreas Dangel 3140cadb80 Fix test 2022-07-21 22:30:44 +02:00
Andreas Dangel b6b58bf302 Merge branch 'master' into pmd/7.0.x 2022-07-21 22:06:34 +02:00
Andreas Dangel 9aa8694c26 Merge branch 'pr-3976' into pmd/7.0.x 2022-07-21 21:58:43 +02:00
Clément Fournier ffd040ee84 more cleanups 2022-07-21 19:13:31 +02:00
Andreas Dangel bcb8b4a2c5 Fix compile error 2022-07-21 17:52:42 +02:00
Andreas Dangel 006d2a9e0e Merge branch 'master' into pmd/7.0.x 2022-07-21 17:48:54 +02:00
Clément Fournier c17513b138 fix more bugs 2022-07-21 16:18:48 +02:00
Clément Fournier 2cb54ff1bc fix pmd-vf
needs a dependency mechanism
to prevent apex from being pruned
2022-07-21 15:13:16 +02:00
Clément Fournier 5c2260bd0f fix more modules 2022-07-21 05:24:33 +02:00
Clément Fournier 8076da056a init rules properly 2022-07-21 04:38:54 +02:00
Clément Fournier 5f0ece0591 cleanup cpdCompat 2022-07-21 04:00:05 +02:00
Clément Fournier ea52a779e4 remove enum based base class 2022-07-21 03:56:42 +02:00
Clément Fournier 94c4acbcc8 finish superseding old base module class 2022-07-21 03:50:10 +02:00
Clément Fournier 3d5c2d1f70 fix some tests 2022-07-21 03:38:25 +02:00
Clément Fournier 1d1e1e9c8b try out enum ids 2022-07-21 02:52:15 +02:00
Clément Fournier 3cecfaf38b convert most lang mods to new base class 2022-07-21 02:10:21 +02:00
Clément Fournier ec081ed2e5 wip 2022-07-21 01:18:02 +02:00
Clément Fournier 0732739280 remove usages of lv::getLvh 2022-07-21 00:59:28 +02:00
Clément Fournier 7c9244d631 make lprocessor available on nodes 2022-07-21 00:25:18 +02:00
Clément Fournier 2952df371e try to adapt tests
we need to remove usages of LanguageVersion::getLanguageVersionHandler
2022-07-20 20:59:40 +02:00
Clément Fournier 10ff8f6f0e Wire in existing langs 2022-07-20 18:18:40 +02:00
Clément Fournier 517fef6f83 Minimal language lifecycle 2022-07-20 16:48:38 +02:00
Clément Fournier be4b0d9bbe binary compatibility measures 2022-07-19 23:26:22 +02:00
Clément Fournier dbe1e5e4bb checkstyle 2022-07-19 17:32:58 +02:00
Clément Fournier 88372c701c fix sorting of languages 2022-07-19 17:29:46 +02:00
Clément Fournier 6aecb174e9 cleanup 2022-07-19 17:10:46 +02:00
Clément Fournier 7f8cbe9f58 Merge branch '7.0.x' into violation-decorators 2022-07-19 16:59:59 +02:00
Clément Fournier 6973ed25db last cleanups 2022-07-19 15:52:30 +02:00
Clément Fournier 849ed7c10c Cleanups 2022-07-19 14:10:55 +02:00
Clément Fournier fb8c19f661 Merge branch '7.0.x' into pmd7-lang-registry-non-static 2022-07-19 12:59:18 +02:00
Clément Fournier e4e76880b9 add testes 2022-07-18 20:40:16 +02:00
Clément Fournier 093d5d36fb Flatten properties package 2022-07-18 15:00:46 +02:00
Clément Fournier a73af66aae throw ConstraintViolatedException 2022-07-18 14:59:47 +02:00
Clément Fournier 29a711335f Reintroduce separate default delimiter
Let's change that later
2022-07-18 14:41:38 +02:00
Clément Fournier 7e9d1fab85 Merge branch '7.0.x' into port-properties 2022-07-18 12:53:59 +02:00
Clément Fournier 34a668c012 checkstyle 2022-07-17 22:50:10 +02:00
Clément Fournier 227e27c369 fix inclusive offsets in cpp test 2022-07-17 17:55:38 +02:00
Clément Fournier 63c01f0f5b Merge branch '7.0.x' into text-utils-javacc 2022-07-17 17:06:37 +02:00
Clément Fournier 451cbb64c7 Merge branch 'text-utils-simple' into 7.0.x 2022-07-17 17:04:29 +02:00
Clément Fournier 0dddefa4b8 Fix merge 2022-07-17 17:03:07 +02:00
Clément Fournier 3cf2eb0a07 Merge branch 'text-utils-simple' into port-properties 2022-07-17 15:45:48 +02:00
Clément Fournier ba105a646c progress, remove ContextualizedTest 2022-07-17 14:49:48 +02:00
Clément Fournier 8587844c1c Fix build
Refs #2716 - langs aren't declared in java anymore
2022-07-17 14:03:23 +02:00
Clément Fournier c868d7243b Merge branch 'text-utils-simple' into pmd7-lang-registry-non-static 2022-07-17 13:11:28 +02:00
Clément Fournier 00574929ab more fixes 2022-07-16 22:16:15 +02:00
Clément Fournier 166733b588 Fix FP of UselessOperationOnImmutableRule 2022-07-16 19:42:37 +02:00
Clément Fournier fb6d375c59 fix pmd warnings 2022-07-16 19:37:06 +02:00
Clément Fournier cbf2951c1d Fix merge 2022-07-16 19:33:13 +02:00
Clément Fournier 495dbb750f Merge branch 'text-utils-simple' into pmd7-lang-registry-non-static 2022-07-16 18:48:57 +02:00
Clément Fournier a56ba97e29 Fix merge 2022-07-16 17:55:32 +02:00
Clément Fournier 4eb1e40a8a Merge branch '7.0.x' into text-utils-simple 2022-07-16 17:30:34 +02:00
Clément Fournier 942c8f045d Merge branch 'pmd7-junit5' into 7.0.x 2022-07-16 17:08:15 +02:00
Clément Fournier c68f63b981 Fix pmd warning 2022-07-16 16:03:44 +02:00
Clément Fournier e6c3f6fafd Better integrate #3922 and #3958
They were merged on separate branches
2022-07-16 14:51:52 +02:00
Clément Fournier ededcbeba6 Fix lasts tests in pmd-core 2022-07-16 14:07:07 +02:00
Clément Fournier 972dbd90c0 Merge remote-tracking branch 'upstream/pmd/7.0.x' into pmd7-junit5 2022-07-15 21:31:04 +02:00
Clément Fournier dd96116c31 Merge branch '7.0.x' into text-utils-simple 2022-07-15 14:11:51 +02:00
Andreas Dangel 77e39e98bf Merge pull request #3922 from oowekyala:xml-messages-in-ruleset-parser
[core] Better error reporting for the ruleset parser #3922
2022-07-14 18:52:40 +02:00
Andreas Dangel c7ba7917e8 Fix test ruleset all-xsl.xml 2022-07-14 18:51:50 +02:00
Andreas Dangel 08594824a6 Bump nice-xml-messages from 2.0 to 3.1 2022-07-14 18:34:01 +02:00
Andreas Dangel 94bad7f900 [core] Restore RuleSetFactoryTest testStringMultiPropertyDelimiter 2022-07-14 18:32:24 +02:00
Andreas Dangel 24e159a044 Merge branch 'pmd/7.0.x' into pr-3922 2022-07-14 18:20:45 +02:00
Andreas Dangel 0b4718a36c Merge pull request #4023 from adangel:pmd7-downgrade-slf4j
Downgrade slf4j to 1.7.36 #4023
2022-07-14 13:21:25 +02:00
Andreas Dangel 9221be7cf5 Merge pull request #4039 from adangel:pmd7-java-19
[java] Support Java 19 (pmd7) #4039
2022-07-14 13:17:53 +02:00
Andreas Dangel 13b68ac852 Merge branch 'master' into pmd7-java-19 2022-07-14 11:54:40 +02:00
Andreas Dangel 040f020fda [java] Allow type name "when" for Java 19 2022-07-14 11:29:53 +02:00
Andreas Dangel 6c1bd0e82b [java] Fix grammar and tests for Java 19 2022-07-10 17:12:30 +02:00
Andreas Dangel 70a5291cda [java] Update LanguageLevelChecker 2022-07-10 15:36:52 +02:00
Andreas Dangel 183a322d7c [java] Fix compile errors after merge 2022-07-10 15:33:32 +02:00
Andreas Dangel ffbe5b7378 Merge branch 'pmd6-java-19' into pmd7-java-19 2022-07-10 15:05:35 +02:00
Clément Fournier e248156d96 Merge remote-tracking branch 'upstream/pmd/7.0.x' into text-utils-simple 2022-07-10 13:53:30 +02:00
Clément Fournier 59d931cd91 Merge remote-tracking branch 'upstream/pmd/7.0.x' into text-utils-simple 2022-07-10 13:50:03 +02:00
Clément Fournier 535c74bb1e Fix code style 2022-07-10 12:50:06 +02:00
Clément Fournier 6d6e1907a8 Merge remote-tracking branch 'upstream/pmd/7.0.x' into xml-messages-in-ruleset-parser 2022-07-09 11:26:02 +02:00
Andreas Dangel ba72505e1f [javascript] Migrate tests to Junit5 2022-07-07 17:47:07 +02:00
Andreas Dangel 917b9df957 [html] Migrate tests to Junit5 2022-07-07 17:28:46 +02:00
Andreas Dangel f79d2389b0 [groovy] Migrate tests to Junit5 2022-07-07 17:23:37 +02:00
Andreas Dangel 4284583261 [go] Migrate tests to Junit5 2022-07-07 17:22:24 +02:00
Andreas Dangel 9f340bd1c0 [fortran] Migrate tests to Junit5 2022-07-07 17:20:58 +02:00
Andreas Dangel 378c77f60f [dart] Migrate tests to Junit5 2022-07-07 17:19:12 +02:00
Andreas Dangel 6086beb4dd [cs] Migrate tests to Junit5 2022-07-07 17:17:36 +02:00
Andreas Dangel 02db84a48c [cpp] Migrate tests to JUnit5 2022-07-07 17:15:09 +02:00
Andreas Dangel 092e3d4fc9 [java] Fix rules TooManyMethods and FinalFieldCouldBeStatic 2022-07-07 16:33:00 +02:00
Andreas Dangel bd830daea0 Merge branch 'master' into pmd/7.0.x 2022-07-07 16:14:35 +02:00
Andreas Dangel 8f6a17404c [core] Undo changes in CoreCliTest
The test run in IntelliJ will be fixed by #4032
2022-07-01 19:52:28 +02:00
Andreas Dangel 4d3ccc2066 Merge branch 'pmd/7.0.x' into pmd7-downgrade-slf4j 2022-07-01 19:47:04 +02:00
Andreas Dangel d54d08ce8a Make PlainTextLanguage.TextLvh final
Fixes pmd dogfood
2022-07-01 19:31:16 +02:00
Andreas Dangel a7340fce4c [gherkin] Migrate to PMD 7 2022-07-01 15:09:46 +02:00
Andreas Dangel c79db6e5f3 [kotlin] Mark kotlin language module @Experimental 2022-07-01 14:59:39 +02:00
Andreas Dangel f8e9adf2c5 [java] Fix WhileLoopWithLiteralBoolean tests 2022-07-01 14:56:33 +02:00
Andreas Dangel 82245b0794 [core] Fix compile errors with PlainTextLanguage 2022-07-01 14:43:46 +02:00
Andreas Dangel e6e1bfb62a Merge branch 'master' into pmd/7.0.x 2022-07-01 14:30:58 +02:00
Andreas Dangel cb70ab5268 [apex] Migrate tests to JUnit5 2022-07-01 10:11:58 +02:00
Andreas Dangel 9d1782d9f4 [kotlin] remove spdx-ids from tokens files 2022-06-30 15:44:24 +02:00
Andreas Dangel 6ce135e1cc Merge pull request #3496 from adangel:pmd7-antlr-doc
[doc] Improve Antlr documentation #3496
2022-06-30 15:33:09 +02:00
Andreas Dangel 05bb0867e5 Merge pull request #3808 from adangel:kotlin-poc
[kotlin] Kotlin support #3808
2022-06-30 15:32:02 +02:00
Andreas Dangel b38c8969ac [kotlin] Clarify license for grammar 2022-06-30 15:27:09 +02:00
Andreas Dangel bd1f7271ce [doc] Update swift rules and contributors 2022-06-30 15:03:54 +02:00
Andreas Dangel 44cc3829a7 [doc] Update release notes (#419, #3808) 2022-06-30 14:53:31 +02:00
Andreas Dangel 6627ac3974 [apex] Migrate tests to JUnit5 2022-06-30 10:43:29 +02:00
Andreas Dangel 6cdda01578 Merge branch 'pmd7-junit5' into pmd7-junit5-part2 2022-06-30 10:20:12 +02:00
Andreas Dangel cc154dd0b6 [core] Make unit tests consistent
- Use static imports for assertions
- Use package private tests and classes when possible
2022-06-30 10:12:36 +02:00
Andreas Dangel e8718aece7 [core] Convert remaining tests to JUnit5
Update wiremock dependency
2022-06-30 09:14:23 +02:00
Andreas Dangel af860c25e0 [core] Convert more tests to JUnit5 2022-06-29 20:54:31 +02:00
Andreas Dangel 5840314c61 [core] Convert Util tests to JUnit5 2022-06-29 19:50:38 +02:00
Andreas Dangel 232322e339 Merge branch 'pmd/7.0.x' into pmd7-junit5 2022-06-28 19:32:09 +02:00
Andreas Dangel 3ddf32a879 [core] Convert Renderer tests to JUnit5 2022-06-28 19:26:07 +02:00
Andreas Dangel 392e8375cd [core] Convert Property tests to JUnit5 2022-06-28 19:02:34 +02:00
Clément Fournier c3d4b3d0d9 Merge branch '7.0.x' into xml-messages-in-ruleset-parser 2022-06-25 20:23:13 +02:00
Clément Fournier 799fa8b11c Merge branch 'abort-on-semantic-errors' into xml-messages-in-ruleset-parser 2022-06-25 18:55:39 +02:00
Clément Fournier 51c890cf42 Merge branch 'abort-on-semantic-errors' into 7.0.x 2022-06-25 18:43:06 +02:00
Clément Fournier 9a5ab047b3 Merge branch '7.0.x' into abort-on-semantic-errors 2022-06-25 18:39:59 +02:00
Clément Fournier 7e2a1bf491 Merge branch '7.0.x' into xml-messages-in-ruleset-parser 2022-06-25 18:34:11 +02:00
Andreas Dangel 436a3339d9 Merge branch 'master' into pmd/7.0.x 2022-06-25 12:02:32 +02:00
Andreas Dangel c0536d5cb9 Downgrade slf4j to 1.7.36 2022-06-24 21:14:59 +02:00
Andreas Dangel aa4a8906ce Merge branch 'pmd/7.0.x' into kotlin-poc 2022-06-24 19:21:16 +02:00
Andreas Dangel 0f58afcc01 [java] ImmutableField - remove now unnecessary field annotations 2022-06-24 16:19:43 +02:00
Andreas Dangel 4f1e95dae3 Fix compile error 2022-06-24 16:07:26 +02:00
Andreas Dangel 65437fc3b7 Merge branch 'master' into pmd/7.0.x 2022-06-24 16:00:03 +02:00
Andreas Dangel 30718ad5dd [core] Convert more tests to JUnit5 2022-06-17 18:53:32 +02:00
Andreas Dangel dd0afb326e Fix compilation error 2022-06-13 19:23:16 +02:00
Andreas Dangel c9fd482e9c Merge branch 'pmd/7.0.x' into pmd7-junit5 2022-06-13 19:20:25 +02:00
Andreas Dangel 87bef022a6 Merge branch 'master' into pmd/7.0.x 2022-06-13 19:06:49 +02:00
Andreas Dangel ee4e451382 Merge branch 'pmd/7.0.x' into pmd7-junit5 2022-06-10 20:21:36 +02:00
Andreas Dangel 7ff4327ef2 [core] Convert more tests to JUnit5 2022-06-10 20:06:54 +02:00
Andreas Dangel 3e68d334df [core] Convert cpd tests to JUnit5 2022-06-10 16:03:04 +02:00
Andreas Dangel 96e2c1b286 [core] Convert cli tests to JUnit5 2022-06-10 15:38:19 +02:00
Andreas Dangel 9681ea800b Merge branch 'master' into pmd/7.0.x 2022-06-09 15:08:04 +02:00
Andreas Dangel 2bdc8a8263 Merge branch 'master' into pmd/7.0.x 2022-06-04 15:59:22 +02:00
Andreas Dangel 73e5a68978 Merge branch 'master' into pmd/7.0.x 2022-05-28 12:09:48 +02:00
Andreas Dangel fd8b2e35a1 Merge branch 'master' into pmd/7.0.x 2022-05-28 09:20:01 +02:00
Andreas Dangel 31dfea9fa3 Merge pull request #3987 from adangel:pmd7-pr-3958
[core] Deprecate some syntax for ruleset references (pmd7) #3987
2022-05-28 09:13:53 +02:00
Andreas Dangel 8b845154c2 Merge pull request #3986 from adangel:pmd7-pr-3716
[java] Merge rules that check for empty things (pmd7) #3986
2022-05-28 09:12:35 +02:00
Andreas Dangel 9f3abe4f5f Fix logging 2022-05-27 19:14:31 +02:00
Andreas Dangel e31004b209 Merge branch 'pr/3958' into pmd7-pr-3958 2022-05-27 19:05:15 +02:00
Andreas Dangel f663f33b20 Fix tests 2022-05-27 18:18:03 +02:00
Andreas Dangel da8c3e6de8 Merge branch 'pr/3716' into pmd7-pr-3716 2022-05-27 18:10:31 +02:00
Andreas Dangel 9d46288918 [java] Adjust new rules for PMD 7 2022-05-27 18:02:03 +02:00
Andreas Dangel 4c382b165d Merge branch 'pr/3716' into pmd7-pr-3716 2022-05-27 17:15:09 +02:00
Andreas Dangel a40cc0bbad [java] Fix rule UseArraysAsList 2022-05-26 16:11:19 +02:00
Andreas Dangel 2085e795ad Merge branch 'master' into pmd/7.0.x 2022-05-26 15:52:20 +02:00
Andreas Dangel a7f1bdf15b Merge pull request #3969 from adangel:pmd7-replace-commons-io
[core] Replace commons-io (pmd7 merge) #3969
2022-05-26 15:49:36 +02:00
Andreas Dangel 56ca3c8eb0 Merge branch 'replace-commons-io' into pmd7-replace-commons-io 2022-05-26 15:05:33 +02:00
Andreas Dangel a186c808a7 Merge branch 'pmd/7.0.x' into pmd7-replace-commons-io 2022-05-26 15:04:34 +02:00
Andreas Dangel 8248f6e4e1 Fix unit tests 2022-05-26 11:49:51 +02:00
Andreas Dangel 82dd4d46ca Merge branch 'master' into pmd/7.0.x 2022-05-26 11:21:38 +02:00
Andreas Dangel 26f6682a8b Fix build 2022-05-20 14:58:56 +02:00
Andreas Dangel 572ccc302e Merge branch 'master' into pmd/7.0.x 2022-05-20 14:49:40 +02:00
Andreas Dangel e669d3834f Add dependencies to support JUnit5 suites 2022-05-20 14:28:46 +02:00
Andreas Dangel e32ad74892 Rename path -> uri 2022-05-20 14:14:31 +02:00
Andreas Dangel eee9f6de38 [core] Convert *FingerPrinterTests to JUnit5 2022-05-19 16:36:08 +02:00
Andreas Dangel 0e51007d32 [core] Convert Ant Tests to JUnit5 2022-05-19 14:57:21 +02:00
Clément Fournier 5ae11f4e8a fix java tests 2022-05-15 15:30:14 +02:00
Clément Fournier 0a72e50109 Fix pmd warning 2022-05-15 14:31:16 +02:00
Clément Fournier e759069956 Make semantic errors report processing errors 2022-05-15 14:28:45 +02:00
Clément Fournier bd86027d90 Remove info level of SemanticErrorReporter 2022-05-15 14:15:06 +02:00
Clément Fournier 02571c6c04 Only use MessageReporter as backend of SemanticErrorReporter 2022-05-15 14:14:17 +02:00
Clément Fournier f291a2917b Turn many semantic errors into warnings 2022-05-15 14:09:58 +02:00
Clément Fournier fd6f70545f Merge branch '7.0.x' into abort-on-semantic-errors 2022-05-15 13:05:21 +02:00
Andreas Dangel a507d8c85f Merge branch 'master' into pmd7-replace-commons-io 2022-05-13 18:41:05 +02:00
Andreas Dangel fe414864a0 Replace IOUtils with IOUtil, Fix compile errors 2022-05-13 17:21:43 +02:00
Andreas Dangel 91342e3d8c Merge branch 'replace-commons-io' into pmd7-replace-commons-io 2022-05-13 17:14:09 +02:00
Andreas Dangel 17ba56e454 Replace IOUtils with IOUtil, Fix compile errors 2022-05-13 16:14:47 +02:00
Andreas Dangel 309d1dea28 Merge branch 'replace-commons-io' into pmd7-replace-commons-io 2022-05-13 16:00:19 +02:00
Clément Fournier 4cf0889c29 Merge branch 'text-utils-simple' into text-utils-javacc 2022-05-07 19:37:40 +02:00
Clément Fournier 5b0404ffa0 checkstyle 2022-05-07 13:13:46 +02:00
Clément Fournier 98e026bfc8 Revert changes to apex/EmptyCatchBlock 2022-05-07 13:07:17 +02:00
Clément Fournier a6a7eb9904 Stop using reflection to build nodes in pmd-apex 2022-05-07 13:04:02 +02:00
Clément Fournier 89bdfafdfd Add Chars#removePrefix
and cleanup something
2022-05-06 19:54:48 +02:00
Clément Fournier 78dbed2f08 Fix test about equals 2022-05-06 19:25:44 +02:00
Clément Fournier 49064d4bf0 Undo changes to scala modules 2022-05-06 19:06:29 +02:00
Andreas Dangel 8b3827981f Merge branch 'pmd/7.0.x' into pr-3893 2022-05-06 16:39:42 +02:00
Andreas Dangel 8e90891b28 Merge branch 'master' into pmd/7.0.x 2022-05-06 15:06:23 +02:00
Andreas Dangel d23273921c [doc] Document cli parameter "--no-progress"
Refs #3828 #3866
2022-05-06 14:34:54 +02:00
Clément Fournier 7b65280f36 Doc 2022-04-30 23:04:57 +02:00
Clément Fournier c72baf3bab Merge branch 'text-utils-javacc' into text-utils-comments 2022-04-30 23:01:06 +02:00
Clément Fournier 58ee669696 Add more tests for unicode escape 2022-04-30 22:58:07 +02:00
Clément Fournier a9037215f7 Merge branch 'text-utils-javacc' into text-utils-comments 2022-04-30 21:29:23 +02:00
Clément Fournier 87c224feaa Fix AvoidDuplicateLiteral
message needs escaping
2022-04-30 20:59:55 +02:00
Clément Fournier 2794184760 Merge branch 'text-utils-simple' into text-utils-javacc 2022-04-30 18:51:48 +02:00
Clément Fournier 76fe12d925 Recognize octal escapes in strings 2022-04-30 18:48:09 +02:00
Clément Fournier 158f0a6ee3 Fix bug with string literals 2022-04-30 17:12:28 +02:00
Clément Fournier ce0ee67e86 Merge branch 'text-utils-simple' into text-utils-javacc 2022-04-30 16:24:23 +02:00
Clément Fournier d797c861e7 Fix last psql refs 2022-04-30 16:24:12 +02:00
Clément Fournier d1d2f30119 Remove some things from TextDocument 2022-04-30 16:06:40 +02:00
Clément Fournier 935b7fc4e2 Merge branch 'text-utils-simple' into text-utils-javacc 2022-04-30 15:45:00 +02:00
Clément Fournier 515df821d8 doc 2022-04-30 15:39:06 +02:00
Clément Fournier 3c04526a65 Update plsql references 2022-04-30 15:36:42 +02:00
Clément Fournier 7c536288e8 Cleanup apex tests 2022-04-30 15:29:28 +02:00
Clément Fournier 17948d1cb8 Fix some comments 2022-04-30 15:05:48 +02:00
Clément Fournier ec4a638d44 Clarify one test 2022-04-30 15:01:16 +02:00
Clément Fournier 94f90ffbbf Add tests for Chars#newReader 2022-04-30 14:54:22 +02:00
Clément Fournier 1b7560dd7c Fix HTML module
Requires Chars#newReader
to support marks
2022-04-30 14:37:45 +02:00
Clément Fournier 7ed2b6610a Stop using long to mask line/col 2022-04-30 14:11:16 +02:00
Clément FournierandAndreas Dangel 772ccb3386 Cleanups in Chars
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-04-30 14:03:59 +02:00
Clément Fournier 3ec44f83c1 Merge branch '7.0.x' into text-utils-simple 2022-04-30 14:02:21 +02:00
Andreas Dangel 1deb4b7c7f Merge branch 'master' into pmd/7.0.x 2022-04-30 10:37:52 +02:00
Andreas Dangel f17219ba32 [core] Migrate Tests to JUnit5 2022-04-29 18:21:55 +02:00
Andreas Dangel d7a673dec0 Fix testSourceUri generation 2022-04-29 17:38:48 +02:00
Andreas Dangel 10590a27c4 [test] Refactor SimpleAggregatorTst to also use dynamic tests 2022-04-29 17:05:47 +02:00
Andreas Dangel c23d88da27 [test] Deprecate PMDTestRunner and RuleTestRunner
They were only needed for JUnit4
2022-04-29 17:04:59 +02:00
Andreas Dangel ac3f152dcd [test] Migrate PmdRuleTst to JUnit5 dynamic tests 2022-04-29 16:49:25 +02:00
Andreas Dangel 5c3afd881f [test] Add JUnit5 dependencies 2022-04-29 16:48:09 +02:00
Andreas Dangel 4c45d6125e Merge branch 'master' into pmd/7.0.x 2022-04-29 13:40:05 +02:00
Andreas Dangel 73f670b11a [plsql] Fix compile and test errors 2022-04-28 16:00:53 +02:00
Andreas Dangel f1a69b6ba9 Merge branch 'master' into pmd/7.0.x 2022-04-28 15:42:19 +02:00
Andreas Dangel bbe24eb320 Merge pull request #3931 from adangel:pmd7-html-jsoup
[html] Merge #3885 to pmd/7.0.x #3931
2022-04-28 15:25:45 +02:00
Clément Fournier 5d07ce4bb8 Deprecate DataSource
Update comments
2022-04-26 01:02:58 +02:00
Clément Fournier 6d83eda6be Fix sort on unmodifiable list 2022-04-26 00:59:48 +02:00
Clément Fournier 0b44c7d247 Fix test in pmd-java
RuleTst doesn't trim messages now
2022-04-24 19:54:03 +02:00
Clément Fournier 871fcc3ced Finish cleaning up trimming logic 2022-04-24 19:45:06 +02:00
Clément Fournier e4627fb841 Move trimBlankLines 2022-04-24 19:38:01 +02:00
Clément Fournier 89545272af Fix joinOn 2022-04-24 19:33:21 +02:00
Clément Fournier 4943dda381 Cleanup trimming logic 2022-04-24 19:19:19 +02:00
Clément Fournier 8a73559eb8 Add tests for StringUtil 2022-04-24 18:24:03 +02:00
Clément Fournier 5bbc3fa8d1 Test data source compat 2022-04-24 17:58:53 +02:00
Clément Fournier dc40bc27b8 More tests 2022-04-24 17:42:14 +02:00
Clément Fournier dae31bf308 Tests for readonlyness 2022-04-24 17:11:33 +02:00
Clément Fournier 6cf5e09088 Add test for text files 2022-04-24 17:01:22 +02:00
Clément Fournier d0dc228b00 Avoid calling indexOf too often in lines iterator 2022-04-24 17:01:14 +02:00
Clément Fournier 2d2a1c5531 More tests 2022-04-24 16:33:00 +02:00
Clément Fournier 32c8581f04 Add missing tests 2022-04-24 16:18:26 +02:00
Clément Fournier 3f9fb52a9b Treat \r as line separator as well 2022-04-24 15:51:44 +02:00
Clément Fournier 0d10425aac Pull some trimming logic into pmd-core 2022-04-24 14:56:58 +02:00
Clément Fournier b3818954ac Doc 2022-04-24 13:12:34 +02:00
Clément Fournier f2708f4b4e Make Node#getTextRegion non-default
Now implementors of Node need an implementation.
Implementation of #getReportLocation can be shared
2022-04-24 12:28:05 +02:00
Clément Fournier 13d0ddad1b Sync with designer, remove range2d 2022-04-24 12:07:18 +02:00
Clément Fournier fa60ad9317 Cleanup tests
Make DummyNode use offset/length coordinates
2022-04-24 11:56:56 +02:00
Clément Fournier 1da096b126 Merge, wip 2022-04-24 11:50:33 +02:00
Clément Fournier 64b9b25bef Merge branch 'text-utils-simple' into text-utils-javacc 2022-04-24 10:58:33 +02:00
Clément Fournier f567b8caee plsql: Update reference files
The SourceCode attribute has disappeared
2022-04-24 00:01:51 +02:00
Clément Fournier ff2f5ef93c Remove coupling between BaseLanguageModule and PmdRunnableTest 2022-04-23 20:29:11 +02:00
Clément Fournier 9b965eb97c Add a test, cleanup PmdRunnable tests 2022-04-23 20:11:21 +02:00
Clément Fournier 087f97f2a3 checkstyle 2022-04-23 20:01:18 +02:00
Clément Fournier 246436ac7f Fix tests on windows
Bug in toLocation(Range2d)
Use RulePriority.LOW as default in PMDTask, so as not to create IndexOutOfBoundsException every time
2022-04-23 19:58:33 +02:00
Clément Fournier 2a0ce95a99 Change a Chars method 2022-04-22 20:49:16 +02:00
Clément Fournier 26bdab4da4 WIP: Merge branch 'abort-on-semantic-errors' into text-utils-simple 2022-04-22 20:24:54 +02:00
Clément Fournier 226e63ea6c Merge branch '7.0.x' into abort-on-semantic-errors 2022-04-22 19:27:48 +02:00
Andreas Dangel c9a1b3fb78 [html] Migrate to PMD 7 2022-04-22 16:01:51 +02:00
Andreas Dangel 184d83b501 Merge remote-tracking branch 'adangel/html-jsoup' into pmd7-html-jsoup 2022-04-22 14:37:25 +02:00
Andreas Dangel 6b536ba7d0 Merge pull request #3912 from oowekyala:pmd7-lambda-wrong-form-bug
[java] Fix IndexOutOfBoundsException with lambda that has wrong shape #3912
2022-04-22 08:42:21 +02:00
Andreas Dangel 8f00641bff Merge pull request #3890 from oowekyala:java-grammar-module
[java] Improve module grammar #3890
2022-04-22 08:29:16 +02:00
Andreas Dangel 3cec04ebc5 Merge branch 'master' into pmd/7.0.x 2022-04-21 21:07:07 +02:00
Andreas Dangel 38765e1ce1 Add missing files 2022-04-21 19:38:12 +02:00
Andreas Dangel 6b7f976728 [core] (tests) Remove DummyRoot and use DummyNode.DummyRootNode
Refs #3896
2022-04-21 19:07:29 +02:00
Andreas Dangel 73aee5f2a6 Fix tests 2022-04-21 18:53:47 +02:00
Andreas Dangel 4c61883a92 Fix compilation errors 2022-04-21 18:50:45 +02:00
Andreas Dangel 5e9402bfe1 Merge branch 'master' into pmd/7.0.x 2022-04-21 18:42:08 +02:00
Clément Fournier 7773559808 add test 2022-04-16 20:04:05 +02:00
Clément Fournier 820c210cb2 Fix bug 2022-04-16 19:42:50 +02:00
Clément Fournier efd75bb8a1 Merge branch 'pr/3866' into 7.0.x 2022-04-16 18:50:50 +02:00
Clément Fournier 56c18f4a03 Add a test for the full message 2022-04-16 18:35:58 +02:00
Clément Fournier 9aee9beb77 More cleanups 2022-04-16 18:24:53 +02:00
Clément Fournier a9364e8664 Fix improper MessageFormat in some messages 2022-04-16 18:05:47 +02:00
Clément Fournier f9a1e840e0 Fix test strings not being MessageFormat 2022-04-16 17:53:04 +02:00
Clément Fournier 1fd343619c Cleanup xml parser tests 2022-04-16 17:39:41 +02:00
Clément Fournier 559e883be8 Fix bugs 2022-04-15 21:45:43 +02:00
Clément Fournier f1946be17f Don't accumulate 2022-04-15 21:19:09 +02:00
Clément Fournier bdc116e403 Fix quoting 2022-04-15 21:16:33 +02:00
Clément Fournier 3acc740925 Add ctor for ruleset reference id 2022-04-15 21:09:09 +02:00
Clément Fournier 6084611032 More cleanups 2022-04-15 20:55:01 +02:00
Clément Fournier d7d3bb8ef2 Fix errors being duplicated 2022-04-15 20:26:25 +02:00
Clément Fournier 8a9c9433f2 Merge branch 'xml-messages-in-ruleset-parser' into port-properties 2022-04-15 20:01:28 +02:00
Clément Fournier 5933d9a1f2 Merge branch '7.0.x' into text-utils-simple 2022-04-15 17:54:37 +02:00
Clément Fournier cb9a092090 Update to release version of nxml-messages 2022-04-15 17:28:39 +02:00
Clément Fournier 59f7bb3df4 Move package 2022-04-15 16:36:51 +02:00
Clément Fournier a09cc05781 Adapt code to work without changes to properties 2022-04-15 16:24:22 +02:00
Clément Fournier fc81d649b8 Checkout ruleset parser changes 2022-04-15 15:43:46 +02:00
Clément Fournier 9620dfc91a Update release notes, ref #3866 2022-04-15 15:22:40 +02:00
Clément Fournier 2fee670407 Document default value 2022-04-15 15:08:32 +02:00
Clément Fournier 7023804441 Inline method
to see more clearly what's going on
2022-04-15 15:06:53 +02:00
Clément Fournier 5cb2750329 Change task name to 'Processing files' 2022-04-15 15:05:34 +02:00
Clément Fournier 7f9cbc6155 Merge branch '7.0.x' into pr/3866 2022-04-15 15:04:11 +02:00
Clément Fournier 4225b24339 Merge branch 'master' into 7.0.x 2022-04-15 14:51:24 +02:00
Clément Fournier 341c2029c6 Merge branch 'pmd7-lambda-wrong-form-bug' into abort-on-semantic-errors 2022-04-15 14:45:09 +02:00
Clément Fournier abad806344 Fix tree dump tests 2022-04-15 13:26:14 +02:00
Clément Fournier 6d2858da8e Initial work to report typing errors in Java
This should be done more thoroughly in a future PR
2022-04-14 21:30:24 +02:00
Clément Fournier f374dd2462 Merge branch 'pmd7-lambda-wrong-form-bug' into abort-on-semantic-errors 2022-04-14 21:23:47 +02:00
Clément Fournier 6d152b1552 Fix IndexOutOfBoundsException with lambda that has wrong shape 2022-04-14 21:23:21 +02:00
Clément Fournier d599a7d6f7 Add tests for Sem error reporter 2022-04-14 21:03:52 +02:00
Clément Fournier 38d731cac2 Add tests, use MessageReporter in SemanticErrorReporter 2022-04-14 20:38:08 +02:00
Clément Fournier 3336d11fb6 Merge branch '7.0.x' into abort-on-semantic-errors 2022-04-14 20:11:25 +02:00
Clément Fournier 35d5eca1ca Fix tests 2022-04-14 20:09:24 +02:00
Clément Fournier 0970b718ce Merge branch '7.0.x' into java-grammar-module 2022-04-14 19:57:41 +02:00
Clément Fournier 8b67ab93a7 Rename getters 2022-04-14 19:57:16 +02:00
Clément Fournier 1b54b35441 Remove DirectiveType enum 2022-04-14 19:52:42 +02:00
Clément FournierandAndreas Dangel 7bf44c69ac Replace package name with class name
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-04-14 19:49:48 +02:00
Clément Fournier 36b750f682 Fix tests
Move runAndReportStats to PmdAnalysis
2022-04-13 21:23:51 +02:00
Clément Fournier 271b8ab062 Fix tests 2022-04-13 20:48:38 +02:00
Clément Fournier a5f9ed8f7e Use new ooxml lib 2022-04-13 20:09:58 +02:00
Andreas Dangel 7cf97d6afc Merge pull request #3891 from oowekyala:force-type-resolution
[java] Make type resolution not lazy #3891
2022-04-13 10:19:03 +02:00
Andreas Dangel 393210bd2f Merge pull request #3906 from oowekyala:cleanup-java-module-remove-nodes
[java] Remove deprecated nodes #3906
2022-04-13 10:18:35 +02:00
Andreas Dangel c1dad89317 Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.java 2022-04-13 09:33:50 +02:00
Andreas Dangel b8b7c12d1c Merge branch 'pmd/7.0.x' into pr-3891 2022-04-13 09:27:34 +02:00
Andreas Dangel e0c0e96d07 Merge branch 'master' into pmd/7.0.x 2022-04-12 20:15:44 +02:00
Clément Fournier 9f163ed9a1 WIP needs xml messages PR 2022-04-10 09:10:53 +02:00
Clément Fournier 95b57dcb28 Even better 2022-04-10 00:51:03 +02:00
Clément Fournier d777d1f8ce Better xml error reporting 2022-04-09 22:52:54 +02:00
Clément Fournier 9a5eed54ad Merge branch '7.0.x' into port-properties 2022-04-09 22:42:20 +02:00
Clément Fournier 7e8b5e37fc Merge branch 'text-utils-simple' into lang-registry-non-static 2022-04-09 21:45:22 +02:00
Clément Fournier b8efedf967 Make lang registry non static 2022-04-09 21:44:01 +02:00
Clément Fournier 407ffeaf74 Merge branch '7.0.x' into lang-registry-non-static 2022-04-09 20:11:52 +02:00
Clément Fournier ad5ff51d20 Fix tests 2022-04-09 17:56:17 +02:00
Clément Fournier 455d1a68b3 Update cached RV 2022-04-09 17:24:29 +02:00
Clément Fournier bf70eff5f9 Cleanup formatting logic 2022-04-09 17:17:55 +02:00
Clément Fournier 40824e4fc9 Remove RuleViolationFactory 2022-04-09 17:09:24 +02:00
Clément Fournier ebbb6b8770 WIP violation decorators, need java-grammar 2022-04-09 16:54:28 +02:00
Clément Fournier b6ac0aadee Remove deprecated nodes 2022-04-09 16:16:43 +02:00
Clément Fournier 4d886ef243 Merge branch '7.0.x' into text-utils-simple 2022-04-09 16:02:37 +02:00
Clément Fournier 32a02cecaa Add some log statements 2022-04-09 14:57:54 +02:00
Clément Fournier 24fe7053ef Fix type inference tests 2022-04-03 15:50:58 +02:00
Clément Fournier 27962debc0 Fix build 2022-04-03 00:52:12 +02:00
Clément Fournier 3d022c5d1f Merge branch 'scala-fix-build' into text-utils-simple 2022-04-03 00:26:32 +02:00
Clément Fournier 4620453fc8 Rename getStartLine/Column 2022-04-03 00:26:27 +02:00
Clément Fournier 544f9c0c1b [scala] Fix build of pmd-scala-common
The project doesn't compile as it is
missing dependencies that are provided
in its children modules (version-specific
scala modules). This disables the java
compilation.
2022-04-02 23:46:23 +02:00
Clément Fournier 15d98409db Add TextRange2d 2022-04-02 22:54:15 +02:00
Clément Fournier 911347541e Add TextPos2d 2022-04-02 21:01:33 +02:00
Clément Fournier 0d4a56ea6b Add method for designer 2022-04-02 18:53:03 +02:00
Clément Fournier a7582e5ac8 Fix scala module 2022-04-02 17:28:16 +02:00
Clément Fournier 0a5bf6f75f Merge branch 'text-utils-javacc' into text-utils-comments 2022-04-02 16:37:10 +02:00
Clément Fournier a611af163b Merge branch 'text-utils-simple' into text-utils-javacc 2022-04-02 16:34:17 +02:00
Clément Fournier e5453eea28 Fix plsql build 2022-04-02 16:22:14 +02:00
Clément Fournier 163a9274dc Ignore some cpp tests 2022-04-02 15:54:31 +02:00
Clément Fournier 474deca0e2 Fix cpd 2022-04-02 15:43:28 +02:00
Clément Fournier b2b81784ff Fix compil failures 2022-04-02 15:17:06 +02:00
Clément Fournier c3a5945ae5 More cleanups 2022-04-02 15:07:55 +02:00
Clément Fournier 810d3773f7 Cleanup file filtering logic 2022-04-02 14:45:14 +02:00
Clément Fournier 777ab88755 Checkstyle (apex) 2022-04-02 14:31:08 +02:00
Clément Fournier 4c032f4622 Small cleanup in CPD 2022-04-02 14:30:51 +02:00
Clément Fournier 4fa7db254e [core] Abort on semantic errors 2022-04-02 01:44:15 +02:00
Clément Fournier fa635e226e Merge branch '7.0.x' into text-utils-simple 2022-04-01 23:36:14 +02:00
Clément Fournier 31a341d9ad [java] force type resolution phase 2022-04-01 21:19:04 +02:00
Clément Fournier b7c3e47591 Add tests for module directives 2022-04-01 21:15:50 +02:00
Clément Fournier bc19d2cc40 [java] Improve module grammar
Type names in "provides" directives are disambiguated
like any other type name.

ASTName is made redundant and removed for good.
2022-04-01 19:06:33 +02:00
Andreas Dangel 9d816d28b9 Merge pull request #3842 from oowekyala:java-ast-utils
[java] Move things from JavaRuleUtil to JavaAstUtils #3842
2022-04-01 10:28:40 +02:00
Andreas Dangel 2980897529 Merge branch 'master' into pmd/7.0.x 2022-03-27 17:15:12 +02:00
Andreas Dangel 6bf7996851 Merge branch 'master' into pmd/7.0.x 2022-03-27 16:33:07 +02:00
Andreas Dangel 81d8eea7f6 Merge pull requets #3838 from adangel:pmd7-jdk-18
[java] Merge "Support JDK 18 #3837" into pmd/7.0.x #3838
2022-03-27 16:25:10 +02:00
Andreas Dangel dde255953b Merge pull request #3871 from adangel:pmd7-regression-tester-update
[ci] Merge #3861 into pmd/7.0.x #3871
2022-03-27 16:24:14 +02:00
jeickhoff 9ca8176d3e Fix pmd-test with progress bar flag 2022-03-25 16:35:49 +01:00
jeickhoff 9241da3bf8 Add progress bar task name 2022-03-25 14:54:21 +01:00
jeickhoff 15674891c2 Switch progress bar default to activated 2022-03-25 14:46:34 +01:00
jeickhoff f5c21828c8 Move ProgressBarListener to cli.internal package 2022-03-25 14:43:53 +01:00
Andreas DangelandClément Fournier 2f856fee33 Update docs/pages/pmd/userdocs/cli_reference.md
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2022-03-25 09:41:11 +01:00
Andreas Dangel cca055487e Merge branch 'pmd/7.0.x' into pmd7-jdk-18 2022-03-25 09:35:27 +01:00
Andreas Dangel 0bad2f1a45 Merge branch 'pmd/7.0.x' into pmd7-regression-tester-update 2022-03-25 08:50:12 +01:00
Andreas Dangel 2c80e34e92 Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2022-03-25 08:26:55 +01:00
Andreas Dangel ea653a89fc Merge pull request #3872 from oowekyala:pmd7-merge-xml-rule
[xml] Merge #3864 into pmd 7 #3872
2022-03-25 08:26:35 +01:00
Clément Fournier b0ce80350f Merge branch '7.0.x' into pmd7-merge-xml-rule 2022-03-24 19:52:16 +01:00
Clément Fournier a26a42f623 Fix xml module 2022-03-24 19:45:43 +01:00
Clément Fournier 6343cfe0ce Remove comment about required xpath ver
We don't support jaxen anymore
2022-03-24 19:36:52 +01:00
Clément Fournier ed33ff403b Restore new xpath funs 2022-03-24 19:35:52 +01:00
Clément Fournier 495918f001 Merge branch 'xml-new-xpath-rule' into pmd7-merge-xml-rule 2022-03-24 19:25:42 +01:00
Andreas Dangel c26275a2b6 Merge remote-tracking branch 'adangel/regression-tester-update' into
pmd7-regression-tester-update
2022-03-24 18:54:45 +01:00
Andreas Dangel 819e6236c4 Fix tests and compile errors 2022-03-24 15:52:16 +01:00
Andreas Dangel 644bd3ab39 Merge branch 'master' into pmd/7.0.x 2022-03-24 15:15:55 +01:00
jeickhoff 997fef92d0 Progress bar output choice 2022-03-21 13:13:21 +01:00
jeickhoff 3338b5e6ba Small style fixes 2022-03-21 12:49:46 +01:00
jeickhoff cd7e3a3e0d Implement CLI progress bar using me.tongfei.progressbar 2022-03-21 11:32:12 +01:00
Clément Fournier 28a724d0c4 Merge branch 'cannot-resolve-ambiguous-dollar' into 7.0.x
Old cleanups
2022-03-15 22:56:02 +01:00
Clément Fournier 731bd02a6b Merge branch '7.0.x' into cannot-resolve-ambiguous-dollar 2022-03-15 22:54:26 +01:00
Clément Fournier 114f3f6fce Cleanup 2022-03-14 21:58:37 +01:00
Clément Fournier e3005e279a Move things from BinaryOp 2022-03-14 21:49:01 +01:00
Clément Fournier 4322047623 Move things from JavaRuleUtil to JavaAstUtils 2022-03-14 21:47:42 +01:00
Clément Fournier 19bb54acdb Minor cleanup 2022-03-14 21:30:17 +01:00
Andreas Dangel 80dfc1ef46 Merge pull request #3839 from oowekyala:just-remove-old-symtable
[java] Remove old symtable #3839
2022-03-11 12:59:43 +01:00
Andreas Dangel bbff690f1d Merge pull request #3833 from oowekyala:update-saxon-10
[core] Update saxon to 10.7 #3833
2022-03-11 11:29:25 +01:00
Andreas Dangel a102fcd419 Merge pull request #3827 from oowekyala:cannot-resolve-ambiguous-dollar
[java] Fix handling of classes with dollars in their names #3827
2022-03-11 11:10:40 +01:00
Andreas Dangel 65a483c003 Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/asm/AsmSymbolResolver.java 2022-03-11 11:09:59 +01:00
Andreas Dangel cd57e8c79d Fix PMD dogfood issue - inner Visitor class should be final 2022-03-11 10:53:08 +01:00
Andreas Dangel 5dc797bae5 Fix build after merge 2022-03-11 10:52:38 +01:00
Andreas Dangel cbc7352324 Merge branch 'pmd/7.0.x' into kotlin-poc 2022-03-11 10:16:12 +01:00
Clément Fournier c84e1b033b Fix tests 2022-03-10 22:07:12 +01:00
Clément Fournier e27e595e58 Add back tests that disappeared by mistake 2022-03-10 21:09:54 +01:00
Andreas Dangel 655102f346 Merge branch 'localpmd6/jdk-18' into pmd7-jdk-18 2022-03-10 16:49:02 +01:00
Andreas Dangel 686b7fb29e [java] Move standardized preview features to be regular features
Since the old preview language versions are not supported anymore.
2022-03-10 16:36:57 +01:00
Andreas Dangel c50f4f2903 [java] Fix unit tests after merge 2022-03-10 16:25:10 +01:00
Andreas Dangel 925899ed50 Merge branch 'localpmd6/jdk-18' into pmd7-jdk-18 2022-03-10 16:08:48 +01:00
Clément Fournier 07549b1283 Remove old symbol table 2022-03-10 15:11:18 +01:00
Clément Fournier df0508610e Merge branch 'pmd/7.0.x' into cannot-resolve-ambiguous-dollar 2022-03-10 13:52:54 +02:00
Andreas Dangel aead02ba89 Merge pull request #3819 from oowekyala:pmd7-merge-master
[core] Merge PmdAnalysis into pmd/7.0.x #3819
2022-03-10 10:37:37 +01:00
Andreas Dangel 4160092ceb Merge branch 'master' into pr-3819 2022-03-10 10:32:41 +01:00
Clément Fournier 9dae9d70db Update saxon to 10.7 2022-03-09 19:01:35 +01:00
Clément Fournier fcd54c7abe Cleanups 2022-03-08 12:38:37 +01:00
Clément Fournier 7be498ae32 Fix rename 2022-03-07 22:00:43 +01:00
Clément Fournier 1ecbbca27c Rename to JavaComment 2022-03-07 21:27:08 +01:00
Clément Fournier c64973f96a Merge branch 'text-utils-javacc' into text-utils-comments 2022-03-07 21:25:45 +01:00
Clément Fournier 20472d492d Merge branch 'text-utils-simple' into text-utils-javacc 2022-03-07 21:25:32 +01:00
Clément Fournier f3454949d7 Fix build 2022-03-07 21:24:35 +01:00
Clément Fournier 2c0a641b2c Cleanups 2022-03-07 20:17:15 +01:00
Clément Fournier 8231542746 Merge branch 'text-utils-simple' into text-utils-javacc 2022-03-07 20:09:38 +01:00
Clément Fournier 454a501bfb Merge branch 'pmd7-merge-master' into text-utils-simple 2022-03-07 20:04:34 +01:00
Clément Fournier 3b8d7a32a7 Cleanups 2022-03-07 19:59:50 +01:00
Clément Fournier 26c4999b53 Fix NPE with missing simple name 2022-03-07 17:42:57 +01:00
Clément Fournier 7d3c391394 Close listeners even if the analysis is not run 2022-03-07 16:31:52 +01:00
Clément Fournier 99425d53ff Fix OutOfMemory in tests
This did not show up earlier because
we used soft class references, which
reduces the memory footprint of unused
TypeSystems. However, they still remain
in old gen and are a large memory hog.

Since e97e2cd we don't use SoftReference
anymore as parsing the same class several
times may have unintended side-effects.
This revealed the out of memory error.

This will be fixed when we have proper
language lifecycle and resources like the
classloader can be reclaimed later.
2022-03-06 19:00:13 +01:00
Clément Fournier e3fd2782a3 Cleanup 2022-03-06 15:28:50 +01:00
Clément Fournier 7f31dc9e63 Test local classes 2022-03-06 14:13:53 +01:00
Clément Fournier e97e2cde27 Remove SoftClassReference
They were `get` immediately, and it's unclear
what happens if a reference is GCed and reparsed
later (it may set fields of existing enclosing
classes).
2022-03-06 14:01:20 +01:00
Clément Fournier 1f008958e8 Add tests, require parsing to know simple/cano name 2022-03-06 13:54:23 +01:00
Clément Fournier 9bab5b659f Fix issue with simple name containing dollar 2022-03-06 11:41:49 +01:00
Clément Fournier 8ff61a208e Fix pmd warning 2022-03-06 11:20:12 +01:00
Clément Fournier 7f184f5a98 PMD warning 2022-03-05 19:45:28 +01:00
Clément Fournier 509903288b Merge branch 'text-utils-javacc' into text-utils-comments 2022-03-05 19:37:16 +01:00
Clément Fournier b0b7f69480 Merge branch 'text-utils-simple' into text-utils-javacc 2022-03-05 19:35:10 +01:00
Clément Fournier dee330293f Fix pmd-core compil 2022-03-05 19:16:13 +01:00
Clément Fournier 97070a4fa2 Remove replaced methods 2022-03-05 18:36:04 +01:00
Clément Fournier 42835596e6 Fix caching logic 2022-03-05 18:34:53 +01:00
Clément Fournier af5aceeff8 Merge branch 'pmd7-merge-master' into text-utils-simple 2022-03-05 18:16:49 +01:00
Clément Fournier f4f7f4b65d Move nspmd.util.document -> lang.document 2022-03-05 18:05:04 +01:00
Clément Fournier 6349f134a7 Checkstyle 2022-03-05 17:54:06 +01:00
Clément Fournier 9fc7828754 Fix tests 2022-03-05 17:36:34 +01:00
Clément Fournier c66ece42d0 Merge branch 'pmd6-improve-pmd-analysis' into pmd7-merge-master 2022-03-05 17:26:49 +01:00
Clément Fournier 6004f99348 Merge branch 'pmd6-improve-pmd-analysis' into pmd7-merge-master 2022-03-05 17:21:49 +01:00
Clément Fournier 9808f75654 Merge branch 'pmd6-improve-pmd-analysis' into pmd7-merge-master 2022-03-05 16:34:23 +01:00
Clément Fournier add6349045 More cleanups 2022-03-05 16:23:27 +01:00
Clément Fournier a48b9e2740 Fix ant test 2022-03-05 16:18:45 +01:00
Clément Fournier 3d3abf31be Merge branch 'pmd6-improve-pmd-analysis' into pmd7-merge-master 2022-03-05 16:02:07 +01:00
Clément Fournier 82084ddc13 Merge branch 'pmd6-improve-pmd-analysis' into pmd7-merge-master 2022-03-05 15:59:47 +01:00
Clément Fournier 18e0abf93c Fix PmdLogger name 2022-03-05 15:41:09 +01:00
Clément Fournier e414e2119c Merge branch 'pmd6-improve-pmd-analysis' into pmd7-merge-master 2022-03-05 15:34:50 +01:00
Clément Fournier af67187205 Restore binary compatibility with mvn plugin 2022-03-05 13:59:21 +01:00
Clément Fournier 70a05acdd3 Merge branch 'pmd6-improve-pmd-analysis' into pmd7-merge-master 2022-03-05 13:50:54 +01:00
Clément Fournier 8dbc8c200e Fix merge 2022-03-05 13:50:05 +01:00
Clément Fournier 164bd07a1d Merge branch 'pmd6-improve-pmd-analysis' into pmd7-merge-master 2022-03-05 13:42:26 +01:00
Clément Fournier d41e0d0f32 Merge branch '7.0.x' into pmd7-merge-master 2022-03-05 11:53:55 +01:00
Clément Fournier 7d36ddaa35 Merge branch 'remove-processing-stages' into 7.0.x 2022-03-05 11:53:03 +01:00
Clément Fournier b212e6497b Doc, initial log level message is reported at INFO 2022-03-05 11:47:57 +01:00
Clément Fournier 48b8a1d094 More cleanups around PmdReporter 2022-03-05 11:21:48 +01:00
Clément Fournier 578ed7a52e Remove trace/debug from PmdLogger 2022-03-05 11:00:49 +01:00
Clément Fournier 8c42febcdb Fix last tests 2022-03-04 20:22:14 +01:00
Andreas Dangel e1f02e8d11 Use rulechain 2022-03-04 20:19:52 +01:00
Andreas Dangel 9c35b03937 Merge branch 'pmd/7.0.x' into kotlin-poc 2022-03-04 20:15:06 +01:00
Andreas Dangel 3db42ba1e9 Removed unnecessary XPath function "hasChildren" 2022-03-04 20:11:23 +01:00
Andreas Dangel 2a73c2b312 Refactor OverrideBothEqualsAndHashcode 2022-03-04 20:06:21 +01:00
Andreas Dangel 68c91b766d [doc] Update sidebar for new Kotlin rule category errorprone 2022-03-04 19:52:25 +01:00
Andreas Dangel db627b4535 AbstractKotlinRule should use KotlinVisitor 2022-03-04 19:50:21 +01:00
Andreas Dangel 01d24b8ac9 Add new rule OverrideBothEqualsAndHashcode 2022-03-04 19:49:05 +01:00
Clément Fournier 22e7399eb3 More cleanups 2022-03-04 18:39:00 +01:00
Clément Fournier ea25e647cf Make PmdLogger use slf4j 2022-03-04 17:13:16 +01:00
Clément Fournier f7fa52c238 Fix tests 2022-03-04 10:41:55 +01:00
Andreas Dangel a3974bd560 [doc] Add Kotlin specific language page 2022-03-03 21:24:33 +01:00
Andreas Dangel 3969215635 Update ruleset, add ruleset factory test
Using pmd.website.baseurl parameter
2022-03-03 21:09:49 +01:00
Clément Fournier 97402dc61d Remove some deprecated things 2022-03-03 21:04:03 +01:00
Andreas Dangel 0a6e4abc75 Fix root-node-name 2022-03-03 20:58:46 +01:00
Andreas Dangel c0150e4698 Remove unnecessary rulesets.properties 2022-03-03 20:46:58 +01:00
Andreas Dangel 4566ed4f16 Update Kotlin Grammar to 1.6-rfc+0.1
Keep the grammar as original as possible
2022-03-03 20:46:06 +01:00
Clément Fournier 9808c743d2 Fix merge 2022-03-03 20:46:01 +01:00
Andreas Dangel 22bc2f0463 KotlinLexer doesn't need to be executable 2022-03-03 20:22:42 +01:00
Clément Fournier 9d1c1860cb Merge branch 'master' into 7.0.x 2022-03-03 19:55:10 +01:00
Clément Fournier 78fb7f8af8 checkstyle 2022-03-02 12:29:43 +01:00
Clément Fournier 1921cd7043 Merge remote-tracking branch 'upstream/pmd/7.0.x' into remove-processing-stages 2022-03-01 21:28:08 +01:00
Clément Fournier f5ae8bece1 Fix missing classpath 2022-03-01 21:19:39 +01:00
Clément Fournier 8457e19d00 Merge branch 'pr/3789' into 7.0.x
Refs #3789
2022-02-27 17:57:53 +01:00
Clément Fournier 7a0b20a65e Merge branch '7.0.x' into pr/3789 2022-02-27 17:57:52 +01:00
Clément Fournier 5fcb69d46c checkstyle 2022-02-27 14:56:13 +01:00
Clément Fournier ee0e751b53 Report semantic errors by default
The dogfood failure is probably caused by missing
classes on the classpath, as I can't reproduce it
locally with a full classpath, but can with an
incomplete one.
2022-02-27 14:47:32 +01:00
Clément Fournier e6e848895f Cleanup 2022-02-27 13:58:22 +01:00
Clément Fournier e4547df0c0 Use AssertionUtil 2022-02-27 13:44:38 +01:00
Clément Fournier 067e2f4407 Move BaseParserTest 2022-02-26 22:42:46 +01:00
Andreas Dangel 6719156669 Add simplelogger.properties in pmd-test
This provides a default configuration that will be used
when resetting the logger configuration in CLITests or
PMDTaskTest. Without this, slf4j-simple will keep
the last configured default level. Now it will use the
default level configured in simplelogger.

Since pmd-test is not part of the distribution, this
configuration file has no effect for the binaries.
2022-02-26 20:34:58 +01:00
Clément Fournier 09344bb6a0 Fix compil of ASTSwitchStatementTest 2022-02-26 17:50:51 +01:00
Clément Fournier cdaeb48a02 Merge remote-tracking branch 'upstream/pmd/7.0.x' into remove-processing-stages 2022-02-26 17:48:44 +01:00
Andreas Dangel 3b7e775fe7 Silence out pushd/popd 2022-02-26 14:35:08 +01:00
Andreas Dangel fb14974834 Fix getDefaultLogLevel 2022-02-26 14:20:54 +01:00
Andreas Dangel 94dcd9c214 [ci] Avoid running dogfood twice for pull requests 2022-02-26 13:40:36 +01:00
Andreas Dangel e964297c8c Use Level.valueOf for converting PMD_DEBUG_LEVEL into slf4j Level 2022-02-26 13:05:56 +01:00
Andreas Dangel 56bf7802f7 Reset logging after PMDTaskTest and (Core)CLITest
otherwise debug log level is enabled for later tests
2022-02-26 13:05:50 +01:00
Andreas Dangel 9f9ceabf0b Only configure default loglevel with --debug is used at cli
This theoretically allows to use
"-Dorg.slf4j.simpleLogger.defaultLogLevel=trace" manually

Still log the current default log level (verified in BinaryDistributionIT)
2022-02-26 12:45:30 +01:00
Andreas DangelandClément Fournier fd6f521079 Apply suggestions from code review
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2022-02-26 11:35:56 +01:00
Andreas Dangel 2091c78ead Merge branch 'pmd/7.0.x' into pmd7-896-slf4j 2022-02-26 11:29:11 +01:00
Andreas Dangel 6c1886efc6 Apply suggestions from code review 2022-02-26 10:52:17 +01:00
Andreas Dangel 524fcd8e38 Merge branch 'master' into pmd/7.0.x 2022-02-26 10:45:47 +01:00
Andreas Dangel 8eb18114c9 Merge branch 'master' into pmd/7.0.x 2022-02-25 20:23:58 +01:00
Clément Fournier bf91e70c9f Update tests 2022-02-25 19:50:50 +01:00
Clément Fournier bad65fe858 Cleanup 2022-02-25 18:52:17 +01:00
Clément Fournier f29b2c1267 Replace test post processing function 2022-02-25 18:52:17 +01:00
Clément Fournier 853942d623 Remove core api 2022-02-25 18:52:17 +01:00
Clément Fournier 2396b89043 Remove java processing stages
This also removes execution of old symbol table code.
2022-02-25 18:52:16 +01:00
Clément Fournier c37c87655b Remove plsql processing stages 2022-02-25 18:52:16 +01:00
Clément Fournier c519b84024 Remove Modelica processing stages 2022-02-25 18:52:16 +01:00
Andreas Dangel e934efb3bc [doc] Kotlin rules in sidebar 2022-02-25 15:35:11 +01:00
Andreas Dangel b21cb6a9fc Fix BinaryDistributionIT - kotlin is now one of the PMD languages 2022-02-25 15:33:19 +01:00
Andreas Dangel 27d012c9a1 Merge branch 'pmd/7.0.x' into kotlin-poc 2022-02-25 15:18:12 +01:00
Andreas Dangel d826c3574e Revert "set version to 7.0.0-kotlin-SNAPSHOT to avoid mixups in 7.0.0-SNAPSHOT in sonatype snapshots repo"
This reverts commit 051da73ce3.
2022-02-25 15:16:35 +01:00
Andreas Dangel 347a91a57e Merge pull request #3795 from
oowekyala:issue3786-simplify-boolean-returns

[java] Fix #3786 - make SimplifyBooleanReturns consider parentheses.
#3795
2022-02-25 12:37:48 +01:00
Andreas Dangel 01fa91a540 [doc] Update release notes (#3786 #3795) 2022-02-25 12:36:18 +01:00
Andreas Dangel f21008dce6 Merge pull request #3510 from oowekyala:update-LawOfDemeter
[java] Update LawOfDemeter #3510
2022-02-25 12:15:44 +01:00
Andreas Dangel f2ac5be50a [doc] Update release notes for Law Of Demeter (#3510)
Issues: #1014 #1605 #2175 #2179 #2180 #2182 #2188
2022-02-25 12:14:38 +01:00
Andreas Dangel a7ef00e762 Enable all rules for regression testing 2022-02-25 12:00:45 +01:00
Andreas Dangel 0c80e35f39 Enable AllRulesIT for java 2022-02-25 11:59:49 +01:00
Andreas Dangel 495b0f4eb0 Fix tests 2022-02-25 11:57:02 +01:00
Clément Fournier e6e707a671 Merge branch '7.0.x' into update-LawOfDemeter 2022-02-24 21:22:12 +01:00
Clément Fournier ed69dbd78a Merge branch 'java-pattern-binding-scopes' into 7.0.x 2022-02-24 21:17:03 +01:00
Clément Fournier 7adfdfebd3 Fix some FNs 2022-02-23 01:34:34 +01:00
Clément Fournier 0032ea1134 Fix pmd warnings 2022-02-22 23:25:13 +01:00
Clément Fournier f524fe5dfc Finish doc 2022-02-22 23:24:07 +01:00
Andreas Dangel 868a664d77 Fix tests 2022-02-19 11:32:23 +01:00
Andreas Dangel 1a0a2d3778 Fix compilation errors 2022-02-19 11:12:50 +01:00
Andreas Dangel c2fd65c452 [core] Check if SimpleLogger is in use before trying to reconfigure it 2022-02-19 11:11:31 +01:00
Andreas Dangel a592621b2d Merge branch 'pmd7-896-slf4j-migrations' into pmd7-896-slf4j 2022-02-19 11:01:29 +01:00
Andreas Dangel 5a90edcd5d Merge branch 'pr-3789' into pmd7-896-slf4j 2022-02-19 11:01:08 +01:00
Andreas DangelandClément Fournier e595211705 Apply suggestions from code review
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2022-02-19 10:51:13 +01:00
Andreas Dangel c2f99dc834 Merge branch 'pmd/7.0.x' into pmd7-896-slf4j 2022-02-19 10:44:22 +01:00
Andreas Dangel 02464a2e2a [dist] Enable test "runPMD" again - most rules are migrated now 2022-02-19 10:36:55 +01:00
Andreas Dangel 765cf3c92a Merge branch 'master' into pmd/7.0.x 2022-02-19 10:25:28 +01:00
Clément Fournier 9cae6e08c6 Revert changes to utils 2022-02-19 00:10:44 +01:00
Clément Fournier e8b79d6d27 fix a bug with parens 2022-02-18 23:46:39 +01:00
Clément Fournier 62cdd0cc22 Remove node matchers 2022-02-18 23:28:05 +01:00
Clément Fournier b34236db15 Fix #3786
Node matchers
2022-02-18 23:27:41 +01:00
Clément Fournier 743ff275eb Extract members of JavaRuleUtil 2022-02-18 20:36:52 +01:00
Andreas Dangel f079921971 Merge master into pmd/7.0.x 2022-02-18 20:18:38 +01:00
Andreas Dangel b9542e5219 Merge pull request #3764 from oowekyala:issue3763-ambiguity-error
[java] Fixes #3763 - ambiguity error #3764
2022-02-18 19:59:54 +01:00
Andreas Dangel 1d78dbabec [doc] Update cli doc for slf4j logging 2022-02-18 19:44:00 +01:00
Andreas Dangel 4e824620b8 [doc] Update release notes, add logging doc (#896) 2022-02-18 19:35:10 +01:00
Clément Fournier c0041a715e Better rationalize what to do with escaping objects 2022-02-18 18:45:17 +01:00
Andreas Dangel 06363dbf69 [doc] Use slf4j 2022-02-18 18:19:54 +01:00
Andreas Dangel 462d30335a [core] Fix jul-to-slf4j integration
Need to remove all handlers first, as java by default
adds a ConsoleLogger. The SLF4JBridgeHandler should be
the only handler registered.
2022-02-18 18:13:44 +01:00
Andreas Dangel 958be69b19 [visualforce] Use slf4j 2022-02-18 18:00:55 +01:00
Andreas Dangel 0c0b0ff86f [plsql] Use slf4j 2022-02-18 17:44:12 +01:00
Andreas Dangel 138296be1e [java] Use slf4j 2022-02-18 17:21:10 +01:00
Andreas Dangel 744817a389 [apex] Use slf4j 2022-02-18 16:49:29 +01:00
Andreas Dangel 7b702bd6eb [core] Add jul-to-slf4j bridge
This is at least needed for apex jorje, but might be handy
for any other library that logs through jul.
2022-02-18 16:44:31 +01:00
Andreas Dangel d1cc05e4d5 [test] Supress JavaUtilLoggingRule for now 2022-02-18 16:12:07 +01:00
Andreas Dangel 9ba34fea67 [core] Use slf4j 2022-02-18 16:03:37 +01:00
Andreas Dangel f6378d17ea Merge branch 'pmd/7.0.x' into pmd7-896-slf4j 2022-02-18 14:22:10 +01:00
Andreas Dangel cfbb14c91c [core] Refactor Slf4jSimpleConfigurationForAnt 2022-02-18 14:22:00 +01:00
Andreas Dangel 116cb766aa Merge branch 'master' into pmd/7.0.x 2022-02-18 12:45:04 +01:00
Andreas Dangel 3b5908ed23 [core] Report.addSuppressedViolation can be private (is new in PMD7) 2022-02-18 11:37:00 +01:00
Clément Fournier 47942277fb Treat field more like getter 2022-02-18 10:37:22 +01:00
Clément Fournier fda60f7d20 Add return and throw as ok places 2022-02-18 10:35:53 +01:00
Clément Fournier 2f714ee432 Improve printing 2022-02-18 00:42:11 +01:00
Clément Fournier 4161d7fcea Merge remote-tracking branch 'upstream/pmd/7.0.x' into update-LawOfDemeter 2022-02-18 00:12:31 +01:00
Andreas Dangel ee74e7eacf [core] Restore Report methods for backwards compatibility
These methods are DeprecatedUntil700 to allow
calling PMD7 from maven-pmd-plugin.
2022-02-17 21:10:07 +01:00
Clément Fournier 468e04b236 More improvements 2022-02-17 20:14:31 +01:00
Andreas Dangel 64a8b37972 Use new dogfood rule "DoNotUseJavaUtilLogging" 2022-02-17 18:54:38 +01:00
Andreas Dangel a8daccb6a5 [apex] Remove unused logback impl 2022-02-17 18:54:37 +01:00
Andreas Dangel c166613c0f [dist] Add integration test for --debug flag 2022-02-17 18:54:37 +01:00
Andreas Dangel ad86896682 [dist] Adjust default logging configuration 2022-02-17 18:54:37 +01:00
Andreas Dangel bc6806d0f1 [core] Forward slf4j logging to ant
This is a hacky way: It reconfigures SimpleLogger to use
a special print stream. What ever is printed there is
forwarded to ant's project logger.

Removed the deprecated and now unused classes in
net.sourceforge.pmd.util.log.
2022-02-17 18:54:37 +01:00
Andreas Dangel 5c7af91688 [dist] Add default simplelogger.properties 2022-02-17 18:54:36 +01:00
Andreas Dangel e1d66e2f42 [core] Use slf4j-api and slf4j-simple
Support "--debug" flag for slf4j-simple
2022-02-17 18:54:36 +01:00
Andreas Dangel 488f8c716f Avoid NPE if writer is not set in AbstractRenderer.flush 2022-02-17 18:52:53 +01:00
Andreas Dangel 1645f963a8 [core] Restore PMD.processFiles(PMDConfiguration,List,Collection,List)
Refs #3692
2022-02-17 14:12:08 +01:00
Andreas Dangel c6e8a9dfb2 Merge branch 'master' into pmd/7.0.x 2022-02-16 22:02:02 +01:00
Clément Fournier 238697f039 suppress SimplifyBooleanReturns
Refs #3786
2022-02-16 22:00:20 +01:00
Clément Fournier ef33d2e732 Fix more fps 2022-02-16 21:36:31 +01:00
Clément Fournier 1f2aa739b4 Revert "Add commonPrefix and commonSuffix to StringUtils"
This reverts commit f7e4d62415.
2022-02-16 21:13:43 +01:00
Clément Fournier f7e4d62415 Add commonPrefix and commonSuffix to StringUtils 2022-02-16 21:12:44 +01:00
Clément Fournier 4a1e417307 Allow transformation methods 2022-02-16 20:41:52 +01:00
Clément Fournier 6d1adeebfe Fix more bugs 2022-02-16 20:21:57 +01:00
Andreas Dangel 02fafafc1f Merge branch 'master' into pmd/7.0.x 2022-02-16 19:58:27 +01:00
Andreas Dangel 18779ea2e4 Merge pull request #3692 from oowekyala:analysis-listener
[core] Analysis listeners #3692
2022-02-16 19:57:26 +01:00
Clément Fournier e65b11919a Add test cases for fixed issues
- Fixes #2175
- Fixes #2179
- Fixes #1605: same fix as #2179, since enum constants are static fields they are trusted.
- Fixes #2180: the fix is not to special-case Thread, but to consider all static methods as trusted (consistent with the treatment of static fields in #2179)
- Fixes #2182: the fix is not to allow package-private access, but to allow a class to access fields of instances of the same class.
- Fixes #1014
- Fixes #2188
2022-02-16 19:54:31 +01:00
Clément Fournier e88e4b6fcc cleanup 2022-02-16 19:02:29 +01:00
Clément Fournier e30271f165 Fix FPs 2022-02-16 18:59:25 +01:00
Clément Fournier 3bd8e0281a Cleanup 2022-02-16 18:49:03 +01:00
Clément Fournier a4a8feec2c Improve pretty printer 2022-02-16 18:35:36 +01:00
Clément Fournier 8f4c1aecfb make trust radius configurable 2022-02-16 18:20:49 +01:00
Clément Fournier 1fe9850b84 better definition and messges 2022-02-16 16:55:22 +01:00
Clément Fournier 98ee90d1e9 Comments 2022-02-16 13:44:49 +01:00
Clément Fournier 4e734fec59 Fix memory leak 2022-02-16 13:41:41 +01:00
Clément Fournier 925c3d2b51 suppress SimplifyBooleanReturns 2022-02-16 12:52:42 +01:00
Clément Fournier bc3c8a7ffa Fix factory methods 2022-02-16 01:29:30 +01:00
Clément Fournier 5bad87eb88 Update tree dump tests 2022-02-16 01:14:32 +01:00
Clément Fournier 9660e44a48 fix it 2022-02-16 01:05:26 +01:00
Clément Fournier 42a8c879bd Degree approach 2022-02-16 00:21:56 +01:00
Clément Fournier 74aa58a603 Filter out System.out 2022-02-15 22:51:21 +01:00
Clément Fournier e1da2b3645 infection metaphor 2022-02-15 21:34:37 +01:00
Clément Fournier 0ba06b939d Simplify 2022-02-08 01:10:49 +01:00
Clément Fournier 230236d328 avoid computing canCompleteNormally if possible 2022-02-08 00:50:34 +01:00
Clément Fournier 1c74b1820e Fix new errors with finally 2022-02-08 00:45:01 +01:00
Clément Fournier dff3458d61 Fix #3763 - ambiguity error
Problem was that the header scopes looked like this:

   IMPORTED -> EMPTY -> JAVA_LANG

Where IMPORTED and JAVA_LANG both can resolve the same
name NAME. The empty symtable is administrative, it's
a shadow barrier. With the previous definition of a
 shadow barrier, the barriers were positioned this way:

   IMPORTED -> EMPTY] -> JAVA_LANG]

IMPORTED asks for NAME and finds something. It's not
a shadow barrier so it asks EMPTY for NAME. EMPTY
does not know NAME so it asks its parent, ignoring that
it itself is a shadow barrier.

Now we don't call `ShadowChain::resolve` to collect
shadowed names to avoid this situation.
2022-02-07 21:15:12 +01:00
Clément Fournier 7afc7ade13 Fix pmd violations 2022-02-07 17:21:33 +01:00
Clément Fournier 59ada54047 Merge remote-tracking branch 'pmd6/master-deprecations-for-analysis-listeners' into analysis-listener 2022-02-07 01:04:10 +01:00
Clément Fournier 8cc7c7bbea Merge branch '7.0.x' into analysis-listener 2022-02-07 00:54:47 +01:00
Clément Fournier 44090b5dee Merge branch 'text-utils-simple' into text-utils-javacc 2022-02-06 17:06:12 +01:00
Clément Fournier 1f8497fc55 Merge branch 'analysis-listener' into text-utils-simple 2022-02-06 16:57:51 +01:00
Clément Fournier 820be59186 Merge branch '7.0.x' into update-LawOfDemeter 2022-02-06 16:05:56 +01:00
Clément Fournier d2a51d4e73 Merge branch '7.0.x' into java-pattern-binding-scopes 2022-02-06 15:59:40 +01:00
Clément Fournier b93dfb72f9 Merge branch 'pr/3657' into 7.0.x 2022-02-06 15:58:48 +01:00
Clément Fournier 92f0e25af2 Merge branch '7.0.x' into pr/3657 2022-02-06 15:58:47 +01:00
Clément Fournier 459f9c5204 Merge remote-tracking branch 'pmd6/master' into 7.0.x 2022-02-06 15:58:23 +01:00
Clément Fournier 47713a3cd8 Update tests for targets 2022-02-06 15:52:17 +01:00
Clément Fournier 3fbdd5a7d9 Make abrupt completionbinary
Full coverage of the JLS, even for tries
2022-02-06 15:47:14 +01:00
Clément Fournier 0a0c730726 Update abrupt completion tests to be binary 2022-02-06 14:16:51 +01:00
Clément Fournier c93eb11703 Merge branch '7.0.x' into java-pattern-binding-scopes 2022-02-06 14:14:37 +01:00
Clément Fournier 2a89d9a115 fix test 2022-02-05 12:06:36 +01:00
Clément Fournier 02c1b5a869 pmd AvoidUsingVolatile 2022-02-04 23:05:36 +01:00
Clément Fournier f6b4f944b4 Merge remote-tracking branch 'origin/analysis-listener' into analysis-listener 2022-02-04 21:11:26 +01:00
Clément Fournier a69d2fb194 update doc 2022-02-04 21:09:24 +01:00
Clément FournierandAndreas Dangel 8b9d825581 Update pmd-core/src/main/java/net/sourceforge/pmd/PMD.java
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-02-04 20:51:40 +01:00
Clément Fournier 734bf91a3e Comments from PR review 2022-02-04 20:51:33 +01:00
Clément FournierandAndreas Dangel c874f7a0bd Apply suggestions from code review
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2022-02-04 20:42:32 +01:00
Andreas Dangel 2489ef8061 [java] Fix DontCallSuperVisitWhenUsingRuleChain issues 2022-02-04 17:12:35 +01:00
Andreas Dangel bc61f500ac [java] MostlySingularMultimap - return null again 2022-02-04 16:01:31 +01:00
Andreas Dangel 26f99743c7 Remove UselessParentheses 2022-02-03 14:52:47 +01:00
Andreas Dangel 668ed37ffb [visualforce] Fix PMD dogfood issues 2022-02-03 12:59:32 +01:00
Andreas Dangel c4a1c61fe3 [scala] Fix PMD dogfood issues 2022-02-03 12:51:35 +01:00
Andreas Dangel 0d43acc11a [plsql] Fix PMD dogfood issues 2022-02-03 12:49:31 +01:00
Andreas Dangel c172920011 [modelica] Fix PMD dogfood issues 2022-02-03 12:42:54 +01:00
Andreas Dangel b2585cd484 [javascript] Use ArrayDeque instead of Stack (LooseCoupling) 2022-02-03 12:39:21 +01:00
Andreas Dangel 3d706dd486 [java] More PMD dogfood fixes
* ClassWithOnlyPrivateConstructorsShouldBeFinal
* SimplifyBooleanReturns
* LiteralsFirstInComparisons
* UnnecessaryReturn
* LooseCoupling
2022-02-03 12:28:32 +01:00
Andreas Dangel 7aabe2ee5e [core] Remove suppression for PMD.SingularField (#3754 / #3756) 2022-02-03 10:49:03 +01:00
Andreas Dangel 6703945371 Merge branch 'pmd/7.0.x' into pmd7-dogfood 2022-02-03 10:44:42 +01:00
Andreas Dangel f8e5593f72 Merge pull request #3756 from oowekyala:issue3754-singularfield-fp
[java] Fix #3754 singularfield fp #3756

* pr-3756:
  Fix #3754 - SingularField false positive with read in while condition
2022-02-03 10:31:54 +01:00
Andreas Dangel e7f9f6bd4d Merge pull request #3757 from oowekyala:java-override-resolution
[java] Improve ASTMethodDeclaration::isOverridden #3757

* pr-3757:
  Cleanups
  Add tests for UselessOverridingMethod
  Cleanups
  Cleanup UselessOverridingMethod
  Cleanups
  Extract override resolution logic from MissingOverrid rule
2022-02-03 10:31:17 +01:00
Clément Fournier 84c0424af9 Support foreach loop 2022-02-01 21:28:00 +01:00
Clément Fournier 7d76e6b160 support do loop 2022-02-01 21:24:28 +01:00
Clément Fournier ce9f1c9474 support for loop 2022-02-01 20:52:36 +01:00
Clément Fournier f190316c16 Cleanup 2022-02-01 20:49:22 +01:00
Andreas Dangel 4648417108 [java] Various PMD dogfood fixes
* SimplifyBoolean
* LooseCoupling
* UnusedLocalVar
2022-02-01 20:09:25 +01:00
Clément Fournier c4f7a07956 Checkstyle 2022-01-31 20:17:03 +01:00
Clément Fournier 5adecda4e4 Merge remote-tracking branch 'pmd6/master' into 7.0.x 2022-01-31 20:15:06 +01:00
Clément Fournier 2d8ee7c059 Cleanups 2022-01-31 19:15:35 +01:00
Clément Fournier 019fcd02ba Change mix -> join 2022-01-31 19:00:08 +01:00
Clément Fournier 14b19d9969 add test for yield 2022-01-31 18:56:12 +01:00
Clément Fournier d2d4944840 Rename test file 2022-01-31 18:54:19 +01:00
Clément Fournier c2b78f1799 Treat yield like break 2022-01-31 18:35:04 +01:00
Clément Fournier 413e0eb0c4 Enum switches are not considered exhaustive by compiler
Should fix some of the crashes in regression
2022-01-31 17:23:53 +01:00
Clément Fournier f261eeb8eb Add tests for UselessOverridingMethod
Add unit tests
2022-01-31 01:42:06 +01:00
Clément Fournier 0a9a80e695 Cleanups 2022-01-30 20:20:09 +01:00
Clément Fournier 51345e37d7 Cleanup UselessOverridingMethod 2022-01-30 20:15:22 +01:00
Clément Fournier beb72e98b1 Cleanups 2022-01-30 19:44:07 +01:00
Clément Fournier 76bb41cc35 Extract override resolution logic from MissingOverrid rule 2022-01-30 19:36:17 +01:00
Clément Fournier b59bf94dd8 Remove duplication 2022-01-30 18:31:26 +01:00
Clément Fournier 60914cb9c0 Change default delimiter for strings 2022-01-30 18:23:30 +01:00
Clément Fournier c0ca9764a3 Remove rule builder, improve error reporting for invalid rule 2022-01-30 17:52:49 +01:00
Clément Fournier 9f110e9099 Merge branch '7.0.x' into port-properties 2022-01-30 16:39:07 +01:00
Clément Fournier 315b8993f6 Fix stackoverflow 2022-01-30 16:18:40 +01:00
Clément Fournier 44dda882c5 Merge branch '7.0.x' into update-LawOfDemeter 2022-01-30 16:11:40 +01:00
Clément Fournier 48f4517a6e Merge branch 'pr/3734' into 7.0.x 2022-01-30 16:10:08 +01:00
Clément Fournier c3c64771db Merge branch '7.0.x' into pr/3734 2022-01-30 16:10:05 +01:00
Clément Fournier f720323619 Fix copy-pasted doc 2022-01-30 16:00:09 +01:00
Clément Fournier f9a1846bda Fix other bugs 2022-01-30 15:53:35 +01:00
Clément Fournier 3f7b93a3e4 Fix scope of locals in initializers 2022-01-30 15:23:27 +01:00
Clément Fournier 2b570cf51a Fix a bug with bindings after while 2022-01-30 00:15:38 +01:00
Clément Fournier 46b4c6f780 Fix scope of locals in fallthrough switch 2022-01-29 19:13:28 +01:00
Clément Fournier ed1c9e970a Fix parsing bug 2022-01-29 19:04:32 +01:00
Clément Fournier da96eab924 Fix scope of guarded patterns in switch 2022-01-29 18:51:39 +01:00
Clément Fournier 778764c682 Support switch stmt properly 2022-01-29 18:48:40 +01:00
Clément Fournier 0be7135122 Fix parsing problem with guarded patterns 2022-01-29 18:27:07 +01:00
Clément Fournier 6d5fe7e63c Fix some nodes not visited 2022-01-29 17:30:42 +01:00
Clément Fournier 0dfb4a2e37 Extract abrupt completion analysis 2022-01-29 17:19:45 +01:00
Clément Fournier 63e3daee36 Support switch 2022-01-29 17:10:22 +01:00
Clément Fournier d9bcc0bb26 More tests 2022-01-29 16:41:26 +01:00
Clément Fournier dc232f6f6f Fix while loop tests 2022-01-29 15:56:14 +01:00
Clément Fournier 5a080d8f97 Fix #3754 - SingularField false positive with read in while condition 2022-01-29 15:34:46 +01:00
Clément Fournier b22f182c2a Try to fix an issue
This abrupt completion function is bad..
2022-01-29 13:28:21 +01:00
Clément Fournier bd2a5a9d64 Update abrupt completion test 2022-01-29 13:28:03 +01:00
Andreas Dangel 41c6d260fb Merge branch 'master' into pmd/7.0.x 2022-01-29 10:08:59 +01:00
Clément Fournier 4db3627c02 Support ternaries 2022-01-28 21:57:47 +01:00
Clément Fournier 38c7ba2bf6 Support loops and conditionals 2022-01-28 21:39:07 +01:00
Clément Fournier 31fdf9f8d2 Fix bindings in conditionals 2022-01-28 20:38:29 +01:00
Clément Fournier 260b5ccf89 doc 2022-01-28 20:16:08 +01:00
Andreas Dangel 2d393396d5 [apex] Various PMD dogfood fixes 2022-01-28 12:09:57 +01:00
Andreas Dangel 77f01f683d Fix PMD issues in core and test 2022-01-28 11:44:54 +01:00
Andreas Dangel 3f2b1b031a Suppress SingularField in IteratorUtil 2022-01-28 11:29:30 +01:00
Andreas Dangel cdefdf240e Add pmd-jsp/javascript modules on m-pmd-p execution
This avoids incompatible API errors, as then no mix
of PMD 6/7 is used.
2022-01-28 10:15:18 +01:00
Andreas Dangel c3114a1670 Compare GenericToken with == again 2022-01-28 10:13:12 +01:00
Andreas Dangel a12e9aed13 Merge branch 'pmd/7.0.x' into pmd7-dogfood 2022-01-28 10:01:37 +01:00
Andreas Dangel aa8c02cf5c Merge pull request #3668 from adangel:pmd7-ClassWithOnlyPrivateConstructorsShouldBeFinal-abstract
[java] ClassWithOnlyPrivateConstructorsShouldBeFinal - fix FP with inner private classes #3668

* pr-3668:
  Compare subtypes without generics
  [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - add test case with generics
  [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - simplify
  [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - consider nested
  [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - allow non-abstract abstract classes
  [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - exclude abstract classes
2022-01-28 09:47:39 +01:00
Clément Fournier c8a6df7cf5 Merge branch '7.0.x' into java-pattern-binding-scopes 2022-01-27 17:05:35 +01:00
Clément Fournier 2acda6ad96 Merge branch '7.0.x' into update-LawOfDemeter 2022-01-26 20:06:50 +01:00
Clément Fournier c026fa0905 Merge branch 'update-UnnecessaryImport' into 7.0.x 2022-01-26 20:05:15 +01:00
Clément Fournier 06a2205fdf Merge branch 'pr/3731' into 7.0.x 2022-01-26 20:00:49 +01:00
Clément Fournier 41a7f20301 Merge branch '7.0.x' into pr/3731 2022-01-26 20:00:47 +01:00
Clément Fournier 3cc1d1b2e0 Fix NPE 2022-01-26 19:53:05 +01:00
Clément Fournier 919a1e7562 Merge branch 'pr/3739' into 7.0.x 2022-01-26 19:49:54 +01:00
Clément Fournier 590ce32880 Merge branch 'pr/3663' into 7.0.x 2022-01-26 19:46:02 +01:00
Clément Fournier 124bf950df Merge branch '7.0.x' into pr/3663 2022-01-26 19:46:00 +01:00
Clément Fournier 9ce2213b0e Merge remote-tracking branch 'pmd6/master' into 7.0.x 2022-01-25 22:31:53 +01:00
Clément Fournier cb3422a7fa Fix UnnecessaryImport with import static of types 2022-01-23 22:34:31 +01:00
Clément Fournier 5d30c39ce7 checkstyle 2022-01-23 19:31:08 +01:00
Clément Fournier 185bba853c Handle static imports of types 2022-01-23 18:43:55 +01:00
Andreas Dangel 85a4053352 [java] Fix rules and tests after merge 2022-01-20 16:12:57 +01:00
Andreas Dangel 6c5cf17d18 Merge branch 'master' into pmd/7.0.x 2022-01-20 15:45:14 +01:00
Peter Paul Bakker 051da73ce3 set version to 7.0.0-kotlin-SNAPSHOT to avoid mixups in 7.0.0-SNAPSHOT in sonatype snapshots repo 2022-01-20 15:37:41 +01:00
Andreas Dangel 840f2e3203 [javascript] Update AST nodes and visitor 2022-01-20 12:48:45 +01:00
Andreas Dangel afc8a11020 Merge branch 'master' into pmd/7.0.x 2022-01-20 12:36:44 +01:00
Clément Fournier 4790a38e20 Add test case 2022-01-16 15:51:51 +01:00
Clément Fournier 7432048d75 Cleanups 2022-01-16 15:47:38 +01:00
Clément Fournier 20c366ec27 update ci file 2022-01-16 15:42:35 +01:00
Clément Fournier 62aa48f3e2 codestyle 2022-01-16 01:20:47 +01:00
Clément Fournier f8ce9cd9b9 Fix tree dump tests 2022-01-15 22:53:49 +01:00
Clément Fournier 878845d9fc Fix last tests 2022-01-15 19:12:05 +01:00
Clément Fournier be852434a1 Correctly hndle java.lang 2022-01-15 19:05:08 +01:00
Clément Fournier e475788a10 Fix bugs 2022-01-15 18:32:37 +01:00
Clément Fournier e4cea86a06 Support method wip 2022-01-15 18:02:44 +01:00
Clément Fournier 6b5c017f23 Support static import of variables 2022-01-15 17:44:55 +01:00
Clément Fournier 3c410f1abe Merge branch '7.0.x' into update-UnnecessaryImport 2022-01-15 17:27:32 +01:00
Clément Fournier 0fb4e08171 Cleanup 2022-01-15 17:13:03 +01:00
Clément Fournier 658b5bd595 Merge branch 'pr/3730' into 7.0.x 2022-01-15 17:12:14 +01:00
Clément Fournier 97055cfe87 Merge branch 'pr/3735' into 7.0.x 2022-01-15 17:11:24 +01:00
Clément Fournier 5be7994e5c Merge branch '7.0.x' into pr/3735 2022-01-15 17:11:22 +01:00
Clément Fournier 7929e15076 Merge branch 'pr/3738' into 7.0.x 2022-01-15 17:10:52 +01:00
Clément Fournier cef71db8b6 Merge branch '7.0.x' into pr/3738 2022-01-15 17:10:51 +01:00
Clément Fournier 9071d9d968 Merge branch 'pr/3737' into 7.0.x 2022-01-15 17:10:42 +01:00
Clément Fournier 94522503d8 Merge branch '7.0.x' into pr/3737 2022-01-15 17:10:38 +01:00
Clément Fournier fe719f88bf Merge branch 'pr/3736' into 7.0.x 2022-01-15 17:10:29 +01:00
Clément Fournier 91b1497184 Merge branch '7.0.x' into pr/3736 2022-01-15 17:10:27 +01:00
Clément Fournier 88bc319f98 Merge branch 'pr/3733' into 7.0.x 2022-01-15 17:10:15 +01:00
Clément Fournier c131823471 Merge branch '7.0.x' into pr/3733 2022-01-15 17:10:13 +01:00
Clément Fournier 4058da180c Merge branch '7.0.x' into pr/3730 2022-01-15 17:09:57 +01:00
Clément Fournier fbdbb42b87 Merge branch 'pr/3728' into 7.0.x 2022-01-15 17:09:11 +01:00
Clément Fournier 98445bd91b Cleanups in CouplingBetweenObjectsRule 2022-01-15 16:57:56 +01:00
Clément Fournier 04e3b28329 Simplify SignatureDeclareThrowsExceptionRule 2022-01-15 16:32:26 +01:00
Andreas Dangel 9c3c93b53f [java] Update rule DoNotTerminateVM 2022-01-14 18:48:00 +01:00
Andreas Dangel 2a94279874 [java] Update rule FinalParameterInAbstractMethod 2022-01-14 18:36:31 +01:00
Andreas Dangel 562a7d25c4 [java] Update rule AvoidDeeplyNestedIfStmts 2022-01-14 18:26:12 +01:00
Andreas Dangel 8f0f0ce755 [java] Update rule AvoidThrowingNewInstanceOfSameException 2022-01-14 18:19:48 +01:00
Andreas Dangel fca93a29c9 [java] Update rule AvoidThrowingRawExceptionTypes 2022-01-14 17:00:13 +01:00
Andreas Dangel 80ae15555c [java] Update rule CouplingBetweenObjects 2022-01-14 16:54:33 +01:00
Andreas Dangel 4e9659b392 [java] Update rule LoosePackageCoupling 2022-01-14 16:32:45 +01:00
Andreas Dangel 95c629fb61 Compare subtypes without generics 2022-01-14 15:56:49 +01:00
Andreas Dangel a17765894e [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - add test case
with generics
2022-01-14 15:56:10 +01:00
Andreas Dangel 4a540f5f6d Merge branch 'pmd/7.0.x' into pmd7-ClassWithOnlyPrivateConstructorsShouldBeFinal-abstract 2022-01-14 12:21:10 +01:00
Andreas Dangel efdaeb58de [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - simplify 2022-01-14 12:20:40 +01:00
Andreas Dangel 83d5a136c8 [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - consider nested
Nested classes should only be flagged, if they are not instantiated.
2022-01-14 12:02:49 +01:00
Andreas Dangel 5b4554d743 [java] AvoidDuplicateLiterals - verify skipAnnotations 2022-01-14 10:21:45 +01:00
Andreas Dangel 5648d6c3a2 Merge branch 'pmd/7.0.x' into pmd7-update-AvoidDuplicateLiterals 2022-01-14 10:13:38 +01:00
Andreas Dangel 5e1f977dcc [java] Update rule SignatureDeclareThrowsException 2022-01-14 10:05:34 +01:00
Andreas Dangel 3627167efa [java] Update rules TooManyMethods and TooManyFields
TooManyRules is now a XPath rule as well
2022-01-14 09:13:37 +01:00
Andreas Dangel 433037d822 [java] Update rule UseObjectForClearerAPI 2022-01-14 08:51:37 +01:00
Andreas Dangel e273ca641f Merge pull request #3715 from oowekyala:update-AvoidCatchingGenericException
[java] Update rule AvoidCatchingGenericException #3715

* pr-3715:
  [java] AvoidCatchingGenericException - consider multi-catch
  Update rule AvoidCatchingGenericException
2022-01-14 08:32:52 +01:00
Andreas Dangel 0bf76602fb Merge pull request #3660 from
adangel:pmd7-update-AvoidLosingExceptionInformation


[java] Update rule AvoidLosingExceptionInformation #3660

* pr-3660:
  [java] Update rule AvoidLosingExceptionInformation
2022-01-14 08:31:54 +01:00
Andreas Dangel d2e3780c04 [java] AvoidCatchingGenericException - consider multi-catch 2022-01-13 19:08:39 +01:00
Andreas Dangel 3927046ada Merge branch 'pmd/7.0.x' into pr-3715 2022-01-13 19:03:47 +01:00
Andreas Dangel 393f26e6cd Merge pull request #3717 from oowekyala:update-SimplifiableTestAssertion
[java] Update rule SimplifiableTestAssertion #3717

* pr-3717:
  Update SimplifiableTestAssertion
2022-01-13 18:58:54 +01:00
Andreas Dangel 54127c281f Merge branch 'master' into pmd/7.0.x 2022-01-13 18:53:09 +01:00
Andreas Dangel 6098864117 [java] UnusedLocalVariable - enable unit test, use "ignored"
The rule supports already "ignored" or "unused" as variable name.
See #3656
2022-01-11 18:03:54 +01:00
Andreas Dangel 12a9aa9948 [core] Dogfood fixes for UnusedLocalVariable with our TimeTracker 2022-01-11 17:57:38 +01:00
Andreas Dangel 0bd545558a Merge branch 'pmd/7.0.x' into pmd7-dogfood 2022-01-11 17:48:10 +01:00
Andreas Dangel a77c7234b9 Merge pull request #3651 from adangel:pmd7-update-MethodWithSameNameAsEnclosingClass
[java] Update rule MethodWithSameNameAsEnclosingClass #3651

* pr-3651:
  Change message of MethodWithSameNameAsEnclosingClass
  [java] Update rule MethodWithSameNameAsEnclosingClass
2022-01-11 17:35:48 +01:00
Andreas Dangel 0c56fef887 Merge branch 'master' into pmd/7.0.x 2022-01-09 20:22:36 +01:00
Clément Fournier 9a6ee67caa Merge branch 'master' into 7.0.x 2022-01-05 13:50:04 +01:00
Clément Fournier 0020f2d31d Merge branch 'pr/3665' into 7.0.x 2022-01-05 00:59:42 +01:00
Clément Fournier 9e778c8c58 Merge branch '7.0.x' into pr/3665 2022-01-05 00:59:26 +01:00
Clément Fournier ef658c76a3 Update rule AvoidCatchingGenericException
Refs #2701
2022-01-05 00:43:32 +01:00
Clément Fournier 0389db2f22 Update SimplifiableTestAssertion 2022-01-05 00:42:34 +01:00
Clément Fournier 0871b5a7ae WIP update UnnecessaryImport - static imports are TODO 2022-01-05 00:41:38 +01:00
Clément Fournier 722be1bbc2 Merge branch 'pr/3659' into 7.0.x 2022-01-04 23:00:32 +01:00
Clément Fournier 162738d3a3 Merge branch '7.0.x' into pr/3659 2022-01-04 23:00:30 +01:00
Clément Fournier 88e82195b2 Merge branch '7.0.x' into update-LawOfDemeter 2022-01-04 18:18:19 +01:00
Clément Fournier 9ae1803168 Merge branch 'pr/3649' into 7.0.x 2022-01-04 17:01:28 +01:00
Clément Fournier 7fcc1c8850 Merge branch '7.0.x' into pr/3649 2022-01-04 17:01:26 +01:00
Clément Fournier a9b1b4d868 Merge branch 'pr/3672' into 7.0.x 2022-01-04 16:46:11 +01:00
Clément Fournier d5d57f67f0 Merge branch '7.0.x' into pr/3672 2022-01-04 16:46:09 +01:00
Clément Fournier 2a34918ef4 Unignore test for JunitSpelling
has already been updated in #2899
2022-01-04 00:11:23 +01:00
Clément Fournier 2c589136ea Fix bugs of AvoidFieldNameMatchingMethodName - made CI fail 2022-01-03 16:45:42 +01:00
Clément Fournier 6dab734c9b Fix test 2022-01-02 17:20:45 +01:00
Clément Fournier cd0196bc23 Remove dep on AbstractIgnoredAnnotationRule 2022-01-02 17:18:51 +01:00
Clément Fournier 03143d992e Merge branch 'pr/3662' into 7.0.x 2022-01-02 17:14:04 +01:00
Clément Fournier 75ccb8513d Merge branch '7.0.x' into pr/3662 2022-01-02 17:14:02 +01:00
Clément Fournier 034ee2b3f9 Merge branch 'pr/3664' into 7.0.x 2022-01-02 17:07:38 +01:00
Clément Fournier 392912e5d9 Merge branch '7.0.x' into pr/3664 2022-01-02 17:07:35 +01:00
Clément Fournier 7b7b510808 Checkstyle 2022-01-02 17:05:22 +01:00
Clément Fournier 08b9187d09 Update pmd-java/src/main/resources/category/java/errorprone.xml 2022-01-02 17:02:56 +01:00
Clément Fournier c939fbc026 Shorten method 2022-01-02 16:52:02 +01:00
Clément Fournier 13bf901133 Merge branch 'pr/3675' into 7.0.x 2022-01-02 16:48:43 +01:00
Clément Fournier 18a184b774 Doc 2022-01-02 16:11:51 +01:00
Clément Fournier 73702b08e2 Use isSubSignature because we already have checked accessibility 2022-01-02 16:07:58 +01:00
Clément Fournier 679cae5c82 Fix the fix 2022-01-02 16:05:15 +01:00
Clément Fournier 916d3dc7ca Merge branch 'pr/3661' into 7.0.x 2022-01-02 15:39:10 +01:00
Clément Fournier d598e43d6f Merge remote-tracking branch 'upstream/pr/3661' into pr/3661 2022-01-02 15:38:56 +01:00
Clément Fournier 0af2424922 Update pmd-java/src/main/resources/category/java/errorprone.xml 2022-01-02 15:38:34 +01:00
Clément Fournier fd1ff06f08 Change rule message, commit useful changes 2022-01-02 15:38:05 +01:00
Clément Fournier 58a7c520d2 Merge branch '7.0.x' into pr/3661 2022-01-02 15:03:35 +01:00
Clément Fournier 1a8bf17a04 Merge branch 'pr/3655' into 7.0.x 2022-01-02 15:00:16 +01:00
Clément Fournier b0cc4a9a60 Merge branch '7.0.x' into pr/3655 2022-01-02 15:00:02 +01:00
Clément Fournier bfa706c541 Merge branch 'pr/3654' into 7.0.x 2022-01-02 14:57:30 +01:00
Clément Fournier 3a9173f9f2 Merge branch '7.0.x' into pr/3654 2022-01-02 14:57:03 +01:00
Clément Fournier df15e21640 Cleanups on BeanMembersShouldSerializeRule #3659 2021-12-31 16:30:13 +01:00
Clément Fournier 3979ae6a77 Merge branch '7.0.x' into pr/3659 2021-12-31 16:27:57 +01:00
Clément Fournier 3bbb012695 Apply suggestions from code review 2021-12-31 16:27:29 +01:00
Clément Fournier 4bc9df12be Merge branch 'pr/3658' into 7.0.x 2021-12-31 16:10:01 +01:00
Clément Fournier 4498b652fa Merge branch '7.0.x' into pr/3658 2021-12-31 16:07:48 +01:00
Clément Fournier 9a29b1cf96 Merge branch 'pmd/7.0.x' into pmd7-update-DoNotExtendJavaLangThrowable 2021-12-31 15:55:59 +01:00
Clément Fournier 0024f0ab6f Use typeIsExactly in DoNotExtendJavaLangThrowable 2021-12-31 15:55:26 +01:00
Clément Fournier f1aa9092ff remove copy pasted doc 2021-12-31 15:51:26 +01:00
Clément Fournier 1ab1403a5f Convert DetachedTestCase to java 2021-12-31 15:48:55 +01:00
Clément Fournier 9f6a36bd41 Merge branch '7.0.x' into pr/3655 2021-12-31 15:33:07 +01:00
Clément Fournier 05dd07cc14 Add test case
I expect it to fail until we merge the other suggestion
2021-12-31 15:26:51 +01:00
Clément Fournier 793572a1e7 Merge branch '7.0.x' into pr/3653 2021-12-31 15:23:14 +01:00
Clément Fournier 895faa1fe5 Merge branch 'pr/3652' into 7.0.x 2021-12-31 15:20:54 +01:00
Clément Fournier 8aa3704af4 Merge branch '7.0.x' into pr/3652 2021-12-31 15:20:51 +01:00
Clément Fournier 18908eb117 Change message of MethodWithSameNameAsEnclosingClass 2021-12-31 15:19:26 +01:00
Clément Fournier 97bafcf537 Merge branch 'pr/3650' into 7.0.x 2021-12-31 15:12:41 +01:00
Clément Fournier 8dc35c296e Merge branch '7.0.x' into pr/3650 2021-12-31 15:12:38 +01:00
Andreas Dangel 0142c9511e [doc] Update release notes (#1669, #2320) 2021-12-23 19:09:47 +01:00
Andreas Dangel 44318f046d [java] NullAssignment - test cases for #2320 and #1669 2021-12-23 19:07:56 +01:00
Andreas Dangel 538f7468d2 [java] NullAssignment - check nested ternaries 2021-12-23 18:37:27 +01:00
Clément Fournier 4e9d451412 Cleanups, rename FormalComment to JavadocComment 2021-12-22 21:22:24 +01:00
Clément Fournier 22a6f0d577 Merge branch 'text-utils-javacc' into text-utils-comments 2021-12-22 19:58:33 +01:00
Clément Fournier dcfccdc2a8 Merge branch 'text-utils-simple' into text-utils-javacc 2021-12-22 19:58:22 +01:00
Clément Fournier 2c1c37b966 More fixes 2021-12-22 19:57:31 +01:00
Clément Fournier 4ea13069f5 Merge branch 'text-utils-simple' into text-utils-javacc 2021-12-22 19:40:43 +01:00
Clément Fournier 13d8ddbab6 checkstyle 2021-12-22 19:40:33 +01:00
Clément Fournier 9d1ec11bbd BAD Merge branch 'text-utils-simple' into text-utils-javacc 2021-12-22 19:24:49 +01:00
Clément Fournier f16c863167 Merge branch 'analysis-listener' into text-utils-simple 2021-12-22 19:23:44 +01:00
Andreas Dangel f5ee382460 [java] NullAssignment - fix false positives and negatives 2021-12-21 20:13:06 +01:00
Andreas Dangel 6ababcbfd7 Merge branch 'master' into pmd/7.0.x 2021-12-20 19:47:10 +01:00
Andreas Dangel b92a938a22 Merge pull request #3647 from adangel:pmd7-fix-regression-tester-errors
[java] Fixes for new regression tester errors #3647

* pmd7-fix-regression-tester-errors:
  [java] CloseResource - use ASTVariableDeclaratorId::getTypeNode
  [java] Fix parse errors with qualified type names in permits clause
  [java] ImplicitSwitchFallThrough - fix NPE in record constructor
  [java] ClassNamingConventions - fix class cast exception with records
  [java] CloseResource - fix class cast exception with pattern matching
2021-12-20 19:16:06 +01:00
Andreas Dangel 02c9591aad Merge branch 'pmd/7.0.x' into pmd7-fix-regression-tester-errors 2021-12-17 15:17:28 +01:00
Clément Fournier f6e2938962 Cleanups 2021-12-17 13:27:34 +01:00
Clément Fournier 5f0a5daa41 Fix force lang 2021-12-16 18:24:37 +01:00
Clément Fournier 71cc6bcf6b Fix apex 2021-12-16 18:14:50 +01:00
Clément Fournier 853278345f merge 2021-12-16 17:53:25 +01:00
Clément Fournier d1ea31a196 Doc 2021-12-16 17:09:01 +01:00
Clément Fournier f4468a22c1 Delete EcmasccriptLanguageModuleTest
This should already be tested in pmd core as there
are no custom violation factories anymore
2021-12-16 16:49:04 +01:00
Clément Fournier 55f301cbd7 Fix support for --force-language 2021-12-16 16:38:17 +01:00
Clément Fournier 913d0ab272 Merge branch '7.0.x' into analysis-listener 2021-12-16 16:31:50 +01:00
Andreas Dangel 6e9ab033ad Merge branch 'pmd/7.0.x' into pmd7-dogfood 2021-12-09 10:01:53 +01:00
Andreas Dangel cae01ceeb4 Merge branch 'pmd/7.0.x' into pmd7-LooseCoupling-generics 2021-12-09 10:01:31 +01:00
Andreas Dangel c56effbd36 Merge branch 'pmd/7.0.x' into pmd7-missingoverride-false-positive 2021-12-09 10:00:42 +01:00
Andreas Dangel b829a168bd Merge branch 'pmd/7.0.x' into
pmd7-ClassWithOnlyPrivateConstructorsShouldBeFinal-abstract
2021-12-09 09:58:15 +01:00
Andreas Dangel b9f259b171 Merge pull request #3671 from
adangel:pmd7-UnusedLocalVariable-unaryexpression

[java] Fix unused variable/field detection with unary expressions #3671

* pr-3671:
  [java] Add #3671 to test cases [skip ci]
  [java] Fix unused variable/field detection with unary expressions
2021-12-09 09:49:56 +01:00
Andreas Dangel 6003838438 [java] Ignore the tests which have pull requests already
#3656 #3668 #3671 #3672 #3675
2021-12-09 09:41:08 +01:00
Andreas Dangel 52d6e8e677 Merge branch 'master' into pmd/7.0.x 2021-12-09 09:20:00 +01:00
Andreas Dangel 32327885d9 [java] MissingOverride - mark test case (#3675) [skip ci] 2021-12-03 20:30:26 +01:00
Andreas Dangel 209ab682ad [java] MissingOverride - fix false positive with mixing type vars 2021-12-03 20:23:29 +01:00
Andreas Dangel 90ce89c9ee REVERT ME - only run addition dogfood execution on linux for PRs 2021-12-02 16:59:11 +01:00
Andreas Dangel fe66cda0d5 [java] LooseCoupling - mark test case (#3672) [skip ci] 2021-12-02 16:55:37 +01:00
Andreas Dangel eb653967ab [java] LooseCoupling - fix false positive with generics 2021-12-02 16:49:57 +01:00
Andreas Dangel bd2ebed978 [java] Add #3671 to test cases [skip ci] 2021-12-02 16:26:25 +01:00
Andreas Dangel ea05f668fd [java] Fix unused variable/field detection with unary expressions
This affects at least UnusedLocalVariable and
UnusedPrivateField
2021-12-02 16:20:00 +01:00
Andreas Dangel 095a7bb593 [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - allow
non-abstract abstract classes

These are abstract classes without abstract methods. They can
be made final without problems.
2021-12-02 15:47:32 +01:00
Andreas Dangel b45de73fb6 [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - exclude abstract
classes
2021-12-01 12:29:36 +01:00
Andreas Dangel 23777571f8 [core] More dogfood fixes
* SimplifyBooleanReturns
* SingularField
* UseDiamondOperator
* ClassWithOnlyPrivateConstructorsShouldBeFinal
* LooseCoupling
2021-12-01 12:13:31 +01:00
Andreas Dangel 5bdd5cd1be [java] Update rule AvoidCallingFinalize
Converted the rule to XPath
2021-11-30 11:57:04 +01:00
Andreas Dangel de043eba39 [java] Update rule AvoidCatchingNPE 2021-11-30 11:38:59 +01:00
Andreas Dangel 3679b4e8af [java] Update rule AvoidDuplicateLiterals 2021-11-30 11:30:29 +01:00
Andreas Dangel ae81189fae [java] Update rules AvoidFieldNameMatching{Method,Type}Name
Converted both rules to XPath
2021-11-30 11:09:03 +01:00
Andreas Dangel 3d077b2d1b [java] Update rule AvoidLiteralsInIfCondition 2021-11-30 10:52:10 +01:00
Andreas Dangel 71ffd62abc [java] Update rule AvoidLosingExceptionInformation 2021-11-30 10:18:11 +01:00
Andreas Dangel fa02e9dc2a [java] Update rule BeanMembersShouldSerialize
* JavaRuleUtil::isGetter now only accepts "is"-Prefixed getters
  for boolean methods.
* AbstractLombokAwareRule has been deleted
* One test case has been deleted - it tested that the rule
  worked without a auxclasspath
* Another test case has been ignored - in order to resolve
  imports on demand, lombok would need to be on the test aux classpath
2021-11-30 10:04:59 +01:00
Andreas Dangel b29e2faf66 REVERT ME - execute dogfood also on pull requests 2021-11-30 09:18:56 +01:00
Andreas Dangel 972b55bf99 [ci] Use pmd-dogfood-config.xml again by default
Switch to pmd-dogfood-config7.xml for dogfood execution only
2021-11-30 09:15:15 +01:00
Andreas Dangel f3625abff3 [java] Update rules CallSuperFirst and CallSuperLast 2021-11-30 09:07:35 +01:00
Andreas Dangel c9bed92296 [java] CloseResource - use ASTVariableDeclaratorId::getTypeNode 2021-11-30 08:35:04 +01:00
Andreas Dangel f7395bc72a [core] Various easy dogfood fixes
* ClassWithOnlyPrivateConstructorsShouldBeFinal
* SimplifyBooleanReturns
* OptimizableToArrayCall
* UseDiamondOperator
2021-11-29 12:23:10 +01:00
Andreas Dangel e955b0aee8 [ci] Enable dogfood build for pmd7 2021-11-29 12:18:22 +01:00
Andreas Dangel 9425684882 [java] Update rule DetachedTestCase 2021-11-29 10:09:28 +01:00
Andreas Dangel ac4afff2fd [java] Update rule DoNotExtendJavaLangThrowable
Use typeresolution
2021-11-29 09:57:22 +01:00
Andreas Dangel 9a1908c0a2 [java] Update rule DoNotHardCodeSDCard 2021-11-29 09:52:20 +01:00
Andreas Dangel d66d8828ab [java] Update rule DoNotThrowExceptionInFinally 2021-11-29 09:45:19 +01:00
Andreas Dangel dd8b25802d [java] Update rule MethodWithSameNameAsEnclosingClass
Converted the rule into a simle XPath rule
2021-11-29 09:37:27 +01:00
Andreas Dangel 96936354ce [java] Update rule MoreThanOneLogger 2021-11-29 09:30:52 +01:00
Andreas Dangel fd5457d554 [java] Update rule NullAssignment 2021-11-29 09:22:44 +01:00
Andreas Dangel f36b99fbd7 Merge branch 'master' into pmd/7.0.x 2021-11-27 12:17:22 +01:00
Andreas Dangel c6c75ca5bf Merge branch 'master' into pmd/7.0.x 2021-11-27 11:31:40 +01:00
Andreas Dangel 247d98d270 [java] Fix parse errors with qualified type names in permits clause 2021-11-26 11:10:55 +01:00
Andreas Dangel 9f8d043ad6 [java] ImplicitSwitchFallThrough - fix NPE in record constructor 2021-11-26 11:10:44 +01:00
Andreas Dangel e0cbedc2f1 [java] ClassNamingConventions - fix class cast exception with records 2021-11-26 11:10:30 +01:00
Andreas Dangel fa69bd0ec1 [java] CloseResource - fix class cast exception with pattern matching 2021-11-26 11:10:07 +01:00
Andreas Dangel 6e63a15c94 Merge branch 'master' into pmd/7.0.x 2021-11-26 11:03:17 +01:00
Andreas Dangel b77b74e6aa Merge pull request #3609 from adangel:pmd7-update-PrimitiveWrapperInstantiation
[java] Update rule PrimitiveWrapperInstantiation #3609

* pr-3609:
  [java] PrimitiveWrapperInstantiation - reuse InvocationMatcher
  Bump build-tools to 18-SNAPSHOT for ReuseInvocationMatcher rule
  [java] Update rule PrimitiveWrapperInstantiation
2021-11-26 08:39:15 +01:00
Andreas Dangel 71f26bb698 Merge pull request #3607 from adangel:pmd7-update-LogicInversion
[java] Update rule LogicInversion #3607

* pr-3607:
  [java] LogicInversion - add test case for !=
  [java] LogicInversion - consider != as well
  [java] Update rule LogicInversion
2021-11-26 08:38:28 +01:00
Andreas Dangel 9a1b5550ab Merge branch 'pmd/7.0.x' into pmd7-update-LogicInversion 2021-11-25 21:37:02 +01:00
Andreas Dangel 4bd4211826 Merge branch 'pmd/7.0.x' into pmd7-update-PrimitiveWrapperInstantiation 2021-11-25 21:35:37 +01:00
Andreas Dangel aa95c8f7ed Merge pull request #3645 from adangel:pmd7-supertypecheck-cache-oom
[java] SupertypeCheckCache - exclude also subtypes from caching #3645

* pmd7-supertypecheck-cache-oom:
  [ci] Exclude checkstyle's InputJavaParserNoFreezeOnDeeplyNestedLambdas
  [java] SupertypeCheckCache - exclude also subtypes from caching
2021-11-25 20:28:44 +01:00
Andreas Dangel 2c2ffaa834 [ci] Exclude checkstyle's InputJavaParserNoFreezeOnDeeplyNestedLambdas 2021-11-25 16:58:08 +01:00
Andreas Dangel 4e4ff056be [java] SupertypeCheckCache - exclude also subtypes from caching
Under certain situation, this might lead to an out of memory
if InferenceVars are cached as being a subtype of String.
2021-11-25 16:56:42 +01:00
Peter Paul Bakker b4d7867eba add resources to the pmd-kotlin jar so rule definitions files can be found by pmd-sonar plugin 2021-11-25 15:20:29 +01:00
Peter Paul Bakker 77ca5eac48 upped pmd-designer.version to 7.0.0-SNAPSHOT 2021-11-25 15:19:33 +01:00
Andreas Dangel 482e83c15c Merge branch 'pmd/7.0.x' into pmd7-update-PrimitiveWrapperInstantiation 2021-11-25 12:48:17 +01:00
Andreas Dangel 93972d140a [java] PrimitiveWrapperInstantiation - reuse InvocationMatcher 2021-11-25 12:42:48 +01:00
Andreas Dangel 71adacfe26 Bump build-tools to 18-SNAPSHOT for ReuseInvocationMatcher rule 2021-11-25 12:42:09 +01:00
Andreas Dangel d1a603f3f4 [java] LogicInversion - add test case for != 2021-11-25 12:20:04 +01:00
Andreas DangelandJuan Martín Sotuyo Dodero 1c0999de8f [java] LogicInversion - consider != as well
Co-authored-by: Juan Martín Sotuyo Dodero <jsotuyod@users.noreply.github.com>
2021-11-25 12:19:45 +01:00
Andreas Dangel 822a67c663 Merge pull request #3611 from adangel:pmd7-update-ProperLogger
[java] Update rule ProperLogger #3611

* pr-3611:
  [java] Update rule ProperLogger
2021-11-25 12:07:32 +01:00
Andreas Dangel abe9083da8 Merge pull request #3610 from adangel:pmd7-update-SimpleDateFormatNeedsLocale
[java] Update rule SimpleDateFormatNeedsLocale #3610

* pr-3610:
  [java] Update rule SimpleDateFormatNeedsLocale
2021-11-25 12:06:53 +01:00
Andreas Dangel f16e0d72c2 Merge pull request #3608 from adangel:pmd7-update-FinalFieldCouldBeStatic
[java] Update rule FinalFieldCouldBeStatic #3608

* pr-3608:
  [java] Update rule FinalFieldCouldBeStatic
2021-11-25 12:06:07 +01:00
Andreas Dangel c3f69df04c Fix unit test 2021-11-25 12:03:57 +01:00
Andreas Dangel a9c3c019fe Merge branch 'master' into pmd/7.0.x 2021-11-25 11:50:31 +01:00
Andreas Dangel 31915ac3e5 Merge pull request #3599 from adangel:pmd7-update-UselessOverridingMethod
[java] Update rule UselessOverridingMethod #3599

* pr-3599:
  [java] UselessOverridingMethod - fix false positive with overloads
  [java] Update rule UselessOverridingMethod
2021-11-12 08:46:53 +01:00
Andreas Dangel 641c969f7c Merge pull request #3598 from adangel:pmd7-update-AssignmentToNonFinalStatic
[java] Update rule AssignmentToNonFinalStatic #3598

* pr-3598:
  [java] AssignmentToNonFinalStatic - improve message
  [java] AssignmentToNonFinalStatic - fix false positives
  [java] Update rule AssignmentToNonFinalStatic
2021-11-12 08:46:14 +01:00
Andreas Dangel 6e9343d8c1 Merge pull request #3592 from adangel:pmd7-update-AvoidBranchingStatementAsLastInLoop
[java] Update rule AvoidBranchingStatementAsLastInLoop #3592

* pr-3592:
  [java] AvoidBranchingStatementAsLastInLoop - support for-each, fix false positives
  [java] Update rule AvoidBranchingStatementAsLastInLoop
2021-11-12 08:45:22 +01:00
Andreas Dangel 093742d57a Merge pull request #3550 from adangel:pmd7-update-CloseResource
[java] Update rule CloseResource #3550

* pr-3550:
  [java] CloseResource: fix false positive and negative
  [java] Fix type res if generic type are provided for a non generic
  [java] CloseResource - fix various false positives/false negatives
  [java] CloseResource: fix NPE with null literal
  [java] Update rule CloseResource
2021-11-12 08:44:11 +01:00
Andreas Dangel 0c5977ae31 [java] AssignmentToNonFinalStatic - improve message
Includes field name in rule violation message.
2021-11-11 17:48:16 +01:00
Andreas Dangel 3983e1d839 [java] Update rule ProperLogger 2021-11-11 17:23:49 +01:00
Andreas Dangel 74ace9c734 [java] Update rule SimpleDateFormatNeedsLocale 2021-11-11 16:36:55 +01:00
Andreas Dangel a456e434fb [java] Update rule PrimitiveWrapperInstantiation 2021-11-11 16:27:56 +01:00
Andreas Dangel e15d4cc585 [java] Update rule FinalFieldCouldBeStatic 2021-11-11 16:01:06 +01:00
Andreas Dangel 12b047bb95 [java] Update rule LogicInversion 2021-11-11 15:42:27 +01:00
Andreas Dangel 4ae38fc2d5 [java] UselessOverridingMethod - fix false positive with overloads
* add more types to avoid warnings about unresolved
types during tests
* reuse OverloadTypeInfo instead of reimplementing it
2021-11-11 15:34:16 +01:00
Andreas Dangel 6453740924 [java] AssignmentToNonFinalStatic - fix false positives 2021-11-11 12:48:02 +01:00
Andreas Dangel 814f8807a2 [java] AvoidBranchingStatementAsLastInLoop - support for-each, fix false
positives

Foreach loops are now a separate AST node.
If the loop statements don't use curly braces and have no Block
then we need to use the direct parent instead of grandparent
to check for the loops.
2021-11-11 12:25:35 +01:00
Andreas Dangel 149d8ebde4 Merge pull request #3591 from adangel:pmd7-update-AvoidInstanceofChecksInCatchClause
[java] Update rule AvoidInstanceofChecksInCatchClause #3591

* pr-3591:
  [java] Update rule AvoidInstanceofChecksInCatchClause
2021-11-09 20:05:42 +01:00
Andreas Dangel 1b38a0b757 Merge pull request #3556 from
adangel:pmd7-update-ClassCastExceptionWithToArray

[java] Update rule ClassCastExceptionWithToArray #3556

* pr-3556:
  [java] Update rule ClassCastExceptionWithToArray
2021-11-09 20:03:53 +01:00
Andreas Dangel bb689ad580 Merge pull request #3537 from adangel:pmd7-update-MissingStaticMethodInNonInstantiatableClass
[java] Update rule MissingStaticMethodInNonInstantiatableClass #3537

* pr-3537:
  [java] Update rule MissingStaticMethodInNonInstantiatableClass
2021-11-09 20:01:45 +01:00
Andreas Dangel 6bbad3ecfd [java] CloseResource: fix false positive and negative 2021-11-09 19:51:12 +01:00
Andreas Dangel 480ac2f0f9 [java] Fix type res if generic type are provided for a non generic 2021-11-08 20:18:26 +01:00
Andreas Dangel 348d7fe802 [java] CloseResource - fix various false positives/false negatives
For details, see the test cases
2021-11-06 21:09:09 +01:00
Andreas Dangel 594e4d60c9 Merge branch 'pmd/7.0.x' into pmd7-update-CloseResource 2021-11-06 18:27:25 +01:00
Peter Paul Bakker 5ed2b3e100 fixed NPE which occurred when running sonar-pmd plugin integration tests with pmd/7.0.x branch 2021-11-03 11:54:09 +01:00
Andreas Dangel 97048aa436 [java] Update rule UselessOverridingMethod 2021-11-02 18:41:22 +01:00
Andreas Dangel c1ab978183 Merge branch 'master' into pmd/7.0.x 2021-10-30 10:28:56 +02:00
Andreas Dangel fc0350326e Merge branch 'master' into pmd/7.0.x 2021-10-29 20:19:49 +02:00
Andreas Dangel 54848555d2 [java] Update rule AssignmentToNonFinalStatic 2021-10-29 15:38:33 +02:00
Andreas Dangel 4a42e5f1ad Merge branch 'master' into pmd/7.0.x 2021-10-29 10:25:38 +02:00
Andreas Dangel 0c0f124c40 [java] Update rule AvoidBranchingStatementAsLastInLoop 2021-10-28 15:58:43 +02:00
Andreas Dangel 9a16964259 [java] Update rule AvoidInstanceofChecksInCatchClause 2021-10-28 15:35:16 +02:00
Clément Fournier fd3d8e3398 Merge branch 'pr/3531' into 7.0.x 2021-10-25 17:53:16 +02:00
Clément Fournier 7c11faaff4 Merge branch '7.0.x' into pr/3531 2021-10-25 17:53:07 +02:00
Clément Fournier a94616e626 Merge branch '7.0.x' into pr/3546 2021-10-25 17:51:50 +02:00
Clément Fournier 03a1575d1f Merge branch 'pr/3545' into 7.0.x 2021-10-25 17:51:32 +02:00
Clément Fournier 38ea6c36eb Merge branch '7.0.x' into pr/3545 2021-10-25 17:51:17 +02:00
Andreas Dangel 9404c28fa8 Merge branch 'master' into pmd/7.0.x 2021-10-23 13:14:16 +02:00
Andreas Dangel e4b17d59fa [java] JumbledIncrementer: Fix no ForInit in nested loop FN 2021-10-19 19:34:08 +02:00
Andreas Dangel 9d4b918fe2 Merge branch 'pmd/7.0.x' into pmd7-update-JumbledIncrementer 2021-10-19 19:00:10 +02:00
Andreas Dangel e153880d3b [java] MisplacedNullCheck - fix false positives 2021-10-18 19:42:17 +02:00
Andreas Dangel abd485b83e Merge branch 'pmd/7.0.x' into pmd7-update-MisplacedNullCheck 2021-10-18 19:07:27 +02:00
Andreas Dangel f9a012a8de Merge branch 'master' into pmd/7.0.x 2021-10-16 10:40:02 +02:00
Andreas Dangel 0dd1e39027 Merge pull request #3553 from adangel:pmd7-update-CloneMethodMustBePublic
[java] Update rule CloneMethodMustBePublic #3553
2021-10-16 10:05:18 +02:00
Andreas Dangel 3cfab917e5 Merge pull request #3552 from adangel:pmd7-update-CloneMethodReturnTypeMustMatchClassName
[java] Update rule CloneMethodReturnTypeMustMatchClassName #3552
2021-10-16 10:04:38 +02:00
Andreas Dangel f1617884aa Merge pull request #3548 from adangel:pmd7-update-DoNotCallGarbageCollectionExplicitly
[java] Update rule DoNotCallGarbageCollectionExplicitly #3548
2021-10-16 10:03:59 +02:00
Andreas Dangel 948e3bba74 Merge pull request #3547 from adangel:pmd7-update-DontUseFloatTypeForLoopIndices
[java] Update rule DontUseFloatTypeForLoopIndices #3547
2021-10-16 10:03:11 +02:00
Andreas Dangel db8fe733d0 Merge pull request #3536 from adangel:pmd7-update-NonCaseLabelInSwitchStatement
[java] Update rule NonCaseLabelInSwitchStatement #3536
2021-10-16 10:02:31 +02:00
Andreas Dangel 1a099d1c4b Merge pull request #3535 from
adangel:pmd7-update-OverrideBothEqualsAndHashcode

[java] Update rule OverrideBothEqualsAndHashcode #3535
2021-10-16 10:02:07 +02:00
Andreas Dangel 0dce4f1fc5 Merge pull request #3534 from adangel:pmd7-update-ProperCloneImplementation
[java] Update rule ProperCloneImplementation #3534
2021-10-16 10:00:36 +02:00
Peter Paul Bakker bf10da5444 moved libDirectory setting for kotlin to pmd-kotlin pom.xml 2021-10-15 19:40:16 +02:00
Peter Paul Bakker faeffd4f17 fix checkstyle issues 2021-10-15 19:23:17 +02:00
Peter Paul Bakker 97eeac0daa added kotlin Simple parser test 2021-10-15 19:08:40 +02:00
Peter Paul Bakker a2e9d2b652 added kotlin xpath function 'pmd-kotlin:hasChildren(3)' as test case for custom kotlin xpath functions 2021-10-15 18:51:08 +02:00
Andreas Dangel 39807f325f [doc] Add a warning box in major language contributions 2021-10-14 14:49:17 +02:00
Andreas Dangel 74a283e928 [java] Update rule ClassCastExceptionWithToArray 2021-10-14 11:48:13 +02:00
Andreas Dangel 89e86391ad Fix unit tests 2021-10-14 10:58:14 +02:00
Andreas Dangel 4a221d2e12 Merge branch 'master' into pmd/7.0.x 2021-10-14 10:46:44 +02:00
Andreas Dangel 78c61600f7 [java] Update rule CloneMethodMustBePublic 2021-10-14 09:16:32 +02:00
Andreas Dangel bc6c8bd578 [java] Update rule CloneMethodReturnTypeMustMatchClassName 2021-10-14 09:08:25 +02:00
Andreas Dangel 9b9009f59b [java] CloseResource: fix NPE with null literal 2021-10-14 08:56:44 +02:00
Peter Paul Bakker 4fbf4fb580 added FunctionNameTooShort test in bestpractices category for Kotlin, with unit test cases 2021-10-13 17:34:20 +02:00
Peter Paul Bakker 1a36a7cc55 upped antlr plugin version, fix AST errors by using separate UnicodeClasses.g4 file, added <libDirectory> to maven antlr plugin to make it work 2021-10-13 10:32:19 +02:00
Andreas Dangel 2d6595d603 [java] Update rule CloseResource 2021-10-09 20:25:40 +02:00
Andreas Dangel c1a347bead [java] Update rule DoNotCallGarbageCollectionExplicitly 2021-10-08 12:03:52 +02:00
Andreas Dangel 45e291a7cb [java] Update rule DontUseFloatTypeForLoopIndices 2021-10-08 12:02:33 +02:00
Andreas Dangel 77fbd27550 [java] Update rule JumbledIncrementer 2021-10-08 12:01:26 +02:00
Andreas Dangel 12286b52bb [java] Update rule MisplacedNullCheck 2021-10-08 11:59:48 +02:00
Andreas Dangel 34b41a952c Merge pull request #3533 from adangel:pmd7-update-ReturnEmptyCollectionRatherThanNull
[java] Update rule ReturnEmptyCollectionRatherThanNull #3533
2021-10-08 11:42:26 +02:00
Andreas Dangel 727da617c3 Merge pull request #3530 from
adangel:pmd7-update-SingletonClassReturningNewInstance

[java] Update rule SingletonClassReturningNewInstance #3530
2021-10-08 11:42:08 +02:00
Andreas Dangel 5643659555 Merge pull request #3525 from adangel:pmd7-update-UnnecessaryBooleanAssertion
[java] Update rule UnnecessaryBooleanAssertion #3525
2021-10-08 11:40:39 +02:00
Andreas Dangel 8eb80ea2e5 Merge pull request #3529 from
adangel:pmd7-update-StaticEJBFieldShouldBeFinal

[java] Update rule StaticEJBFieldShouldBeFinal #3529
2021-10-08 11:40:21 +02:00
Andreas Dangel 24ab5abb66 Merge pull request #3527 from adangel:pmd7-update-SuspiciousOctalEscape
[java] Update rule SuspiciousOctalEscape #3527
2021-10-08 11:38:59 +02:00
Andreas Dangel 84f484318a Merge branch 'pmd/7.0.x' into pmd7-update-UnnecessaryBooleanAssertion 2021-10-08 10:19:58 +02:00
Andreas Dangel a0da5f35e3 [java] UnnecessaryBooleanAssertion - fix overlapping with ...
... SimplifiableTestAssertion

Fixes #3087
2021-10-08 10:18:18 +02:00
Andreas Dangel a16cd764f6 [java] SuspiciousOctalEscape: Improve rule message 2021-10-08 09:47:29 +02:00
Andreas Dangel 49f7e5f17e Merge pull request #3528 from adangel:pmd7-update-StringBufferInstantiationWithChar
[java] Update rule StringBufferInstantiationWithChar #3528
2021-10-08 09:20:25 +02:00
Andreas Dangel d9d2866c2f Merge pull request #3526 from adangel:pmd7-update-UnconditionalIfStatement
[java] Update rule UnconditionalIfStatement #3526
2021-10-08 09:18:33 +02:00
Andreas Dangel 12cc2b91ab Merge pull request #3524 from adangel:pmd7-update-UnnecessaryCaseChange
[java] Update rule UnnecessaryCaseChange #3524
2021-10-08 09:17:58 +02:00
Andreas Dangel b286584cd5 Merge pull request #3523 from adangel:pmd7-update-UnnecessaryConversionTemporary
[java] Update rule UnnecessaryConversionTemporary #3523
2021-10-08 09:02:41 +02:00
Andreas Dangel fda1501cf4 Merge pull request #3522 from adangel:pmd7-update-AvoidAccessibilityAlteration
[java] Update rule AvoidAccessibilityAlteration #3522
2021-10-08 09:01:37 +02:00
Andreas Dangel cb1d840c0f Merge pull request #3483 from adangel:pmd7-update-UseCorrectExceptionLogging
[java] Update rule UseCorrectExceptionLogging #3483
2021-10-01 19:24:09 +02:00
Andreas Dangel d81e1d9333 [java] Update rule MissingStaticMethodInNonInstantiatableClass 2021-10-01 19:18:07 +02:00
Andreas Dangel 5828168934 [java] Update rule NonCaseLabelInSwitchStatement 2021-10-01 18:50:33 +02:00
Andreas Dangel dc3fedd306 [java] Update rule OverrideBothEqualsAndHashcode 2021-10-01 12:19:10 +02:00
Andreas Dangel 1754f4d0c0 [java] Update rule ProperCloneImplementation 2021-10-01 11:57:55 +02:00
Andreas Dangel 20146f18b0 [java] Update rule ReturnEmptyCollectionRatherThanNull 2021-10-01 11:39:12 +02:00
Andreas Dangel 1f2bc99d67 [java] Update rule SingleMethodSingleton
Any nested type is now a find boundary.
2021-09-30 18:49:20 +02:00
Andreas Dangel af19de71e6 [java] Update rule SingletonClassReturningNewInstance 2021-09-30 17:14:00 +02:00
Andreas Dangel 161521e8f8 [java] Update rule StaticEJBFieldShouldBeFinal 2021-09-30 16:40:17 +02:00
Andreas Dangel 5853cab38b [java] Update rule StringBufferInstantiationWithChar 2021-09-30 16:13:43 +02:00
Andreas Dangel d80ad0e098 [java] Update rule SuspiciousOctalEscape 2021-09-30 16:00:07 +02:00
Andreas Dangel 4b112e8a88 Merge pull requet #3512 from oowekyala:update-InvalidLogMessageFormat
[java] Update rule InvalidLogMessageFormat #3512
2021-09-30 15:26:12 +02:00
Andreas Dangel 4324043f3f Merge pull request #3511 from oowekyala:update-CheckSkipResult
[java] Update CheckSkipResult #3511
2021-09-30 15:25:31 +02:00
Andreas Dangel 2edeb61bfc [java] Update rule UnconditionalIfStatement 2021-09-30 15:17:21 +02:00
Andreas Dangel c91aeb9f68 [java] Update rule UnnecessaryBooleanAssertion 2021-09-30 15:09:39 +02:00
Andreas Dangel 59dbf73997 [java] Update rule UnnecessaryCaseChange 2021-09-30 14:45:18 +02:00
Andreas Dangel c8c3590d0e [java] Update rule UnnecessaryConversionTemporary 2021-09-30 14:20:27 +02:00
Andreas Dangel c94726f8ae [java] Update rule AvoidAccessibilityAlteration 2021-09-30 12:40:31 +02:00
Andreas Dangel 7cee47d71e Merge branch 'master' into pmd/7.0.x 2021-09-27 20:11:01 +02:00
Andreas Dangel 784c3437c4 [plsql] Fix unit test 2021-09-25 14:08:48 +02:00
Andreas Dangel 1d3f8eec02 Merge branch 'master' into pmd/7.0.x 2021-09-25 13:58:22 +02:00
Andreas Dangel 34f47a72a5 Merge pull request #3498 from adangel:pmd7-fix-cpd
[core] Enable CPD check (pmd7) #3498
2021-09-23 13:56:14 +02:00
Andreas Dangel 5285946451 [plsql] Fix TreeDumpTest 2021-09-23 13:50:12 +02:00
Andreas Dangel a1f2a46135 [core] Extend XPath tests (#3499) 2021-09-23 13:39:28 +02:00
Andreas Dangel cacfeda085 Merge branch 'origin/master' into pr-3498 2021-09-23 13:25:40 +02:00
Andreas Dangel b9eebfe258 Merge branch 'pmd/7.0.x' into pr-3498 2021-09-23 13:22:47 +02:00
Clément Fournier 5391797905 Fix tests 2021-09-20 17:03:43 +02:00
Clément Fournier 2d1ba48dbb Merge branch '7.0.x' into pr/3483 2021-09-20 16:58:10 +02:00
Clément Fournier 70ee1b0f14 wip fix stackoverflow 2021-09-19 23:15:53 +02:00
Clément Fournier 7bb4a76bcf Special case static methods 2021-09-19 23:15:35 +02:00
Clément Fournier f0cb279227 update ci file 2021-09-19 22:30:44 +02:00
Clément Fournier e615fab844 checkstyle 2021-09-19 17:27:04 +02:00
Clément Fournier 7c4644d97f Update InvalidLogMessageFormat 2021-09-19 17:16:41 +02:00
Clément Fournier 86332e8a57 Refactor LawOfDemeter to give better semantics to iterator/collections 2021-09-18 23:54:06 +02:00
Clément Fournier 25bfb70c7d Update LawOfDemeter 2021-09-18 17:34:35 +02:00
Clément Fournier 0c44c1b6bd Update rule CheckSkipResult 2021-09-18 16:38:44 +02:00
Clément Fournier cbe1f3bef8 Merge branch 'pr/3485' into 7.0.x 2021-09-18 14:39:18 +02:00
Clément Fournier 4e65cbae7f Merge branch '7.0.x' into pr/3485 2021-09-18 14:39:07 +02:00
Clément Fournier 416d7a9afd Merge branch 'pr/3486' into 7.0.x 2021-09-18 14:36:59 +02:00
Clément Fournier cec8225d4e Merge branch '7.0.x' into pr/3486 2021-09-18 14:36:42 +02:00
Clément Fournier 93ce9160f5 Simplify xpath 2021-09-18 14:34:45 +02:00
Clément Fournier 582916b2a4 Merge branch '7.0.x' into pr/3483 2021-09-18 14:30:03 +02:00
Clément Fournier d1489a4623 Merge branch 'pr/3478' into 7.0.x 2021-09-18 14:21:59 +02:00
Clément Fournier 8f15a89ccd Merge branch '7.0.x' into pr/3478 2021-09-18 14:21:46 +02:00
Clément Fournier 8ec07d4e88 Merge branch 'pr/3477' into 7.0.x 2021-09-18 14:18:29 +02:00
Clément Fournier e415bd795b Merge branch '7.0.x' into pr/3477 2021-09-18 14:18:20 +02:00
Clément Fournier cea1d58718 Ignore tests of AvoidAccessibilityAlteration
Refs #3493
2021-09-18 14:15:36 +02:00
Clément Fournier 99953e18bd Merge branch 'pr/3472' into 7.0.x 2021-09-18 14:11:30 +02:00
Clément Fournier 9fa29d4b62 Merge branch '7.0.x' into pr/3472 2021-09-18 14:11:20 +02:00
Clément Fournier 8298d2ff19 Merge branch 'pr/3474' into 7.0.x 2021-09-18 14:10:31 +02:00
Clément Fournier 1730ef91b0 Merge branch '7.0.x' into pr/3474 2021-09-18 14:10:20 +02:00
Clément Fournier 9291a2c4ff Merge branch 'pr/3479' into 7.0.x
Refs #3479
2021-09-18 14:08:15 +02:00
Clément Fournier 634a0f75fe Merge branch '7.0.x' into pr/3479 2021-09-18 14:08:01 +02:00
Clément Fournier d70821a48d Apply suggestions from code review 2021-09-18 14:07:41 +02:00
Clément Fournier ae0352fea0 Fix xpath, refs #3499 2021-09-18 13:36:55 +02:00
Clément Fournier 5043183b14 Merge branch 'master' into 7.0.x 2021-09-18 13:27:26 +02:00
Clément Fournier b511fa2418 Merge branch 'pr/3500' into 7.0.x
Refs #3500
2021-09-17 17:13:28 +02:00
Clément Fournier c2eb1e6bab checkstyle issues 2021-09-15 18:25:04 +02:00
Clément Fournier e945897278 Fix pmd warning 2021-09-15 17:36:47 +02:00
Clément Fournier 5d278c049b Fix compilation issues 2021-09-15 16:58:38 +02:00
jborgers de6ddbd624 Separate Kotlin.g4 for parser grammar and KotlinLexer.g4 for lexer grammar; and move PmdKotlinParser.java to the right place 2021-09-15 15:41:36 +02:00
jborgers a82e7eff24 Handled all steps of "Adding PMD support for a new ANTLR grammar based language" except $. Generate your Parser did not succeed because combining lexer and parser grammars has issues. 2021-09-13 14:15:25 +02:00
jborgers cde4efb27e Combine KotlinParser, KotlinLexer and UnicodeClasses and use Swift.g4 as example 2021-09-10 17:10:24 +02:00
Andreas Dangel 6a641ccb34 Add tests for Boolean.valueOf 2021-09-10 14:31:39 +02:00
Andreas Dangel a7f3e388f1 [java] UnnecessaryBoxing - check for Integer.valueOf(String) calls
This implements the last point of #2973
2021-09-10 11:27:54 +02:00
Andreas Dangel b1d7e030cf Fix code duplications and checkstyle 2021-09-09 10:52:14 +02:00
Andreas Dangel d192abff5a Merge remote-tracking branch 'adangel/fix-cpd' into pmd7-fix-cpd 2021-09-09 09:56:01 +02:00
Andreas Dangel d82b245e53 Fix typo 2021-09-08 20:26:11 +02:00
jborgers 2780560b36 Add official Kotlin ANTLR grammar files, copy and rename some more from Swift 2021-09-08 18:37:00 +02:00
Andreas Dangel 01eacda5a6 [doc] Fix typo with mvn generate-sources 2021-09-07 19:14:43 +02:00
jborgers 1fda7a0782 Adding PMD support for a new ANTLR grammar based language - step 1-4 2021-09-07 16:17:58 +02:00
Andreas Dangel 6de1dbacbc Merge pull request #1881 from teamraptor:antlr-documentation
[doc] Add ANTLR documentation #1881
2021-09-04 10:52:52 +02:00
Andreas Dangel 973df243b7 [doc] Update ANTLR documentation 2021-09-04 10:51:18 +02:00
Andreas Dangel 8ce8da1ea0 [doc] Update release notes, refs #1881 2021-09-04 10:33:38 +02:00
Andreas Dangel 1e81667233 Merge branch 'pmd/7.0.x' into pr-1881 2021-09-03 21:31:52 +02:00
Andreas Dangel 5f13215445 Merge branch 'master' into pmd/7.0.x 2021-08-28 17:47:46 +02:00
Andreas Dangel d5240fffb4 Merge pull request #3458 from oowekyala:update-SwitchDensity
[java] Update rule SwitchDensity #3458
2021-08-23 19:28:00 +02:00
Clément Fournier def74df7a9 Add test with empty switch stmt 2021-08-23 15:26:51 +02:00
Clément FournierandAndreas Dangel 07a7360959 Fix comment about double division
Co-authored-by: Andreas Dangel <andreas.dangel@pmd-code.org>
2021-08-23 15:25:50 +02:00
Andreas Dangel ea79544a59 [java] SwitchDensity: Fix FP with default label 2021-08-22 21:40:52 +02:00
Andreas Dangel 2df54339e7 Add missing @Override 2021-08-22 20:15:36 +02:00
Andreas Dangel c3dcab412d [java] UnusedNullCheckInEquals: Fix FNs / FPs 2021-08-22 20:12:55 +02:00
Andreas Dangel b0b2087316 [doc] Fix more old rule references 2021-08-22 17:19:44 +02:00
Andreas Dangel 63998b2a28 Merge pull request #3457 from oowekyala:update-UseUtilityClass
[java] Update rule UseUtilityClass #3457
2021-08-22 17:03:28 +02:00
Andreas Dangel b49093daf4 [doc] UseUtilityClass: The property ignoredAnnotations has been
removed.
2021-08-22 17:03:19 +02:00
Andreas Dangel 79df6231ec Merge pull request #3450 from oowekyala:update-SimplifiedTernary
[java] Update rule SimplifiedTernary #3450
2021-08-22 17:01:26 +02:00
Andreas Dangel 95e8c7daa1 Merge pull request #3449 from oowekyala:update-SimplifyConditional
[java] Update rule SimplifyConditional #3449
2021-08-22 16:59:26 +02:00
Andreas Dangel 954723d927 Merge pull request #3448 from oowekyala:pmd7-remove-deprecated-rules
[java] Remove deprecated rules in pmd 7 #3448
2021-08-22 16:58:48 +02:00
Andreas Dangel 489f28edd3 Merge branch 'master' into pmd/7.0.x 2021-08-22 16:53:55 +02:00
Andreas Dangel 0be2b6122a [java] InsufficientStringBufferDeclaration: Fix NPE
... when StringBuilder is used in lambda and if without else
2021-08-21 17:40:50 +02:00
Andreas Dangel e7b6c0f82c [java] UseCorrectExceptionLogging: fix FN with string concat 2021-08-21 16:50:56 +02:00
Andreas Dangel 7eaf814b7c [java] Update rule UnusedNullCheckInEquals 2021-08-21 16:31:17 +02:00
Andreas Dangel 16c9adb34d [java] UseCorrectExceptionLogging - add test case for #3100 2021-08-20 20:10:01 +02:00
Andreas Dangel 542703b02e [java] Update rule UseCorrectExceptionLogging 2021-08-20 20:04:13 +02:00
Andreas Dangel b6baa10178 [java] UseEqualsToCompareStrings: Fix false positives 2021-08-20 14:53:40 +02:00
Andreas Dangel b379a670b1 [java] Update rule UseEqualsToCompareStrings 2021-08-20 13:00:59 +02:00
Andreas Dangel 517a2e66d8 Add test case for #3173 2021-08-20 09:22:08 +02:00
Andreas Dangel a50759ba17 [java] Update rule UseLocaleWithCaseConversions 2021-08-20 09:04:34 +02:00
Andreas Dangel 6ceef15933 [java] Update rule UseProperClassLoader 2021-08-19 20:27:29 +02:00
Andreas Dangel 7103b7f96d Merge pull request #3404 from oowekyala:update-ClassWithOnlyPrivateConstructorsShouldBeFinal
[java] Update ClassWithOnlyPrivateConstructorsShouldBeFinal #3404
2021-08-19 16:26:49 +02:00
Andreas Dangel 3a7f264945 Merge pull request #3384 from Monits:update-rules
[java] Update many Java rules #3384
2021-08-19 16:14:16 +02:00
Andreas Dangel dcbdbc027f Merge pull request #3381 from Monits:update-return-from-finally
[java] Update ReturnFromFinallyBlock #3381
2021-08-19 16:13:27 +02:00
Andreas Dangel dd9a757596 [java] Fix false positive with valid double checked locking pattern 2021-08-19 16:11:25 +02:00
Andreas Dangel 72b7428578 [java] Update rule NonThreadSafeSingleton 2021-08-19 12:36:15 +02:00
Andreas Dangel 9f72026913 Merge branch 'pmd/7.0.x' into pr-3384 2021-08-19 11:46:01 +02:00
Andreas Dangel 5611ed93cd [java] Update rule UnsynchronizedStaticFormatter 2021-08-19 11:23:58 +02:00
Andreas Dangel 50cb179b5b Merge branch 'pmd/7.0.x' into pr-3381 2021-08-19 10:42:09 +02:00
Clément Fournier f9c140ed7a Tests for fixed bugs 2021-08-09 19:22:47 +02:00
Clément Fournier 8dac4d74d5 Remove unresolved reference warnings 2021-08-09 19:20:04 +02:00
Clément Fournier 8b98c861a2 Update rule UseUtilityClass 2021-08-09 19:13:51 +02:00
Clément Fournier c8311e96e4 Update rule SwitchDensity
Maybe we should consider using metrics for this... whatever

Add NodeStream#sumBy
2021-08-09 18:40:54 +02:00
Clément Fournier a1486ffe54 Checkstyle 2021-08-09 18:28:17 +02:00
Clément Fournier 621f5f6dd1 Update rule SimplifyConditional 2021-08-08 20:57:00 +02:00
Clément Fournier b50fee14af Update ci file 2021-08-08 20:31:46 +02:00
Clément Fournier 467a7d964a Remove FN when both branches are literals
There is no such "existing rule" that reports this.
2021-08-08 20:30:22 +02:00
Clément Fournier 99f41d4b74 Update SimplifiedTernary 2021-08-08 20:24:36 +02:00
Clément Fournier 3bdb28044e Fix remaining references 2021-08-07 21:35:40 +02:00
Clément Fournier f6093dec0e Cleanups 2021-08-07 21:35:39 +02:00
Clément Fournier b0832dba82 Cleanups 2021-08-07 18:43:04 +02:00
Clément Fournier d06fce15e5 Add replacements in release notes 2021-08-07 18:38:08 +02:00
Clément Fournier 02cb1f5725 Cleanup errorprone.xml of deprecated rules 2021-08-07 18:28:40 +02:00
Clément Fournier f3759d0da0 Cleanup bestpractices.xml of deprecated rules 2021-08-07 18:23:44 +02:00
Clément Fournier 6b6f7f3445 Cleanup design.xml of deprecated rules 2021-08-07 18:19:05 +02:00
Clément Fournier c872cec1d5 Cleanup codestyle.xml of deprecated rules 2021-08-07 18:17:02 +02:00
Clément Fournier 19a4c9cd84 Cleanup performance.xml of deprecated rules 2021-08-07 18:15:34 +02:00
Clément Fournier bc2169c087 Add one more test case for fixed FNs in diff report 2021-08-07 18:01:16 +02:00
Clément Fournier f210c795c9 Merge branch '7.0.x' into update-ClassWithOnlyPrivateConstructorsShouldBeFinal 2021-08-07 18:00:04 +02:00
Clément Fournier 2242badb92 Merge branch 'pr/3418' into 7.0.x 2021-08-07 17:54:56 +02:00
Clément Fournier 8112dc4042 Merge branch '7.0.x' into pr/3418 2021-08-07 17:52:37 +02:00
Clément Fournier 85e9bfa8f1 Add test cases from UnnecessaryWrapperObjectCreation to UnnecessaryBoxing
Refs #3418
2021-08-07 17:51:31 +02:00
Clément Fournier ce7ce025e4 Merge branch 'pr/3408' into 7.0.x 2021-08-07 17:31:12 +02:00
Clément Fournier 607faa1663 Merge branch '7.0.x' into pr/3408 2021-08-07 17:30:49 +02:00
Clément Fournier e222c8422f Merge branch 'pr/3405' into 7.0.x 2021-08-07 17:27:50 +02:00
Clément Fournier 783a27db2e Merge branch '7.0.x' into pr/3405 2021-08-07 17:27:48 +02:00
Clément Fournier 95ddb2b2a4 Merge branch 'pr/3398' into 7.0.x 2021-08-07 17:27:07 +02:00
Clément Fournier 27517c2e15 Merge branch '7.0.x' into pr/3398 2021-08-07 17:27:06 +02:00
Clément Fournier 3e07e0b5b0 Merge branch 'pr/3395' into 7.0.x 2021-08-07 17:26:52 +02:00
Clément Fournier 06674ee23f Merge branch '7.0.x' into pr/3395 2021-08-07 17:26:50 +02:00
Clément Fournier b2de129082 Merge branch 'pr/3394' into 7.0.x 2021-08-07 17:25:46 +02:00
Clément Fournier 623e5db9c1 Merge branch '7.0.x' into pr/3394 2021-08-07 17:25:34 +02:00
Clément Fournier d4a43fbc95 Merge branch 'master' into 7.0.x 2021-08-07 17:19:30 +02:00
Clément Fournier 5fde88d6dd Merge branch 'master' into 7.0.x 2021-08-07 13:41:10 +02:00
Andreas Dangel c0fbc568f3 Merge branch 'master' into pmd/7.0.x 2021-07-31 19:16:21 +02:00
Andreas Dangel aa75b2b5bf Merge branch 'master' into pmd/7.0.x 2021-07-31 17:33:53 +02:00
Andreas Dangel 32bd651969 Merge branch 'master' into pmd/7.0.x 2021-07-30 14:11:48 +02:00
Andreas Dangel 852e99bbe7 Merge pull request #3414 from adangel:pmd7-issue-3366-support-jdk-17
[java] Support JDK 17 (LTS) (PMD 7) #3414
2021-07-30 11:48:23 +02:00
Andreas Dangel 48a7ec6a8a Merge branch 'master' into pmd7-issue-3366-support-jdk-17 2021-07-30 11:47:56 +02:00
Andreas Dangel f104af4b01 Merge branch 'pmd/7.0.x' into pmd7-issue-3366-support-jdk-17 2021-07-30 11:33:25 +02:00
Andreas Dangel 92905716b4 Fix unit test 2021-07-30 11:25:30 +02:00
Andreas Dangel 89dd3f97b5 Merge 'issue-3366-support-jdk-17' into pmd7-issue-3366-support-jdk-17 2021-07-30 11:15:31 +02:00
Andreas Dangel e91c4619c9 Merge 'issue-3366-support-jdk-17' into pmd7-issue-3366-support-jdk-17 2021-07-30 10:46:10 +02:00
Andreas Dangel b7fa50f0f3 Remove unused import (checkstyle) 2021-07-29 20:08:08 +02:00
Andreas Dangel 0277d10a37 [java] Fix UseTryWithResources 2021-07-29 20:03:26 +02:00
Andreas Dangel c15c8a0f81 [java] Ignore tests of not yet updated rules 2021-07-29 19:15:10 +02:00
Andreas Dangel 99a4ddf08e Fix merge error 2021-07-29 18:56:58 +02:00
Andreas Dangel f86f363954 Merge branch 'master' into pmd/7.0.x 2021-07-29 18:51:25 +02:00
Andreas Dangel 9d529e5570 [java] UnnecessaryWrapperObjectCreation - fix NPE 2021-07-24 13:51:56 +02:00
Andreas Dangel 7be41188bc [java] Deprecated UnnecessaryWrapperObjectCreation
Replaced by UnnecessaryBoxing
2021-07-24 12:09:02 +02:00
Andreas Dangel 50d2287baa [java] Update rule UnnecessaryWrapperObjectCreation 2021-07-24 12:03:12 +02:00
Andreas Dangel 8b6ee1c8c2 Merge pull request #3364 from oowekyala:new-rule-UnnecessaryConversion
[java] New rule UnnecessaryBoxing #3364
2021-07-24 11:09:36 +02:00
Andreas Dangel b1805fe42d [java] New rule UnnecessaryBoxing 2021-07-24 10:54:33 +02:00
Andreas Dangel 1ec564b22d Fix unit tests 2021-07-22 20:35:18 +02:00
Andreas Dangel e4431d4d65 Fix compile errors 2021-07-22 19:31:45 +02:00
Andreas Dangel 7ee9aedca8 Merge branch 'issue-3366-support-jdk-17' into
pmd7-issue-3366-support-jdk-17
2021-07-22 12:03:58 +02:00
Andreas Dangel 82bf847986 Fix errorprone.xml ruleset 2021-07-22 11:01:12 +02:00
Andreas Dangel 2a2cc5895f [java] Rename MissingBreakInSwitchRule to ImplicitSwitchFallThroughRule 2021-07-22 10:51:36 +02:00
Andreas Dangel 8a79403a28 Merge branch 'master' into pmd/7.0.x 2021-07-22 10:47:14 +02:00
Andreas Dangel af13b32858 [java] AvoidArrayLoops - fix false positives 2021-07-16 14:39:09 +02:00
Andreas Dangel 7d4e61aa17 Merge branch 'master' into pmd/7.0.x 2021-07-16 13:39:28 +02:00
Andreas Dangel 17ea4648ea [java] Disable new rule ReturnEmptyCollectionRatherThanNull 2021-07-16 13:39:12 +02:00
Andreas Dangel 12e789601f Merge branch 'master' into pmd/7.0.x 2021-07-16 12:15:28 +02:00
Andreas Dangel 4e16bcbcd2 Merge branch 'master' into pmd/7.0.x 2021-07-16 11:25:19 +02:00
Andreas Dangel cc5c0d3f6b Merge pull request #3397 from oowekyala:update-CollapsibleIfStatements
[java] Update rule CollapsibleIfStatements #3397
2021-07-16 10:50:50 +02:00
Andreas Dangel ac73f85017 Merge pull request #3396 from oowekyala:update-ComparisonWithNaN
[java] Update rule ComparisonWithNaN #3396
2021-07-16 10:47:23 +02:00
Andreas Dangel b91de04fb9 Merge pull request #3389 from oowekyala:update-SuspiciousHashcodeMethodName
[java] Update rules Suspicious[Equals/Hashcode]MethodName #3389
2021-07-16 10:38:54 +02:00
Andreas Dangel 55309f0ead Merge pull request #3386 from adangel:pmd7-update-BigIntegerInstantiation
[java] Update BigIntegerInstantiation #3386
2021-07-16 10:33:36 +02:00
Andreas Dangel 9ec7848c41 Merge pull request #3391 from oowekyala:update-DontImportSun
[java] Update rule DontImportSun #3391
2021-07-16 10:32:59 +02:00
Andreas Dangel 9e171b14cc Merge pull request #3390 from oowekyala:update-IdempotentOperations
[java] Update rule IdempotentOperations #3390
2021-07-16 10:32:15 +02:00
Andreas Dangel ba3cfc533e [java] BigIntegerInstantiation: Just check constValue 2021-07-16 10:07:42 +02:00
Andreas DangelandClément Fournier e2864fa85a Use LanguageVersion.compareToVersion
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2021-07-16 09:58:17 +02:00
Andreas Dangel d76873763f Merge branch 'pmd/7.0.x' into pmd7-update-AvoidArrayLoops 2021-07-16 09:19:10 +02:00
Andreas Dangel eb3d9d3fee [java] AvoidCalendarDateCreation - fix more false positives 2021-07-15 20:30:44 +02:00
Andreas Dangel 47137eeed0 [java] AvoidInstantiatingObjectsInLoops - fix more false positives 2021-07-15 19:47:46 +02:00
Andreas Dangel bbe8b83559 [java] AvoidInstantiatingObjectsInLoops - fix false positives/negatives 2021-07-15 15:17:04 +02:00
Andreas Dangel b75c55bc6e Merge branch 'pmd/7.0.x' into pr-3397 2021-07-15 14:24:09 +02:00
Andreas Dangel 5c2fbc8d27 Merge branch 'pmd/7.0.x' into pr-3396 2021-07-15 14:22:57 +02:00
Andreas Dangel fdde5d7d96 Merge branch 'pmd/7.0.x' into pr-3389 2021-07-15 11:45:03 +02:00
Andreas Dangel c74a3be37f [java] AvoidInstantiatingObjectsInLoops - fix tests 2021-07-15 11:40:33 +02:00
Andreas Dangel c5c20a2cec [java] AvoidCalendarDateCreation - improve rule description 2021-07-15 11:25:38 +02:00
Andreas Dangel caf545d671 [java] AvoidCalendarDateCreation - fix false positives 2021-07-15 11:21:17 +02:00
Andreas Dangel 88cc75c0a8 Merge pull request #3399 from oowekyala:stop-dynamic-rset-generation
[ci] Stop autogenerating ruleset from branch differences #3399
2021-07-15 10:38:59 +02:00
Andreas Dangel fa9b84c996 [java] Update rule AvoidArrayLoops 2021-07-15 09:45:09 +02:00
Clément Fournier 28590ca2b9 Update AvoidUncheckedExceptionsInSignatures 2021-07-12 17:42:54 +02:00
Clément Fournier 4b8e83d3d7 Update ci file & release notes 2021-07-12 17:41:55 +02:00
Clément Fournier c94bf66fc5 Add test case for #2536 2021-07-12 17:38:11 +02:00
Clément Fournier c2105d3385 Update rule ClassWithOnlyPrivateConstructorsShouldBeFinal 2021-07-12 17:35:21 +02:00
Clément Fournier c04a5a36cb REVERT ME - [ci] Stop autogenerating ruleset from branch differences
This prevents failing rules in pmd 7 to make the
regression tester fail entirely.
2021-07-11 15:32:44 +02:00
Clément Fournier cf6a69089b Update rule AvoidUsingOctalValues 2021-07-10 18:21:14 +02:00
Clément Fournier 7c60af8390 Update CollapsibleIfStatements 2021-07-10 18:10:45 +02:00
Clément Fournier 690de57790 Update rule ComparisonWithNaN 2021-07-10 01:49:01 +02:00
Clément Fournier 1289afc409 Merge branch 'master' into 7.0.x 2021-07-10 01:14:32 +02:00
Andreas Dangel 45a0a95395 [java] Update rule AvoidCalendarDateCreation 2021-07-09 20:11:20 +02:00
Clément Fournier 1e5c2a9918 Fix checkstyle 2021-07-09 17:05:46 +02:00
Andreas Dangel b0154089e4 [java] Update rule AvoidInstantiatingObjectsInLoops 2021-07-09 15:53:23 +02:00
Clément Fournier 6916151e27 Merge branch 'text-utils-javacc' into text-utils-comments 2021-07-08 23:59:32 +02:00
Clément Fournier 8b0f7e0caa Fix tests 2021-07-08 21:16:58 +02:00
Clément Fournier ab1e3f974e Fix plsql module 2021-07-08 19:29:40 +02:00
Clément Fournier fa31d54bd7 Fix tests 2021-07-08 19:11:20 +02:00
Clément Fournier 85fd4fa9f4 Merge branch 'text-utils-simple' into text-utils-javacc 2021-07-08 18:45:55 +02:00
Clément Fournier c7292e245a Fix java LOC metric 2021-07-08 18:44:50 +02:00
Clément Fournier 96bf5093ff Fix compilation 2021-07-08 18:26:49 +02:00
Clément Fournier 4d320fdbb9 Merge branch 'analysis-listener' into text-utils-simple 2021-07-08 16:54:40 +02:00
Clément Fournier 50a09f970f Refactor renderer tests
They use the new utilities to build reports now.
They now use the Renderer#newListener method.
2021-07-08 16:32:51 +02:00
Clément Fournier 243ab00229 Add utility to build a report, make report immutable 2021-07-08 16:01:34 +02:00
Clément Fournier 92fbaee6ac Make report final 2021-07-08 15:25:00 +02:00
Clément Fournier 62ca0edb2a Merge branch '7.0.x' into analysis-listener 2021-07-08 15:23:00 +02:00
Clément Fournier a5b94fd768 Update DontImportSun
Do not special case sun.misc.Signal anymore
2021-07-07 17:00:55 +02:00
Clément Fournier 5fea2ec485 Update ci file 2021-07-07 16:48:34 +02:00
Clément Fournier 3c7217e638 Update IdempotentOperations 2021-07-07 16:45:33 +02:00
Clément Fournier 97af85eda4 Turn SuspiciousHashcodeMethodName into xpath rule 2021-07-07 16:33:06 +02:00
Clément Fournier 6f36b20d87 Update ci file 2021-07-07 16:32:27 +02:00
Clément Fournier 7f8eacfab2 Update SuspiciousEqualsMethodName 2021-07-07 16:26:36 +02:00
Clément Fournier 207b3f3819 Update SuspiciousHashcodeMethodName 2021-07-07 16:17:54 +02:00
Andreas Dangel 690e50f198 [java] Support BigInteger.TWO for BigIntegerInstantiation 2021-07-06 19:38:00 +02:00
Andreas Dangel 83d57865a0 [java] Update BigIntegerInstantiation 2021-07-06 19:28:24 +02:00
Juan Martín Sotuyo Dodero b649efe685 Reenable FinalizeDoesNotCallSuperFinalize 2021-07-06 02:59:46 -03:00
Juan Martín Sotuyo Dodero 25a3c01a99 Update FinalizeDoesNotCallSuperFinalize 2021-07-06 02:59:24 -03:00
Juan Martín Sotuyo Dodero 3b1b8a203d Reenable FinalizeOnlyCallsSuperFinalize 2021-07-06 02:50:49 -03:00
Juan Martín Sotuyo Dodero d539f472c8 Update FinalizeOnlyCallsSuperFinalize 2021-07-06 02:50:24 -03:00
Juan Martín Sotuyo Dodero a8e25e0393 Reenable FinalizeOverloaded 2021-07-06 02:43:03 -03:00
Juan Martín Sotuyo Dodero 46d3636889 eenable FinalizeShouldBeProtected 2021-07-06 02:42:43 -03:00
Juan Martín Sotuyo Dodero ab9499a1ec Update FinalizeShouldBeProtected 2021-07-06 02:40:34 -03:00
Juan Martín Sotuyo Dodero 0b0e03f192 Reenable InstantiationToGetClass 2021-07-06 02:37:55 -03:00
Juan Martín Sotuyo Dodero d54cf810f2 Update InstantiationToGetClass 2021-07-06 02:37:38 -03:00
Juan Martín Sotuyo Dodero f4c9cf2902 Reenable MissingSerialVersionUID 2021-07-06 02:25:31 -03:00
Juan Martín Sotuyo Dodero e3efb8c36e Update MissingSerialVersionUID 2021-07-06 02:24:42 -03:00
Juan Martín Sotuyo Dodero 61be284d2f Reenable NonStaticInitializer 2021-07-05 20:33:03 -03:00
Juan Martín Sotuyo Dodero adb9182f70 Update NonStaticInitializer 2021-07-05 20:31:46 -03:00
Juan Martín Sotuyo Dodero 74b75dc098 Reenable unit test 2021-07-05 16:19:05 -03:00
Juan Martín Sotuyo Dodero 323c5a82bc Reenable ReturnFromFinallyBlock regression testing 2021-07-05 15:43:45 -03:00
Juan Martín Sotuyo Dodero 048f4c65f9 Update ReturnFromFinallyBlock 2021-07-05 15:43:01 -03:00
Andreas Dangel 0cf72b8c97 Merge branch 'master' into pmd/7.0.x 2021-06-26 10:34:41 +02:00
Andreas Dangel ff99ac03d4 Merge branch 'master' into pmd/7.0.x 2021-06-26 10:01:43 +02:00
Clément Fournier 150cc84776 Add to release notes 2021-06-25 17:54:46 +02:00
Clément Fournier 41e11d4eae Fix description 2021-06-25 17:51:34 +02:00
Clément Fournier a39893a41b Merge branch '7.0.x' into new-rule-UnnecessaryConversion 2021-06-25 17:39:53 +02:00
Clément Fournier 429dc90b41 Rename rule 2021-06-25 17:38:13 +02:00
Clément Fournier 65c7882af9 Add to ci file 2021-06-25 17:34:37 +02:00
Clément Fournier 83ba7a1ce0 Fix pmd warnings 2021-06-25 17:33:52 +02:00
Clément Fournier a720616e2f Move to codestyle
other 'unnecessary*' rule are there
2021-06-25 17:31:43 +02:00
Clément Fournier 5a9b609645 Salvage rule 2021-06-25 17:17:40 +02:00
Clément Fournier b779f08198 Revert "REVERT ME LATER Remove UnnecessaryConversion rule"
This reverts commit d5c6cd01ff.
2021-06-25 17:14:22 +02:00
Andreas Dangel a2e7615b76 [java] ConstructorCallsOverridableMethod - mention #3351 in tests 2021-06-25 16:31:00 +02:00
Andreas Dangel dfc5e8daa2 Merge pull request #3358 from
oowekyala:update-ConstructorCallsOverridableMethod

[java] Update ConstructorCallsOverridableMethod #3358
2021-06-25 16:29:19 +02:00
Andreas Dangel ca691de3d1 [doc] Update release notes for pmd 7 (#3351) 2021-06-25 16:25:49 +02:00
Andreas Dangel 77d5438dee [java] Don't share TypePrettyPrinter 2021-06-25 16:24:32 +02:00
Andreas Dangel 62a1bfe3bd Merge pull request #3335 from adangel:pmd7-update-ConsecutiveLiteralAppends
[java] Update rule ConsecutiveLiteralAppends #3335
2021-06-25 16:22:49 +02:00
Andreas Dangel 610c9e49fb [ci] Remove duplicated rule CognitiveComplexity 2021-06-25 16:05:26 +02:00
Andreas Dangel b49f53bc8e [java] Fix UnusedAssignment 2021-06-25 15:56:58 +02:00
Andreas Dangel bb259f72c6 Merge pull request #3311 from
oowekyala:java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing

[java] Extract reaching definitions analysis out of UnusedAssignmentRule
#3311
2021-06-25 15:45:03 +02:00
Andreas Dangel 73d2d06fdc [doc] Update release notes for pmd 7 2021-06-25 15:43:05 +02:00
Andreas Dangel 5e0ac9009a [java] Make eclipse compiler happy
tryGetNode() is reachable via BoundToNode
and via JElementSymbol. We should use BoundToNode
as this has a type.
2021-06-25 15:35:13 +02:00
Andreas Dangel 214d6f3307 [java] MissingBreakInSwitch - add test cases
#659 #2579 #1899
2021-06-25 15:29:52 +02:00
Andreas Dangel e568ad48c0 Merge pull requets #3278 from adangel:pmd7-update-insufficientstringbufferdeclaration
[java] Update rule InsufficientStringBufferDeclaration #3278
2021-06-25 14:08:35 +02:00
Clément Fournier e64e063e48 ConstructorCallsOverridableMethod: Print correct method for transitive call 2021-06-24 15:51:39 +02:00
Clément Fournier 6c55649d55 Update ci file 2021-06-24 15:10:35 +02:00
Andreas Dangel f0a9c39373 Merge branch 'master' into pmd/7.0.x 2021-06-24 15:00:17 +02:00
Andreas Dangel f555122c41 [java] Fix LiteralsFirstInComparisons 2021-06-24 12:48:49 +02:00
Andreas Dangel fb900924e3 [java] Fix line numbers for UseArraysAsList 2021-06-24 12:48:35 +02:00
Andreas Dangel 7006523392 Merge branch 'master' into pmd/7.0.x 2021-06-24 12:21:41 +02:00
Andreas Dangel fc4b2270ae [java] Fix GuardLogStatementRule (refs #957) 2021-06-24 10:49:37 +02:00
Andreas Dangel bc88fed446 Fix compile errors 2021-06-24 10:13:01 +02:00
Andreas Dangel 256b00f773 Merge branch 'master' into pmd/7.0.x 2021-06-24 10:01:51 +02:00
Clément Fournier 4f64f93c85 Fix pmd violations 2021-06-24 01:14:38 +02:00
Clément Fournier 4d5fc38a05 Don't print method result in rule message 2021-06-24 01:08:50 +02:00
Clément Fournier a324ed3969 Refactor type pretty printers 2021-06-24 01:06:00 +02:00
Clément Fournier 22d62bb1e8 ConstructorCallsOverridableMethod: support transitive calls 2021-06-24 00:36:34 +02:00
Clément Fournier f40fe721f7 ConstructorCallsOverridableMethod: rewrite description 2021-06-24 00:05:16 +02:00
Clément Fournier a3c5911b05 ConstructorCallsOverridableMethod: Stop ignoring abstract methods - fix #3351 2021-06-23 23:56:55 +02:00
Clément Fournier 453a0c40bf Merge branch '7.0.x' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2021-06-22 21:18:42 +02:00
Clément Fournier de2212c93b Update rule ConstructorCallsOverridableMethod 2021-06-22 20:23:50 +02:00
Andreas Dangel 2656e62d89 [apex] Fix rule AvoidDebugStatements
ApexXPathRule exists no longer
2021-06-20 18:55:31 +02:00
Andreas Dangel 652f04ee58 [ci] Add openjdk-11 as project for regression testing 2021-06-20 18:47:07 +02:00
Andreas Dangel 17615cb850 [ci] Improve pmd-regression-tester call
Use --filter-with-patch-config when creating diff against master
2021-06-20 18:46:25 +02:00
Andreas Dangel d03863f4e6 Merge branch 'master' into pmd/7.0.x 2021-06-20 18:44:33 +02:00
Clément Fournier ed98ec7078 Merge branch 'master' into 7.0.x 2021-06-16 14:22:40 +02:00
Clément Fournier 3aba7f9367 Enable CognitiveComplexity in ci 2021-06-16 14:22:16 +02:00
Andreas Dangel 616bc57882 [java] ConsecutiveLiteralAppends - fix reported line numbers 2021-06-11 17:07:04 +02:00
Andreas Dangel f02e7c6ab0 [java] ConsecutiveLiteralAppends: refactor and fix false pos/neg 2021-06-11 16:23:44 +02:00
Andreas Dangel a98b965e09 [java] Update rule ConsecutiveLiteralAppends
Fixes a false positive: intervening calls to toString()
are no longer ignored, as the result of toString() would
change if the consecutive append calls would be merged.
2021-06-11 12:43:34 +02:00
Andreas Dangel 86ffb97ce1 Merge pull request #3310 from oowekyala:update-ExceptionAsFlowControl
[java] Update rule ExceptionAsFlowControl #3310
2021-06-11 10:20:50 +02:00
Andreas Dangel 5ad362cd44 Merge pull request #3309 from oowekyala:update-DoNotExtendJLError
[java] Update DoNotExtendJavaLangError #3309
2021-06-11 10:06:03 +02:00
Andreas Dangel 8dcd5b2967 Merge pull request #3308 from oowekyala:update-ExcessiveXX
[java] Update ExcessiveSomething rules #3308
2021-06-11 10:04:28 +02:00
Andreas Dangel 654f890d84 [java] Change Excessive*Rule for regression tester
The regression tester executes only rules, that actually have
been changed.
2021-06-11 09:37:32 +02:00
Andreas Dangel cfc0fa0a70 Merge pull request #3298 from oowekyala:update-AbstractClassWithoutAnyMethod
[java] Update rule AbstractClassWithoutAnyMethod #3298
2021-06-11 09:12:07 +02:00
Andreas Dangel fda7cd8da4 Suppress PMD warning (refs #3315) 2021-06-10 18:12:03 +02:00
Andreas Dangel 2e5b12fdff [java] Fix rule test for CognitiveComplexity 2021-06-10 18:02:42 +02:00
Andreas Dangel 5fbf9b2921 Merge branch 'master' into pmd/7.0.x 2021-06-10 17:52:32 +02:00
Andreas Dangel 2039367b82 Merge branch 'master' into pmd/7.0.x 2021-05-29 07:44:44 +02:00
Andreas Dangel 89d0d76035 Merge branch 'master' into pmd/7.0.x 2021-05-28 19:02:50 +02:00
Andreas Dangel 60f57c46d6 Enable CognitiveComplexity in regression tester 2021-05-28 17:03:03 +02:00
Andreas Dangel 0fea742f3d Merge branch 'master' into pmd/7.0.x 2021-05-28 17:01:04 +02:00
Clément Fournier 77b57a7f3b Cleanups 2021-05-28 16:12:11 +02:00
Clément Fournier 6a23441b64 Update ci file 2021-05-28 16:06:28 +02:00
Clément Fournier 8685acff1e Update rule ExceptionAsFlowControl 2021-05-28 15:52:50 +02:00
Clément Fournier cbaff2effc Update DoNotExtendJavaLangError 2021-05-28 15:52:27 +02:00
Clément Fournier 1e8278f86b Update CI file 2021-05-28 15:50:28 +02:00
Clément Fournier 118561804e Merge branch '7.0.x' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2021-05-28 15:44:47 +02:00
Clément Fournier c3fedf747f Update ExcessiveXX rules in design.xml
ExcessiveClassLengthRule
ExcessiveImportsRule
ExcessiveMethodLengthRule
ExcessiveParameterListRule
ExcessivePublicCountRule
2021-05-28 15:35:39 +02:00
Clément Fournier 6e4be5093e Checkstyle, pmd warnings 2021-05-28 14:10:44 +02:00
Clément Fournier 90b903a560 Fix unresolved types warnings.. 2021-05-28 14:06:16 +02:00
Clément Fournier 5e3ead8b4d Update cognitive complexity
most of it is in merge commit
2021-05-28 13:56:28 +02:00
Clément Fournier fb294680af Merge branch 'master' into 7.0.x 2021-05-28 13:24:49 +02:00
Andreas Dangel a46d194046 Merge branch 'master' into pmd/7.0.x 2021-05-27 10:59:25 +02:00
Andreas Dangel 8f4bf19f2f Update (new) rule MutableStaticState 2021-05-27 09:39:28 +02:00
Andreas Dangel 4215f6f6e5 Merge branch 'master' into pmd/7.0.x 2021-05-27 09:32:00 +02:00
Andreas Dangel 08a055c2a5 [doc] Remove duplicated entry in release notes 2021-05-27 09:31:18 +02:00
Clément Fournier e58cc6ef65 Merge branch 'pr/3271' into 7.0.x 2021-05-25 19:11:18 +02:00
Clément Fournier 6fa3fb6ef9 Merge branch '7.0.x' into pr/3271 2021-05-25 19:11:05 +02:00
Clément Fournier 1d52700c49 Merge branch 'update-AvoidRethrowingException' into 7.0.x 2021-05-25 19:10:16 +02:00
Clément Fournier 16983ec778 Merge branch 'update-PreserveStackTrace' into 7.0.x 2021-05-25 19:09:59 +02:00
Clément Fournier 03e9e840a2 Update JUnit5TestShouldBePackagePrivate to pmd 7
refs #3247
2021-05-25 13:30:05 +02:00
Clément Fournier a2ad578039 Merge branch 'master' into 7.0.x 2021-05-25 13:21:10 +02:00
Clément Fournier 513a865cf8 Hide some api in core 2021-05-25 12:40:29 +02:00
Clément Fournier 4c6d02a28e Shorten node repr printed to log 2021-05-24 22:07:05 +02:00
Clément Fournier a2d35948c7 Remove duplicate stack trace 2021-05-24 21:58:12 +02:00
Clément Fournier 26316883c7 Update AvoidRethrowingException 2021-05-24 17:54:01 +02:00
Clément Fournier f38a9a716f Update AbstractClassWithoutAnyMethod 2021-05-24 17:37:03 +02:00
Andreas Dangel 5f10bf3c7a Merge branch 'master' into pmd/7.0.x 2021-05-21 11:20:23 +02:00
Andreas Dangel e5a6f78baf Merge branch 'master' into pmd/7.0.x 2021-05-20 14:43:08 +02:00
Andreas Dangel 26bac0d8da [java] UnnecessaryLocalBeforeReturn - fix test
We report now the declaration of the local variable
that is unnecessary instead of the return.
2021-05-20 14:33:45 +02:00
Andreas Dangel a6c85ece42 [apex] Fix XPath rule 2021-05-20 14:10:23 +02:00
Andreas Dangel fce7933208 Merge branch 'master' into pmd/7.0.x 2021-05-20 14:05:53 +02:00
Andreas Dangel 072f4a8124 Add additional test case 2021-05-18 19:46:55 +02:00
Clément Fournier 8e8a2b0a39 Fix stackoverflow
Minimize following error:

https://github.com/spring-projects/spring-framework/blob/f5e8f4983f7653169f3da8a3287499fce93cadd4/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java#L587
2021-05-15 22:10:04 +02:00
Clément Fournier ea3c5229a8 Merge branch '7.0.x' into update-PreserveStackTrace 2021-05-15 21:19:13 +02:00
Clément Fournier dcf4234508 Add contexted stackoverflow error 2021-05-15 21:18:23 +02:00
Clément Fournier 987da9a6c8 Fix message 2021-05-15 20:29:40 +02:00
Clément Fournier c063e14d0c Merge branch '7.0.x' into pr/3271 2021-05-15 17:13:49 +02:00
Clément Fournier 1df324c632 Merge branch '7.0.x' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2021-05-15 14:26:16 +02:00
Andreas Dangel 7346c4974c [java] Update rule InsufficientStringBufferDeclaration 2021-05-14 17:03:51 +02:00
Clément Fournier 3e94623971 Merge branch '7.0.x' into update-PreserveStackTrace 2021-05-13 12:27:59 +02:00
Andreas Dangel 399106116f Merge pull request #3253 from oowekyala:update-UseDiamondOperator
[java] Update rule UseDiamondOperator #3253
2021-05-13 11:18:25 +02:00
Andreas Dangel 988e162353 [doc] Update release notes (#2391) 2021-05-13 11:17:31 +02:00
Andreas Dangel 5b814aa4b1 Merge pull request #3270 from oowekyala:java-classpath-resilience
[java] Improve resilience to broken classpath #3270
2021-05-13 10:49:19 +02:00
Clément Fournier c8416e9e3d Merge branch '7.0.x' into update-PreserveStackTrace 2021-05-12 14:50:49 +02:00
Clément Fournier 3b0389f291 Change message again 2021-05-11 21:46:21 +02:00
Clément Fournier 71bbbfdffb Ignore exceptions that are named "ignored" 2021-05-11 21:43:37 +02:00
Clément Fournier 0f00865c59 Allow PrivilegedActionException#getCause 2021-05-11 20:37:21 +02:00
Andreas Dangel 6369c96943 [java] Update rule OptimizableToArrayCall 2021-05-11 19:49:02 +02:00
Clément Fournier 88b0cda3b3 Rule doc and messages 2021-05-11 17:58:09 +02:00
Clément Fournier b04730684d Support conditional expr 2021-05-11 17:40:44 +02:00
Clément Fournier 6e4fda8f5b Fix stackoverflow in some cases 2021-05-11 17:22:26 +02:00
Clément Fournier 13319f4471 More tests 2021-05-11 16:23:13 +02:00
Clément Fournier f2b512fe01 PMD violation 2021-05-11 15:22:10 +02:00
Clément Fournier 513841e374 Constraint dataflow to be single-assignment
This will avoid some FPs at the cost of some FNs.
The rule doesn't handle branches in control flow or loops.
2021-05-11 15:19:06 +02:00
Clément Fournier 7b693aae1a Ignore new Exception(new Problem(originalException))
These are cases where the exception is consumed by the constructor
transitively.
Since we're processing everything recursively now we're effectively
exploring the dataflow graph... only in an indirect way, without respect
for ordering of statements... This can be improved later, and ideally
generalized to help other rules.
2021-05-11 15:14:29 +02:00
Clément Fournier 8bba9b070b Ignore InvocationTargetException#getTargetException 2021-05-11 15:04:28 +02:00
Clément Fournier 51b491ca7a add some test cases for future 2021-05-11 14:57:29 +02:00
Clément Fournier 4e9d06b8da Add wrap function for ContextedRuntimeException 2021-05-10 21:49:00 +02:00
Andreas Dangel 497cf39e32 Merge branch 'master' into pmd/7.0.x 2021-05-10 20:33:26 +02:00
Clément Fournier bbc9c83814 PMD warnings 2021-05-09 21:28:49 +02:00
Clément Fournier 1d5ee7828f Remove DataflowPass#ensureProcessed 2021-05-09 21:18:07 +02:00
Clément Fournier 074b955aeb ImmutableField fixes 2021-05-09 20:55:18 +02:00
Clément Fournier 5fd40ef219 Refine annotations of SingularField 2021-05-09 20:38:44 +02:00
Clément Fournier 2ea0946e86 Refine annotations of UnusedPrivateField 2021-05-09 20:29:45 +02:00
Clément Fournier 601aa70c34 Improve ImmutableField 2021-05-09 20:19:02 +02:00
Clément Fournier 3ee1af3a53 Fix compil, test failures 2021-05-09 20:00:09 +02:00
Clément Fournier 0e457c857b Merge branch '7.0.x' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2021-05-09 19:48:56 +02:00
Clément Fournier efde78e000 Add fixed issues to release notes
refs #3179
2021-05-09 19:31:51 +02:00
Clément Fournier 2bcf279dab Check that #2134 is fixed 2021-05-09 19:28:09 +02:00
Clément Fournier e932177730 Fix FNs with PreserveStackTrace rule 2021-05-09 19:25:48 +02:00
Clément Fournier 1fc3e9868d Fix unresolved references in tests 2021-05-09 18:17:07 +02:00
Clément Fournier f9448ffcb7 Merge branch '7.0.x' into update-PreserveStackTrace 2021-05-09 17:54:31 +02:00
Clément Fournier fd801ab8b9 Release notes
also format
2021-05-09 17:29:54 +02:00
Clément Fournier 27549ba430 Merge branch '7.0.x' into update-UseDiamondOperator 2021-05-09 17:24:48 +02:00
Clément Fournier 2d9a54e9f4 Merge branch '7.0.x' into java-classpath-resilience 2021-05-09 14:36:56 +02:00
Clément Fournier 4dec17b937 Merge branch 'master' into 7.0.x 2021-05-09 14:36:29 +02:00
Clément Fournier 597f9cf048 Fix apex tests using ApexNode<Compilation>
ApexNode<Compilation> is not a node...
At most ApexNode<? extends Compilation>, but
even then, you can't do anything with that,
so better to use ASTUserClassOrInterface
2021-05-09 12:59:57 +02:00
Clément Fournier 5f3bfff869 Make base class for apex class/interface
Also delete getTypeKind, like in the java module
2021-05-09 12:28:33 +02:00
Clément Fournier d1ce25a087 Merge branch 'master' into 7.0.x 2021-05-09 12:16:33 +02:00
Clément Fournier b166d8e231 Move test data class in dir ignored by checkstyle 2021-05-08 21:08:25 +02:00
Clément Fournier 04d9e8986b Merge branch '7.0.x' into java-classpath-resilience 2021-05-08 21:02:46 +02:00
Andreas Dangel baf929f178 Merge branch 'master' into pmd/7.0.x 2021-05-08 20:34:49 +02:00
Clément Fournier 471ded7da7 Doc 2021-05-08 13:55:55 +02:00
Clément Fournier 834dadbcbf Change enum constant name set to enum constant itself 2021-05-08 13:25:37 +02:00
Clément Fournier 627d6a4147 Merge branch '7.0.x' into typeres-annotations 2021-05-08 12:51:14 +02:00
Clément Fournier 43d9250503 Save 'broken' class files in regular source tree
Since we have the classpath abstraction, we can just
mask off some class files to get a broken classpath
for use in tests.
2021-05-08 12:44:34 +02:00
Clément Fournier fe304c12fa Fix test 2021-05-07 23:34:25 +02:00
Clément Fournier 7557357f4a More doc 2021-05-07 23:30:22 +02:00
Clément Fournier b594bb23fe Checkstyle + pmd 2021-05-07 23:18:26 +02:00
Clément Fournier 1c2604f770 Doc 2021-05-07 22:58:15 +02:00
Clément Fournier 8cec99fcb7 Fix bug with repeated withTypeArguments 2021-05-07 22:56:24 +02:00
Clément Fournier 6e9480bc9f Fix overriding test
previously this test was ill-posed. We had an unresolved List type,
and also, had a type param <S extends List<S>> which is an unsatisfiable
recursive bound.
2021-05-07 22:46:24 +02:00
Clément Fournier 658f689750 Format 2021-05-07 22:24:46 +02:00
Clément Fournier d4dd12b943 Make sure malformed types don't break algos 2021-05-07 19:11:55 +02:00
Clément Fournier 7eefea221d Add test for broken classpath 2021-05-07 17:43:21 +02:00
Clément Fournier 06f1b566bf Add classpath abstraction - meant to ease testing 2021-05-07 17:00:35 +02:00
Clément Fournier 371f83f3aa Fix context of relational exprs 2021-05-07 16:45:48 +02:00
Clément Fournier 495c120ed9 Improve error messages when an AssertionError occurs
Prints eg

net.sourceforge.pmd.internal.util.ContextedAssertionError: Detail message
Exception Context:
	[1:Rule applied on node=[CastExpression:92:53](long ) (2 * (4 / 2 ) )]
2021-05-07 16:38:19 +02:00
Clément Fournier 73a50e2b61 Update ci file 2021-05-07 15:41:47 +02:00
Clément Fournier df3c3c2547 Fix wrong syntax in UnusedPrivateMethod 2021-05-07 15:19:25 +02:00
Clément Fournier 435df090e7 Checkstyle 2021-05-07 15:04:09 +02:00
Clément Fournier cb7a455c14 Fix context problem,
do inference for entire subtree instead of just one level
2021-05-07 15:01:54 +02:00
Clément Fournier ed99668be8 Merge branch '7.0.x' into update-UseDiamondOperator 2021-05-07 13:28:59 +02:00
Clément Fournier 00a087774a Fix tests of LocalVariableCouldBeFinal
The rule ignores unused variables since 7.0.0

Refs #3266
2021-05-07 13:00:41 +02:00
Clément Fournier 63e06eb005 Remove unresolved reference 2021-05-07 12:57:37 +02:00
Clément Fournier a8716a13f9 Merge branch 'master' into 7.0.x 2021-05-07 12:39:00 +02:00
Clément Fournier 9274af1e8e Merge branch 'master' into 7.0.x 2021-05-06 12:52:34 +02:00
Clément Fournier 55abab9e62 Merge branch '7.0.x' into update-UseDiamondOperator 2021-05-05 15:19:43 +02:00
Clément Fournier d8ce0227ee Doc 2021-05-05 14:55:46 +02:00
Clément Fournier 2ec8ced391 Test method erasure 2021-05-05 14:39:34 +02:00
Clément Fournier 9edc586bd3 Doc 2021-05-05 14:29:29 +02:00
Clément Fournier 987629160f Improve TypePrettyPrint tests 2021-05-05 14:24:12 +02:00
Clément Fournier f5534e47d9 Add unit test for TypeSystem 2021-05-05 14:10:30 +02:00
Clément Fournier 75a0129c27 Rename CtxKind constants 2021-05-02 20:46:38 +02:00
Clément Fournier 69245ee243 Move type-related classes from package ast into types.ast 2021-05-02 20:42:11 +02:00
Clément Fournier 0c4cdd8973 Cleanup, find new failing test case 2021-05-02 17:27:29 +02:00
Clément Fournier a867c86ffb Increase max message length 2021-05-02 17:02:37 +02:00
Clément Fournier 3e36f30069 Add equivalence testing method
Fix #2391
2021-05-02 16:57:00 +02:00
Clément Fournier 4c1bde89e0 Cleanups 2021-05-02 15:00:28 +02:00
Clément Fournier 3cc94b7f20 Link ExprMirrors to their parent 2021-05-02 13:19:54 +02:00
Clément Fournier 5f78f4d2d3 Merge branch '7.0.x' into update-UseDiamondOperator 2021-05-02 11:48:20 +02:00
Clément Fournier 670ec9a7ef Fix bug with method refs erasure of getClass return 2021-05-02 11:47:41 +02:00
Clément Fournier 7e1428e748 Use shouldHaveType more consistently 2021-05-02 11:08:38 +02:00
Clément Fournier bccfe082d8 Use shouldHaveType more consistently 2021-05-02 00:05:45 +02:00
Clément Fournier 2d44270f2b Add TypingContext param to getTypeMirror 2021-05-02 00:01:53 +02:00
Clément Fournier 1c88f21f7e Improve message 2021-04-30 13:27:25 +02:00
Clément Fournier bab81f3549 Doc 2021-04-30 13:20:42 +02:00
Clément Fournier 6978862120 Merge branch '7.0.x' into update-UseDiamondOperator 2021-04-30 13:17:23 +02:00
Clément Fournier a5c2bbdaa9 Merge branch 'java-better-contexts' into 7.0.x 2021-04-30 12:49:21 +02:00
Clément Fournier 10186c85ba Merge branch 'master' into 7.0.x 2021-04-30 12:49:10 +02:00
Clément Fournier 4d6ff45724 Release notes 2021-04-30 12:48:14 +02:00
Clément Fournier 4df0290fc4 Test string contexts 2021-04-29 12:49:02 +02:00
Clément Fournier 3723e5b05f More tests for arithmetic casts 2021-04-29 12:19:44 +02:00
Clément Fournier be65070281 Casts in arithmetic smaller than int 2021-04-29 00:27:09 +02:00
Clément Fournier 9bbe60f269 Casts in ternary condition 2021-04-29 00:13:24 +02:00
Clément Fournier 46f7c77507 Fix nopmd comment 2021-04-28 15:24:48 +02:00
Clément Fournier f960ca4eb8 PMD violations 2021-04-27 22:41:07 +02:00
Clément Fournier 37fa63e59e Fix tree dump tests 2021-04-27 22:37:48 +02:00
Clément Fournier d624eec16b Merge branch 'java-better-contexts' into update-UseDiamondOperator 2021-04-27 22:33:28 +02:00
Clément Fournier 1af3069463 Fix NPE in spring with null enclosing class 2021-04-27 22:16:51 +02:00
Clément Fournier 9a13b287e7 Fix arithmetic expressions in unnecessaryCast 2021-04-27 22:16:51 +02:00
Clément Fournier 1bb8eafd44 Fix importing bug
Shows up in java.base

The problem is importing a member declared in the file will try to recurse
into the superclass to find members with the same name.
But the superclass node has not been disambiguated yet,
and cannot be, as scopes are not properly built.
We just load static imports lazily now.
2021-04-27 22:16:51 +02:00
Clément Fournier 0ab05dc0d2 Checkout acceptsType 2021-04-27 22:16:51 +02:00
Clément Fournier 8bbbb0fcb6 Numeric contexts 2021-04-27 22:16:51 +02:00
Clément Fournier 4b482177bf Add more conversion context rules, improve UnnecessaryCast 2021-04-27 22:16:51 +02:00
Clément Fournier 8196349d0d Add conversion context for assert statements 2021-04-27 22:16:51 +02:00
Clément Fournier ebfaf36b69 Improve ExprContext 2021-04-27 22:16:51 +02:00
Andreas Dangel 25463d94f3 Merge pull request #3229 from oowekyala:update-FieldDeclarationsShouldBeAtStartOfClass
[java] Update FieldDeclarationsShouldBeAtStartOfClass #3229
2021-04-27 19:25:35 +02:00
Clément Fournier 008ad4bf81 Merge branch '7.0.x' into update-PreserveStackTrace 2021-04-27 15:39:53 +02:00
Clément Fournier dcac640ec1 Merge branch '7.0.x' into update-FieldDeclarationsShouldBeAtStartOfClass 2021-04-27 15:38:49 +02:00
Clément Fournier c7ba4c918b Make getErasedReceiverType lazy 2021-04-27 15:37:18 +02:00
Clément Fournier b2f55eb11d Add todo comment to fix problems with unresolved things 2021-04-27 15:28:59 +02:00
Clément Fournier d3ecd33f28 Replace ASTType#getTypeImage with PrettyPrintingUtil 2021-04-27 15:20:10 +02:00
Clément Fournier 4f8cee70dd Use node streams in ASTUnion/Intersection types 2021-04-27 15:16:39 +02:00
Clément Fournier 45015ba15e Remove some usages of ASTType#getTypeImage
Remaining usages are in deprecated code.
Replacement is PrettyPrintingUtil.

Also method signatures now use type arguments.
This will change rule messages.
2021-04-27 15:14:42 +02:00
Clément Fournier 4786f14114 Expose enum constant names 2021-04-27 14:22:46 +02:00
Clément Fournier c06fa237b2 Improve defensive copies in ClassTypeImpl 2021-04-27 13:51:33 +02:00
Clément Fournier 0ea8dc49f9 Fix stackoverflow in spring
The problem was that unresolved types had an unresolved type as
a superclass. So their ancestors were basically an infinite
chain (which is lazily resolved though). When calling isSubtype,
at some point we recurse into ancestors and trigger the infinite
recursion.

With enough memory this manifests as a StackOverflowError. Before
I upgraded my RAM though, this threw an OutOfMemoryError (because
of the locals on the stack).
2021-04-27 13:38:05 +02:00
Clément Fournier 9296c9cfe2 Merge branch '7.0.x' into update-FieldDeclarationsShouldBeAtStartOfClass 2021-04-26 16:10:10 +02:00
Clément Fournier 2345047ce9 Fix bug with missing method type in standalone exprs 2021-04-25 19:03:04 +02:00
Clément Fournier ae5f10d38e Fix tests 2021-04-25 18:24:35 +02:00
Clément Fournier ab2d538eab Cleanup UnnecessaryCast rule 2021-04-25 17:51:42 +02:00
Clément Fournier 5485ebbdb4 Improve rule documentation
Remove references to the 'diamond operator'. This is not
an operator, it's just a syntax to avoid mentioning type
arguments. The JLS says 'diamond type arguments', now we
do too.
2021-04-25 17:48:20 +02:00
Clément Fournier aac3bb6d17 Cleanups 2021-04-25 17:39:21 +02:00
Clément Fournier 28c47ba065 Merge branch '7.0.x' into update-UseDiamondOperator 2021-04-25 17:07:03 +02:00
Clément Fournier 8d66b024d8 Merge branch 'java-typeres-ctxs' into 7.0.x
Refs #3204
2021-04-25 17:06:12 +02:00
Clément Fournier 6b916547ff Merge branch '7.0.x' into java-typeres-ctxs 2021-04-25 16:42:52 +02:00
Clément Fournier eb2fd05722 Merge branch 'master' into 7.0.x 2021-04-25 16:41:37 +02:00
Clément Fournier 681f6f3829 Ignore empty declarations 2021-04-25 15:02:18 +02:00
Clément Fournier 3354c80681 Merge branch '7.0.x' into update-FieldDeclarationsShouldBeAtStartOfClass 2021-04-25 14:45:59 +02:00
Clément Fournier 8bca73f7f2 Add #2748 to pmd 7 release notes 2021-04-25 14:42:07 +02:00
Clément Fournier 2788434b84 Fix message with lambda violation 2021-04-25 14:40:57 +02:00
Clément Fournier 628e403c4b Add example about lists 2021-04-25 14:36:50 +02:00
Clément Fournier daab65b6b9 Rename getConversionContextType 2021-04-25 14:26:13 +02:00
Clément Fournier a7634828f8 Fix doc 2021-04-25 14:25:20 +02:00
Andreas Dangel 2ada953df5 Merge branch 'master' into pmd/7.0.x 2021-04-24 18:33:52 +02:00
Andreas Dangel a6df6a9ebc Merge branch 'master' into pmd/7.0.x 2021-04-24 16:52:28 +02:00
Andreas Dangel 96dc198fc6 Merge branch 'master' into pmd/7.0.x 2021-04-24 16:17:42 +02:00
Andreas Dangel 24365bb26e Merge branch 'pmd7-build-scripts-update' into pmd/7.0.x 2021-04-23 23:01:53 +02:00
Andreas Dangel f89c9e40d4 [ci] Sync branch pmd/7.0.x to sourceforge 2021-04-23 23:01:28 +02:00
Andreas Dangel 3b503c572f Merge branch 'master' into pmd7-build-scripts-update 2021-04-23 22:34:44 +02:00
Andreas Dangel 2a1a457129 Merge branch 'pmd/7.0.x' into pmd7-build-scripts-update 2021-04-23 22:34:27 +02:00
Andreas Dangel fa8ccf4b1a Merge master into pmd/7.0.x 2021-04-23 22:32:43 +02:00
Andreas Dangel 742e1e5a47 Merge branch 'master' into pmd/7.0.x 2021-04-23 22:17:09 +02:00
Andreas Dangel 6c9eee83b4 Merge pull request #3227 from oowekyala:update-OnlyOneReturn
[java] Update rule OnlyOneReturn #3227
2021-04-23 12:14:38 +02:00
Andreas Dangel 4c9ee04254 Merge pull request #3207 from oowekyala:fix-java-rulechain
[core] Make more rules be recognized as rulechain (saxon HE) #3207
2021-04-23 12:03:11 +02:00
Andreas Dangel 59192e8227 Merge branch 'pr-3220' into pmd7-build-scripts-update 2021-04-22 12:23:19 +02:00
Andreas Dangel aea369a80b Merge branch 'pr-3220' into pmd7-build-scripts-update 2021-04-22 11:35:31 +02:00
Clément Fournier 6008d910c3 Merge branch '7.0.x' into java-typeres-ctxs 2021-04-20 22:50:13 +02:00
Clément Fournier 67ee24934f [doc] Add {% deleted_rule %} tag because {% rule %} tag checks that the rule exists 2021-04-20 21:37:11 +02:00
Clément Fournier 7214de30b5 Cleanup pmd-doc build log 2021-04-20 21:19:42 +02:00
Clément Fournier 0eb3e5c12b Remove faulty fix, todo for later 2021-04-20 17:50:45 +02:00
Clément Fournier 078e903b73 Remove deprecated imports rules
Refs #3200, #3128, #2701
2021-04-20 17:46:10 +02:00
Clément Fournier 7301082d2e Merge branch 'master' into 7.0.x 2021-04-20 17:37:22 +02:00
Clément Fournier 46d2a02404 Update ci file 2021-04-19 17:34:47 +02:00
Clément Fournier 52f62698f9 Update ci file 2021-04-19 17:33:43 +02:00
Clément Fournier a7e7bf70e8 Remove unresolved references 2021-04-19 17:09:59 +02:00
Clément Fournier 6e701406ed Restore old properties 2021-04-19 17:03:49 +02:00
Clément Fournier a98cfbbea0 Update FieldDeclarationsShouldBeAtStartOfClass
Properties to make exceptions for enums and interfaces are removed.
2021-04-19 16:55:14 +02:00
Clément Fournier 4367f88fce Merge branch 'java-typeres-ctxs' into update-UseDiamondOperator 2021-04-19 16:51:47 +02:00
Clément Fournier 79ccde716a Update OnlyOneReturn rule 2021-04-19 16:43:23 +02:00
Clément Fournier a4353bb366 Add dropLast to NodeStream 2021-04-19 16:43:23 +02:00
Clément Fournier ea51f0683b Merge branch '7.0.x' into java-typeres-ctxs 2021-04-18 23:56:41 +02:00
Clément Fournier 9f9e375ddf Add cast image to rule message 2021-04-18 23:28:43 +02:00
Clément Fournier 2bd4ea50f4 Fix UnnecessaryCast 2021-04-18 23:17:27 +02:00
Clément Fournier 06faa10bc3 Fix context bug: standalone ternaries are their own 'context' for branch expressions 2021-04-18 22:31:45 +02:00
Clément Fournier 98228621b2 Add tests for correct behavior 2021-04-18 22:07:24 +02:00
Clément Fournier a328794d69 Merge branch 'apexlink' into 7.0.x
Refs #2830
2021-04-16 15:32:02 +02:00
Clément Fournier 0c84eb0a29 Merge branch 'master' into 7.0.x 2021-04-16 15:31:49 +02:00
Clément Fournier 622d1d51fa Use more Markdown in apex:UnusedMethod description 2021-04-16 15:30:04 +02:00
Clément Fournier 73f86cefb8 Merge branch '7.0.x' into apexlink 2021-04-16 15:24:00 +02:00
Andreas Dangel d33c517476 Merge pull request #3199 from oowekyala:update-PrematureDeclaration
[java] Update rule PrematureDeclaration #3199
2021-04-16 09:31:48 +02:00
Andreas Dangel eda0de0bd0 [doc] Update release notes for PMD 7 2021-04-16 09:29:21 +02:00
Andreas Dangel f711cc7276 Merge pull request #3191 from oowekyala:update-BrokenNullCheck
[java] Update rule BrokenNullCheck #3191
2021-04-15 10:33:37 +02:00
Andreas Dangel 04de8851e6 Add UseStandardCharsets for regression testing 2021-04-15 10:21:18 +02:00
Andreas Dangel 5b73a9f10b Merge pull request #3182 from oowekyala:update-UseVarargs
[java] Update rule UseVarargs #3182
2021-04-15 10:11:31 +02:00
Kevin Jones 8bc57f349a Change rule name to UnusedMethod, correct logging and add FIXME 2021-04-14 22:29:05 +01:00
Clément Fournier 2f86c13007 Fix some fps with boxing/unboxing casts 2021-04-13 13:08:08 +02:00
Clément Fournier 3f29a7a4b4 Fix example about casting to int to Long 2021-04-13 12:27:43 +02:00
Clément Fournier 35498ef3f6 Update release notes, rule examples
Refs #3218
2021-04-13 12:19:52 +02:00
Clément Fournier 537024784f Merge branch 'java-typeres-ctxs' into update-UseDiamondOperator 2021-04-12 20:22:53 +02:00
Clément Fournier 362dfe4bb0 Make getConversionContextType non-null
It's a pain otherwise
2021-04-12 20:16:07 +02:00
Clément Fournier 23e163cf44 Add tests to UseDiamondOperator 2021-04-12 20:09:39 +02:00
Clément Fournier 2c835363e3 Add pr to release notes 2021-04-12 19:24:35 +02:00
Clément Fournier 4dd53f0480 Add test case for #2748 2021-04-12 17:07:11 +02:00
Clément Fournier fd78a41ef1 REVERT ME remove type arg rule 2021-04-12 16:49:31 +02:00
Clément Fournier c995d20be1 Java 7 doesn't use invoc context as target type 2021-04-12 16:48:42 +02:00
Clément Fournier 136cab1e35 Cleanup tests 2021-04-12 16:19:40 +02:00
Clément Fournier 0cbc569ec2 Add unit tests 2021-04-12 00:17:14 +02:00
Clément Fournier 2d51d52d87 Fix the rule 2021-04-11 23:58:06 +02:00
Clément Fournier 2ebfa2ad06 Refine java 7 rules 2021-04-11 23:13:19 +02:00
Clément Fournier 6b60e7018a Add java 7-specific logic in Infer 2021-04-11 22:41:15 +02:00
Clément Fournier 500a042cc4 Improve UseDiamondOperator using similar approach 2021-04-11 22:12:33 +02:00
Clément Fournier 42665c9ead Finish UnnecessaryTypeArgumentRule 2021-04-11 21:41:51 +02:00
Clément Fournier afb02ec39b Revert "REVERT ME Remove UnnecessaryTypeArgument rule skeleton"
This reverts commit 8e570afe38.
2021-04-11 21:31:30 +02:00
Clément Fournier e850b607ad Update UseDiamondOperator
Convert it to a java rule
2021-04-11 21:30:07 +02:00
Clément Fournier d4db298675 Checkstyle 2021-04-11 18:56:38 +02:00
Clément Fournier 8b4302d684 Merge branch '7.0.x' into java-typeres-ctxs 2021-04-11 18:55:43 +02:00
Clément Fournier 3efac241ec Unused private method 2021-04-11 18:43:11 +02:00
Clément Fournier 6817b049fd Merge branch '7.0.x' into update-PrematureDeclaration 2021-04-11 15:21:51 +02:00
Clément Fournier 88f467aa10 Fix reference files 2021-04-11 14:57:09 +02:00
Clément Fournier 229cd707f6 Remove unresolved references in test file 2021-04-11 14:43:06 +02:00
Clément Fournier 4e575f91f9 Handle c-style array decl 2021-04-11 14:42:57 +02:00
Clément Fournier bf238c4dad Update text dump references 2021-04-11 14:37:10 +02:00
Clément Fournier 88b32d4da9 Merge branch '7.0.x' into update-UseVarargs 2021-04-11 14:33:55 +02:00
Clément Fournier 2f7e8660fa Ignore byte[] to restore legacy behavior 2021-04-11 14:33:07 +02:00
Clément Fournier 10230821aa New test case just for the show 2021-04-11 14:31:02 +02:00
Clément Fournier bdb46eb1be Test new contexts that are recognized 2021-04-11 14:21:22 +02:00
Clément Fournier 5c1b9d7b6d FN with Boolean var
The rule is now much more general though
2021-04-11 13:58:03 +02:00
Clément Fournier d475407cd5 Merge branch '7.0.x' into update-BrokenNullCheck 2021-04-11 13:20:19 +02:00
Clément Fournier 61f5fd6ec9 Merge branch 'master' into 7.0.x 2021-04-11 00:07:04 +02:00
Andreas Dangel beda672aa1 [doc] remove duplicated changed rules in release notes for 7.0.0 2021-04-10 19:04:40 +02:00
Andreas Dangel b75adc8169 Merge pull request #3195 from oowekyala:update-UnnecessaryReturn
[java] Improve rule UnnecessaryReturn to detect more cases #3195
2021-04-10 19:03:38 +02:00
Andreas Dangel 52c6fab707 [doc] Update release notes, refs #3195 2021-04-10 19:02:35 +02:00
Andreas Dangel 16e46c79c2 Merge pull request #3194 from oowekyala:update-UnnecessaryModifier
[java] Update rule UnnecessaryModifier #3194
2021-04-10 18:46:36 +02:00
Andreas Dangel 2f4bde2631 Suppress PMD false positive with unused private method
Refs #3209
2021-04-10 17:32:54 +02:00
Andreas Dangel 70478ce403 [java] Update new rule UseStandardCharsets 2021-04-10 17:14:16 +02:00
Andreas Dangel 6059558c1b Merge branch 'master' into pmd/7.0.x 2021-04-10 17:08:20 +02:00
Andreas Dangel 30e841a9ca Fix PMD SimplifyBooleanReturns 2021-04-10 16:17:57 +02:00
Andreas Dangel be94effc77 Merge pull request #3189 from oowekyala:update-LinguisticNaming
[java] Update rule LinguisticNaming #3189
2021-04-10 16:06:27 +02:00
Andreas Dangel c0eeb37caa [java] Fix JavaRuleUtil.containsCamelCaseWord 2021-04-10 16:06:16 +02:00
Andreas Dangel 1ddc5c6225 Merge pull request #3188 from
oowekyala:update-CommentDefaultAccessModifier

[java] Update CommentDefaultAccessModifier #3188
2021-04-10 15:45:38 +02:00
Clément Fournier 4d98076314 Merge branch '7.0.x' into update-LinguisticNaming 2021-04-10 14:43:26 +02:00
Andreas Dangel f7f67a4a3e Merge pull request #3181 from oowekyala:update-UseTryWithResources
[java] Update rule UseTryWithResources #3181
2021-04-10 12:06:27 +02:00
Clément Fournier f05c22687b Find another fp
wont-fix for now
2021-04-10 09:28:49 +02:00
Clément Fournier c824c1c43a Fix promotion not applied to arithmetic on operands smaller than int 2021-04-10 09:12:13 +02:00
Clément Fournier 271fa5ec3a Add test case 2021-04-10 08:46:24 +02:00
Clément Fournier f4bc89d3b2 add todo 2021-04-10 08:39:48 +02:00
Clément Fournier 65e462d18e Remove useless indirection 2021-04-10 08:27:29 +02:00
Clément Fournier 6397f256e0 Test null ternary 2021-04-10 08:15:51 +02:00
Clément Fournier 6d58a1cacb Add Numeric context kind 2021-04-10 08:10:46 +02:00
Clément Fournier e2a4857f8a Fix bug with simple query parsed weirdly by saxon
Now we have a normalization step that pulls up filters,
and reduces the start expression, so that the rulechain
analyser can recognise the pattern

Add tests for java rulechain

Rules that were not recognized as Rulechain and that now are:
- AvoidDecimalLiteralsInBigDecimalConstructor
- AvoidPrintStackTrace
- AvoidSynchronizedAtMethodLevel
- AvoidUsingVolatile
- DoNotUseThreads
- DontCallThreadRun
- EmptyMethodInAbstractClassShouldBeAbstract
- JUnit4TestShouldUseTestAnnotation
- LocalHomeNamingConvention
- LocalInterfaceSessionNamingConvention
- MDBAndSessionBeanNamingConvention
- RemoteInterfaceNamingConvention
- RemoteSessionInterfaceNamingConvention
- ReplaceHashtableWithMap
- ReplaceVectorWithList
- SimplifyStartsWith
- StringToString
- UseAssertEqualsInsteadOfAssertTrue
- UseAssertNullInsteadOfAssertTrue
- UseAssertSameInsteadOfAssertTrue
- UseAssertTrueInsteadOfAssertEquals
- UseStringBufferLength
2021-04-10 00:49:47 +02:00
Clément Fournier f245d6195e Make more rules use rulechain
- GuardLogStatementRule
- GodClassRule
- CommentContentRule
- CommentRequiredRule
- CommentSizeRule
- IdenticalCatchBranchesRule
- UnusedFormalParameterRule

Note: GuardLogStatementRule may now report
classes, enums, initializrs, etc. that are
nested within an interface, thus removing
false negatives.

Note: this is especially a big performance
improvement for the comment rules, which
previously were visiting the whole tree for
nothing.
2021-04-10 00:39:26 +02:00
Clément Fournier 89e8cc13eb Add test case 2021-04-09 17:54:01 +02:00
Clément Fournier ba09ff9eb7 Fix unclear definition with poly/standalone conditionals
This fixes some FPs of UnnecessaryCast
2021-04-09 17:13:50 +02:00
Clément Fournier 1187b9e4e1 Add tests for logging behavior 2021-04-09 16:19:57 +02:00
Clément Fournier 1572484bf0 Merge branch '7.0.x' into apexlink 2021-04-09 14:38:21 +02:00
Clément Fournier cf3ed1cd04 Only attempt loading once 2021-04-09 14:35:18 +02:00
Clément Fournier c2e65a2ec1 Fix FPs with lambda + cast in invoc context
Eg https://github.com/spring-projects/spring-framework/blob/v5.0.6.RELEASE/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java#L1368
2021-04-08 23:23:04 +02:00
Clément Fournier 3996049cc3 Remove ThreadLocal supertype cache
This way it's not static, so the TypeSystem may be garbage collected
properly.
2021-04-08 23:11:52 +02:00
Clément Fournier 193be9736e Fix comment 2021-04-08 22:41:58 +02:00
Clément Fournier 4345d5a099 Remove duplication in caching logic 2021-04-08 22:39:27 +02:00
Kevin Jones 97c8c3b365 Extend description on AvoidUnusedMethod 2021-04-08 21:38:50 +01:00
Clément Fournier 2da974ef4a Fix FP with casts that set a target type for a lambda/mref 2021-04-08 22:32:23 +02:00
Kevin Jones b2a421fed8 Upgrade apex-link version 2021-04-08 20:38:44 +01:00
Clément Fournier e97c70f47e Remove InferenceVar#getInfContext() 2021-04-08 19:55:15 +02:00
Clément Fournier 09e3bc9176 Fix unchecked conversion needed when checking bounds...
... and not being propagated to the enclosing site.

Inference happening in the added test:

```
Phase INVOC_STRICT     valueOf(java.lang.Class<T>, java.lang.String) -> T
    New bound           (ctx 5):   'b <: java.lang.Enum<'b>
    Context 5          valueOf(java.lang.Class<'b>, java.lang.String) -> 'b
    RETURN

    ARGUMENTS
        Checking arg 0 against java.lang.Class<'b>
            At:   /*unknown*/:16 :33..16:46
            Expr: this.enumType
            New bound           (ctx 5):   'b = T

        Checking arg 1 against java.lang.String
            At:   /*unknown*/:16 :48..16:61
            Expr: source.trim()
            Skipping instantiation of java.lang.String.trim() -> java.lang.String, it's already complete

    Ivar instantiated   (ctx 5):   'b := T
    Success: valueOf(java.lang.Class<T>, java.lang.String) -> java.lang.Enum
```

On line `new bound... 'b = T` what happens is the context will
check that the previous bound `'b <: java.lang.Enum<'b>` against
`'b = T`. Since T has upper bound `Enum`, not `Enum<T>`, an unchecked
conversion is necessary (`Enum ~> Enum<T>`). This needs to be notified
to the inference context so that invocation properly erases the return
type to `Enum`.

This was causing a FP with UnnecessaryCast, as in the previous, bugged
version, the return type of `Enum.valueOf(...)` was inferred to `T`,
 which doesn't need to be cast to `T`.
2021-04-08 19:43:04 +02:00
Clément Fournier 66fbbc56bb Fix tests about conversions 2021-04-08 18:01:49 +02:00
Clément Fournier 7a058e12df Suppress CompareObjectsWithEquals 2021-04-08 16:21:18 +02:00
Clément Fournier 0875d22d2c Explicitly ignore casts in argument context, todo for later 2021-04-08 16:09:38 +02:00
Clément Fournier 0dfb3b55cc Extract context object 2021-04-08 15:52:14 +02:00
Clément Fournier 7ed31aa5a9 Update ci file 2021-04-08 15:45:19 +02:00
Clément Fournier e59134933c Add more tests 2021-04-08 15:44:13 +02:00
Clément Fournier d5c6cd01ff REVERT ME LATER Remove UnnecessaryConversion rule 2021-04-08 15:34:17 +02:00
Clément Fournier c01da2ad8e Add UnnecessaryCast rule 2021-04-08 15:32:35 +02:00
Clément Fournier a7c47d2c7a Use simple names to pretty print 2021-04-08 14:44:02 +02:00
Clément Fournier 6fa418369b Merge branch '7.0.x' into java-typeres-ctxs 2021-04-08 14:39:30 +02:00
Clément Fournier 269a1ca42c Fix FP with reference to field which may be mutated 2021-04-08 14:31:14 +02:00
Clément Fournier 1f889e1354 Unresolved references in metrics 2021-04-08 14:11:26 +02:00
Clément Fournier ee316eb5ff More unresolved references... 2021-04-08 13:52:53 +02:00
Clément Fournier 9cca3f1f15 Unresolved refs in NPath rule+metric 2021-04-08 12:50:14 +02:00
Clément Fournier 3bd49417f5 More unresolved references... 2021-04-08 12:36:01 +02:00
Clément Fournier 9a828e2def Fix bug with DefaultPackage and ParameterizedTest
ParameterizedTest was not in the correct package. In PMD 6
this doesn't matter as we fall back on comparing simple names.
We don't do that in PMD 7.

See https://junit.org/junit5/docs/5.3.0/api/org/junit/jupiter/params/ParameterizedTest.html
2021-04-08 12:28:59 +02:00
Clément Fournier c768dfe32f Remove more unresolved references 2021-04-08 12:27:28 +02:00
Clément Fournier dcd9c379b0 Remove unresolved references from IdenticalCatchBranches.xml 2021-04-08 12:11:53 +02:00
Clément Fournier da7479075e Remove unresolved references from UnusedAssignment.xml 2021-04-08 12:09:24 +02:00
Clément Fournier 75be71f383 Merge branch 'pr/3187' into 7.0.x
Refs #3187
2021-04-08 11:32:27 +02:00
Clément Fournier fd9ee377ef Merge branch '7.0.x' into pr/3187 2021-04-08 11:31:45 +02:00
Clément Fournier e025977001 Move InvocationMatcher out create compound matcher 2021-04-07 22:07:46 +02:00
Clément Fournier d662a873de Doc 2021-04-07 21:49:17 +02:00
Clément Fournier 65ab809ac7 Fix some FNs related to side effects 2021-04-07 21:39:17 +02:00
Clément Fournier 61763ea698 Fix FN with exception ctor flagged as side-effect 2021-04-07 20:51:45 +02:00
Clément Fournier 6cc5312d8f Fix FN with blank local declaration 2021-04-07 20:39:28 +02:00
Clément Fournier 862a320b7d Add language attribute 2021-04-07 01:20:19 +02:00
Clément Fournier 77fbc0bb44 Merge branch '7.0.x' into apexlink 2021-04-07 01:19:47 +02:00
Clément Fournier 9b51be7b21 Don't check for deprecations when loading a ruleset in tests
This happens when we have a deprecated rule in a category.
Every time a rule of the same category was being loaded for
a test, the deprecation warning would be output.

pmd-apex was barfing a wall of deprecation warnings during
its tests because of this.
2021-04-07 01:18:52 +02:00
Clément Fournier c314ba84b2 Fix APEX_ROOT_DIRECTORY not being set 2021-04-07 01:04:47 +02:00
Clément Fournier ae195a8179 Merge branch '7.0.x' into apexlink 2021-04-07 01:01:25 +02:00
Andreas Dangel ea43f4157a Merge pull request #3178 from oowekyala:update-OneDeclarationPerLine
[java] Update rule OneDeclarationPerLine #3178
2021-04-06 10:07:14 +02:00
Clément Fournier d33eca20d3 Add test case for #2946
Already fixed
2021-04-05 20:14:42 +02:00
Clément Fournier 759d1279f4 Update ci file 2021-04-05 20:02:10 +02:00
Clément Fournier c189c7bb3f Update ci file 2021-04-05 20:01:22 +02:00
Clément Fournier 68aa87ed90 Remove some diff 2021-04-05 18:44:16 +02:00
Clément Fournier f3f83c3e06 Recognize side-effects in PrematureDeclaration
Fixes #1429, #1208
2021-04-05 18:41:27 +02:00
Clément Fournier 1268232af1 Update rule PrematureDeclaration 2021-04-05 01:37:10 +02:00
Clément Fournier b23330da6a Fix fp with loop 2021-04-05 01:00:13 +02:00
Clément Fournier e447aa5e0a Add tests with lambdas 2021-04-05 00:45:22 +02:00
Clément Fournier e22d0663d3 Fix fps with switch 2021-04-05 00:32:48 +02:00
Clément Fournier 6f4b4cc418 Update ci file 2021-04-04 18:28:03 +02:00
Clément Fournier 19e15b105b Update rule UnnecessaryReturn 2021-04-04 18:24:49 +02:00
Clément Fournier 07790eec72 Update rule UnnecessaryModifier 2021-04-04 16:32:19 +02:00
Clément Fournier ae3d7d46bb Merge branch 'pmd/7.0.x' into update-UseTryWithResources 2021-04-04 15:58:03 +02:00
Clément Fournier fcfadbdd96 Add a 'flatten operands' op for concatenations 2021-04-04 15:51:37 +02:00
Clément Fournier d264985073 Add manual tests 2021-04-03 23:18:05 +02:00
Clément Fournier 875793f99a Update reference files 2021-04-03 23:17:59 +02:00
Clément Fournier 56fe413588 Merge branch '7.0.x' into pr/3171 2021-04-03 23:02:33 +02:00
Clément Fournier 173806b687 Fix some compiler warnings 2021-04-03 23:01:54 +02:00
Clément Fournier 7b87d69b85 Fix pmd-lang-test project import 2021-04-03 22:55:39 +02:00
Clément Fournier bdd19af1f7 Remove some magic numbers 2021-04-03 20:59:53 +02:00
Clément Fournier 6680b54577 Remove intermediary list 2021-04-03 19:21:17 +02:00
Clément Fournier 3ddf0ad0d3 Merge branch '7.0.x' into pr/3171 2021-04-03 18:56:10 +02:00
Clément Fournier d3308f516f Merge branch 'pr/3172' into 7.0.x
Refs #3172
2021-04-03 18:43:19 +02:00
Clément Fournier 85a17e0915 Merge branch '7.0.x' into pr/3172 2021-04-03 18:33:50 +02:00
Clément Fournier 4a0a1503c5 Update release notes, refs #3191 2021-04-03 13:20:02 +02:00
Clément Fournier 886ca27bfb Update ci file 2021-04-03 13:18:53 +02:00
Clément Fournier 250d40512e Test cases for #3071 2021-04-03 13:17:49 +02:00
Clément Fournier 55786e2457 Reimplement broken null check 2021-04-03 12:59:37 +02:00
Clément Fournier 6671963ea2 Remove some kotlin warnings 2021-04-03 05:03:47 +02:00
Clément Fournier b70ded59ca Checkstyle 2021-04-03 02:43:17 +02:00
Clément Fournier 363aeb05a7 Remove more unresolved references 2021-04-03 01:19:09 +02:00
Clément Fournier f9c4512ced Fix PrettyPrintingUtil::displaySignature with extra dimensions 2021-04-03 00:03:38 +02:00
Clément Fournier b16e80c65f Fix unresolved references in tests 2021-04-02 23:40:53 +02:00
Clément Fournier 71f47d5768 Update dump tests 2021-04-02 17:08:38 +02:00
Clément Fournier 3903f5a4f3 Forcibly disable InsufficientStringBufferDeclarationRule
This is to avoid errors in CI, like in #3187.
This is just a hack, we should fix pmd-regression-tester,
or live with it until we have ported all rules.
This may not be enough, maybe another rule
will take its place and crash everything.
2021-04-02 16:00:39 +02:00
Clément Fournier 94171eb401 Update LinguisticNaming 2021-04-02 15:37:17 +02:00
Clément Fournier 0770c2e403 Update CommentDefaultAccessModifier 2021-04-02 15:09:06 +02:00
Clément Fournier 89d04f1d02 Fix duplicate import 2021-04-02 15:07:59 +02:00
Clément Fournier 1780978f73 Merge remote-tracking branch 'upstream/pmd/7.0.x' into 7.0.x 2021-04-02 14:40:10 +02:00
Andreas Dangel 6c667f570e [java] UseStringBufferForStringAppends - fix more fp with simple
assignments

Refs #3171
2021-04-02 11:10:10 +02:00
Andreas Dangel 43feee9416 Merge pull request #3177 from oowekyala:java-update-LooseCoupling
[java] Update rule LooseCoupling #3177
2021-04-02 10:37:02 +02:00
Clément Fournier 5a5510ca12 Revert some changes
ConsecutiveLiteralAppendsRule mostly
2021-04-01 21:21:13 +02:00
Clément Fournier b6f2172171 Add nullable annot 2021-04-01 19:09:15 +02:00
Clément Fournier 5b03ef61f5 Merge branch '7.0.x' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2021-04-01 19:06:39 +02:00
Clément Fournier c6b8147ec1 Fix some javadoc warnings 2021-04-01 19:06:02 +02:00
Clément Fournier 92561e149d Merge branch '7.0.x' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2021-04-01 15:47:48 +02:00
Clément Fournier 86c24760ab Fix fp with this/super qualifier 2021-04-01 15:34:34 +02:00
Clément Fournier bcde125ada Fix fp with extends clause 2021-04-01 15:31:24 +02:00
Clément Fournier 585ee8d158 Merge branch '7.0.x' into java-update-LooseCoupling 2021-04-01 15:28:45 +02:00
Clément Fournier 155975595d Merge branch 'pmd/7.0.x' into update-PreserveStackTrace 2021-04-01 15:27:44 +02:00
Andreas Dangel 92cd6ae91b Merge pull request #3180 from oowekyala:update-replace-X-with-X-rules
[java] Update replace x with x rules #3180
2021-04-01 11:52:43 +02:00
Andreas Dangel 9b35f5cc4d [java] Changes bestpractices.xml for regression tester
This is necessary so that the regression tester picks up
a change and creates a new diff report.
2021-04-01 11:39:44 +02:00
Andreas Dangel d8728799c7 Merge branch 'pmd/7.0.x' into pr-3178 2021-04-01 11:38:45 +02:00
Andreas Dangel 6865c692ea [java] UseStringBufferForStringAppends - fix more false positives
Refs #3171
2021-04-01 11:01:47 +02:00
Andreas Dangel 04ead37ce9 [java] Update rule UseArraysAsList 2021-04-01 10:07:42 +02:00
Andreas Dangel cff45648a9 [java] UseIOStreamsWithApacheCommons: fix FN with method call returning
file item
2021-04-01 09:29:53 +02:00
Andreas Dangel 480bec5db9 [java] UseStringBufferForStringAppends - fix fp with multiple simple
assignments

Refs #3171
2021-04-01 09:23:25 +02:00
Clément Fournier 158a075a84 Remove hacky logic from apex 2021-03-30 21:50:40 +02:00
Clément Fournier b80e8472bd Try to fix apex logic, ended up ignoring the test 2021-03-30 21:49:51 +02:00
Clément Fournier 5143a9f825 Remove apex position workarounds 2021-03-30 20:54:18 +02:00
Clément Fournier 5529b4fcac Merge branch 'analysis-listener' into text-utils-simple 2021-03-30 20:44:59 +02:00
Clément Fournier 25425b1c80 Merge branch '7.0.x' into analysis-listener 2021-03-30 20:44:02 +02:00
Clément Fournier c7d249fbf7 Delete unused class 2021-03-30 20:20:04 +02:00
Andreas Dangel 04d54611a3 Merge pull request #3176 from oowekyala:java-update-junit-annotation-rules
[java] Update junit annotation rules #3176
2021-03-30 19:36:42 +02:00
Andreas Dangel 33f5e9705f [doc] Fix dead links in doc/ruledoc 2021-03-30 19:33:10 +02:00
Andreas Dangel df06d150ca Merge pull request #3162 from oowekyala:pmd7-update-metrics
[core] Update metrics framework and some rules #3162
2021-03-30 19:14:36 +02:00
Clément Fournier 116f1a9578 Merge branch 'text-utils-javacc' into text-utils-comments 2021-03-30 03:04:15 +02:00
Clément Fournier d9a3ef9691 Merge branch 'text-utils-simple' into text-utils-javacc 2021-03-30 03:04:07 +02:00
Clément Fournier 0c9d0ca68f Merge branch 'text-utils-javacc' into text-utils-comments 2021-03-30 02:45:04 +02:00
Clément Fournier 7da7b96cf1 Merge branch 'text-utils-simple' into text-utils-javacc 2021-03-30 02:41:30 +02:00
Clément Fournier 50c00f4f9a Merge branch 'analysis-listener' into text-utils-simple 2021-03-30 02:38:13 +02:00
Clément Fournier 993e20899f Update tree dump tests 2021-03-30 00:00:07 +02:00
Clément Fournier 48ab0716fa Fold some test logic 2021-03-29 23:34:44 +02:00
Clément Fournier 0011b64c35 Merge branch '7.0.x' into analysis-listener 2021-03-29 23:14:29 +02:00
Clément Fournier 95ca6acb8e Update UseVarargs 2021-03-29 17:51:41 +02:00
Clément Fournier d172e4ea3b Update UseTryWithResources
- Test case for #2882
- Test case for #2650
- Update ci file
- Update release notes
2021-03-29 17:32:42 +02:00
Clément Fournier 882b76f74f Allow cast 2021-03-29 16:40:26 +02:00
Clément Fournier 891ed33a01 Allow AbstractMap.SimpleEntry 2021-03-29 16:39:13 +02:00
Clément Fournier b741cdc65f Update pmd 7 release notes 2021-03-29 00:45:02 +02:00
Clément Fournier c2678ecfb7 Fix #1747 for pmd 7 2021-03-29 00:43:28 +02:00
Clément Fournier 9f087b6f3b Ignore class literals (#2464) 2021-03-29 00:40:09 +02:00
Clément Fournier 65064ffdc7 Update rule doc 2021-03-29 00:36:58 +02:00
Clément Fournier 6d21c69d53 Fix FPs with throwing same exception 2021-03-29 00:28:23 +02:00
Clément Fournier 6e6ca68192 Add new property to LooseCoupling for list of exceptions to the rule
This is because I saw a lot of them being things like
ImmutableList, which are project-specific
2021-03-29 00:21:18 +02:00
Clément Fournier bd3288ffcc Fix FPs of LooseCoupling 2021-03-29 00:12:31 +02:00
Clément Fournier 956d53b134 Update ReplaceHashtableWithMap and ReplaceVectorWithList 2021-03-28 23:54:01 +02:00
Clément Fournier 33f232aa8d Update ReplaceEnumerationWithIterator 2021-03-28 23:47:14 +02:00
Clément Fournier f186b13a1c Update PreserveStackTrace 2021-03-28 23:42:56 +02:00
Clément Fournier 95e2dbfe8e Remove removed rules from ci rule list 2021-03-28 23:41:36 +02:00
Clément Fournier 0402663965 Update OneDeclarationPerLine 2021-03-28 22:55:17 +02:00
Clément Fournier 1a3fea8cdb Update LooseCoupling 2021-03-28 22:49:59 +02:00
Clément Fournier ea244062b9 Reduce FPs by checking we're a junit 4 class 2021-03-28 22:36:50 +02:00
Clément Fournier 9593451362 Update ci file 2021-03-28 22:30:51 +02:00
Clément Fournier 765de83cac Update JUnit4TestShouldUseTestAnnotation 2021-03-28 22:28:21 +02:00
Clément Fournier 091e6bec74 Update JUnit4TestShouldUseBeforeAnnotation 2021-03-28 22:23:04 +02:00
Clément Fournier 4c3d237031 Update JUnit4TestShouldUseAfterAnnotation 2021-03-28 22:19:16 +02:00
Clément Fournier 77c05afd55 Update JUnit4SuitesShouldUseSuiteAnnotation 2021-03-28 22:15:33 +02:00
Clément Fournier 045720399f Use jekyll tags properly, create apex page placeholder 2021-03-28 19:27:32 +02:00
Clément Fournier 783772a351 Doc in java page 2021-03-28 19:12:03 +02:00
Clément Fournier eb4fe19b5d Describe how to add a new metrics framework 2021-03-28 19:07:57 +02:00
Clément Fournier 415b4a49bf Update doc for some metrics rules 2021-03-28 19:02:45 +02:00
Clément Fournier d531201179 Also recognize isX methods as getters 2021-03-28 17:44:34 +02:00
Clément Fournier 794b723075 Fix npath not handling foreach loop 2021-03-28 17:30:05 +02:00
Clément Fournier 11894ba381 Make npath tests more unitary 2021-03-28 17:17:42 +02:00
Clément Fournier e8a16765b7 Unresolved types in tests 2021-03-28 17:14:26 +02:00
Clément Fournier 9bc8ea67cc Add some doc 2021-03-28 17:08:19 +02:00
Clément Fournier eb43a3b251 Refine atfd 2021-03-28 17:00:39 +02:00
Clément Fournier 93c04c4b1f Refine definition of a getter 2021-03-28 16:49:39 +02:00
Clément Fournier d6d316eba5 Merge branch '7.0.x' into HEAD 2021-03-28 16:49:10 +02:00
Clément Fournier d4a2f4b417 Move file to java source root 2021-03-27 18:43:23 +01:00
Clément Fournier e5c2296381 Add more constraints to Nopa test 2021-03-27 18:15:22 +01:00
Clément Fournier 0cb6e537f0 Change parameters of Metric#compute to match order in MetricsUtil 2021-03-27 18:12:10 +01:00
Clément Fournier 08cc7f8c59 Remove useless suppression annotations 2021-03-27 18:10:32 +01:00
Andreas Dangel 86fa682661 Merge branch 'master' into pmd/7.0.x 2021-03-27 16:37:22 +01:00
Andreas Dangel a5c57a3dc9 Fix unused import 2021-03-27 16:01:11 +01:00
Andreas Dangel 2371832a0b [java] Fix merge errors in UnusedPrivateMethod 2021-03-27 15:57:46 +01:00
Andreas Dangel 2daf99eb67 [apex] Fix line number calculations
When calculateLineNumbers is called,
the root node (ASTApexFile) is not available yet
2021-03-27 15:49:21 +01:00
Andreas Dangel 74fffb35c4 Merge branch 'master' into pmd/7.0.x 2021-03-27 15:38:36 +01:00
Andreas Dangel 99f4b8e8d2 Merge branch 'pmd/7.0.x' into pmd7-update-UseStringBufferForStringAppendsTest 2021-03-26 18:00:44 +01:00
Andreas Dangel 5c4fb5ae6e [java] Update rule UseIOStreamsWithApacheCommonsFileItem 2021-03-26 17:46:13 +01:00
Clément Fournier dd312be8f2 Draft for java features page 2021-03-26 17:22:09 +01:00
Clément Fournier e39abff4fb Merge branch '7.0.x' into pmd7-update-metrics 2021-03-26 16:38:11 +01:00
Clément Fournier 936289af6b Merge branch 'master' into 7.0.x 2021-03-26 16:37:11 +01:00
Andreas Dangel 6488e11523 [java] Update rule UseStringBufferForStringAppends 2021-03-26 16:28:46 +01:00
Andreas Dangel a4ed281a9d Merge pull request #3126 from oowekyala:reimplement-forloopcanbeforeach
[java] Update ForLoopCanBeForeach #3126
2021-03-26 10:42:08 +01:00
Andreas Dangel fb67b2bc54 Merge branch 'pmd/7.0.x' into pr-3126 2021-03-26 10:41:20 +01:00
Andreas Dangel 80d0a9bf4a [doc] Update release notes, refs #833 2021-03-26 10:23:41 +01:00
Andreas Dangel 09d0405147 [java] Fix BinaryOp.COMPARISON_OPS 2021-03-26 10:16:24 +01:00
Clément Fournier 2bd9445098 Merge branch '7.0.x' into pmd7-update-metrics 2021-03-12 17:03:50 +01:00
Clément Fournier 85680d815a Javadoc warnings 2021-03-10 17:01:33 +01:00
Clément Fournier 7e5ebc8c77 Simplify ImmutableField 2021-03-10 16:48:57 +01:00
Clément Fournier 5f9a0e6c7b Merge branch '7.0.x' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2021-03-10 16:24:00 +01:00
Clément Fournier 12cec068e7 Fix merge of master 2021-03-10 16:10:32 +01:00
Clément Fournier 98fca353c6 Merge branch 'master' into 7.0.x 2021-03-10 15:32:29 +01:00
Andreas Dangel a2a840132f Merge pull request #3127 from oowekyala:java-more-rules-2-sunsecure
[java] Update ArrayIsStoredDirectly and MethodReturnsInternalArray #3127
2021-03-09 20:18:46 +01:00
Andreas Dangel 8c1db7e824 Merge branch 'master' into pmd/7.0.x 2021-03-09 20:14:34 +01:00
Clément Fournier a71ad27200 Fix a bug with nested lambdas 2021-03-08 16:11:15 +01:00
Clément Fournier cf6f0f0aa8 Add test for #833 2021-03-08 14:42:56 +01:00
Clément Fournier a434dc3f26 Merge branch '7.0.x' into reimplement-forloopcanbeforeach 2021-03-08 14:38:27 +01:00
Clément Fournier 7c80ae05a8 Code style 2021-03-06 13:26:47 +01:00
Clément Fournier 70e00a64fe Fix malformed code in tests 2021-03-06 13:17:51 +01:00
Clément Fournier 01a46d7f7d Merge branch '7.0.x' into pmd7-update-metrics 2021-03-06 09:31:27 +01:00
Clément Fournier 9345c74e85 Handle unknown field references 2021-03-06 06:50:55 +01:00
Clément Fournier 334e34e273 Fix test references 2021-03-05 16:14:26 +01:00
Clément Fournier ec1e6bfb77 Fix behavior for #3160 2021-03-05 15:32:34 +01:00
Clément Fournier 56b054d0c5 Merge remote-tracking branch 'origin/java-more-rules-2-sunsecure' into java-more-rules-2-sunsecure 2021-03-05 15:17:57 +01:00
Clément Fournier d9afc4995e Merge branch '7.0.x' into java-more-rules-2-sunsecure 2021-03-05 15:15:03 +01:00
Clément Fournier d5e28bb591 Merge branch 'master' into 7.0.x 2021-03-05 15:14:13 +01:00
Andreas Dangel 1a1d32f313 Fix tests 2021-03-05 12:41:35 +01:00
Andreas Dangel 9bee4564c7 Revert "Correct findBoundries for nested/local classes and types"
This reverts commit a1d36106a5.
2021-03-05 12:29:01 +01:00
Andreas Dangel a1d36106a5 Correct findBoundries for nested/local classes and types 2021-03-05 12:22:15 +01:00
Andreas Dangel ce478c9a14 MethodReturnsInternalArray: consider static fields 2021-03-05 12:11:57 +01:00
Andreas Dangel 3eba9e1d8f MethodReturnsInternalArray: Fix false positive with local classes 2021-03-05 12:11:12 +01:00
Clément Fournier 2fd2ce4ffd Merge branch '7.0.x' into pmd7-update-metrics 2021-03-05 12:04:34 +01:00
Clément Fournier e62c7e2f33 Merge branch 'master' into 7.0.x 2021-03-05 12:03:07 +01:00
Clément Fournier 37d4431cee Make constants for sets of metrics 2021-03-01 17:19:35 +01:00
Clément Fournier 835be1f9bc Update release notes 2021-03-01 17:16:06 +01:00
Clément Fournier 793aa40fc5 Merge branch '7.0.x' into pmd7-update-metrics 2021-03-01 16:37:23 +01:00
Clément Fournier c9a463bd4f Suppressions for CompareObjectsWithEquals - refs #2980 2021-03-01 16:28:14 +01:00
Clément Fournier 77767a5e53 Merge branch 'master' into 7.0.x 2021-03-01 15:49:07 +01:00
Andreas Dangel f6eef3c48f Merge branch 'master' into pmd/7.0.x 2021-02-27 13:06:40 +01:00
Andreas Dangel 1ed1e9b409 Merge branch 'master' into pmd/7.0.x 2021-02-27 09:14:33 +01:00
Andreas Dangel ee6e819ff7 [doc] Update release notes 2021-02-23 19:29:31 +01:00
Andreas Dangel b2ab30a2f4 Update ruledoc for AvoidUnusedMethod (apex) 2021-02-23 19:25:29 +01:00
Andreas Dangel e8ac569a59 Update ApexLink to 1.2.2 2021-02-23 19:24:00 +01:00
Clément Fournier f07cc2c882 Update ForLoopCanBeForeach
Remove unresolved things from tests
2021-02-20 00:15:23 +01:00
Clément Fournier 5f8e9c2b92 Remove AbstractSunSecure base class 2021-02-19 22:45:32 +01:00
Clément Fournier 0320618bbf Update MethodReturnsInternalArray 2021-02-19 22:45:32 +01:00
Clément Fournier 0d2c1dc49f Update ArrayIsStoredDirectly 2021-02-19 22:45:32 +01:00
Clément Fournier ad683b8c46 Merge branch '7.0.x' into pr/3120
Refs #312O
2021-02-19 22:11:06 +01:00
Clément Fournier 8bccbabb04 Merge branch 'master' into pr/3120 2021-02-19 22:10:34 +01:00
Andreas Dangel dd97c82030 Merge pull request #3116 from oowekyala:java-more-rules
[java] Update a few more rules in bestpractices #3116
2021-02-19 18:54:53 +01:00
Andreas Dangel 0ea6adfa96 Merge pull request #3113 from oowekyala:java-usage-resolver
[java] Usage resolution for java variables #3113
2021-02-19 18:52:37 +01:00
Andreas Dangel b3fad36941 [doc] Update release notes 2021-02-19 18:52:25 +01:00
Clément Fournier fb673d75a2 Merge branch '7.0.x' into java-usage-resolver 2021-02-19 17:19:01 +01:00
Clément Fournier 72b80cef70 Activate InefficientStringBuffering test 2021-02-19 17:01:14 +01:00
Andreas Dangel 266c1319ea Merge branch 'java-16-support' into pmd7-java-16-support 2021-02-19 09:45:01 +01:00
Andreas Dangel 15a72610bc Merge branch 'pmd/7.0.x' into pmd7-java-16-support 2021-02-19 09:42:22 +01:00
Andreas Dangel 28a644cd8e Merge branch 'master' into pmd/7.0.x 2021-02-19 09:26:59 +01:00
Andreas Dangel 1074f71f40 [java] Move standardized preview features to regular language features 2021-02-18 16:01:22 +01:00
Andreas Dangel 56a67155c0 [java] Remove Preview Feature "Break with value statement"
This has been withdrawn and is not implemented in the grammar
anymore.
2021-02-18 15:54:01 +01:00
Andreas Dangel 8cdab43ef5 [java] Add yield, sealed, permits as contextual keywords
Those cannot be used as type names.
2021-02-18 15:51:07 +01:00
Andreas Dangel f2587cc69d Fix checkstyle 2021-02-18 15:38:18 +01:00
Andreas Dangel a1f7c3ebbc [java] Fix tests around records and sealed classes 2021-02-18 15:20:06 +01:00
Andreas Dangel c23b1a0149 [java] Fix TypePattern and Modifiers 2021-02-18 14:53:20 +01:00
Andreas Dangel 0ef7f4c1cd Merge branch 'java-16-support' into pmd7-java-16-support 2021-02-18 10:44:23 +01:00
Clément Fournier e1462714f1 Expect a parse exception, refs #3117 2021-02-16 20:18:37 +01:00
Clément Fournier 5afb4956c3 Merge branch 'master' into 7.0.x 2021-02-16 20:08:18 +01:00
Clément Fournier 11592acfc5 Add test case for #3117 2021-02-16 16:13:03 +01:00
Clément Fournier 086a806d22 Merge branch '7.0.x' into java-usage-resolver 2021-02-14 19:13:52 +01:00
Clément Fournier 75fb227ea8 Update AbstractClassWithoutAbstractMethod 2021-02-14 17:34:56 +01:00
Clément Fournier 20ee6733d0 Update WhileLoopWithLiteralBoolean
Do/while is now reported on the literal and not the 'do' keyword.
This means violation lines will change.
2021-02-14 17:23:41 +01:00
Clément Fournier bfc833d581 Update GuardLogStatement 2021-02-14 17:23:41 +01:00
Clément Fournier 63bc84f724 Update CheckResultSet 2021-02-14 17:23:41 +01:00
Clément Fournier a10252c071 Update AvoidUsingHardCodedIPRule 2021-02-14 17:23:40 +01:00
Clément Fournier 0e8d2c9c07 Update SystemPrintln 2021-02-14 17:23:40 +01:00
Clément Fournier e3db5b76af Merge branch '7.0.x' into pmd7-update-metrics 2021-02-14 15:25:37 +01:00
Clément Fournier 268f66f4cd Simplify tests 2021-02-13 21:28:24 +01:00
Clément Fournier 8fb4a082d8 Remove sentinel value 2021-02-13 21:18:47 +01:00
Clément Fournier fb359c290e Remove some things from pmd core 2021-02-13 21:14:43 +01:00
Clément Fournier 7c427413a8 Merge branch '7.0.x' into pr/2830 2021-02-13 21:02:09 +01:00
Clément Fournier 5ca13f1bdd Merge branch 'core-parser-tasks' into 7.0.x 2021-02-13 20:51:11 +01:00
Clément Fournier ed7b2f0567 Fix a bug with siblings 2021-02-13 20:49:16 +01:00
Clément Fournier 533b316eaa Checkstyle + PMD 2021-02-13 19:54:36 +01:00
Clément Fournier 5cb16f9051 Merge branch 'java-usage-resolver' into java-typeres-ctxs 2021-02-13 17:44:35 +01:00
Clément Fournier d079e0841e Merge branch '7.0.x' into java-typeres-ctxs 2021-02-13 17:44:06 +01:00
Clément Fournier 2626025eef Fix some tests
Mostly caused by untested merges
2021-02-13 17:31:49 +01:00
Clément Fournier e1baf37646 Merge branch '7.0.x' into java-usage-resolver 2021-02-13 16:51:00 +01:00
Clément Fournier 59bfd93814 Merge branch 'pr/3086' into 7.0.x
Refs #3086
2021-02-13 16:44:42 +01:00
Clément Fournier 1bf7a23d8f Doc 2021-02-13 15:58:33 +01:00
Clément Fournier c1fe5785c7 Remove nullability in CtorInvocMirror
We just use ts.UNKNOWN, and don't create a fake symbol (yet?)
2021-02-13 15:53:58 +01:00
Clément Fournier 70b5abe7b3 Merge branch '7.0.x' into pr/3086 2021-02-13 15:26:34 +01:00
Andreas Dangel 0b86a4f19d [java] Handle type resolve errors for qualified constructor calls 2021-02-06 19:31:40 +01:00
Andreas Dangel c740bdeb98 [ci] Enable security rules for regression tester 2021-02-04 09:40:32 +01:00
Andreas Dangel 9b9c6fad2a [java] Rename base class for security rules
The regression tester searches for changed classes
the end with "Rule" and assumes this is a rule
and creates a customized ruleset. But the base
class is not a rule and can't be instantiated...
2021-02-04 09:39:21 +01:00
Andreas Dangel cbf1b88ac1 Merge branch 'master' into pmd/7.0.x 2021-01-30 18:19:01 +01:00
Andreas Dangel cf2b8aca3a Merge branch 'master' into pmd/7.0.x 2021-01-30 12:04:28 +01:00
Andreas Dangel e815c95d40 Remove unnecessary constructor arg 2021-01-28 10:47:58 +01:00
Andreas Dangel d4a8f01453 [java] Refactor security rules 2021-01-28 10:32:04 +01:00
Andreas Dangel d4e7b617ff [java] Update InsecureCryptoIvRule 2021-01-28 10:26:33 +01:00
Andreas Dangel facc71166e [java] Update HardCodedCryptoKeyRule 2021-01-28 10:14:16 +01:00
Andreas Dangel a178ea44c3 Merge branch 'master' into pmd/7.0.x 2021-01-28 09:40:53 +01:00
Clément Fournier d6beac9e9c Merge branch '7.0.x' into core-parser-tasks 2021-01-27 16:08:48 +01:00
Clément Fournier 11fe7de051 Merge branch '7.0.x' into java-usage-resolver 2021-01-24 19:51:04 +01:00
Andreas Dangel a7230bce02 Merge pull request #2971 from oowekyala:remove-xml-dom-rule
[xml] Remove xml dom rule and parser options #2971
2021-01-24 19:18:21 +01:00
Andreas Dangel 49972794d8 Fix RulesetLoader::getStandardRuleSets for languages without rules
E.g. scala doesn't have any built in rules, but still provides
a categories.properties with an empty "rulesets.filenames" property.
2021-01-24 19:10:07 +01:00
Andreas Dangel 3f9fe137fc Merge pull request #2969 from oowekyala:pmd7-ruleset-loader
[core] Use ruleset loader in pmd 7 #2969
2021-01-24 18:40:11 +01:00
Andreas Dangel 6219e74a76 [doc] Update release notes, refs #1451 2021-01-24 18:39:59 +01:00
Andreas Dangel 3fcf339656 Rename local variable rsf -> rulesetLoader 2021-01-24 18:39:43 +01:00
Clément Fournier e9b1499508 Merge branch 'remove-xml-dom-rule' into core-parser-tasks 2021-01-24 16:42:24 +01:00
Clément Fournier 8af799529d Merge branch '7.0.x' into pmd7-ruleset-loader 2021-01-22 17:11:26 +01:00
Clément Fournier 434df63f2c Merge branch '7.0.x' into remove-xml-dom-rule 2021-01-22 17:10:46 +01:00
Andreas Dangel 527b91adab Merge branch 'master' into pmd/7.0.x 2021-01-22 12:27:13 +01:00
Andreas Dangel b58c52db22 Fix compile errors and tests 2021-01-21 21:30:03 +01:00
Andreas Dangel 5dac4a7795 Merge branch 'master' into pmd/7.0.x 2021-01-21 21:00:42 +01:00
Clément Fournier a37bad92c5 Merge branch '7.0.x' into java-usage-resolver 2021-01-18 17:53:09 +01:00
Clément Fournier bf60cd1e5b Merge branch 'master' into 7.0.x 2021-01-18 17:08:38 +01:00
Andreas Dangel f27dc1bde5 Merge branch 'master' into pmd/7.0.x 2021-01-16 19:29:09 +01:00
Andreas Dangel e614e256e0 Fix unit tests 2021-01-16 11:49:44 +01:00
Andreas Dangel f0f2286f98 Merge branch 'master' into pmd/7.0.x 2021-01-16 10:37:27 +01:00
Clément Fournier df70e46990 Unnecessary conversion rule
Previously UnnecessaryBoxing,
but also handles conversions
between primitives
2020-12-16 03:01:19 +01:00
Clément Fournier 09aac4af3b Remove unnecessary branch 2020-12-15 22:11:22 +01:00
Clément Fournier c7c46db8c2 wip 2020-12-15 22:08:32 +01:00
Clément Fournier b7cdd4608f Cleanup type res test rule 2020-12-15 21:47:10 +01:00
Clément Fournier 24d9466384 Dont use error type as target 2020-12-15 21:47:10 +01:00
Clément Fournier 29cfa8dc8f Organise classes better 2020-12-15 21:47:10 +01:00
Clément Fournier 8e570afe38 REVERT ME Remove UnnecessaryTypeArgument rule skeleton 2020-12-15 21:47:10 +01:00
Clément Fournier 58a0d1a16e Verify missing lambda context is not an error 2020-12-15 21:47:10 +01:00
Clément Fournier 2aae13b1df Remove some dead code 2020-12-15 21:47:10 +01:00
Clément Fournier ce5a1d14c2 Dont special case missing context 2020-12-15 21:47:10 +01:00
Clément Fournier 85d0ea6000 Add object for context type 2020-12-15 21:47:10 +01:00
Clément Fournier e59a258a14 Support pure mirrors that do not mutate the AST 2020-12-15 21:47:10 +01:00
Clément Fournier b0e0358287 Make sure #755 is fixed 2020-12-15 13:36:07 +01:00
Clément Fournier f5f05ed544 Merge branch 'master' into 7.0.x 2020-12-14 17:27:00 +01:00
Clément Fournier 31d907bc4b Merge branch '7.0.x' into java-usage-resolver 2020-12-14 14:38:18 +01:00
Clément Fournier 429a8e2e80 Merge branch '7.0.x' into pmd7-update-metrics 2020-12-14 14:35:57 +01:00
Clément Fournier dba9ffa49b Merge branch 'remove-xml-dom-rule' into core-parser-tasks 2020-12-14 13:49:43 +01:00
Clément Fournier d877bdb779 Readd some deleted tests 2020-12-14 13:37:34 +01:00
Clément Fournier ca4b96ef13 Fix reference files 2020-12-14 13:18:46 +01:00
Clément Fournier f6b1acbdd5 Remove xml parser options 2020-12-14 13:18:46 +01:00
Clément Fournier 2ac5a4907e Remove XML dom rule 2020-12-14 13:18:46 +01:00
Clément Fournier 053c439a43 Escape special chars correctly in test output 2020-12-14 13:12:17 +01:00
Clément Fournier 56fc980e22 Cleanup tests
Replace a duplicated function
2020-12-14 12:58:48 +01:00
Clément Fournier dffabf8924 Fix VF 2020-12-13 08:11:04 +01:00
Clément Fournier 2f6329e217 Update apex reference files 2020-12-13 07:35:53 +01:00
Clément Fournier ede8ba076b Fix last tests 2020-12-13 07:33:11 +01:00
Clément Fournier c6c81b7eca Fix tests about comments 2020-12-13 07:22:38 +01:00
Clément Fournier a80c1c55b8 Use getReportLocation in tests 2020-12-13 05:44:44 +01:00
Clément Fournier b7c946d308 Merge branch 'analysis-listener' into text-utils-simple 2020-12-13 05:42:07 +01:00
Clément Fournier 161e6b2cb3 Merge branch 'remove-xml-dom-rule' into analysis-listener 2020-12-13 05:41:29 +01:00
Clément Fournier 138f16c150 Also for modelica 2020-12-13 05:41:17 +01:00
Clément Fournier 00bee39767 Merge branch 'analysis-listener' into text-utils-simple 2020-12-13 05:38:09 +01:00
Clément Fournier fe5d1e49f1 Fix tests 2020-12-13 04:17:40 +01:00
Clément Fournier d60b780e73 Merge branch 'core-parser-tasks' into analysis-listener 2020-12-13 03:35:20 +01:00
Clément Fournier 52d8904a9e Fix last tests 2020-12-13 01:54:02 +01:00
Clément Fournier a374cd3de1 Fix some test files not being compilable 2020-12-13 01:31:27 +01:00
Clément Fournier 08227f8b18 Fix vf module 2020-12-13 01:13:53 +01:00
Clément Fournier 2623efbc8a Delete ParserOptions 2020-12-13 00:39:05 +01:00
Clément Fournier 220d7a0d12 Merge branch 'remove-xml-dom-rule' into core-parser-tasks 2020-12-13 00:10:24 +01:00
Clément Fournier 084a81265c Cleanup tests 2020-12-12 23:34:16 +01:00
Clément Fournier 163d7af6c2 Remove xml parser options 2020-12-12 23:26:41 +01:00
Clément Fournier 70079f0842 Remove XML dom rule 2020-12-12 23:01:06 +01:00
Clément Fournier 79def1b51d Reduce importance of parser options 2020-12-12 21:19:50 +01:00
Clément Fournier 83edce05c1 Merge branch 'pmd7-ruleset-loader' into core-parser-tasks 2020-12-12 20:53:50 +01:00
Clément Fournier 7d69a67ae6 Remove deprecated methods in ruleset 2020-12-12 20:39:41 +01:00
Clément Fournier 86ea3a0fb7 Use list of ruleset in configuration 2020-12-12 20:31:50 +01:00
Clément Fournier 789e4aa730 Fix tests 2020-12-12 20:17:38 +01:00
Clément Fournier 3cf619e8e4 Delete RulesetNotFoundException 2020-12-12 19:21:18 +01:00
Clément Fournier 75e4537d0d Delete RulesetsFactoryUtils 2020-12-12 19:08:07 +01:00
Clément Fournier 14df02e3cf Cleanup more tests 2020-12-12 18:55:38 +01:00
Clément Fournier 99ee5bdee0 Update tests 2020-12-12 18:38:17 +01:00
Clément Fournier 59fff65a85 Remove more useless things 2020-12-12 17:58:07 +01:00
Clément Fournier 94028a1ce6 Remove deprecated ctors of RuleSetFactory 2020-12-12 17:38:40 +01:00
Clément Fournier 134dbed07e Simplify compat filter 2020-12-12 17:31:48 +01:00
Andreas Dangel 3202136bd9 [ci] Fix maven dependencies workaround for dokka 2020-12-12 13:11:52 +01:00
Andreas Dangel 60d21a2feb Merge branch 'master' into pmd/7.0.x 2020-12-12 12:54:15 +01:00
Andreas Dangel 5d9e657d6e Fix old rule references of deleted rules 2020-12-11 20:06:04 +01:00
Andreas Dangel 8de0e171fd Remove unused import 2020-12-11 19:55:03 +01:00
Andreas Dangel 384d32ddd0 Merge branch 'master' into pmd/7.0.x 2020-12-11 19:48:54 +01:00
Clément Fournier 10a2b40731 Fix last references 2020-12-11 17:44:01 +01:00
Clément Fournier 5de4969808 Fix removed rule references 2020-12-11 16:53:04 +01:00
Clément Fournier a8d40342f7 Fix compil, remove dependency on xpath 2020-12-11 10:57:39 +01:00
Clément Fournier 823f78c425 Merge branch 'master' into 7.0.x
Refs #2864
2020-12-11 10:11:40 +01:00
Clément Fournier 524eb85cd3 Make MapFunction abstract
the apply implementation is dead code
2020-12-11 09:49:17 +01:00
Clément Fournier e29e2f97a9 Move documentation from website into javadocs 2020-12-11 08:37:23 +01:00
Clément Fournier a37cabf9bc Update docs 2020-12-11 08:37:23 +01:00
Clément Fournier b5f2e3a248 Cleanups 2020-12-11 08:37:23 +01:00
Clément Fournier 16a4aa3163 Remove signatures 2020-12-11 08:37:23 +01:00
Clément Fournier 9fa85d8e59 Remove MethodLikeNode 2020-12-11 08:37:23 +01:00
Clément Fournier 768a24670f Remove old metrics abstract class 2020-12-11 08:37:23 +01:00
Clément Fournier afaf46c6fc Update GodClass 2020-12-11 08:37:23 +01:00
Clément Fournier 19aa28b240 Update Cyclo rule 2020-12-11 08:37:23 +01:00
Clément Fournier 3e15b4af00 Update Npath complexity rule 2020-12-11 08:37:23 +01:00
Clément Fournier 2f9a9bf902 Update some of the old metrics rules 2020-12-11 08:37:23 +01:00
Clément Fournier de37639d1d Merge both ast util classes 2020-12-11 08:37:23 +01:00
Clément Fournier 81dcce7418 Move files around 2020-12-11 08:37:23 +01:00
Clément Fournier 0307300891 Fix tests 2020-12-11 08:37:23 +01:00
Clément Fournier c7b4ec962c Checkstyle 2020-12-11 08:37:23 +01:00
Clément Fournier c423266ba0 Fix fan out 2020-12-11 08:37:23 +01:00
Clément Fournier e46ed39b06 Finish cyclo 2020-12-11 08:37:23 +01:00
Clément Fournier bde3626b05 Fix tcc 2020-12-11 08:37:23 +01:00
Clément Fournier 7234a1e68a Try fixing noam 2020-12-11 08:37:23 +01:00
Clément Fournier 736086a45f Fix nopa 2020-12-11 08:37:23 +01:00
Clément Fournier 22d28ec1a4 Fix WOC 2020-12-11 08:37:23 +01:00
Clément Fournier 4cf56d1f4d Fix wmc 2020-12-11 08:37:23 +01:00
Clément Fournier adb4030ab1 Fix loc 2020-12-11 08:37:23 +01:00
Clément Fournier 32c71edd5a Fix npath 2020-12-11 08:37:23 +01:00
Clément Fournier 31a623d9cb Fix ncss 2020-12-11 08:37:23 +01:00
Clément Fournier d76c0ea0f9 Fix cyclo 2020-12-11 08:37:23 +01:00
Clément Fournier 4863ebda96 Fix ATFD 2020-12-11 08:37:23 +01:00
Clément Fournier e4cb5f74d8 Fix metrics tests 2020-12-11 08:37:23 +01:00
Clément Fournier bb2c27bd6f Checkstyle 2020-12-11 08:37:23 +01:00
Clément Fournier 7519bd4a71 Rename metric name method 2020-12-11 08:37:23 +01:00
Clément Fournier b7b8199ce9 Remove duplicate 2020-12-11 08:37:23 +01:00
Clément Fournier 90c123621a Make NPath return BigInteger 2020-12-11 08:37:23 +01:00
Clément Fournier 06f2c96e3c Fix tests 2020-12-11 08:37:23 +01:00
Clément Fournier 148d3d5397 Update release notes 2020-12-11 08:37:23 +01:00
Clément Fournier 6d8619618f Deprecate signatures 2020-12-11 08:37:23 +01:00
Clément Fournier d9347d6178 Doc 2020-12-11 08:37:23 +01:00
Clément Fournier 2f2153bba5 Update java tests WIP
This needs to wait for java-grammar to be finished
+ metrics to be ported.
2020-12-11 08:37:23 +01:00
Clément Fournier 83389f7d47 Update tests 2020-12-11 08:37:23 +01:00
Clément Fournier 5a13a9425d Refactor metrics 2020-12-11 08:37:23 +01:00
Clément Fournier 050938f1bc Remove some dead code 2020-12-11 07:47:35 +01:00
Clément Fournier 593fa9010c Add some tests for lub 2020-12-11 07:47:05 +01:00
Clément Fournier ce85132d5b Cleanup captured type var 2020-12-11 07:25:57 +01:00
Clément Fournier a77908c16a Remove some dead code in GLB
This was needed at some point, but now
dead, can most likely be removed.
2020-12-11 07:25:46 +01:00
Clément Fournier 952a96735c Add tests for GLB 2020-12-11 06:19:22 +01:00
Clément Fournier 7b99900d65 Merge branch '7.0.x' into java-usage-resolver 2020-12-11 03:23:15 +01:00
Clément Fournier 2876c48b32 Merge branch 'core-parser-tasks' into analysis-listener 2020-12-11 00:45:11 +01:00
Clément Fournier 6aef869a74 Merge branch 'ruleset-factory-builder' into core-parser-tasks 2020-12-11 00:38:31 +01:00
Clément Fournier fb9838358e Merge branch 'master' into ruleset-factory-builder 2020-12-11 00:28:12 +01:00
Clément Fournier 30fb3a5fcc Merge branch 'core-parser-tasks' into analysis-listener 2020-12-11 00:27:20 +01:00
Clément Fournier 42f4a32c43 Merge branch '7.0.x' into core-parser-tasks 2020-12-11 00:23:53 +01:00
Clément Fournier 8743c0a256 Add some tests 2020-12-10 23:49:27 +01:00
Clément Fournier e946fda40f Rename new method 2020-12-10 21:04:25 +01:00
Clément Fournier 715d4ef543 Merge branch '7.0.x' into java-usage-resolver 2020-12-10 21:00:20 +01:00
Clément Fournier 0b6f3cb991 [java] Remove deprecated rules PositionLiteralFirstInCaseInsensitiveComparsons, PositionLiteralsFirstInComparisons
Refs #2493, #2701, #2022
2020-12-10 20:56:56 +01:00
Clément Fournier e73cc25e65 Merge branch 'java-rule-bulk-update' into 7.0.x
Refs #2899
2020-12-10 20:40:50 +01:00
Clément Fournier 7d102cb509 Merge branch 'deprecate-find-xx-of-any-type' into 7.0.x
Refs #2886
2020-12-10 20:40:06 +01:00
Clément Fournier 0a2279aef3 Merge branch '7.0.x' into java-rule-bulk-update 2020-12-05 16:59:01 +01:00
Andreas Dangel fde558fe45 Merge branch 'master' into pmd/7.0.x 2020-12-05 15:40:44 +01:00
Clément Fournier a94db93df5 Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-12-03 16:37:05 +01:00
Clément Fournier 8999377331 Fix tests 2020-12-03 12:55:03 +01:00
Clément Fournier 69d6df044a Ignore isFindBoundary
NoAttribute cannot be inherited...
2020-12-01 16:07:33 +01:00
Clément Fournier 0bf0541606 Merge branch '7.0.x' into deprecate-find-xx-of-any-type 2020-12-01 16:04:18 +01:00
Clément Fournier fe67ac789a Update C# test references
End column number is exclusive in pmd 7.

Refs #2945
2020-12-01 15:57:46 +01:00
Clément Fournier 1e417186b9 Merge branch 'master' into 7.0.x 2020-12-01 15:44:48 +01:00
Clément Fournier 303d534979 Checkout an older revision 2020-11-29 17:17:38 +01:00
Clément Fournier d7f8b7b95b This bullshit doesnt scale at all 2020-11-29 16:12:46 +01:00
Clément Fournier 671c4cbaca Make progress 2020-11-29 15:43:17 +01:00
Clément Fournier 6b0ddfce35 Make progress 2020-11-29 02:24:42 +01:00
Clément Fournier 2656161b1a Problems with labels 2020-11-29 01:19:18 +01:00
Clément Fournier f2063ac38c Add limited support for abrupt completion determination 2020-11-28 21:37:49 +01:00
Clément Fournier 56f5f47b84 Update tests 2020-11-28 21:20:46 +01:00
Clément Fournier be510dc22e Start updating the sym table resolver 2020-11-28 21:20:46 +01:00
Clément Fournier c9f51314b9 Add tests for pattern bindings (failing) 2020-11-28 21:20:46 +01:00
Clément Fournier c47a0dc51a Update CompareObjectsWithEquals for #2934 2020-11-28 15:47:38 +01:00
Clément Fournier 2170c7c464 Merge branch '7.0.x' into java-rule-bulk-update 2020-11-28 15:30:06 +01:00
Clément Fournier 13009e78b2 Merge branch 'master' into 7.0.x 2020-11-28 15:24:10 +01:00
Clément Fournier 9a196dfc8e Merge branch 'master' into 7.0.x 2020-11-28 14:33:11 +01:00
Clément Fournier 28f47c1ad7 Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-25 23:30:43 +01:00
Clément Fournier dd625ed18d Remove unused class 2020-11-25 23:30:32 +01:00
Clément Fournier f2c53375d5 Merge branch '7.0.x' into java-rule-bulk-update 2020-11-25 22:52:13 +01:00
Clément Fournier ee59732ec5 [java-xpath] Cleanups after #2917
* Improve docs
* Add missing tests for XPath functions
* TypeIsFunction has been replaced with BaseContextNodeTestFun,
so this deletes the file

getCommentOn is still untested. I wonder whether we really need it,
also, it's inefficient and not specified at all (because it's unused).
2020-11-25 18:39:19 +01:00
Andreas Dangel 915163d23f Merge pull request #2917 from oowkyala/pmd:java-new-xpath-functions
[java] New Java XPath functions #2917
2020-11-25 16:35:58 +01:00
Andreas Dangel 9d51879088 Small fixes (since=7.0.0, unused ExpectedExeption) 2020-11-25 15:58:35 +01:00
Clément Fournier 748851b57f Update a comment 2020-11-25 15:38:06 +01:00
Andreas Dangel b21a2e5d38 Merge branch 'master' into pmd/7.0.x 2020-11-25 14:17:10 +01:00
Andreas Dangel ce999665b4 [ci] Remove download_baseline, not needed anymore 2020-11-25 14:16:45 +01:00
Clément Fournier 2d0291f3e2 Merge branch '7.0.x' into deprecate-find-xx-of-any-type 2020-11-25 12:40:06 +01:00
Clément Fournier 87ad4e42c6 Merge branch 'java-new-xpath-functions' into java-rule-bulk-update 2020-11-25 12:03:38 +01:00
Clément Fournier f8ed1495c2 Merge branch '7.0.x' into java-new-xpath-functions 2020-11-25 12:03:11 +01:00
Andreas Dangel 5adb7646e5 Merge branch 'master' into pmd/7.0.x 2020-11-25 11:41:46 +01:00
Andreas Dangel ba78a2316e Merge branch 'master' into pmd/7.0.x 2020-11-24 16:19:27 +01:00
Clément Fournier 2080800366 Merge branch 'java-new-xpath-functions' into java-rule-bulk-update 2020-11-24 12:41:56 +01:00
Andreas Dangel 3651e66c12 Merge branch 'pmd/7.0.x' into pr-2917 2020-11-24 09:11:08 +01:00
Andreas Dangel f9ca35bcd5 [scala] Fix compile errors and tests 2020-11-23 16:19:55 +01:00
Andreas Dangel 346e67b3f0 Merge branch 'master' into pmd/7.0.x 2020-11-23 16:00:01 +01:00
Andreas Dangel 9e1fcb2416 [ci] Fix correct branch env var for Danger/pmd-regression-tester
I guess, that was missed when I merged master.
2020-11-23 14:59:58 +01:00
Clément Fournier 11de7b58eb Try to update ConsecutiveLiteralAppends
Needs use-def chains...
2020-11-18 23:51:01 +01:00
Clément Fournier 6459d7f319 Merge branch 'java-usage-resolver' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2020-11-18 22:54:03 +01:00
Clément Fournier a04e218941 Extract some reusable logic 2020-11-18 22:45:27 +01:00
Clément Fournier ba73de2389 Merge branch 'java-usage-resolver' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2020-11-18 17:48:54 +01:00
Clément Fournier 812c5b13ad Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-18 17:48:42 +01:00
Clément Fournier 2621e9c636 Update InefficientStringBuffering 2020-11-18 17:48:10 +01:00
Clément Fournier 1e397057c5 Merge branch 'text-utils-javacc' into text-utils-comments 2020-11-18 12:55:00 +01:00
Clément Fournier 97e40a54b2 Improve FileLocation 2020-11-18 12:50:27 +01:00
Clément Fournier 870e13ce83 Cleanup duplicate code paths in escape translators 2020-11-18 12:39:11 +01:00
Clément Fournier e014b03e8f Make CommentContent use a regex 2020-11-17 00:33:25 +01:00
Clément Fournier 0c19203b62 Make the comment rules use rulechain 2020-11-17 00:19:40 +01:00
Clément Fournier fc9c3abbb8 Merge branch 'text-utils-javacc' into text-utils-comments 2020-11-17 00:08:33 +01:00
Clément Fournier f515e34d51 Remove string pool 2020-11-17 00:07:10 +01:00
Clément Fournier 68257d2244 Make sure we use either chars or string 2020-11-17 00:06:09 +01:00
Clément Fournier 189c962d3e Test removeSuffix 2020-11-16 20:56:13 +01:00
Clément Fournier 8f2054f4a4 Test splits 2020-11-16 20:29:16 +01:00
Clément Fournier f16c56dbe8 Pmd warnings 2020-11-16 19:57:01 +01:00
Clément Fournier de916626aa Remove subclasses of Comment 2020-11-16 18:00:31 +01:00
Clément Fournier f72953cefc Extract utilities 2020-11-16 17:59:58 +01:00
Clément Fournier 066675cf44 Update rule CommentContent 2020-11-16 17:59:58 +01:00
Clément Fournier 1baf797b71 Improve token range ergonomics 2020-11-16 17:59:57 +01:00
Clément Fournier e926c9423d Refactor CommentDefaultAccessModifier 2020-11-16 17:59:32 +01:00
Clément Fournier 5a1b898a85 Refactor CommentSize 2020-11-16 17:59:32 +01:00
Clément Fournier e4a5e4556c Make Comment not implement Node 2020-11-16 17:59:31 +01:00
Clément Fournier 11de423765 Merge branch 'text-utils-simple' into text-utils-javacc 2020-11-16 00:29:45 +01:00
Clément Fournier db18cf1ca1 Add back reader 2020-11-16 00:23:09 +01:00
Clément Fournier 91fb58355b More tests for Chars 2020-11-16 00:21:26 +01:00
Clément Fournier 3ca59ce12d Fix chars indexof 2020-11-15 23:41:22 +01:00
Clément Fournier 4d018f5a2a Fix wrong check for location at EOF 2020-11-15 22:58:43 +01:00
Clément Fournier 4cd1fa0a1d Fix build 2020-11-15 22:24:48 +01:00
Clément Fournier cd2e95ff7b Merge branch 'analysis-listener' into text-utils-simple 2020-11-15 21:19:15 +01:00
Clément Fournier 5c940eb5a3 Fix swift 2020-11-15 21:06:32 +01:00
Clément Fournier f0465f1145 Merge branch 'core-parser-tasks' into analysis-listener 2020-11-15 21:06:09 +01:00
Clément Fournier fd439ac5ff Cleanup swift 2020-11-15 21:06:03 +01:00
Clément Fournier f8f11715a6 Fix merge 2020-11-15 20:55:51 +01:00
Clément Fournier 6840292ad4 Fix violation using removed field 2020-11-15 19:45:30 +01:00
Clément Fournier af1e818ee0 Merge branch 'text-utils-simple' into text-utils-javacc 2020-11-15 19:41:20 +01:00
Clément Fournier 4d5ba29842 Simplify violations 2020-11-15 19:30:12 +01:00
Clément Fournier 0474353beb Fix merge 2020-11-15 19:11:17 +01:00
Clément Fournier 9826ff241b Merge branch 'analysis-listener' into text-utils-simple 2020-11-15 19:04:14 +01:00
Clément Fournier eeab5169d8 Merge branch 'deprecate-find-xx-of-any-type' into core-parser-tasks 2020-11-15 18:54:41 +01:00
Clément Fournier dfffaf772c Merge branch 'deprecate-find-xx-of-any-type' into analysis-listener 2020-11-15 18:54:17 +01:00
Clément Fournier a2b13d3fce Merge branch 'core-parser-tasks' into analysis-listener 2020-11-15 18:53:32 +01:00
Clément Fournier b57221d7ac Cleanups 2020-11-15 18:53:26 +01:00
Clément Fournier 4fe253c1db Remove old stuff 2020-11-15 18:50:59 +01:00
Clément Fournier a9530ec5ea Merge branch 'core-parser-tasks' into analysis-listener 2020-11-15 18:49:54 +01:00
Clément Fournier d4ad2f5011 Fix compil 2020-11-15 18:47:23 +01:00
Clément Fournier 99ca901fbb Update dummy module 2020-11-15 18:08:04 +01:00
Clément Fournier c8488c5996 Update rest of modules 2020-11-15 18:01:08 +01:00
Clément Fournier 0e4676237b Update forgotten swift module 2020-11-15 17:41:15 +01:00
Clément Fournier 7c45eb0ca9 Use a wrapper 'AstInfo' 2020-11-15 17:35:10 +01:00
Clément Fournier 2ef105374c Merge branch 'core-parser-tasks' into analysis-listener 2020-11-15 17:11:56 +01:00
Clément Fournier 6d88cb9cff Plsql + modelica 2020-11-15 17:07:49 +01:00
Clément Fournier aee9c1792c Changes to js 2020-11-15 17:07:08 +01:00
Clément Fournier 2431a41d74 Changes to VF, JSP, VM 2020-11-15 17:03:52 +01:00
Clément Fournier d6512c718b Changes to pmd-apex 2020-11-15 17:03:05 +01:00
Clément Fournier d79ba5620d Changes to pmd-xml 2020-11-15 17:00:01 +01:00
Clément Fournier 95587416cf Merge branch 'java-new-xpath-functions' into core-parser-tasks 2020-11-15 16:54:08 +01:00
Clément Fournier e035f7c922 Changes to pmd-java 2020-11-15 16:53:41 +01:00
Clément Fournier 2fad9bf507 Changes to DataSource and test modules 2020-11-15 16:42:30 +01:00
Clément Fournier a2311f1a17 Checkout changes to core from other branch 2020-11-15 16:35:00 +01:00
Clément Fournier 4776178b58 Merge branch 'java-new-xpath-functions' into java-rule-bulk-update 2020-11-15 16:10:47 +01:00
Clément Fournier bc15bb96c5 Merge branch '7.0.x' into java-new-xpath-functions 2020-11-15 16:10:30 +01:00
Andreas Dangel a99e205a54 Merge branch 'master' into pmd/7.0.x 2020-11-14 20:34:49 +01:00
Andreas Dangel 3ca98b7313 [ci] Enable pushes workflow for branch pmd/7.0.x 2020-11-14 19:35:20 +01:00
Andreas Dangel bad14719c0 Merge branch 'master' into pmd/7.0.x 2020-11-14 19:35:13 +01:00
Clément Fournier 4426d3de3f Merge branch 'ruleset-factory-builder' into analysis-listener 2020-11-13 17:09:44 +01:00
Clément Fournier bf34602f9e Merge branch '7.0.x' into analysis-listener 2020-11-13 16:53:01 +01:00
Clément Fournier 7635a19ea4 Fix exception not thrown 2020-11-13 16:22:43 +01:00
Clément Fournier 2b10c79caa Fix documentation 2020-11-13 15:15:44 +01:00
Clément Fournier 17f9f9edfb Merge branch 'java-new-xpath-functions' into java-rule-bulk-update 2020-11-13 14:43:14 +01:00
Clément Fournier 67d3b8a4f4 Extract changes to lang-test 2020-11-13 14:43:02 +01:00
Clément Fournier f287f56d62 Add location information 2020-11-13 14:41:55 +01:00
Clément Fournier 51a86bda47 Merge branch 'java-new-xpath-functions' into java-rule-bulk-update 2020-11-13 14:41:24 +01:00
Clément Fournier 715c8facf1 Extract changes to core 2020-11-13 14:37:38 +01:00
Clément Fournier c1e58ad5e7 Merge branch '7.0.x' into java-rule-bulk-update 2020-11-13 14:37:16 +01:00
Clément Fournier fbc12562ba Extract changes to ast 2020-11-13 14:35:18 +01:00
Clément Fournier 4b98c4012d Extract xpath fun doc 2020-11-13 14:33:25 +01:00
Clément Fournier c35b4e879e Extract changes to invocation matchers 2020-11-13 14:32:32 +01:00
Clément Fournier 150f8c746e Extract changes to xpath functions 2020-11-13 14:29:20 +01:00
Clément Fournier 1818976683 Cleanup 2020-11-13 14:27:50 +01:00
Clément Fournier b0d961c738 Test other xpath functions 2020-11-13 14:15:45 +01:00
Clément Fournier 3c273c85ec Improve exception handling for XPath queries
Now there is a specific exception type for XPath exceptions.
We add context values to help pinpointing the error
2020-11-13 13:33:49 +01:00
Clément Fournier d182067fb7 Test xpath functions WIP 2020-11-13 12:47:06 +01:00
Clément Fournier a27ff2b9a8 Merge branch 'java-usage-resolver' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2020-11-13 11:30:47 +01:00
Clément Fournier c46f5bb315 Merge branch 'deprecate-find-xx-of-any-type' into java-usage-resolver 2020-11-13 11:28:54 +01:00
Clément Fournier 9c1843f726 Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-13 11:25:03 +01:00
Clément Fournier 7e07539022 Merge branch '7.0.x' into deprecate-find-xx-of-any-type 2020-11-13 11:00:06 +01:00
Clément Fournier c81eb1ef7e Add node streams to release notes 2020-11-13 10:43:51 +01:00
Clément Fournier 51ca1a5961 Merge branch 'master' into 7.0.x 2020-11-11 22:19:14 +01:00
Clément Fournier ca1f601b00 Merge branch 'pmd7-error-recovery' into 7.0.x
Refs #2901: [core] Add error recovery mode
2020-11-11 21:47:02 +01:00
Clément Fournier 4db94e5aaf Merge branch '7.0.x' into pmd7-error-recovery 2020-11-11 21:46:48 +01:00
Clément Fournier 697e3ae290 Fix typo 2020-11-11 21:41:25 +01:00
Clément Fournier 423949cc27 Fix #2528 2020-11-11 15:47:09 +01:00
Clément Fournier d571885771 Check fixes #2577 2020-11-11 14:59:58 +01:00
Clément Fournier 3a1940d5a0 Fix pmd warnings 2020-11-10 14:11:34 +01:00
Clément Fournier 2d068f9ac0 Check fixes #770 2020-11-10 13:08:46 +01:00
Clément Fournier 6246cc0f70 Check fixes #1189 2020-11-10 13:06:30 +01:00
Clément Fournier 6b9fc07e68 Check fixes #2890 2020-11-10 13:00:20 +01:00
Clément Fournier b918d9ae93 Check fixes #2130 2020-11-10 12:58:08 +01:00
Clément Fournier 5314c9d469 Cleanup after merge 2020-11-10 12:57:58 +01:00
Clément Fournier 324a73b8bd Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-10 12:51:04 +01:00
Clément Fournier bf79114682 Check fixes #2880 2020-11-10 12:50:06 +01:00
Clément Fournier 782acd55ad Check fixes #2537 2020-11-10 12:44:44 +01:00
Clément Fournier 5ac0c9f9d9 Check fixes #2538 2020-11-10 12:44:34 +01:00
Clément Fournier 8ffb948b40 Fix #1212
Also fixes duplicate #2374
2020-11-10 12:36:01 +01:00
Clément Fournier 143153c7af Fix ordering 2020-11-10 12:06:34 +01:00
Clément Fournier 1df6a92477 Update release notes, refs #2899 2020-11-10 11:53:44 +01:00
Clément Fournier 21cc35dfba Merge branch '7.0.x' into java-rule-bulk-update 2020-11-10 11:35:51 +01:00
Clément Fournier 9fab59cd45 Add test case for #2910 2020-11-10 11:30:01 +01:00
Clément Fournier f146da2649 Update AvoidRethrowingException 2020-11-08 18:29:12 +01:00
Clément Fournier bf47078ac3 Add tests for AvoidThrowingNullPointerException 2020-11-08 18:28:51 +01:00
Clément Fournier 4748813896 Update travis file
Update AvoidThrowingNullPointerException
2020-11-08 18:22:30 +01:00
Clément Fournier 04e041afd4 Merge branch 'java-rule-bulk-update' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2020-11-08 18:21:34 +01:00
Clément Fournier 51b05b6cc6 Use reaching definitions in AvoidThrowingNullPointerExceptionRule 2020-11-08 18:20:59 +01:00
Clément Fournier bcba3e6989 Fix fp of UseShortArrayInitializer 2020-11-08 10:29:08 +01:00
Clément Fournier f1c9387411 Ensure removed violations of UselessStringValueOf are not FNs 2020-11-08 10:05:54 +01:00
Clément Fournier 83450d815f Fix FP in RedundantFieldInitializer 2020-11-08 09:51:14 +01:00
Clément Fournier 140a44a78e Fix FNs with LiteralFirstInComparisons 2020-11-08 09:40:23 +01:00
Clément Fournier 8d7bc66057 Fix FN with CloneMethodMustImplementCloneable 2020-11-08 09:22:15 +01:00
Clément Fournier 68d6d644e2 Verify AppendCharacterWithChar handles escapes 2020-11-08 09:14:05 +01:00
Clément Fournier 9a99b3ccb2 Merge branch '7.0.x' into java-rule-bulk-update 2020-11-08 09:08:51 +01:00
Clément Fournier deea35fe4e Merge branch 'master' into 7.0.x 2020-11-08 09:08:22 +01:00
Clément Fournier 897b5613ea Fix type vars with unresolved bounds being subtypes of anything 2020-11-08 09:01:19 +01:00
Clément Fournier f6af40bd24 Fix error in type res 2020-11-07 15:39:38 +01:00
Clément Fournier eb7a171e43 Fix an error with old metrics code 2020-11-07 15:12:16 +01:00
Clément Fournier ee6ba958b0 Fix merge 2020-11-07 14:45:28 +01:00
Clément Fournier 3592b69628 Fix merge 2020-11-06 22:34:32 +01:00
Clément Fournier b602cd228a Merge branch 'java-usage-resolver' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2020-11-06 22:20:00 +01:00
Clément Fournier ea64e05f92 Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-06 22:19:46 +01:00
Clément Fournier 791fff43a3 Merge branch '7.0.x' into java-rule-bulk-update 2020-11-06 22:18:35 +01:00
Andreas Dangel 770bfbe4d7 Merge branch 'pr-2900' into pmd/7.0.x
[java] Update UselessParentheses #2900
2020-11-06 14:57:26 +01:00
Andreas Dangel 6d92db8286 [doc] Update release notes for UselessParentheses 2020-11-06 14:55:26 +01:00
Andreas Dangel 77daa30bcc Merge branch 'pr-2897' into pmd/7.0.x
[java] Update UnnecessaryFullyQualifiedName #2897
2020-11-06 14:28:54 +01:00
Andreas Dangel fc2d243e34 [doc] Update release notes, fixes UnnecessaryFullyQualifiedName issues 2020-11-06 14:26:06 +01:00
Andreas Dangel a3f365a3fd [java] UnnecessaryFullyQualifiedName - add comment for false positive 2020-11-06 14:25:16 +01:00
Andreas Dangel 34e8225104 Merge branch 'pr-2905' into pmd/7.0.x
[core] Update kotest to 4.3.1 #2905
2020-11-06 11:55:18 +01:00
Andreas Dangel 18c2ab5621 Revert kotest workaround
This is a partial revert of bc0d26eeb5
2020-11-06 11:16:22 +01:00
Andreas Dangel 54d4cc8f87 Revert "Add workaround for kotest/kotest#1815"
This reverts commit 930581d844.
2020-11-06 11:16:22 +01:00
Andreas Dangel 1bf05ac490 Merge branch 'master' into pmd/7.0.x 2020-11-06 11:16:09 +01:00
Andreas Dangel dd9390eb61 Merge branch 'pr-2837' into pmd/7.0.x
[javascript] Remove JS parser options #2837
2020-11-06 10:07:15 +01:00
Andreas Dangel 3b49c15831 Merge branch 'master' into pmd/7.0.x 2020-11-06 09:58:12 +01:00
Andreas Dangel 7dfdd653e7 [javascript] Update default version name to "ES6" 2020-11-06 09:41:55 +01:00
Clément Fournier 7165ed1479 Fix tests 2020-11-05 14:38:21 +01:00
Clément Fournier c514697fbc Simplify AvoidDecimalLiteralsInBigDecimalConstructor
Fixes #2532
2020-11-05 14:36:21 +01:00
Clément Fournier edaff363a9 Check fixes #1224 2020-11-05 11:04:20 +01:00
Clément Fournier 2144e72235 Fix #1998 2020-11-05 11:02:43 +01:00
Clément Fournier 9e7ad67a84 Check fixes #2542 2020-11-05 10:58:18 +01:00
Clément Fournier 4a1b30bef7 Check fixes #342 2020-11-05 10:55:20 +01:00
Clément Fournier ff33b022f6 Check fixes #807 2020-11-05 10:54:21 +01:00
Andreas Dangel 5fdc9bfb5b [core] Add error recovery mode
This can be enabled by setting system property "pmd.error_recovery"
to an arbitrary value, e.g. "-Dpmd.error_recovery".
2020-11-05 10:54:13 +01:00
Clément Fournier c37232368e Check fixes #1005 2020-11-05 10:51:58 +01:00
Clément Fournier 06664d2887 Check fixes #1422 2020-11-05 10:50:05 +01:00
Clément Fournier 3d7de24256 Check fixes #1565 2020-11-05 10:46:54 +01:00
Clément Fournier e799a140ea Check fixes #1969
Actually was fixed by #2800
2020-11-05 10:40:50 +01:00
Clément Fournier ce3d91e01a Check fixes #2147 2020-11-05 10:33:57 +01:00
Clément Fournier 7c5fbb26ac Check fixes #2716 2020-11-05 10:30:12 +01:00
Clément Fournier d5e8c45658 Check fixes #2806 2020-11-05 10:28:46 +01:00
Clément Fournier a0e1d7577d Update SwitchStmtsShouldHaveDefault 2020-11-05 10:25:31 +01:00
Clément Fournier e912f12124 Check fixes #2883 2020-11-05 10:16:38 +01:00
Clément Fournier 2095d2f63d Check fixes #2712 2020-11-05 10:14:29 +01:00
Clément Fournier f5690e1712 Add test cases from fixed issues 2020-11-05 10:05:24 +01:00
Clément Fournier 7665204310 Set ignore clarifying as default 2020-11-05 09:41:36 +01:00
Clément Fournier d75b0d3462 Keep old name 2020-11-05 09:21:46 +01:00
Clément Fournier a830c20225 Reimplement UselessParentheses 2020-11-05 09:19:58 +01:00
Clément Fournier f350a5bad7 Merge branch 'java-usage-resolver' into java-dfa-reaching-defs-unused-assignment-singular-field-that-kind-of-thing 2020-11-04 17:51:15 +01:00
Clément Fournier 54f74c12bf Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-04 17:51:04 +01:00
Clément Fournier c18509cab0 Fix report location of enum constant 2020-11-04 17:50:52 +01:00
Clément Fournier e287bff00d Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-04 09:38:03 +01:00
Clément Fournier 3b29ceb13b Fix PMD warnings 2020-11-04 09:37:27 +01:00
Clément Fournier 12e106e84b Fix test compil 2020-11-04 09:29:16 +01:00
Clément Fournier 4dbd161144 Fix ClassNamingConventions 2020-11-04 09:19:07 +01:00
Clément Fournier 149d3732f8 Fix soft assertions for JUnitTestsShouldIncludeAssertTest 2020-11-04 09:17:17 +01:00
Clément Fournier c106f04fcf Doc and tests for InvocationMatcher 2020-11-04 08:19:43 +01:00
Clément Fournier 93062200cd Ignore Thread.currentThread().getContextClassLoader() 2020-11-04 07:08:50 +01:00
Clément Fournier 658fa3fee3 Improve CompareObjectsWithEquals 2020-11-04 06:56:05 +01:00
Clément Fournier fe3c8c36b4 Revert "Change UseConcurrentHashMap"
We can do that later

This reverts commit 21f26b75ab.
2020-11-04 06:36:58 +01:00
Clément Fournier 384dff44d9 Fixes for regression test 2020-11-04 05:53:59 +01:00
Clément Fournier 21f26b75ab Change UseConcurrentHashMap 2020-11-03 17:22:36 +01:00
Clément Fournier fee6000d0c Review 2020-11-03 17:22:11 +01:00
Clément Fournier 8b63dae494 Review 2020-11-03 16:45:21 +01:00
Clément Fournier 0a2532381e Merge branch '7.0.x' into java-rule-bulk-update 2020-11-03 15:55:11 +01:00
Clément Fournier 0434d83280 Merge branch 'java-ast-goodies' into 7.0.x 2020-11-03 15:54:05 +01:00
Clément Fournier a26aeaf56a Update reference files 2020-11-03 15:11:31 +01:00
Clément Fournier 2a6e631e85 Fix warnings 2020-11-03 14:37:22 +01:00
Clément Fournier fde92e5091 Merge branch 'master' into java-ast-goodies 2020-11-03 14:36:58 +01:00
Clément Fournier 4351839f0e Test effective visibility 2020-11-03 14:33:54 +01:00
Clément Fournier b661abe3bd Checkstyle 2020-11-03 14:16:58 +01:00
Clément Fournier f8a3b2a1f6 Fix concurrent modification exception 2020-11-03 14:07:25 +01:00
Clément Fournier 6aceb3d5e2 Fix pmd warnings 2020-11-03 10:41:50 +01:00
Clément Fournier 4cae55cf0f Remove deprecated tokenizers 2020-11-03 10:06:11 +01:00
Clément Fournier 8941a2ef7f Simplify code 2020-11-03 09:59:50 +01:00
Clément Fournier ee8f1ef2f9 Delete AbstractJunitRule 2020-11-03 09:57:26 +01:00
Clément Fournier b91d6dce04 Finish porting junit rules 2020-11-03 09:48:17 +01:00
Clément Fournier f13c8c51b8 Update JUnitAssertionsShouldIncludeMessage 2020-11-03 08:24:22 +01:00
Clément Fournier afa5a168eb Checkstyle 2020-11-03 07:55:44 +01:00
Clément Fournier 3e089c0e9b Update release notes 2020-11-03 07:51:50 +01:00
Clément Fournier 7d6e7b1522 Support field access 2020-11-03 07:49:11 +01:00
Clément Fournier 8fc9d3166b Fix problem with method imported through subtype 2020-11-03 07:28:36 +01:00
Clément Fournier 59881c9338 Add properties to control behavior 2020-11-03 07:06:06 +01:00
Clément Fournier 33bc87f831 Add todo test case 2020-11-02 23:01:50 +01:00
Clément Fournier 9a2fe42af4 Fix fp with method type arguments 2020-11-02 22:22:29 +01:00
Clément Fournier d66516b2d3 Add more test cases 2020-11-02 22:20:20 +01:00
Clément Fournier 7acbcc8694 Ensure #2299 is fixed
fix #2299
2020-11-02 22:12:58 +01:00
Clément Fournier 720678eac9 Handle type obscuring
Fix #1790
2020-11-02 22:11:11 +01:00
Clément Fournier d3353191f0 Add test cases 2020-11-02 22:07:40 +01:00
Clément Fournier c3d1ca4db0 Fix PMD warning 2020-11-02 20:52:14 +01:00
Clément Fournier 6ae64dbb54 Add test 2020-11-02 19:42:54 +01:00
Clément Fournier b6616795f5 Support methods 2020-11-02 19:39:55 +01:00
Clément Fournier e19dba1377 Simplify 2020-11-02 19:01:54 +01:00
Clément Fournier f5c3c152eb Reimplement UnnecessaryFullyQualifiedName
Fix tests

Doesn't work yet for static method calls:
resolution of methods needs type resolution.
Also fails with same package if classloader
is not set
2020-11-02 18:38:15 +01:00
Clément Fournier f7a0695301 Update JUnitUseExpected 2020-11-02 17:13:21 +01:00
Clément Fournier 4165b7d569 Update JUnitSpelling 2020-11-02 17:01:05 +01:00
Clément Fournier cb1d1c5a51 Update JUnitTestsShouldIncludeAssert 2020-11-02 16:56:10 +01:00
Clément Fournier 3b72741f19 Update JUnitTestContainsTooManyAsserts 2020-11-02 16:19:42 +01:00
Clément Fournier ee72dacd3e Update UseAssertTrueInsteadOfAssertEquals 2020-11-02 13:48:30 +01:00
Clément Fournier 7f88884748 Update UseAssertSameInsteadOfAssertTrue 2020-11-02 13:40:33 +01:00
Clément Fournier ce4c5bb749 Update UseAssertNullInsteadOfAssertTrue 2020-11-02 13:38:28 +01:00
Clément Fournier 5e047918d6 Update UseAssertEqualsInsteadOfAssertTrue 2020-11-02 13:30:48 +01:00
Clément Fournier f0656c181d Convert some rules to XPath rules 2020-11-02 12:49:06 +01:00
Clément Fournier 16692fafda Abstract some logic 2020-11-02 12:18:31 +01:00
Clément Fournier e428ed7255 Add signature matcher xpath function 2020-11-02 11:41:15 +01:00
Clément Fournier e3b2d2d0e6 Fix some errors 2020-11-02 10:44:43 +01:00
Clément Fournier e5eb7d60f3 Fix report locations for var ids 2020-11-02 10:07:51 +01:00
Clément Fournier 89a1ec7b55 Update AvoidMultipleUnaryOperators 2020-11-02 10:04:57 +01:00
Clément Fournier b75ba84346 Cleanup 2020-11-02 09:59:28 +01:00
Clément Fournier 97c79d2345 Doc 2020-11-02 09:59:28 +01:00
Clément Fournier f5ba440944 Add support for comment suppression 2020-11-02 09:59:28 +01:00
Clément Fournier a674cf8c14 Convert MissingBreakInSwitch to fallthrough switch case 2020-11-02 09:59:28 +01:00
Clément Fournier 940909e005 Fix fp 2020-11-02 09:59:28 +01:00
Clément Fournier 5262302b27 Update ImmutableField
This uses the new dataflow and is in theory
more precise, but also will report more things.
2020-11-02 09:59:28 +01:00
Clément Fournier 16c39ff04f Ignore unused vars
This removes some noisyness that is better caught by unusedPrivateField
2020-11-02 09:59:28 +01:00
Clément Fournier 498bb1fb33 Cleanup lombok logic 2020-11-02 09:59:28 +01:00
Clément Fournier 85a7de492e Add SingularField to 'unused' group rules 2020-11-02 09:59:28 +01:00
Clément Fournier 216f8ffa04 Update SingularField 2020-11-02 09:59:28 +01:00
Clément Fournier e54b56ef7e Check fields before methods 2020-11-02 09:59:28 +01:00
Clément Fournier f2e90304f7 Add machinery to consider unbound assignments 2020-11-02 09:59:28 +01:00
Clément Fournier 4c5bc0d714 Extract reaching defs analysis 2020-11-02 09:59:28 +01:00
Clément Fournier 9ac49a346c Update AssignmentInOperand 2020-11-02 09:57:51 +01:00
Clément Fournier 3e69ba1130 Update WhileLoopWithLiteralBoolean 2020-11-02 09:49:56 +01:00
Clément Fournier 62243f546e Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-02 09:41:47 +01:00
Clément Fournier 957a35bc82 Ensure TypeTestUtil throws on parameterized type 2020-11-02 09:40:42 +01:00
Clément Fournier 2be5ab8e75 Update AvoidDecimalLiteralsInBigDecimalConstructor 2020-11-02 09:22:01 +01:00
Clément Fournier b3195d65e8 Update AvoidAssertAsIdentifier 2020-11-02 09:08:52 +01:00
Clément Fournier 769bc5fe5f Update AvoidCatchingThrowable 2020-11-02 09:08:19 +01:00
Clément Fournier 34a0690e61 Update AvoidEnumAsIdentifier 2020-11-02 09:05:46 +01:00
Clément Fournier 978ebf954b Update UselessOperationOnImmutable 2020-11-02 08:29:07 +01:00
Clément Fournier fbc08e69ec Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-02 08:05:20 +01:00
Clément Fournier d905c5f0aa PMD warnings 2020-11-02 02:44:06 +01:00
Clément Fournier fb19943b02 Share logic in both rules 2020-11-02 01:03:36 +01:00
Clément Fournier 9873076016 Update AccessorMethodGeneration 2020-11-02 00:58:17 +01:00
Clément Fournier 097533479f Update AccessorClassGeneration 2020-11-02 00:20:40 +01:00
Clément Fournier b75d2e8f3b Fix SimplifyStartsWith 2020-11-02 00:10:53 +01:00
Clément Fournier 5e07ccd017 Update UnnecessaryConstructor 2020-11-02 00:02:32 +01:00
Clément Fournier 348133024d Update IdenticalCatchBranches 2020-11-01 23:41:41 +01:00
Clément Fournier 5b555ac1d9 Doc 2020-11-01 23:25:15 +01:00
Clément Fournier d5c3f8d908 Update alljava.xml 2020-11-01 21:29:19 +01:00
Clément Fournier b78e8dd174 Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-01 21:27:35 +01:00
Clément Fournier 0ac60ebd19 Fixes 2020-11-01 21:24:38 +01:00
Clément Fournier d1d83320b1 Update CloneMethodMustImplementCloneable 2020-11-01 21:17:52 +01:00
Clément Fournier 5fd0c07e08 Update CompareObjectsWithEquals 2020-11-01 21:17:39 +01:00
Clément Fournier e9c0752ae0 Update ConsecutiveAppendsShouldReuseRule 2020-11-01 20:58:31 +01:00
Clément Fournier 1cbeb16e8b Merge branch 'java-rule-bulk-update' into java-usage-resolver 2020-11-01 20:57:44 +01:00
Clément Fournier 9c50f0fc6d Update UnnecessaryLocalBeforeReturn 2020-11-01 20:55:20 +01:00
Clément Fournier 3e17f9c120 Update SimplifyBooleanExpressions 2020-11-01 01:25:17 +01:00
Clément Fournier eb7ae7899b Use new attributes 2020-11-01 01:17:11 +01:00
Clément Fournier a9130cfdf7 Merge branch 'java-ast-goodies' into java-rule-bulk-update 2020-11-01 01:15:25 +01:00
Clément Fournier 9172665e15 Remove now useless method 2020-11-01 01:13:47 +01:00
Clément Fournier 01cbdd116c Merge branch 'deprecate-find-xx-of-any-type' into java-usage-resolver 2020-11-01 01:13:05 +01:00
Clément Fournier 18b820b01b Add since comments 2020-10-31 15:47:42 +01:00
Clément Fournier 1fbbab2860 Add getNextSibling/getPreviousSibling 2020-10-31 15:41:50 +01:00
Clément Fournier 5ee18becbb Fix merge 2020-10-31 15:37:48 +01:00
Clément Fournier e306af7059 Merge branch 'deprecations-for-70-pr' into java-ast-goodies 2020-10-31 15:36:18 +01:00
Clément Fournier a44fead936 Simplify further 2020-10-31 14:21:15 +01:00
Clément Fournier 8085d364b6 Move utils into JavaRuleUtil 2020-10-31 14:05:49 +01:00
Clément Fournier fee83e5679 Update SimplifyBooleanReturns 2020-10-31 14:00:12 +01:00
Clément Fournier 880c51824b Fix compil 2020-10-31 13:13:13 +01:00
Clément Fournier 1f66609fb1 Cleanup 2020-10-31 11:55:21 +01:00
Clément Fournier f6a57240c2 Optimise fragmented doc builder offset access
Just cache the most recently accessed fragment and assume
we're working near it. The previous scheme was taking twice
as much time as the rest of the run combined on a real run.
2020-10-31 01:10:47 +01:00
Clément Fournier 966b5de056 Merge branch 'text-utils-simple' into text-utils-javacc 2020-10-30 21:05:34 +01:00
Clément Fournier 2f87b35deb Fix merge in pmd-java 2020-10-30 21:01:25 +01:00
Clément Fournier 0dee94dd7c Remove getSourceCodeFile 2020-10-30 20:54:22 +01:00
Clément Fournier bc563cfd6f Fix merge 2020-10-30 20:50:38 +01:00
Clément Fournier 014ba90c88 Merge branch 'analysis-listener' into text-utils-simple 2020-10-30 20:45:57 +01:00
Clément Fournier 9c0ea3a992 Merge branch '7.0.x' into analysis-listener 2020-10-30 20:39:52 +01:00
Clément Fournier 3e52f402b9 Merge branch 'java-ast-goodies' into java-usage-resolver 2020-10-30 20:14:27 +01:00
Clément Fournier 4caaf561d9 Fix VarDeclId visibility 2020-10-30 19:34:47 +01:00
Clément Fournier fb730405b7 Merge branch '7.0.x' into java-ast-goodies 2020-10-30 19:27:07 +01:00
Clément Fournier 6afb4fb94a Merge branch 'fix-stackoverflows' into 7.0.x 2020-10-30 19:19:35 +01:00
Clément Fournier b909a97baa Merge branch 'java-comments' into 7.0.x 2020-10-30 19:19:23 +01:00
Clément Fournier 9096ef8f8e Merge branch '7.0.x' into java-comments 2020-10-30 19:18:27 +01:00
Clément Fournier 1ec5ca8013 Update VarCouldBeFinal (2 rules) 2020-10-30 13:55:53 +01:00
Clément Fournier 524cf33fc9 Update AvoidReassigningCatchVariablesRule 2020-10-30 13:55:53 +01:00
Clément Fournier 004e7792a0 Add more tests 2020-10-30 13:55:53 +01:00
Clément Fournier 8b1a743886 Finish it 2020-10-30 13:55:53 +01:00
Clément Fournier 3861067c8c Try updating AvoidReassigningLoopVariablesRule 2020-10-30 13:55:53 +01:00
Clément Fournier 8d26aed811 Update AvoidReassigningParametersRule 2020-10-30 13:55:53 +01:00
Clément Fournier b86f38030a Add more stuff to JavaRuleUtil 2020-10-30 13:55:53 +01:00
Clément Fournier df59506bc7 Update UnusedFormalParameter 2020-10-30 13:55:53 +01:00
Clément Fournier 3c8283792f Update UnusedPrivateMethod 2020-10-30 13:55:53 +01:00
Clément Fournier 5c902a47f9 Revert "Proto for method usages"
This reverts commit 0cf084db5befb78579b05468014b3a26509d494a.
2020-10-30 13:55:53 +01:00
Clément Fournier f067e42036 Proto for method usages 2020-10-30 13:55:53 +01:00
Clément Fournier 5a96c714d5 Update UnusedPrivateField 2020-10-30 13:55:53 +01:00
Clément Fournier bbc71da289 Update UnusedLocalVariable 2020-10-30 13:55:53 +01:00
Clément Fournier 700d029932 Make usage resolver 2020-10-30 13:55:53 +01:00
Clément Fournier 376774316d Merge branch '7.0.x' into java-ast-goodies 2020-10-30 13:53:43 +01:00
Clément Fournier b08ab40eca Merge branch '7.0.x' into fix-stackoverflows 2020-10-30 11:23:01 +01:00
Clément Fournier 16a44152db Update UseStringBufferLength 2020-10-30 11:18:42 +01:00
Clément Fournier 77ba1853de Update UseArrayListInsteadOfVector 2020-10-30 11:07:23 +01:00
Clément Fournier da78dbbac6 Update EqualsNull 2020-10-30 11:04:18 +01:00
Clément Fournier fb0541420f Update LiteralsFirstInComparison 2020-10-30 11:01:55 +01:00
Andreas Dangel e4ae118ab0 Merge branch 'pr-2808' into pmd/7.0.x
[core] Consider some Errors recoverable #2808
2020-10-30 10:52:39 +01:00
Clément Fournier 9ffc8e0b97 Activate ForLoopVariableCount 2020-10-30 10:48:21 +01:00
Clément Fournier 0a3b262740 Update AvoidUsingNativeCode 2020-10-30 10:46:02 +01:00
Clément Fournier f1d155770e Update AtLeastOneConstructor 2020-10-30 10:43:42 +01:00
Clément Fournier 98f3656985 Update ConfusingTernary 2020-10-30 10:37:11 +01:00
Clément Fournier 8a6030acd9 Move more utils to JavaRuleUtil 2020-10-30 10:26:55 +01:00
Andreas Dangel f499c8ccb6 Revert "[ci] Add exclude-patterns for regression tester"
This reverts commit 331f8f9d11.
2020-10-30 10:10:07 +01:00
Andreas Dangel 31e5b91695 Merge branch 'pmd/7.0.x' into pr-2808 2020-10-30 10:08:48 +01:00
Clément Fournier ecf9982721 Update designer bindings 2020-10-30 09:48:10 +01:00
Clément Fournier 2e3b52a33b Update UseCollectionsIsEmpty 2020-10-30 09:33:56 +01:00
Clément Fournier 0c9e24d5c1 Update InefficientEmptyStringCheck 2020-10-30 09:33:56 +01:00
Clément Fournier 0f2cde21a3 Update UseNotifyAllInsteadOfNotify 2020-10-30 09:33:56 +01:00
Clément Fournier c72c108b5f Update UseConcurrentHashMap 2020-10-30 09:33:56 +01:00
Clément Fournier a9fcb8f20b Update DoubleCheckedLocking 2020-10-30 09:33:56 +01:00
Clément Fournier f6b4bace56 Update DontCallThreadRun 2020-10-30 09:33:56 +01:00
Clément Fournier 7ed9db6550 Update DoNotUseThreads 2020-10-30 09:33:56 +01:00
Clément Fournier 28e2d0b41b Update AvoidUsingVolatile 2020-10-30 09:33:56 +01:00
Clément Fournier db506d7e1a Update AvoidThreadGroup 2020-10-30 09:33:56 +01:00
Clément Fournier b74b8f19cf Update AvoidSynchronizedAtMethodLevel 2020-10-30 09:33:56 +01:00
Clément Fournier 4a35778d55 Update TooFewBranchesForASwitchStatement 2020-10-30 09:33:56 +01:00
Clément Fournier 73deec4e7c Update SimplifyStartsWith 2020-10-30 09:33:56 +01:00
Clément Fournier 37ce1447bb Update StringInstantiation 2020-10-30 09:33:56 +01:00
Clément Fournier a5410e8750 Update AppendCharacterWithChar 2020-10-30 09:33:56 +01:00
Clément Fournier 8b8d5497d7 Update RedundantFieldInitializer 2020-10-30 09:33:56 +01:00
Clément Fournier a7f5111a3b Update UseIndexOfChar rule 2020-10-30 09:33:56 +01:00
Clément Fournier 67097d221a Update UselessStringValueOf 2020-10-30 09:33:56 +01:00
Clément Fournier 381c5b7009 Update performance.xml/*Instantiation 2020-10-30 09:33:56 +01:00
Clément Fournier ecc95d6fd3 Fix AvoidUsingShortType 2020-10-30 09:33:56 +01:00
Clément Fournier b3e8ea08ad Make AvoidDollarSigns use rulechain 2020-10-30 09:33:56 +01:00
Clément Fournier 949a07639a Use rulechain for MethodNamingConventions 2020-10-30 09:33:56 +01:00
Clément Fournier 9522bda9d9 Improve AvoidUsingShortType perf 2020-10-30 09:33:56 +01:00
Clément Fournier c89256ac97 Optimise node is function 2020-10-30 09:33:56 +01:00
Clément Fournier e82e01a11f Add doc for last functions 2020-10-30 09:33:56 +01:00
Clément Fournier 8edd4b61c4 Update UncommentedEmptyConstructor 2020-10-30 09:33:56 +01:00
Clément Fournier c18a04572d Checkstyle 2020-10-30 09:33:56 +01:00
Clément Fournier 3249158446 Fix type test util for anons 2020-10-30 09:33:56 +01:00
Clément Fournier 5aa9a69e9c Update more empty rules 2020-10-30 09:33:56 +01:00
Clément Fournier 342fe708c5 Update EmptyFinallyBlock 2020-10-30 09:33:56 +01:00
Clément Fournier 4aebddf112 Update EmptyFinalizer 2020-10-30 09:33:56 +01:00
Clément Fournier 2318414a7a Update EmptyCatchBlock
Now it doesn't ignore InterruptedException/CloneNotSupportedException
2020-10-30 09:33:56 +01:00
Clément Fournier d55ea50cc3 Update DoubleBraceInitialization 2020-10-30 09:33:56 +01:00
Clément Fournier a153e0af9a Update DefaultLabelNotLastInSwitchStmt 2020-10-30 09:33:56 +01:00
Clément Fournier 8e8d5d60da Update ConstantsInInterface 2020-10-30 09:33:56 +01:00
Clément Fournier 390e591949 Update AvoidStringBufferField 2020-10-30 09:33:56 +01:00
Clément Fournier 82c7e3daeb Update AvoidPrintStackTrace 2020-10-30 09:33:56 +01:00
Clément Fournier d80b06600f Update AvoidMessageDigestField 2020-10-30 09:33:56 +01:00
Clément Fournier ecabd3e566 Update AvoidUsingShortType 2020-10-30 09:33:56 +01:00
Clément Fournier c153e27a21 Update AvoidFileStream 2020-10-30 09:33:56 +01:00
Clément Fournier 77687eb903 Update AddEmptyString 2020-10-30 09:33:56 +01:00
Clément Fournier 0c6100a0e7 Update UnnecessaryAnnotationValueElement
Convert to XPath rule
2020-10-30 09:33:56 +01:00
Clément Fournier a1e24ef7ff Update Remote(Interface|Session)NamingConvention 2020-10-30 09:33:56 +01:00
Clément Fournier d01b6efce7 Update naming conventions rules 2020-10-30 09:33:56 +01:00
Clément Fournier 9de7298b29 Update regression ruleset 2020-10-30 09:33:56 +01:00
Clément Fournier 03f735014a Update AvoidProtectedFieldInFinalClass 2020-10-30 09:33:56 +01:00
Clément Fournier 3a599e024f Update AvoidDollarSigns 2020-10-30 09:33:56 +01:00
Clément Fournier 4b543397f6 Cleanup 2020-10-30 09:33:56 +01:00
Clément Fournier e963576a89 Update UseShortArrayInitializer 2020-10-30 09:33:56 +01:00
Clément Fournier 6fff03fdb4 Update UselessQualifiedThis 2020-10-30 09:33:56 +01:00
Clément Fournier 0aa02f78a8 Update TooManyStaticImports 2020-10-30 09:33:56 +01:00
Clément Fournier ea3f201ec9 Update Short/Long vars 2020-10-30 09:33:56 +01:00
Clément Fournier 2802ae4eec Update xpath fun doc 2020-10-30 09:33:56 +01:00
Clément Fournier 1c4f2153ae Update NoPackage, add nodeIs function 2020-10-30 09:33:56 +01:00
Clément Fournier 73325883fa Update PackageCase 2020-10-30 09:33:56 +01:00
Clément Fournier 9768c3928b Update UseUnderscoresInNumericLiterals 2020-10-30 09:33:56 +01:00
Clément Fournier d1b90778d7 Update LongVariable 2020-10-30 09:33:56 +01:00
Clément Fournier 233e9299a6 Update EJB naming conventions
Also allow TypeTestUtil to not fail
if classpath is incomplete
2020-10-30 09:33:56 +01:00
Clément Fournier 8db49519ac Update GenericsNaming 2020-10-30 09:33:56 +01:00
Clément Fournier 7c37fe67fe Update ForLoopShouldBeWhileLoop 2020-10-30 09:33:56 +01:00
Clément Fournier fbafb8d6e1 Update ExtendsObject 2020-10-30 09:33:56 +01:00
Clément Fournier f750dd0c35 Update EmptyMethodInAbstractClassShouldBeAbstract 2020-10-30 09:33:56 +01:00
Clément Fournier ae5fa7621c Use getModifiers funs instead 2020-10-30 09:33:56 +01:00
Clément Fournier 37ed5bc45c Update DontImportJavaLang
Convert to xpath rule
2020-10-30 09:33:56 +01:00
Clément Fournier fa8cc3ff99 Update more rules
DefaultPackage
2020-10-30 09:33:56 +01:00
Clément Fournier 248a3127b8 Update saxon version
Fixes bug https://saxonica.plan.io/issues/4610\?pn\=1\#change-16066

which occurs because of property inlining
2020-10-30 09:33:56 +01:00
Clément Fournier 39e84b7f2f Port some codestyle XPath rules 2020-10-30 09:33:56 +01:00
Clément Fournier 77273513e6 Add a fun to check for annotations 2020-10-30 09:33:56 +01:00
Clément Fournier 0092c6e0f3 Update reference files 2020-10-30 07:40:28 +01:00
Clément Fournier 2ff9f9b759 Add effective visibility 2020-10-30 07:35:24 +01:00
Clément Fournier 603d0bad10 Add ASTMethodDeclaration#isOverridden 2020-10-30 07:31:54 +01:00
Clément Fournier a781de687d Add ASTStringLiteral#length attribute 2020-10-30 01:21:52 +01:00
Clément Fournier f8e5c24705 Deprecate old traversal methods
Most of them can be replaced by node streams,
which is more efficient especially for descendant streams

Give an optimal implementation of firstChild for
array-based nodes

Also deprecate getImage

Make isFindBoundary a NoAttribute
2020-10-30 01:12:37 +01:00
Clément Fournier 220364acf5 Add DataMap#computeIfAbsent 2020-10-30 01:11:58 +01:00
Clément Fournier 40509e934f Unignore some fixed errors 2020-10-29 22:22:24 +01:00
Clément Fournier 88ed07ce1c Merge branch '7.0.x' into fix-stackoverflows 2020-10-29 22:05:37 +01:00
Clément Fournier 8b482bdac1 Add some AST attributes 2020-10-29 21:01:54 +01:00
Andreas Dangel 1124e292d8 Merge branch 'pmd/7.0.x' into pr-2802 2020-10-29 18:30:21 +01:00
Andreas Dangel 331f8f9d11 [ci] Add exclude-patterns for regression tester
This commit can be possibly reverted with #2808.
But for now, this allows to create a baseline for pmd/7.0.x
2020-10-29 17:45:40 +01:00
Andreas Dangel 930581d844 Add workaround for kotest/kotest#1815 2020-10-29 14:21:44 +01:00
Andreas Dangel dd7ed59e26 Fix kotest generators 2020-10-29 13:51:22 +01:00
Andreas Dangel bc0d26eeb5 Fix tests compilation 2020-10-29 11:38:54 +01:00
Andreas Dangel 1862f4fe05 Merge branch 'master' into pmd/7.0.x 2020-10-29 10:52:38 +01:00
Clément Fournier ddb547449d Fix stackoverflow on nested anon ctor call 2020-10-28 17:28:15 +01:00
Clément Fournier 3ff5eaa278 Performance optimisations for UnusedAssignment
Avoid unnecessary copies, mostly
2020-10-27 09:09:55 +01:00
Clément Fournier 1afe089cbd Merge branch '7.0.x' into java-comments 2020-10-27 02:10:46 +01:00
Clément Fournier b19eff5eee Checkstyle 2020-10-27 01:20:02 +01:00
Clément Fournier 271691c743 Fix merge 2020-10-27 00:59:58 +01:00
Clément Fournier 8213596591 Merge branch 'ruleset-f-builder-merger' into analysis-listener 2020-10-27 00:48:47 +01:00
Clément Fournier 5946be38f0 Update more code 2020-10-27 00:44:56 +01:00
Clément Fournier 2a4cde61bf Merge branch 'ruleset-factory-builder' into ruleset-f-builder-merger 2020-10-27 00:32:20 +01:00
Clément Fournier 3e3397308a Start arranging the merge 2020-10-26 23:20:41 +01:00
Clément Fournier e7fdad68b5 Merge branch 'ruleset-factory-builder' into ruleset-f-builder-merger 2020-10-26 22:59:26 +01:00
Kevin Jones 862ee7b236 Merge remote-tracking branch 'upstream/pmd/7.0.x' into apexlink 2020-10-26 20:23:07 +00:00
Clément Fournier 4ef725764a [core,xml] Remove CompoundIterator 2020-10-26 19:17:54 +01:00
Clément Fournier 5267b5dc18 Merge branch '7.0.x' into analysis-listener 2020-10-26 18:49:43 +01:00
Clément Fournier 148e9ac69a Merge branch 'remove-weird-java-grammar-chars' into 7.0.x 2020-10-26 16:04:50 +01:00
Clément Fournier 6eeffe2955 Merge branch 'fix-unused-assignment' into 7.0.x 2020-10-26 16:04:31 +01:00
Clément Fournier 851def221c Merge branch 'apex-remove-multifile' into 7.0.x 2020-10-26 16:04:11 +01:00
Clément Fournier 6467a2b70c Merge branch '7.0.x' into analysis-listener 2020-10-26 16:00:51 +01:00
Clément Fournier 4caef7fd91 Fix variable filtering on ++ 2020-10-26 02:23:01 +01:00
Clément Fournier ed1b2a2e25 Fix problems with switch 2020-10-26 01:45:21 +01:00
Clément Fournier e1c552d9eb Remove weird valid java files
Probably old typos. They probably meant to ignore trailing characters,
we don't (they must be eg comments or whitespace)
2020-10-25 11:37:02 +01:00
Clément Fournier 6f11090838 Fix static field reassignment 2020-10-25 11:32:19 +01:00
Clément Fournier 1e4ae5d15a Fix some false negatives 2020-10-25 10:47:17 +01:00
Clément Fournier 96625a1436 Add test case for FN in static block 2020-10-25 10:01:54 +01:00
Clément Fournier aae646b872 Merge branch '7.0.x' into fix-unused-assignment 2020-10-25 09:13:23 +01:00
Clément Fournier c5934113e0 Merge remote-tracking branch 'origin/java-comments' into java-comments 2020-10-24 22:13:50 +02:00
Kevin Jones d98ec556c7 Merge remote-tracking branch 'upstream/pmd/7.0.x' into apexlink
# Conflicts:
#	pom.xml
2020-10-24 21:11:49 +01:00
Clément Fournier e75eef54a8 Add test 2020-10-24 22:10:20 +02:00
Kevin Jones 279c673341 Resolve PR comments 2020-10-24 21:08:58 +01:00
Clément Fournier e8f769d630 Fallback on equality for isA 2020-10-24 22:03:06 +02:00
Clément Fournier 4ee8cc588c Fix report locations for fields 2020-10-24 21:45:26 +02:00
Clément Fournier 4b779250fa Merge branch '7.0.x' into java-comments 2020-10-24 21:37:28 +02:00
Andreas Dangel 5dfac0b03a Merge branch 'master' into pmd/7.0.x 2020-10-24 12:23:45 +02:00
Kevin Jones eb5a334a13 Merge remote-tracking branch 'upstream/pmd/7.0.x' into apexlink
# Conflicts:
#	pmd-apex/pom.xml
#	pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ApexParser.java
#	pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ApexParser.java
#	pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ApexRootNode.java
#	pmd-core/src/main/java/net/sourceforge/pmd/ant/internal/PMDTaskImpl.java
#	pmd-core/src/main/java/net/sourceforge/pmd/lang/ParserOptions.java
#	pom.xml
2020-10-22 21:40:44 +01:00
Andreas Dangel 32265e0aad Merge branch 'pmd/7.0.x' into pr-2802 2020-10-22 18:22:17 +02:00
Andreas Dangel 9aa9e8cd97 [core] ParserOptions: Remove unnecessary null check 2020-10-22 16:02:40 +02:00
Andreas Dangel 8def693545 [core] Fix incomplete filepath for rule violations
Refs #2807
2020-10-22 15:59:59 +02:00
Clément Fournier 84061cf34b Remove useless method 2020-10-21 18:29:33 +02:00
Clément Fournier 604393d143 Fix report locations 2020-10-21 18:04:04 +02:00
Clément Fournier c0d1fc112d Fix UnusedAssignment FP with field accesses 2020-10-21 17:50:27 +02:00
Clément Fournier f00185e0fa Merge branch '7.0.x' into java-comments 2020-10-21 17:19:46 +02:00
Clément Fournier c8da0b4b36 Fix tests expecting ES3
Default version is now ES 6 and unnamed
2020-10-19 22:32:15 +02:00
Clément Fournier c27b421645 Fix PMD warnings 2020-10-18 03:22:07 +02:00
Clément Fournier 97a7fba762 Remove tests 2020-10-18 03:19:16 +02:00
Clément Fournier a16aed50eb Remove JS parser options 2020-10-18 03:16:19 +02:00
Clément Fournier dbf3f80853 Merge branch '7.0.x' into apex-remove-multifile 2020-10-18 02:57:34 +02:00
Clément Fournier c47d7314ea SORT ME OUT Remove isFailOnError
This was not really been respected i think
2020-10-17 20:28:32 +02:00
Clément Fournier b9cea55e6b Further simplify pmd build task
There is no special "error report" anymore,
an error throws a BuildException unless
it is a processing error, in which case
it cannot bubble up to the PMDTaskImpl,
because it would have been added to the
report already.
2020-10-17 20:18:19 +02:00
Clément Fournier 9c9fe43a3c Fix remaining tests 2020-10-17 19:56:03 +02:00
Clément Fournier 0c2a980eaa Fix Ant task 2020-10-17 19:53:27 +02:00
Clément Fournier 0c0122f19d Fix tests 2020-10-17 18:58:32 +02:00
Clément Fournier a524b52bba Remove old ctor of parametericRuleViolation 2020-10-17 18:30:00 +02:00
Clément Fournier dd0dad1e2c Cleanup Ant task 2020-10-17 18:26:47 +02:00
Clément Fournier a3a11423b9 Merge branch '7.0.x' into analysis-listener 2020-10-17 18:17:13 +02:00
Clément Fournier 4dee15c8c3 Merge branch 'pmd7-test-cleanups' into 7.0.x
Refs #2807
2020-10-17 18:16:15 +02:00
Clément Fournier 9426ce7edf Fix build 2020-10-17 18:15:13 +02:00
Clément Fournier 66190181ef Remove duplication of filename for rule violations 2020-10-17 18:08:59 +02:00
Clément Fournier fb137b6484 Merge branch 'pmd7-test-cleanups' into analysis-listener 2020-10-17 17:56:46 +02:00
Clément Fournier 17dc5d3861 Fix report locations 2020-10-17 16:59:33 +02:00
Clément Fournier 649ad99755 Remove some changes to RuleTst 2020-10-17 16:37:04 +02:00
Clément Fournier 36d6896221 Merge branch '7.0.x' into pmd7-test-cleanups 2020-10-17 16:28:39 +02:00
Clément Fournier c35ee3d305 Merge branch '7.0.x' into java-comments 2020-10-17 16:22:16 +02:00
Andreas Dangel 5290102b96 [java] Add doc pointers for GLB and LUB 2020-10-17 11:19:32 +02:00
Andreas Dangel b6473cc136 Merge branch 'pr-2800' into pmd/7.0.x
[java] Update MissingOverride to pmd 7 grammar #2800
2020-10-16 14:35:47 +02:00
Andreas Dangel 218863bc09 [ci] Update pmdtester 2020-10-16 12:42:12 +02:00
Andreas Dangel 38880bc774 [doc] Update release notes, fixes #2797 2020-10-16 12:06:47 +02:00
Andreas Dangel c512e0069c Merge branch 'pmd/7.0.x' into pr-2800 2020-10-16 11:25:29 +02:00
Andreas Dangel 03bfcf8fd3 [ci] Update pmdtester - use master branch (1.1.0.pre.SNAPSHOT) 2020-10-16 11:12:28 +02:00
Andreas Dangel e853f34164 [ci] Update Dangerfile
Create a report against the PR's base branch
and create a second report against master.
2020-10-16 11:10:16 +02:00
Andreas Dangel e6103eef0d [ci] Update pmdtester
pmdtester is used temporarily from branch "filter-ruleset-single-rules"
in order to test it.
2020-10-16 11:10:09 +02:00
Andreas Dangel ebc8187704 [ci] Update Dangerfile
Create a report against the PR's base branch
and create a second report against master.
2020-10-15 19:08:33 +02:00
Andreas Dangel 19f6835846 [ci] Update pmdtester
pmdtester is used temporarily from branch "filter-ruleset-single-rules"
in order to test it.
2020-10-15 19:08:28 +02:00
Andreas Dangel 7d58181264 Merge branch 'pmd/7.0.x' into pr-2800 2020-10-15 15:06:00 +02:00
Andreas Dangel ebc0dd16f2 Change rule ref to renamed rule (DoNotTerminateVM) 2020-10-15 15:04:49 +02:00
Clément Fournier 9fc24fd037 Merge branch 'master' into 7.0.x 2020-10-13 23:06:27 +02:00
Clément Fournier 3cc4313654 Give up trying to prune incompatible types from LB
In the general case this is possible but complex,
I don't want to introduce that kind of complexity yet.

The complex case is when you have a diamond like

List<? extends Number> & Collection<Integer>

If we try to remove incompatible bounds, we have to
minimize aggressively to `List<Integer>` if we want
to preserve associativity properties. This looks simple
but in general requires finding the most specific type
arguments (comparing Collection<? extends Number> and
Collection<Integer>), then an inversion function that
maps this Collection<Integer> type back to List<Integer>.
In this case
`forall T. List<T> <:Collection<T>`
but there could be an arbitrary transform F st. Sub<X1..Xn> <: Sup<F(X1..Xn)>,
which must be inverted.

I don't think it's worth the effort for now. This kind
of inconsistencies may only be present in user-created
intersections anyway, or invalid programs
2020-10-13 22:52:46 +02:00
Kevin Jones a5fe957b00 Code tidy 2020-10-13 20:47:21 +01:00
Andreas Dangel 269f5bd79b [core] Rule processing error filenames are missing paths #2821
Fixes #2821
2020-10-09 11:25:05 +02:00
Andreas Dangel 907cf768c1 Merge branch 'master' into pmd/7.0.x 2020-10-09 11:24:59 +02:00
Clément Fournier 22baddaec7 Ignore nondeterministic tests
Refs #2819
2020-10-09 00:42:31 +02:00
Clément Fournier d95144a7ba Cleanup build log
Remove some log statements that
were only used for debugging

There are still other things, like
"unresolved reference" warnings which
should be captured silently by the
test logger implementation, but we
can do that later
2020-10-08 23:54:22 +02:00
Clément Fournier 7849db4c0c Fix corner case with glb associativity
Discovered in this build:
https://travis-ci.org/github/pmd/pmd/jobs/733962075
2020-10-08 21:24:43 +02:00
Andreas Dangel 7e5adbfa41 Use HEAD instead of FETCH_HEAD for pmd-regression-tester 2020-10-08 15:49:15 +02:00
Andreas Dangel 55b891d88e Enable debug for pmd-regression-tester 2020-10-08 14:54:56 +02:00
Clément Fournier 6bf3fefd92 Merge branch 'pmd7-doc-update-deps' into 7.0.x
Refs #2795
2020-10-08 14:35:29 +02:00
Andreas Dangel cdfb70b8a2 Fix initial expanding of sidebar after page load.
Also remove unnecessary navgoco configuration and hooks.
2020-10-08 09:24:38 +02:00
Clément Fournier 676bf09e65 [ci] Reactivate documentation rules in regression tester 2020-10-03 23:56:15 +02:00
Clément Fournier a7887349be Merge branch '7.0.x' into java-comments 2020-10-03 23:55:22 +02:00
Clément Fournier ed01ddf993 Activate MissingOverride in regression tester 2020-10-03 23:53:46 +02:00
Clément Fournier e7fc1ca8c7 Merge branch '7.0.x' into reimplement-missing-override 2020-10-03 23:53:03 +02:00
Andreas Dangel d351457fc9 Update regression test project list
Now we use forked repos in github.com/pmd which we can control.
Right now, there are a couple of files removed from analysis:

* https://github.com/pmd/checkstyle/commit/56e3cb06d99595253f3b5337f842870bd4090ac0
* https://github.com/pmd/spring-framework/commit/85357cc7d9270885f2962198b59f16c26da032f4

These files triggered StackOverflowErrors at various places
and need to be analyzed separately.

Might be related to #2808
2020-10-03 22:20:25 +02:00
Clément Fournier 59688775c1 Update regression test ruleset
Sync with #2701 as we go
2020-10-03 18:38:48 +02:00
Clément Fournier 1089da7da2 Hide most methods of RuleTst
The supported API is now just the junit integration
2020-09-30 13:21:02 +02:00
Clément Fournier f1ed65b841 Merge branch '7.0.x' into java-comments 2020-09-30 12:57:18 +02:00
Clément Fournier 527578155f Dont forget enum constants 2020-09-30 12:53:31 +02:00
Clément Fournier 77f9858c6a Add more tests 2020-09-30 12:46:35 +02:00
Clément Fournier b768135f9e Consider SOE and AssertionE recoverable 2020-09-29 15:51:58 +02:00
Clément Fournier afb3a9e387 Fix js tests 2020-09-28 21:05:29 +02:00
Clément Fournier 64e8dc66bc Be more defensive 2020-09-28 20:40:05 +02:00
Clément Fournier f3d2591a80 Checkstyle 2020-09-28 20:37:30 +02:00
Clément Fournier 5c047b0e3e Fix java tests 2020-09-28 20:20:32 +02:00
Clément Fournier 020fa899d5 Fix tests 2020-09-28 20:12:04 +02:00
Clément Fournier 8f4c48c00a Require non null suppress marker 2020-09-28 19:49:33 +02:00
Clément Fournier 5c59de5d52 Checkout changes to test utils 2020-09-28 19:46:34 +02:00
Clément Fournier 0560245298 Refactor DefaultRVFactory 2020-09-28 19:32:54 +02:00
Clément Fournier d25c66137b Extract some test cleanups 2020-09-28 18:58:32 +02:00
Clément Fournier a3c7a264c0 Merge branch '7.0.x' into analysis-listener 2020-09-28 18:35:19 +02:00
Clément Fournier faa3015629 Fix navbar being blue 2020-09-28 18:10:48 +02:00
Clément Fournier b05554031a Merge branch '7.0.x' into pmd7-doc-update-deps 2020-09-28 17:49:05 +02:00
Clément Fournier 2777daf6b5 Merge remote-tracking branch 'upstream/pmd/7.0.x' into 7.0.x 2020-09-28 17:45:28 +02:00
Clément Fournier abc34e369c Merge branch 'pmd7-doc-logo' into 7.0.x 2020-09-28 17:44:53 +02:00
Kevin Jones d48c8a71ad Hack in unused method rule 2020-09-27 22:35:53 +01:00
Kevin Jones c635d5389f Add a configuration for requesting multi-file analysis 2020-09-26 20:56:10 +01:00
Andreas Dangel 97906950dd Merge branch 'master' into pmd/7.0.x 2020-09-26 10:43:36 +02:00
Kevin Jones 7bf7b1a2c5 Add apexlink dependency 2020-09-25 22:57:50 +01:00
Clément Fournier 97c08a37ab Checkstyle 2020-09-24 17:47:11 +02:00
Clément Fournier 4bddbe8a41 Reignore UncommentedEmptyCtor 2020-09-24 14:18:52 +02:00
Clément Fournier c77f388b26 Update other comment rules 2020-09-24 14:18:52 +02:00
Clément Fournier 8b37ccfafe Remove CommentUtil and unused things 2020-09-24 14:18:51 +02:00
Clément Fournier 5597715b8e Fix wrong test spec 2020-09-24 14:18:51 +02:00
Clément Fournier c2172cc588 Update CommentRequiredRule 2020-09-24 14:18:51 +02:00
Clément Fournier bb1568317b Add comment assignment pass 2020-09-24 14:18:51 +02:00
Clément Fournier c55657e244 Fix java comments 2020-09-24 14:18:51 +02:00
Clément Fournier 14799aa121 Fix formal comment 2020-09-24 14:18:51 +02:00
Clément Fournier 06f95d5b92 Fix test instability because of incorrect normalization
Capture ids may be negative
2020-09-24 14:16:40 +02:00
Clément Fournier 4004919737 Remove one collector 2020-09-24 13:52:46 +02:00
Clément Fournier 7728c9c4f1 Remove duplicate override-eq routine 2020-09-24 13:34:39 +02:00
Clément Fournier 32d19f631f Doc 2020-09-24 13:34:39 +02:00
Clément Fournier df7b997d4e Update MissingOverride
Also, fix 2 long standing issues
2020-09-24 13:34:39 +02:00
Andreas Dangel 0642293f4e Merge branch 'master' into pmd/7.0.x 2020-09-24 12:41:20 +02:00
Andreas Dangel 70f1aec87b Merge branch 'pr-2794' into pmd/7.0.x
[java] Update UnusedAssignmentRule to PMD 7 grammar #2794
2020-09-24 12:27:56 +02:00
Andreas Dangel c0a336c869 Merge branch 'pr-2793' into pmd/7.0.x
[java] Fix AST symbols for annotations & records #2793
2020-09-24 12:17:06 +02:00
Clément Fournier 2f7d6d747a Merge branch '7.0.x' into java-sym-fixes 2020-09-22 14:54:15 +02:00
Clément Fournier 818349f622 Merge branch 'master' into 7.0.x 2020-09-21 22:40:17 +02:00
Clément Fournier d77388d832 Remove old kotlintest dep 2020-09-20 22:45:40 +02:00
Clément Fournier da03fafabb Dedup SemanticChecksLogger 2020-09-20 22:33:52 +02:00
Clément Fournier 4539325569 Merge branch '7.0.x' into analysis-listener 2020-09-20 22:10:49 +02:00
Andreas Dangel 4b6aa1c78c [doc] Add border around pre (e.g. code examples) 2020-09-20 20:08:27 +02:00
Andreas Dangel 82c0accf0a [doc] Include javascripts at end of page instead of header 2020-09-20 20:03:44 +02:00
Andreas Dangel dbb451e18e [doc] Remove old pdf configs 2020-09-20 19:55:46 +02:00
Andreas Dangel c94ab8c600 [doc] Remove more unused tooltip files 2020-09-20 19:46:22 +02:00
Andreas Dangel 50dc1dddaf [doc] Externalize further scripts into customscripts.js
Remove unnecessary include disqus.
Remove sample page for tooltips.
Remove support for unused datatable.
Remove support for page.simple_map and page.complex_map
2020-09-20 19:35:22 +02:00
Andreas Dangel ebddad5d26 [doc] Fix sidebar quirks 2020-09-19 21:21:35 +02:00
Andreas Dangel cdfe815929 [doc] Fix persisted tab state 2020-09-19 21:11:44 +02:00
Andreas Dangel 95e6df8652 [doc] Move jekyll-table-of-contents 2020-09-19 20:35:20 +02:00
Andreas Dangel 8ac61c4fc5 [doc] Upgrade Shuffle 2020-09-19 20:21:53 +02:00
Clément Fournier 7151bbf726 Merge branch 'java-const-value-cycles' into 7.0.x 2020-09-19 16:13:18 +02:00
Clément Fournier 23c6c3700c Fix constant value crash on reference cycle 2020-09-19 16:12:34 +02:00
Clément Fournier 7360821e8a Update release notes 2020-09-19 13:17:31 +02:00
Andreas Dangel 2e22335c95 [doc] Update Simple-Jekyll-Search 2020-09-19 12:10:20 +02:00
Andreas Dangel 005045e09b [doc] Fix navbar at top 2020-09-18 18:49:51 +02:00
Clément Fournier 46cff92e45 Fix todo test 2020-09-18 18:48:17 +02:00
Clément Fournier dc76ec93e0 Fix compil 2020-09-18 18:42:38 +02:00
Clément Fournier 0753e2452b Add test case for later 2020-09-18 18:04:21 +02:00
Clément Fournier ddb0acb561 Fix call chains with side effects 2020-09-18 17:59:52 +02:00
Clément Fournier 7caaa6e666 Update UnusedAssignmentRule 2020-09-18 17:48:24 +02:00
Clément Fournier 0cc25f6747 Merge branch 'typeres-array-fixes' into java-sym-fixes 2020-09-18 17:35:15 +02:00
Andreas Dangel 1b1377175c Merge branch 'pr-2788' into pmd/7.0.x
[java] Merge Java-grammar into 7.0.x #2788
2020-09-18 15:44:08 +02:00
Andreas Dangel 8a1c8665b2 [doc] Integrate and update selfhosted bootstrap, jquery, ...
Also delete some unused includes, such as google_analytics and usermap*
and delete old IE code
2020-09-18 11:49:49 +02:00
Andreas Dangel a62b5a388e [doc] Use new self hosted fontawesome
Note: the css class "fa" is deprecated and "fas" should be used
instead. "fab" is for branding icons (like github).
2020-09-18 10:45:00 +02:00
Andreas Dangel e88d38eb5b [doc] Remove old fontawesome files 2020-09-18 10:44:02 +02:00
Andreas Dangel 6cd1305bf7 [doc] Add fontawesome 5.14.0 for self hosting
These are the minimal needed files from the downloadable archive
fontawesome-free-5.14.0-web.zip

See https://fontawesome.com/how-to-use/on-the-web/setup/hosting-font-awesome-yourself
2020-09-18 10:43:42 +02:00
Clément Fournier 7cbf14219a Fix some things about annotations 2020-09-18 03:14:36 +02:00
Clément Fournier 47ff7b1c8b Fix TypeTestUtil for arrays 2020-09-18 03:14:08 +02:00
Clément Fournier 8052d87727 Fix compil 2020-09-17 23:11:11 +02:00
Clément Fournier dd63a88e6a Cleanup cpp 2020-09-17 23:05:02 +02:00
Clément Fournier 1ac7e43cac Abstract some offset mapping logic
This can be shared with subdocument views later
2020-09-17 22:57:08 +02:00
Clément Fournier 16380af92d Clarify difference between getText/getTextRegion 2020-09-17 22:57:06 +02:00
Clément Fournier c88919bbc7 Cleanup 2020-09-17 22:56:45 +02:00
Clément Fournier e76a1d6eb8 Aha! fix tests of c++ 2020-09-17 22:56:02 +02:00
Clément Fournier 3ee32effda Refactor token documents
Isolate static parts
2020-09-17 22:56:01 +02:00
Clément Fournier a01f1a3574 Stop extending Reader 2020-09-17 22:55:11 +02:00
Clément Fournier a11f45e511 Cleanup spec 2020-09-17 22:54:59 +02:00
Clément Fournier 155a895a93 Move charstream 2020-09-17 22:54:20 +02:00
Clément Fournier 51170633b0 Remove fragmented doc cursor 2020-09-17 22:54:09 +02:00
Clément Fournier 3fbb8b51d7 Cleanup 2020-09-17 22:54:09 +02:00
Clément Fournier 2d9d74e1ec Cleanup exception messages 2020-09-17 22:54:08 +02:00
Clément Fournier a6e1f634f5 Add MalformedSourceException 2020-09-17 22:53:54 +02:00
Clément Fournier eaed142496 Move text file stuff into the main document package 2020-09-17 22:53:28 +02:00
Clément Fournier 9a4fc3cee6 Move factory methods to the interface 2020-09-17 22:48:43 +02:00
Clément Fournier 3481e6b699 Checkstyle 2020-09-17 22:45:23 +02:00
Clément Fournier 9843ac0b9d Fix c++ 2020-09-17 22:45:13 +02:00
Clément Fournier cd3ed7a286 Fix rebase 2020-09-17 22:44:38 +02:00
Clément Fournier b8af0dda6e Move AbstractTokenManager 2020-09-17 22:44:38 +02:00
Clément Fournier 7f65b1f910 Improve pooling stats 2020-09-17 22:44:38 +02:00
Clément Fournier 1c4b241255 Pool some strings 2020-09-17 22:44:37 +02:00
Clément Fournier 6064d16ecc Add fast paths 2020-09-17 22:44:19 +02:00
Clément Fournier 01468cd733 Reuse stringbuilders 2020-09-17 22:44:18 +02:00
Clément Fournier db70196159 Ignore MORE token accumulation 2020-09-17 22:44:07 +02:00
Clément Fournier 02684accba PICKME 2020-09-17 22:44:07 +02:00
Clément Fournier 3170fcf3c4 Optimal impl for appendMarkSuffix 2020-09-17 22:44:07 +02:00
Clément Fournier 5ab241ecc5 Use string internally
This is to profit from
compact string features,
and to make the use of
StringBuilders more
efficient.
2020-09-17 22:44:00 +02:00
Clément Fournier 1210d68640 Remove mutable char buffers 2020-09-17 22:43:53 +02:00
Clément Fournier f6b8bdc975 Replace old impl with newer one
This uses "fragmented docs". This
is less efficient when there are
a lot of escapes, but:
- it doesn't require the initial
buffer copy
- it doesn't mutate any buffer, so
Chars can be readonly all the time
- it handles escapes of arbitrary
inLen/outLen ratio and is thus
future proof
- it is much more maintainable

On the downside there is
- efficiency (this data structure is
"pointy")
- clarity of the Reader implementation
(one more state to support, ie reading
not from the input buffer but from an
escape)
2020-09-17 22:43:53 +02:00
Clément Fournier ad9d83a294 Cleanup cursor 2020-09-17 22:43:53 +02:00
Clément Fournier 5d7e57ca9b Move tests 2020-09-17 22:43:45 +02:00
Clément Fournier ea62ad7f2e Remove lazy image token
Slicing Chars will be enough
2020-09-17 22:43:44 +02:00
Clément Fournier e93e5b0a4c Move into .io package 2020-09-17 22:43:29 +02:00
Clément Fournier 6142dc3978 Rename java reader 2020-09-17 22:42:22 +02:00
Clément Fournier dc8ac96013 Fix cherry-pick 2020-09-17 22:42:21 +02:00
Clément Fournier 41d747ead2 Abstract backslash escape readers 2020-09-17 22:42:12 +02:00
Clément Fournier fd375e4bcd More opts 2020-09-17 22:42:11 +02:00
Clément Fournier b662cadcc0 Some opts 2020-09-17 22:41:40 +02:00
Clément Fournier 1f8c5b65b3 Better implementation for appendSuffix 2020-09-17 22:41:16 +02:00
Clément Fournier c088a6add5 Rename charStream methods 2020-09-17 22:41:16 +02:00
Clément Fournier 95bac5eb95 Convert CharStream to class 2020-09-17 22:41:16 +02:00
Clément Fournier d3de455ede Fix backup 2020-09-17 22:41:15 +02:00
Clément Fournier 052103ff0c Test several escapes 2020-09-17 22:41:15 +02:00
Clément Fournier 3b309ce628 Gobble multiple us 2020-09-17 22:41:15 +02:00
Clément Fournier d4be567652 Fix zero-length escapes 2020-09-17 22:41:15 +02:00
Clément Fournier 2e725038ac Checkout tests 2020-09-17 22:41:15 +02:00
Clément Fournier d3a434a933 Remove pmd core ant sources 2020-09-17 22:41:15 +02:00
Clément Fournier b779abd08b Align cpd 2020-09-17 22:41:14 +02:00
Clément Fournier b31edc52c2 Add Chars 2020-09-17 22:40:57 +02:00
Clément Fournier 0d5270a2dc Checkout javacc utils 2020-09-17 22:40:57 +02:00
Clément Fournier fb70b24485 Remove Chars reader 2020-09-17 22:37:24 +02:00
Clément Fournier 65a0387296 Rename TextDocumentImpl 2020-09-17 22:37:24 +02:00
Clément Fournier b1fb2a4251 More tests 2020-09-17 22:37:24 +02:00
Clément Fournier d690b50c07 Move text file stuff into the main document package 2020-09-17 22:37:23 +02:00
Clément Fournier 0d7d0a0fcc Make builder for sourceCode positioner 2020-09-17 22:37:12 +02:00
Clément Fournier 4f797e77f5 Simplify 2020-09-17 22:37:12 +02:00
Clément Fournier 50d6cd1b33 Use some default methods 2020-09-17 22:37:12 +02:00
Clément Fournier 5d436fb7e1 Move factory methods to the interface 2020-09-17 22:37:12 +02:00
Clément Fournier c1b1d3045a Compute checksum while reading 2020-09-17 22:37:12 +02:00
Clément Fournier b0daadf9ad Replace routine to normalize readers 2020-09-17 22:37:12 +02:00
Clément Fournier 1254015334 Doc 2020-09-17 22:37:12 +02:00
Clément Fournier 60e09880bb Use charseq instead of string 2020-09-17 22:37:12 +02:00
Clément Fournier b1ea0816f9 Doc for PmdFiles 2020-09-17 22:37:12 +02:00
Clément Fournier 581e9873df Hide TextFileContent ctor 2020-09-17 22:37:12 +02:00
Clément Fournier a1ae184463 Fix BOM not being removed from string contents 2020-09-17 22:37:12 +02:00
Clément Fournier ccc4c7953f Fix text regions on an end-of-line 2020-09-17 22:37:11 +02:00
Clément Fournier a84ae4b446 Test TextFileContent 2020-09-17 22:37:11 +02:00
Clément Fournier cc20f5febc Checkout contentEquals 2020-09-17 22:37:11 +02:00
Clément Fournier e98c4166d5 Fix rebase 2020-09-17 22:37:11 +02:00
Clément Fournier 31d88080e1 Change some exceptions 2020-09-17 22:37:11 +02:00
Clément Fournier efcfb665ad Cleanups for antlr tokenizers 2020-09-17 22:37:10 +02:00
Clément Fournier ae12b1ac24 Remove some diff 2020-09-17 22:36:36 +02:00
Clément Fournier 3982dda2b9 Share constant for unknown filename 2020-09-17 22:36:36 +02:00
Clément Fournier ede5206f72 Remove JSP sort functions in tests
Aaa
2020-09-17 22:36:35 +02:00
Clément Fournier b0040c54c6 Fix apex tests 2020-09-17 22:36:18 +02:00
Clément Fournier bae2cd92ea Test Chars 2020-09-17 22:36:18 +02:00
Clément Fournier 80c8968a27 Cleanup Apex comment handling 2020-09-17 22:36:18 +02:00
Clément Fournier 316efda06f Fix some things 2020-09-17 22:36:18 +02:00
Clément Fournier 52862997f6 Fix cpd compat 2020-09-17 22:36:18 +02:00
Clément Fournier f4d6f68cab Checkstyle 2020-09-17 22:36:18 +02:00
Clément Fournier 427e6eb039 Add cpd compat text file 2020-09-17 22:36:18 +02:00
Clément Fournier b0c4e33b4b Cleanup short name logic 2020-09-17 22:36:18 +02:00
Clément Fournier cdfa4b0730 Make TextFile#getLanguageVersion mandatory 2020-09-17 22:36:17 +02:00
Clément Fournier 222a548a6d Update listeners 2020-09-17 22:35:18 +02:00
Clément Fournier dd4eac1ddb Doc for FileSystemCloseable 2020-09-17 22:35:06 +02:00
Clément Fournier 9194680c63 Checkstyle + pmd 2020-09-17 22:35:06 +02:00
Clément Fournier 875320fb4b Fix tests 2020-09-17 22:35:06 +02:00
Clément Fournier cec1207f4c Fix Node attributes 2020-09-17 22:35:06 +02:00
Clément Fournier 45f78ac8af Reorganise methods that fetch files 2020-09-17 22:35:05 +02:00
Clément Fournier 266ad0ddb2 Adapt to analysis listeners after rebase 2020-09-17 22:34:48 +02:00
Clément Fournier 90c1e50abe Make text files know their language version 2020-09-17 22:33:25 +02:00
Clément Fournier b14474d0be Use regionMatches for Chars::equals 2020-09-17 22:33:25 +02:00
Clément Fournier d8f4552153 Cleanups 2020-09-17 22:33:24 +02:00
Clément Fournier 99ea61df06 Fix antlr token 2020-09-17 22:33:18 +02:00
Clément Fournier 5c58effe13 Fix rebase 2020-09-17 22:33:17 +02:00
Clément Fournier e755608236 Remove stamps 2020-09-17 22:33:17 +02:00
Clément Fournier 674583a4b1 Preserve line endings 2020-09-17 22:33:17 +02:00
Clément Fournier 3f1acd9379 Replace some other stuff 2020-09-17 22:33:16 +02:00
Clément Fournier 13879c9b94 Make RootNode have a text document 2020-09-17 22:33:00 +02:00
Clément Fournier 9b735e75df Cleanup kotlin utils 2020-09-17 22:32:37 +02:00
Clément Fournier 15da7ab6fc Relax contract of Node::getReportLocation 2020-09-17 22:32:26 +02:00
Clément Fournier d8e53aaafd Replace some usages of beginLine/beginColumn 2020-09-17 22:32:25 +02:00
Clément Fournier b84335d297 Refactor java comments 2020-09-17 22:32:08 +02:00
Clément Fournier 9c4b3f79f2 More doc for Chars 2020-09-17 22:31:12 +02:00
Clément Fournier 959b70fabd Cleanup javascript builder 2020-09-17 22:31:12 +02:00
Clément Fournier 8f2bda4934 Make SourceCodePositioner handle single \r as delimiter 2020-09-17 22:31:12 +02:00
Clément Fournier 37aae9d893 Dont create a String in TokenDocument 2020-09-17 22:31:12 +02:00
Clément Fournier 027800b983 add more tests 2020-09-17 22:31:12 +02:00
Clément Fournier a3d70b78ec Cleanup Region creation api 2020-09-17 22:31:12 +02:00
Clément Fournier 352afc8e85 Cleanup some more 2020-09-17 22:31:11 +02:00
Clément Fournier ca5e56050e Improve Chars API 2020-09-17 22:31:11 +02:00
Clément Fournier 81b8fd5e06 Fix text tests 2020-09-17 22:31:11 +02:00
Clément Fournier 3888443b7e Move other jjtree specific methods 2020-09-17 22:31:11 +02:00
Clément Fournier 8f8c496282 Fix apex tests 2020-09-17 22:31:11 +02:00
Clément Fournier 7ac1e1478e Fix tests 2020-09-17 22:31:10 +02:00
Clément Fournier 8df0f9c1e4 Make getReportLocation abstract 2020-09-17 22:30:50 +02:00
Clément Fournier 578519f692 Remove testing only set coord from AbstractNode 2020-09-17 22:30:48 +02:00
Clément Fournier 48e34c2372 Make Node and GenericToken Reportables 2020-09-17 22:30:12 +02:00
Clément Fournier 3db4bcdb46 Remove CharBufferReader 2020-09-17 22:30:01 +02:00
Clément Fournier 9b996a892f Make TextRegion a class 2020-09-17 22:30:01 +02:00
Clément Fournier 7d9002a420 Make some methods default 2020-09-17 22:30:01 +02:00
Clément Fournier af72f064dc Checkout latest version 2020-09-17 22:30:01 +02:00
Clément Fournier ac52979638 Remove string pool 2020-09-17 22:30:01 +02:00
Clément Fournier 047a9f4759 Use Chars instead 2020-09-17 22:30:01 +02:00
Clément Fournier e1d60c9d65 Make char buffer reader 2020-09-17 22:30:01 +02:00
Clément Fournier 9cf36d952a Doc 2020-09-17 22:30:01 +02:00
Clément Fournier fdc197c032 Pool strings document-wide 2020-09-17 22:30:01 +02:00
Clément Fournier 1312fb739b Add line range region 2020-09-17 22:30:00 +02:00
Clément Fournier 987d806655 Make JavaccToken implement Reportable 2020-09-17 22:30:00 +02:00
Clément Fournier 8e3d176a71 Fix rebase 2020-09-17 22:30:00 +02:00
Clément Fournier 0674d5b9ac Fix node location 2020-09-17 22:30:00 +02:00
Clément Fournier dfe5710aee Fix tests of SCPositioner 2020-09-17 22:30:00 +02:00
Clément Fournier 2356f2f69d Use TextRegion in tokens 2020-09-17 22:29:59 +02:00
Clément Fournier 822a98e045 REVERT ME: remove edition logic 2020-09-17 22:29:31 +02:00
Clément Fournier 5090c9ae27 Cleanup 2020-09-17 22:29:31 +02:00
Clément Fournier 9dad112fb8 Replace TextRegion.WithLineInfo with FilePosition 2020-09-17 22:29:31 +02:00
Clément Fournier f030ba5d8b Rename TextFile 2020-09-17 22:29:31 +02:00
Clément Fournier 1d070b44ad Use array in source code positioner 2020-09-17 22:29:31 +02:00
Clément Fournier 894574515a Add invalid region exception 2020-09-17 22:29:29 +02:00
Clément Fournier 3a08e7e4d2 Add union operation 2020-09-17 22:29:01 +02:00
Clément Fournier 9f19849bea Add file naming logic 2020-09-17 22:29:01 +02:00
Clément Fournier df96d6fbee Use a commit handler 2020-09-17 22:29:01 +02:00
Clément Fournier ec47c13302 Test external modifications 2020-09-17 22:29:01 +02:00
Clément Fournier 9ca01cdb69 Add close semantics
Remove data source adapter
2020-09-17 22:29:01 +02:00
Clément Fournier b958b129e4 Doc 2020-09-17 22:29:00 +02:00
Clément Fournier 709b19710c Remove custom annots 2020-09-17 22:29:00 +02:00
Clément Fournier 3b96e9e3ff Add data source adapter 2020-09-17 22:29:00 +02:00
Clément Fournier b4d72e6ee7 Remaining tests for TextRegion 2020-09-17 22:29:00 +02:00
Clément Fournier 4584071fc4 Create SourceCodePositioner lazily 2020-09-17 22:29:00 +02:00
Clément Fournier 97e891b84d Doc stringUtil addition 2020-09-17 22:29:00 +02:00
Clément Fournier 3a7e0c0e95 Catch other case of overlap 2020-09-17 22:29:00 +02:00
Clément Fournier 2b62c47f08 Document source code positioner 2020-09-17 22:29:00 +02:00
Clément Fournier 28a1ce05bd Test text region 2020-09-17 22:29:00 +02:00
Clément Fournier f4458e5de9 Rename TextFile 2020-09-17 22:29:00 +02:00
Clément Fournier 072ac21e08 Detect overlap wip 2020-09-17 22:29:00 +02:00
Clément Fournier 52927aa777 Specification 2020-09-17 22:29:00 +02:00
Clément Fournier 44c9140f6c Remove create region by line+col 2020-09-17 22:29:00 +02:00
Clément Fournier 8174e464a2 Extract buffering logic 2020-09-17 22:29:00 +02:00
Clément Fournier 6eb44a7f1b Use TextEditor instead 2020-09-17 22:29:00 +02:00
Clément Fournier e89e35c261 Remove insert from line+col 2020-09-17 22:28:59 +02:00
Clément Fournier 7d880a0290 Test regions 2020-09-17 22:28:59 +02:00
Clément Fournier add6cf85b5 Checkstyle 2020-09-17 22:28:59 +02:00
Clément Fournier a79f984390 Rename to avoid conflict with dom API 2020-09-17 22:28:59 +02:00
Clément Fournier b127808c02 Prefer offset-based repr to lineCol 2020-09-17 22:28:59 +02:00
Clément Fournier 5e48926600 Split impl into two classes 2020-09-17 22:28:59 +02:00
Clément Fournier a733da4dcf Cleanup 2020-09-17 22:28:59 +02:00
Clément Fournier 1d7f964126 Remove text operations 2020-09-17 22:28:59 +02:00
Clément Fournier d5d30dcae7 Always check bounds of regions 2020-09-17 22:28:59 +02:00
Clément Fournier 1125fb107c Fix closing 2020-09-17 22:28:59 +02:00
Clément Fournier 770543907e Cleanup api 2020-09-17 22:28:59 +02:00
Clément Fournier 2885a457dc Cleanup tests 2020-09-17 22:28:59 +02:00
Clément Fournier d10b2b6e39 Improve document logic 2020-09-17 22:28:59 +02:00
Clément Fournier 271121c080 Improve SourceCodePositioner 2020-09-17 22:28:59 +02:00
Clément Fournier dfeba3814d Fix TypeResTestRule 2020-09-17 17:24:43 +02:00
Clément Fournier 1cf3f358d2 Merge branch 'java-grammar' into analysis-listener 2020-09-17 16:49:37 +02:00
Clément Fournier 1ab758468d Remove outdated TODO 2020-09-17 16:39:20 +02:00
Andreas Dangel 9329625852 Merge branch 'pmd/7.0.x' into java-grammar 2020-09-17 15:18:52 +02:00
Andreas Dangel 44c065e5b2 Merge branch 'master' into pmd/7.0.x 2020-09-17 15:16:54 +02:00
Andreas Dangel e81482d395 Merge branch 'pr-2778' into java-grammar
[java] Use ignore annotations for rule tests #2778
2020-09-17 14:54:12 +02:00
Andreas Dangel 4820f0c041 Merge branch 'pr-2777' into java-grammar
[java] Implement constant values #2777
2020-09-17 14:42:00 +02:00
Andreas Dangel 875ae1b544 [doc] Use green theme, adjust coloring to match PMD Logo green 2020-09-17 11:13:35 +02:00
Andreas Dangel 4012bb077e [doc] Add new logo to README.md
Note: this references the pmd/7.0.x branch and needs to be
switched to master, once PMD 7 is released.
2020-09-17 11:02:02 +02:00
Andreas Dangel 43e6bbe428 [doc] Add new logo in the documentation, remove old logo images 2020-09-17 10:57:22 +02:00
Clément Fournier 5127c5812e Consider class constants 2020-09-15 17:05:12 +02:00
Clément Fournier 7230224e16 Draft of AST annotation 2020-09-15 16:27:44 +02:00
Clément Fournier d829cbe8ea Merge branch 'java-const-values' into typeres-fwd 2020-09-15 16:13:32 +02:00
Clément Fournier 6735b61c8f Remove apex multifile things 2020-09-14 18:13:42 +02:00
Clément Fournier 69a067e9ad Merge branch 'java-grammar' into analysis-listener 2020-09-14 18:03:50 +02:00
Clément Fournier fff32f2b07 Call start and end 2020-09-14 15:29:40 +02:00
Clément Fournier ad2eafe50d Fix compil 2020-09-14 15:22:40 +02:00
Clément Fournier 7d242718bd Merge branch '7.0.x' into analysis-listener 2020-09-14 15:09:54 +02:00
Clément Fournier 3a5660e6e3 Merge branch 'java-grammar' into use-ignore-annotations-java-grammar 2020-09-13 22:27:45 +02:00
Clément Fournier f81ec66b02 Implement annot attributes 2020-09-13 19:24:42 +02:00
Clément Fournier c35f86468e Reduce api of SymAnnot 2020-09-13 19:16:14 +02:00
Clément Fournier 75264db6e8 Test equality routines 2020-09-13 18:23:40 +02:00
Clément Fournier 9be39b07b5 Cleanup array logic 2020-09-13 13:37:40 +02:00
Clément Fournier 9de36f9a2e Cleanup default value access 2020-09-13 13:37:40 +02:00
Clément Fournier 207c1b4859 Add annots to all members 2020-09-13 13:37:40 +02:00
Clément Fournier 82c31f4908 Doc 2020-09-13 13:37:40 +02:00
Clément Fournier 9e2c9da2a6 Fix isExhaustiveEnumSwitch 2020-09-13 13:37:40 +02:00
Clément Fournier 73227d4309 Finish annotations 2020-09-13 13:37:40 +02:00
Clément Fournier 81f5e75965 Add interface for annots 2020-09-13 13:37:40 +02:00
Clément Fournier d8f36ed0be Support enums properly 2020-09-13 13:37:40 +02:00
Clément Fournier 0480655a29 Tests for enums 2020-09-13 13:37:40 +02:00
Clément Fournier 4ee8d524e2 Test symbolic values 2020-09-13 13:37:40 +02:00
Clément Fournier 45f45e5c55 Remove info about parameters 2020-09-13 13:37:40 +02:00
Clément Fournier 79e35b9c5b Add annotation default values 2020-09-13 13:37:40 +02:00
Clément Fournier c8737e24ac Add more info to reflected formal params 2020-09-13 13:37:40 +02:00
Andreas Dangel 08d3c0eec9 Merge branch 'pmd/7.0.x' into java-grammar 2020-09-13 11:53:38 +02:00
Andreas Dangel 35481bda4b Merge branch 'pr-2753' into pmd/7.0.x
[cpd] Remove some generated source files we don't use #2753
2020-09-13 11:41:58 +02:00
Andreas Dangel 47ab1f34a4 Delete old antlr4 package-infos 2020-09-13 11:41:26 +02:00
Andreas Dangel 4732164a45 Merge branch 'pmd/7.0.x' into pr-2753 2020-09-13 11:40:23 +02:00
Andreas Dangel 3caa6dd0ba Merge branch 'master' into pmd/7.0.x 2020-09-13 11:39:37 +02:00
Andreas Dangel da4d3392ee Merge branch 'pmd/7.0.x' into java-grammar 2020-09-13 10:05:56 +02:00
Andreas Dangel 9cfe485888 Merge branch 'pr-2746' into pmd/7.0.x
[core, ...] Finish generic visitors #2746

Fixes #880
2020-09-13 09:49:14 +02:00
Andreas Dangel 5bcdee24f5 Fix PLSQL Tests due to different rule violation sorting 2020-09-13 09:47:00 +02:00
Andreas Dangel 7605a669a7 Merge branch 'pr-2742' into pmd/7.0.x
[core] Remove deprecated things about rules #2742
2020-09-13 09:22:02 +02:00
Andreas Dangel 4772817171 Merge branch 'master' into pmd/7.0.x 2020-09-13 09:19:52 +02:00
Clément Fournier 7a63ec3bd4 Fix java tests 2020-09-13 02:18:17 +02:00
Clément Fournier 055aeb3d2f Merge branch '7.0.x' into java-grammar 2020-09-13 01:55:23 +02:00
Clément Fournier f5e4a0f81c Merge branch 'master' into 7.0.x 2020-09-13 01:49:45 +02:00
Clément Fournier a8ad1ac4f6 Remove RuleViolationComparator 2020-09-12 14:39:01 +02:00
Clément Fournier d69e27c5b7 Merge branch '7.0.x' into remove-more-deprecated-things 2020-09-12 14:35:22 +02:00
Clément Fournier 57c25685b6 Merge branch 'master' into 7.0.x 2020-09-12 14:35:06 +02:00
Clément Fournier 05e3baf4cf Unignore StringToString 2020-09-12 14:28:04 +02:00
Clément Fournier 1a616988d3 Use ignore annotations for rule tests 2020-09-12 14:27:36 +02:00
Clément Fournier ea5b18fb25 Checkstyle 2020-09-12 14:25:18 +02:00
Clément Fournier 2da4d4eac8 Merge branch 'java-grammar' into java-const-values 2020-09-12 14:02:58 +02:00
Clément Fournier 82510b71f2 Fix tests
Make the symbol resolver explicitly reject
types that have no canonical name. Previously
this was "undefined behavior", meaning, it
could be returning a symbol whose properties
were inconsistent. For example anon classes had
a canonical name...
2020-09-12 04:12:47 +02:00
Clément Fournier cfb3a37261 Merge branch '7.0.x' into java-grammar 2020-09-12 02:59:13 +02:00
Clément Fournier 53999c2d96 Merge branch 'master' into 7.0.x 2020-09-12 02:50:54 +02:00
Clément Fournier 53cf81220f Merge branch 'typeres-fixes' into java-grammar 2020-09-12 02:41:57 +02:00
Clément Fournier 88db75aef5 Fix record formal param reference
The assert was too specific
2020-09-12 02:41:22 +02:00
Clément Fournier a1dde27d7f Make sure lambda and mref fallback in invoc context
This fixes fetchCascaded
2020-09-12 02:35:43 +02:00
Clément Fournier 1001c4a451 Fix tests 2020-09-12 02:26:09 +02:00
Clément Fournier 9cf91bad0b Fix #520: suppress warnings with const expr 2020-09-11 16:35:32 +02:00
Clément Fournier 0c8851a3c1 Implement references to constant fields 2020-09-11 16:26:20 +02:00
Clément Fournier a582504c14 Implement constant expressions 2020-09-11 16:15:17 +02:00
Andreas Dangel 8751271826 Merge branch 'pr-2689' into java-grammar
[java] New type resolution #2689
2020-09-11 15:25:26 +02:00
Andreas Dangel c2e51e4b98 Add TODOs comments, add @DeprecatedUntil700 2020-09-11 15:23:36 +02:00
Clément Fournier 0276320abf Make RuleContext scoped to a single rule 2020-09-07 21:36:30 +02:00
Clément Fournier e72ecc0675 Merge branch 'remove-more-deprecated-things' into analysis-listener 2020-09-06 22:19:40 +02:00
Clément Fournier 507445ecd8 Merge branch '7.0.x' into remove-more-deprecated-things 2020-09-06 22:19:20 +02:00
Clément Fournier 1f473fe4f1 Merge branch '7.0.x' into java-grammar 2020-09-06 19:00:50 +02:00
Clément Fournier 7be569fa8b Merge branch 'master' into 7.0.x 2020-09-06 18:57:21 +02:00
Clément Fournier 6253b696ea Make it clearer when we're requesting a type mirror for side effects
(But implicitly, every getTypeMirror call may trigger type
resolution, it's the entire point)

Also uniformize the exception, it's an assert
2020-09-04 15:32:29 +02:00
Clément Fournier 656a973fb5 Merge branch 'remove-more-deprecated-things' into analysis-listener 2020-09-01 18:32:29 +02:00
Clément Fournier 2e5de16cce Merge branch '7.0.x' into remove-more-deprecated-things 2020-09-01 18:32:14 +02:00
Clément Fournier 05e839139e Merge branch 'test-cleanups' into 7.0.x 2020-09-01 16:58:38 +02:00
Clément Fournier 0d7e60e9e0 Cleanup a JSP test
This is to remove the sorting routines,
which depend on the image
2020-09-01 16:57:51 +02:00
Clément Fournier a4d486f7d2 Improve ant test failure messages 2020-09-01 16:53:55 +02:00
Andreas Dangel bb71d6f1ad Merge branch 'pmd/7.0.x' into java-grammar 2020-08-31 19:09:35 +02:00
Andreas Dangel 2827a8ab73 Fix reference to deleted rule DataflowAnomalyAnalysis 2020-08-31 19:04:20 +02:00
Andreas Dangel bab4ec4489 Merge branch 'master' into pmd/7.0.x 2020-08-31 18:50:18 +02:00
Clément Fournier 8695c495ea Fix exception bubbling 2020-08-31 09:55:11 +02:00
Clément Fournier d3d7495655 Fix tests 2020-08-31 09:21:58 +02:00
Clément Fournier 6671154d80 Checkstyle + pmd 2020-08-31 09:08:50 +02:00
Clément Fournier c331226022 Fix rebase 2020-08-31 08:37:41 +02:00
Clément Fournier 260bb57980 Cleanup threadlocals 2020-08-31 08:37:03 +02:00
Clément Fournier 3f00548e5f Fix some things 2020-08-31 08:37:03 +02:00
Clément Fournier 76d81e6979 Identify things to move to reporting package 2020-08-31 08:37:03 +02:00
Clément Fournier f0f51ab720 Some tests 2020-08-31 08:37:02 +02:00
Clément Fournier 2979754fbd Cleanup 2020-08-31 08:35:21 +02:00
Clément Fournier 6e36a20dd1 Better error handling
Checkstyle + pmd
2020-08-31 08:35:07 +02:00
Clément Fournier da842dd1a5 Improve exception handling 2020-08-31 08:34:52 +02:00
Clément Fournier df9f53afa9 Cleanup 2020-08-31 08:34:25 +02:00
Clément Fournier f942076b2a Get rid of PMDException 2020-08-31 08:34:25 +02:00
Clément Fournier 7af8ff4527 Remove isThrowingExceptions from RuleContext
Not useful outside of unit tests
2020-08-31 08:34:25 +02:00
Clément Fournier 97f90cc3fc Make PMD a utility class 2020-08-31 08:34:25 +02:00
Clément Fournier 0a5c0bc015 Doc 2020-08-31 08:34:25 +02:00
Clément Fournier c7d88ec506 Some sugar 2020-08-31 08:34:25 +02:00
Clément Fournier 0d881b7271 Hide rulesets a bit 2020-08-31 08:34:24 +02:00
Clément Fournier 2abb9a3b9c Checkstyle + pmd 2020-08-31 08:34:14 +02:00
Clément Fournier 025438b4c1 Rename listeners 2020-08-31 08:34:14 +02:00
Clément Fournier 094ce26227 Make nodes have access to file name 2020-08-31 08:34:14 +02:00
Clément Fournier e7e6793eb3 Make nodes have access to their language version 2020-08-31 08:34:14 +02:00
Clément Fournier c66b3e8fa9 Remove report listeners 2020-08-31 08:34:14 +02:00
Clément Fournier 387555b4a1 Wrap renderer inside listener
Fix tests
2020-08-31 08:34:14 +02:00
Clément Fournier dafe49f84a Analysis listener
Big cleanup of RuleContext, RuleViolationFactory API

Somewhat depends on text documents (FileLocation actually)
2020-08-31 08:34:13 +02:00
Clément Fournier 08b19dbcdd Simplify source code processor, change Parser
Remove some stuff with parser options

Get rid of SourceCodeProcessor

Seal processor hierarchy
2020-08-31 08:34:13 +02:00
Clément Fournier 95048b061a Merge branch '7.0.x' into remove-more-deprecated-things 2020-08-30 21:36:04 +02:00
Clément Fournier cbc81229ce Update doc 2020-08-30 19:53:52 +02:00
Clément Fournier 50d39b39e6 Same for Lua 2020-08-30 19:01:07 +02:00
Clément Fournier 9ef8c151e2 Same for kotlin 2020-08-30 18:59:48 +02:00
Clément Fournier 1474ed6e79 Same for C# 2020-08-30 18:54:42 +02:00
Clément Fournier 8620080b92 Same for Golang 2020-08-30 18:52:47 +02:00
Clément Fournier 40443326d3 Add cleanup phase for antlr CPD languages
This removes the parser and other things we don't need in the API

Currently only pmd-dart has been adapted
2020-08-30 18:50:01 +02:00
Clément Fournier ca40b6075e Merge branch 'java-grammar' into typeres-jtypes 2020-08-30 17:16:58 +02:00
Clément Fournier 735dd3c0a6 Merge branch '7.0.x' into java-grammar 2020-08-30 17:16:43 +02:00
Clément Fournier ae26c29542 Merge branch 'master' into 7.0.x 2020-08-30 17:16:28 +02:00
Clément Fournier 356c6e0d64 Make violation suppress regex a Pattern property 2020-08-28 18:14:43 +02:00
Clément Fournier 211ef2da0f Remove useless method 2020-08-28 18:14:43 +02:00
Clément Fournier eb1491d400 REVERT ME Revert changes to test framework
This can be merge later
2020-08-28 18:14:43 +02:00
Clément Fournier eacc33d575 Fix test schema 2020-08-28 18:14:43 +02:00
Clément Fournier b344875247 Update rule doc generator 2020-08-28 18:14:43 +02:00
Clément Fournier e63129e797 Fix tests, add isXPathAvailable 2020-08-28 18:14:43 +02:00
Clément Fournier 02e1762fe5 Equals problem with Regex 2020-08-28 18:14:43 +02:00
Clément Fournier 2434482774 Remove duplicated properties 2020-08-28 18:14:43 +02:00
Clément Fournier fe006d407d Change default delimiter to comma 2020-08-28 18:14:43 +02:00
Clément Fournier 5e323127f2 Fix xml parser options 2020-08-28 18:14:43 +02:00
Clément Fournier 3fb4b7d847 Make PropertyDescriptor a class 2020-08-28 18:14:43 +02:00
Clément Fournier 29d535f0a0 Checkstyle 2020-08-28 18:14:43 +02:00
Clément Fournier 8a8ea6860f Fix pmd violations 2020-08-28 18:14:43 +02:00
Clément Fournier 8f3d52ab1c Remove some useless methods 2020-08-28 18:14:43 +02:00
Clément Fournier 64a90fe351 Fix rebase 2020-08-28 18:14:43 +02:00
Clément Fournier d4ac25deb2 Refactor the ruleset factory to use the message handler 2020-08-28 18:14:43 +02:00
Clément Fournier 84f96caeb5 PMD + CStyle violations 2020-08-28 18:14:43 +02:00
Clément Fournier 3212845856 Fix tests 2020-08-28 18:14:43 +02:00
Clément Fournier d0056bd4f1 Make error message naming scheme systematic 2020-08-28 18:14:43 +02:00
Clément Fournier 7a57d9f404 Simplify enum property handling 2020-08-28 18:14:43 +02:00
Clément Fournier e2b4be51f2 Improve rule factory 2020-08-28 18:14:42 +02:00
Clément Fournier 54c7708de5 Cleanup error handling 2020-08-28 18:14:19 +02:00
Clément Fournier 7e525d9ad8 Make constraints go on the xml mapper 2020-08-28 18:14:19 +02:00
Clément Fournier 72756c67d7 Improve usability of propertyTypeId 2020-08-28 18:14:19 +02:00
Clément Fournier 0e7865b547 Generalize collection buider to an arbitrary collector 2020-08-28 18:14:19 +02:00
Clément Fournier 3afd852203 Remove some changes 2020-08-28 18:14:19 +02:00
Clément Fournier cd41cbeaf1 Fix rebase 2020-08-28 18:14:19 +02:00
Clément Fournier 5319a2272d Fix rebase 2020-08-28 18:14:19 +02:00
Clément Fournier b3824b2a3e Doc 2020-08-28 18:14:19 +02:00
Clément Fournier aa6da7fd18 Fix tests 2020-08-28 18:14:19 +02:00
Clément Fournier 74d915b3db Improve error messages 2020-08-28 18:14:19 +02:00
Clément Fournier ce9a73b09f Rename XmlSyntax 2020-08-28 18:14:18 +02:00
Clément Fournier e909edffd2 Improve xml errors 2020-08-28 18:14:18 +02:00
Clément Fournier 24814daf34 Doc 2020-08-28 18:14:18 +02:00
Clément Fournier b7deb3b30e Rename internal package 2020-08-28 18:14:18 +02:00
Clément Fournier b59b3ad2bf Remove old property builders 2020-08-28 18:14:18 +02:00
Clément Fournier 66d437b788 Cleanup API 2020-08-28 18:14:18 +02:00
Clément Fournier 87a3bed802 Remove last remnants of old implementations 2020-08-28 18:14:18 +02:00
Clément Fournier 99cb4bfd6f Turn violation suppression descriptors into Optional 2020-08-28 18:14:18 +02:00
Clément Fournier 1f28da5bf4 Add optional syntax 2020-08-28 18:14:18 +02:00
Clément Fournier 17d9f6e39d Remove some stuff 2020-08-28 18:14:18 +02:00
Clément Fournier a97efaf975 Remove external builder 2020-08-28 18:14:18 +02:00
Clément Fournier 960dd15797 Remove some string properties 2020-08-28 18:14:18 +02:00
Clément Fournier c5d5844c8d Update boolean property 2020-08-28 18:14:18 +02:00
Clément Fournier 46c0717c1a Simplify AvoidDuplicateLiteralsRule 2020-08-28 18:14:18 +02:00
Clément Fournier a9efe39944 Remove multi value properties 2020-08-28 18:14:18 +02:00
Clément Fournier b70f79bc95 Remove numeric properties 2020-08-28 18:14:18 +02:00
Clément Fournier f13f250e92 Remove more stuff 2020-08-28 18:14:17 +02:00
Clément Fournier 453129a438 Remove variable naming conventions rule 2020-08-28 18:14:05 +02:00
Clément Fournier 6c3a3b1c5e Remove attribute values from property descriptor 2020-08-28 18:14:05 +02:00
Clément Fournier af40bad2a6 Delete more property types 2020-08-28 18:14:05 +02:00
Clément Fournier 007fe9113a Remove unsupported tests 2020-08-28 18:14:05 +02:00
Clément Fournier 95c40f671b Fix ruleset writer 2020-08-28 18:14:05 +02:00
Clément Fournier 89837b0fc5 Use type id instead of isdefinedExternally 2020-08-28 18:14:05 +02:00
Clément Fournier 6d41176e41 Use XML syntax to parse 2020-08-28 18:14:05 +02:00
Clément Fournier 1de32ef047 Better doc support 2020-08-28 18:14:05 +02:00
Clément Fournier c169e50121 Add examples 2020-08-28 18:14:05 +02:00
Clément Fournier 4f8b79d919 Add syntax set 2020-08-28 18:14:05 +02:00
Clément Fournier bb4c7b7a45 Remove enum properties 2020-08-28 18:14:05 +02:00
Clément Fournier f5080d3d0f Port ecmascript parser options 2020-08-28 18:14:05 +02:00
Clément Fournier ceb856d930 Remove package properties 2020-08-28 18:14:05 +02:00
Clément Fournier f01eb4cec7 Add value syntax 2020-08-28 18:14:05 +02:00
Clément Fournier a788e7e40c Remove some property types 2020-08-28 18:14:05 +02:00
Clément Fournier b3b5ecc63b Cleanup ValueParser 2020-08-28 18:14:05 +02:00
Clément Fournier 714563cffd Remove transitional classes of property framework 2020-08-28 18:14:05 +02:00
Clément Fournier cb072600b6 Update some more usages 2020-08-28 18:14:05 +02:00
Clément Fournier 5bb0079ff9 Fix tree dump test 2020-08-28 17:31:57 +02:00
Clément Fournier ba52629923 Tone down the stress test 2020-08-28 17:30:55 +02:00
Clément Fournier 5f94444ce1 Fix void.class 2020-08-28 17:14:15 +02:00
Clément Fournier 3592617934 Definitely fix ordering problems with anon classes 2020-08-28 17:07:24 +02:00
Clément Fournier 3a3c99c469 Merge branch 'java-grammar' into typeres-jtypes 2020-08-28 15:08:28 +02:00
Clément Fournier 3f08368508 Merge branch '7.0.x' into java-grammar 2020-08-28 15:05:11 +02:00
Clément Fournier 7384fd6fb2 Merge branch 'master' into 7.0.x 2020-08-28 14:58:10 +02:00
Clément Fournier e851403482 Fix compilation 2020-08-28 14:49:49 +02:00
Clément Fournier 347f71d201 Checkstyle 2020-08-28 13:38:29 +02:00
Clément Fournier 4086e9ccfb Guard against multiple processing 2020-08-28 13:35:36 +02:00
Clément Fournier 7a39608ba2 Fix tests 2020-08-28 13:28:32 +02:00
Clément Fournier 78b0b283bf Fix doc 2020-08-28 13:23:06 +02:00
Clément Fournier e3349eb885 Test qualified super call 2020-08-28 13:12:58 +02:00
Clément Fournier e4da07f9fb Make symbol tables disambiguate types
This fixes the remaining problems with
scoping in qualified anon classes.
2020-08-28 12:50:29 +02:00
Clément Fournier 0ac34e8f48 Fix array initializer assignment context 2020-08-28 12:06:30 +02:00
Clément Fournier 78175c38b2 Handle methods declared in anon classes 2020-08-27 04:19:02 +02:00
Clément Fournier d898190fc9 Update todos 2020-08-27 04:03:55 +02:00
Clément Fournier 5d84f3bcdc Fix unit tests 2020-08-27 03:24:47 +02:00
Clément Fournier 293054db22 Unit tests for arrays 2020-08-27 02:24:01 +02:00
Clément Fournier 561cbdd0f9 Fix another test 2020-08-27 02:18:07 +02:00
Clément Fournier bd8841c446 Fix bug with capture of array access 2020-08-27 02:04:43 +02:00
Clément Fournier 67887bdadf Add unit tests for ivars + infctx 2020-08-26 23:10:30 +02:00
Clément Fournier 2b2f691c37 Merge branch 'java-grammar' into typeres-jtypes 2020-08-26 20:02:27 +02:00
Clément Fournier acd17c6d1a Merge branch '7.0.x' into java-grammar 2020-08-26 20:02:16 +02:00
Clément Fournier 72555a9476 Checkout OptionalBool 2020-08-26 20:01:44 +02:00
Clément Fournier bc1ac5ebce Merge branch 'java-grammar' into typeres-jtypes 2020-08-26 19:59:17 +02:00
Clément Fournier a0c685b9d4 Merge branch '7.0.x' into java-grammar 2020-08-26 19:59:00 +02:00
Clément Fournier 997e3acf1e Extract improvements to core utils from java-grammar 2020-08-26 19:58:46 +02:00
Clément Fournier 2403735507 Add unreachable code helper 2020-08-26 19:56:15 +02:00
Clément Fournier 709f33f331 Rename getGenericSignature 2020-08-26 19:56:15 +02:00
Clément Fournier 271fc66e0d Bump to asm 9 2020-08-26 19:56:15 +02:00
Clément Fournier dca58f0ab7 Replace char[] by string in SignatureParser 2020-08-26 19:56:10 +02:00
Clément Fournier 827782a089 Fix python referring to old task 2020-08-26 19:30:07 +02:00
Clément Fournier c1eb426142 Use camelCase name for PLSQL 2020-08-26 19:25:21 +02:00
Clément Fournier 5015383fc6 Partially revert 2020-08-26 19:10:32 +02:00
Clément Fournier dd303a0903 Remove default implementation 2020-08-26 19:10:32 +02:00
Clément Fournier 36f4469ac9 Checkstyle 2020-08-26 19:10:32 +02:00
Clément Fournier c5f8d16caf Cleanup wrapper script 2020-08-26 19:10:32 +02:00
Clément Fournier d3d3d637e7 Cleanup some usages of jjtAccept 2020-08-26 19:10:32 +02:00
Clément Fournier 9fb4bfd1d4 Adapt PLSQL module 2020-08-26 19:10:32 +02:00
Clément Fournier 6c3a42f78c Fix base visitor classes 2020-08-26 19:10:32 +02:00
Clément Fournier 1cf88f6aad Same for visualforce 2020-08-26 19:10:32 +02:00
Clément Fournier eed8a1609a Same for VM module 2020-08-26 19:10:32 +02:00
Clément Fournier 6ccd620309 Add dependency on kotest 2020-08-26 19:10:32 +02:00
Clément Fournier 80e9f48ed9 Add a hook for nodes to callback if the visitor is incorrect 2020-08-26 19:10:32 +02:00
Clément Fournier 9ed0da4ed5 Make modelica visitor generic 2020-08-26 19:10:32 +02:00
Clément Fournier bceee2b54f Disallow overriding language in rule reference 2020-08-25 16:13:22 +02:00
Clément Fournier 7922fb7564 Move MockRule into test sources 2020-08-25 16:13:20 +02:00
Clément Fournier d9de4a5f4e Remove AbstractRuleViolationFactory
Since we have a compat branch for the designer, this
doesn't need to exist
2020-08-25 15:25:38 +02:00
Clément Fournier 5f8e5fc1ff Remove ImmutableLanguage 2020-08-25 15:23:22 +02:00
Clément Fournier 7a456e5b93 Remove ruleContext attributes
Refs #2676

Was forgotten in #2672
2020-08-25 15:18:19 +02:00
Clément Fournier ca9f5ff160 Merge branch 'java-grammar' into typeres-jtypes 2020-08-25 14:56:44 +02:00
Clément Fournier 7b4d318567 Merge branch '7.0.x' into java-grammar 2020-08-25 14:56:16 +02:00
Clément Fournier 285e7f2e94 Merge branch 'master' into 7.0.x 2020-08-25 14:53:48 +02:00
Clément Fournier 3484064adf Fix tests 2020-08-24 06:33:13 +02:00
Clément Fournier d5f296c0b0 Cleanup TypeVarImpl 2020-08-24 05:25:33 +02:00
Clément Fournier 0efba4ce18 Make test file not depend on internal api of core 2020-08-24 03:37:33 +02:00
Clément Fournier a55225b8d8 Fix some things not being ground 2020-08-24 03:29:21 +02:00
Clément Fournier 2069df4f95 Avoid mutating site in specificity checks 2020-08-24 02:59:14 +02:00
Clément Fournier 02feaa22ff Fix context fetching 2020-08-24 01:59:40 +02:00
Clément Fournier 9828697607 Simplify ivars
Remove delegate logic
2020-08-24 01:51:35 +02:00
Clément Fournier b19c57915a Fix nested lambda param resolution 2020-08-24 00:09:55 +02:00
Clément Fournier a46e89b076 Fix tests for TypesFromReflection 2020-08-23 22:31:18 +02:00
Clément Fournier e809caaab1 Reactivate tests of TypeTestUtil 2020-08-23 22:06:56 +02:00
Clément Fournier dd451112ab Merge branch 'java-grammar' into typeres-jtypes 2020-08-23 22:01:49 +02:00
Clément Fournier b64042bfab Fix duplicate ModifierList 2020-08-23 22:00:09 +02:00
Clément Fournier c904ed4ea5 Cleanup build 2020-08-23 21:38:17 +02:00
Clément Fournier f298bb40e9 Merge branch 'java-grammar' into typeres-jtypes 2020-08-23 21:33:32 +02:00
Clément Fournier e8bb2c186f Fix parse error with synchronized stmt 2020-08-23 21:31:32 +02:00
Clément Fournier f57c2049f7 Fix a bug with method ref precedence 2020-08-23 21:26:22 +02:00
Clément Fournier 60f206d400 Fix tree dump tests
Some attributes were removed:
- PrimitiveType: @Image, @Boolean, @ModelConstant (replaced by Kind)
- ConstructorCall: MethodName=new was added, from InvocationNode
- getPrimitiveType was removed from literal nodes (this is generalized
by getTypeMirror)
2020-08-23 20:48:16 +02:00
Clément Fournier d5445d7ea5 Normalize captures in tree dump 2020-08-23 20:37:53 +02:00
Clément Fournier fd3de437b3 Merge branch 'java-grammar' into typeres-jtypes 2020-08-23 20:24:21 +02:00
Clément Fournier 9e9f372146 Checkstyle 2020-08-23 20:21:39 +02:00
Clément Fournier 1261d1f084 Merge branch 'java-grammar' into typeres-jtypes 2020-08-23 20:20:07 +02:00
Clément Fournier fcbf55e38e Merge branch '7.0.x' into java-grammar 2020-08-23 20:19:58 +02:00
Clément Fournier 77053b7ac3 Fix pcollections dependency 2020-08-23 20:19:15 +02:00
Clément Fournier 898c2e2b69 Add a tree dumper that prints the type of things 2020-08-23 20:16:59 +02:00
Clément Fournier 77f8c554ad Merge branch 'java-grammar' into typeres-jtypes 2020-08-23 20:05:43 +02:00
Clément Fournier 30466cd793 Use fillAttributes instead
More easily extensible
2020-08-23 20:05:16 +02:00
Clément Fournier 2795af335e Fix result type 2020-08-23 20:04:56 +02:00
Clément Fournier 1498f10d2b Merge branch 'java-grammar' into typeres-jtypes 2020-08-23 19:57:36 +02:00
Clément Fournier 15d3664ee7 Deprecate some attributes 2020-08-23 19:51:36 +02:00
Clément Fournier 468292b24e Update tree dump tests 2020-08-23 19:39:11 +02:00
Clément Fournier faa809b060 Fix compil 2020-08-23 19:27:07 +02:00
Clément Fournier 226cb0f74a Update TypeTestUtil WIP 2020-08-23 19:17:05 +02:00
Clément Fournier c6536db037 Fix merge 2020-08-23 18:49:59 +02:00
Clément Fournier 1f7c3373d6 Merge branch 'java-grammar' into typeres-jtypes 2020-08-23 18:48:00 +02:00
Clément Fournier c1225326a8 Merge branch '7.0.x' into java-grammar 2020-08-23 18:42:49 +02:00
Clément Fournier 1436eb8eed Mention pmd-java deps explicitly
They're transitively gotten from
pmd-core, but for some use cases
this is nicer

eg `mvn install -pl pmd-java`, given
that pmd-core was already installed
locally, should succeed. If the dependencies
are not mentioned explicitly, for some
reason this fails.

Before #2614, pmd-core was shaded with
its dependencies and this wasn't necessary
2020-08-23 18:40:40 +02:00
Clément Fournier e5bf0b3f82 Turn ParserCornerTest into a tree dump test 2020-08-23 18:33:17 +02:00
Clément Fournier f4cdb3bf64 Merge branch '7.0.x' into java-grammar 2020-08-23 18:14:13 +02:00
Clément Fournier 51f0496713 Fix build 2020-08-23 18:11:37 +02:00
Clément Fournier 9e77d38c48 Merge branch '7.0.x' into java-grammar 2020-08-23 18:01:52 +02:00
Clément Fournier 37bd0db6b0 Merge branch 'remove-old-stuff' into 7.0.x 2020-08-23 17:59:27 +02:00
Clément Fournier 8414fbeae1 Fix merge 2020-08-23 17:58:21 +02:00
Clément Fournier 29482a1962 Merge branch 'grammar-void-type' into java-grammar 2020-08-23 17:55:59 +02:00
Clément Fournier e035fd7ebe Fix merge 2020-08-23 17:54:37 +02:00
Clément Fournier ae1332ac29 Merge branch '7.0.x' into java-grammar 2020-08-23 17:51:19 +02:00
Clément Fournier 582d980e9d Merge branch 'update-saxon-version' into 7.0.x 2020-08-23 17:46:40 +02:00
Clément Fournier e6ce27f287 Fix TypeIs[Exactly]Function
Refs #2721
2020-08-23 17:46:11 +02:00
Clément Fournier d5f48c4741 Merge branch '7.0.x' into update-saxon-version 2020-08-23 17:45:21 +02:00
Clément Fournier 6069fe28a3 Fix tests 2020-08-23 17:41:51 +02:00
Clément Fournier 7b2eb77a27 Fix visitors 2020-08-23 17:32:59 +02:00
Clément Fournier e183fb126e Merge branch '7.0.x' into java-grammar 2020-08-23 16:59:51 +02:00
Clément Fournier 9c82dd11ef Fix merge (build passes) 2020-08-23 16:53:40 +02:00
Clément Fournier b2c8892d26 Merge branch 'generic-visitor-js' into 7.0.x 2020-08-23 16:44:27 +02:00
Clément Fournier f203d9837c Merge branch 'generic-visitor3' into 7.0.x 2020-08-23 16:43:47 +02:00
Clément Fournier da3d06377c Merge branch 'apex-generic-visitor' into 7.0.x 2020-08-23 16:42:59 +02:00
Clément Fournier a1251d0e32 Merge branch 'master' into 7.0.x 2020-08-23 16:41:51 +02:00
Clément Fournier 0f6f76a6ce Merge branch 'master' into 7.0.x 2020-08-23 16:40:22 +02:00
Clément Fournier 58794b08af Update tree dump references
I tweaked the printer so that the
modifiers are printed not as separate
attributes. Eventually I think this
is how it should be done: no separate
attributes, but instead a function
 in XPath
2020-08-23 16:35:46 +02:00
Clément Fournier e410c2e561 Fix bugs 2020-08-23 15:54:30 +02:00
Clément Fournier f3d887956d Fix grammar
The BlockStatement production is rewritten for performance
and clarity. There was a problem with ModifierLists floating around
2020-08-23 15:38:21 +02:00
Clément Fournier 9eb6602b7c Fix merge wip 2020-08-22 21:39:14 +02:00
Clément Fournier 8fd4cf274e Merge branch '7.0.x' into java-grammar 2020-08-22 21:22:41 +02:00
Clément Fournier 9ff940a157 Fix java changes
Refs #2714
2020-08-22 20:48:21 +02:00
Clément Fournier 05727ace87 Merge branch 'master' into 7.0.x 2020-08-22 19:48:49 +02:00
Clément Fournier afe82becc0 Cleanup build log 2020-08-22 16:18:00 +02:00
Clément Fournier 30b65b9aff Merge branch 'java-grammar' into typeres-jtypes 2020-08-22 16:13:56 +02:00
Clément Fournier 9828f1526b code style 2020-08-22 16:09:06 +02:00
Clément Fournier 9c052b3d7b Fix an enormous bug in the core inference routine 2020-08-22 08:58:31 +02:00
Clément Fournier 77c8f75413 Remove SymbolFactory 2020-08-22 07:41:59 +02:00
Clément Fournier 7c20254088 Add todo test case 2020-08-22 05:40:36 +02:00
Clément Fournier 555e0b8a4d Cleanup PolyResolution 2020-08-22 05:08:55 +02:00
Clément Fournier 153774ed27 Doc 2020-08-22 04:45:32 +02:00
Clément Fournier 781e068bca Rename unresolved to unknown 2020-08-22 03:47:53 +02:00
Clément Fournier 9f35283b72 Remove some constants of Convertibility 2020-08-22 03:36:46 +02:00
Clément Fournier 2cd7f61099 Cleanup some things 2020-08-22 03:19:13 +02:00
Clément Fournier ff3a12ee61 Fix static methods inherited from interface 2020-08-22 02:26:11 +02:00
Clément Fournier 98754f54ca Fix specificity inference for lambdas 2020-08-22 00:00:17 +02:00
Clément Fournier f15add4f95 Revive standalone types for poly exprs 2020-08-21 22:46:31 +02:00
Clément Fournier e48056658f Fix test failures about erased supertypes 2020-08-21 22:05:32 +02:00
Clément Fournier 89e3502482 Use inference all the time for specificity 2020-08-21 21:51:58 +02:00
Clément Fournier f4e7233707 Actually, fix this 2020-08-21 20:35:56 +02:00
Clément Fournier 67ea3ce0b2 Add test case for lambda specificity
Doesn't pass
2020-08-21 19:49:18 +02:00
Clément Fournier 9b1db7057a Fix corner case with generic method ref 2020-08-21 18:44:03 +02:00
Clément Fournier eb22b98ce0 Fix containment with implicitly bounded cvar 2020-08-21 17:54:54 +02:00
Clément Fournier ba94f94a8b Cleanup some old api 2020-08-21 17:48:51 +02:00
Clément Fournier fa0a630472 Use same type system for all tests 2020-08-21 17:33:17 +02:00
Clément Fournier 140b5ab033 Fix projection of recursive tvar bound 2020-08-21 16:45:06 +02:00
Clément Fournier c6022ff9fa Add test case 2020-08-21 14:59:32 +02:00
Andreas Dangel da28648b64 Merge branch 'pmd/7.0.x' into java-grammar 2020-08-21 12:50:30 +02:00
Andreas Dangel 9ff740caa8 Fix rule tag referencing deleted rule in release notes 2020-08-21 12:42:01 +02:00
Andreas Dangel 6f1e226579 Fix pmd 2020-08-21 12:39:46 +02:00
Andreas Dangel 2b1d071930 Fix tests due to endColumn changes 2020-08-21 12:38:37 +02:00
Andreas Dangel b9829c78fb Fix merge 2020-08-21 11:55:13 +02:00
Andreas Dangel ab489832fe Merge branch 'master' into pmd/7.0.x 2020-08-21 11:51:54 +02:00
Clément Fournier b50c3ac975 Fix the safemap test 2020-08-21 05:54:38 +02:00
Clément Fournier ebd9b61181 Better colors for logging 2020-08-21 03:28:12 +02:00
Clément Fournier e1d0480130 Fix type containment 2020-08-21 02:01:55 +02:00
Clément Fournier e7594699c1 Better doc 2020-08-21 02:01:55 +02:00
Clément Fournier 4a196fdbed Fix bug with containment 2020-08-21 02:01:55 +02:00
Clément Fournier a796a58fb6 Cleanup some tests 2020-08-21 02:01:55 +02:00
Clément Fournier 0eac6320fc Add identity convertibility to fix a hole in api 2020-08-21 02:01:55 +02:00
Clément Fournier 3172dbe007 Fix last missing messages 2020-08-21 02:01:55 +02:00
Clément Fournier 6d0f7409d5 Bring back reduction waves 2020-08-21 02:01:40 +02:00
Clément Fournier ce2bdc66cc Fix wrong tests 2020-08-20 22:44:50 +02:00
Clément Fournier af43f7f4b6 Make typeArgContains package private 2020-08-20 20:02:08 +02:00
Clément Fournier 0b0fe4f4aa Actually handle nested invoc skipping 2020-08-20 19:55:49 +02:00
Clément Fournier c5dcdc43c9 Make softSolve recursive, allow failed invocation to proceed 2020-08-20 18:33:00 +02:00
Clément Fournier 53434b33ef Fix lambda constraints 2020-08-20 18:10:21 +02:00
Clément Fournier 755870322a Promote subtyping routine to convertibility 2020-08-20 17:52:10 +02:00
Clément Fournier 532ec1a616 Fix standalone types test 2020-08-20 16:56:11 +02:00
Clément Fournier 1984511fd4 Fix inferrable functional itf 2020-08-20 16:47:54 +02:00
Clément Fournier e1835b1e3a Fix mostSpecific 2020-08-20 16:45:07 +02:00
Clément Fournier 64675d54f6 Split TypeTestUtil 2020-08-20 16:27:01 +02:00
Clément Fournier 83093f9f04 Cleanups 2020-08-20 04:24:49 +02:00
Clément Fournier e092dc593b Capture should capture the enclosing type 2020-08-20 02:59:31 +02:00
Clément Fournier 86377267c4 Cleanup some stuff in Infer 2020-08-20 02:52:55 +02:00
Clément Fournier ab509c1247 Solve functional itf types early 2020-08-20 02:18:29 +02:00
Clément Fournier 72763b4018 Improve subtyping tests 2020-08-20 02:00:47 +02:00
Clément Fournier 5f620b5b3b Rename inference var
Only published types start with J now
2020-08-20 00:02:43 +02:00
Clément Fournier f90345b42c More tests for subtyping 2020-08-19 23:34:44 +02:00
Clément Fournier 641ea55748 Add a test case, fix todo 2020-08-19 22:03:29 +02:00
Clément Fournier 660d947360 Fix value compatiblity 2020-08-19 21:48:47 +02:00
Clément Fournier 7c18a56811 Improve error messages 2020-08-19 21:25:40 +02:00
Clément Fournier 3a8e12743e Fix lambda with void body 2020-08-19 21:08:13 +02:00
Clément Fournier 2083b4e5c4 Fix method ref compatibility 2020-08-19 20:58:31 +02:00
Clément Fournier 95c81c07fb Fix method ref dangling nulls if resolution fails 2020-08-19 20:41:02 +02:00
Clément Fournier 43d82fd6f6 Add supertype for lambda and method ref 2020-08-19 20:23:45 +02:00
Clément Fournier 1da90470dc Spot a bug, fix todo 2020-08-19 20:04:26 +02:00
Clément Fournier 7eed422f43 Refactor tests 2020-08-19 19:45:28 +02:00
Clément Fournier 3f86f25941 Add todo 2020-08-19 15:55:36 +02:00
Clément Fournier da8d2b7188 Fix specificity inferenece 2020-08-19 07:01:49 +02:00
Clément Fournier 5ee1c06629 Fix intersection minimization 2020-08-19 05:41:25 +02:00
Clément Fournier 6c4e2a2cdf Fix generic superclass ctor 2020-08-19 03:10:41 +02:00
Clément Fournier a9ef809e74 Refactor specificity check 2020-08-19 03:00:16 +02:00
Clément Fournier f5b00ae35f Consider unresolved types in specificity tests 2020-08-19 02:10:14 +02:00
Clément Fournier bf65278ada Fix invoc type 2020-08-19 01:39:19 +02:00
Clément Fournier bd291f803f More fallbacks for standalones 2020-08-19 01:17:34 +02:00
Clément Fournier 9214be5578 Actually handle ambiguity errors 2020-08-18 23:51:22 +02:00
Clément Fournier efa9a9351b Unresolved is compatible with primitives 2020-08-18 22:32:25 +02:00
Clément Fournier 6862043277 Better strategy for unresolved diamond 2020-08-18 22:11:36 +02:00
Clément Fournier a88199efb2 Cleanup API 2020-08-18 21:50:48 +02:00
Clément Fournier fa6fe0c784 Make some interface for method ctdecl public 2020-08-18 21:33:12 +02:00
Clément Fournier 12d40eb6dc Better fallback strategies 2020-08-18 21:03:26 +02:00
Clément Fournier fc55dc2036 Test unresolved inner types 2020-08-18 19:51:36 +02:00
Clément Fournier 8204e030b0 Doc for intersection 2020-08-18 17:02:12 +02:00
Clément Fournier 8bd2edd9be Fix tests 2020-08-18 16:16:30 +02:00
Clément Fournier 878adc1b88 Remove fake symbol 2020-08-18 15:28:59 +02:00
Clément Fournier 02b6d2b9c4 Move array symbol into types package 2020-08-18 15:18:03 +02:00
Clément Fournier 77bf299c92 Doc 2020-08-18 15:09:12 +02:00
Clément Fournier 4eb198b18e Make array type a class 2020-08-18 15:01:38 +02:00
Clément Fournier 4e9a91fc89 Make intersection types a class 2020-08-18 14:58:51 +02:00
Clément Fournier e0e614b55e Move fake intersection symbol 2020-08-18 14:49:07 +02:00
Clément Fournier d9bf4b0b9a Improve tests 2020-08-18 14:47:01 +02:00
Clément Fournier 624597b86b Cleanup intersection 2020-08-18 14:18:30 +02:00
Clément Fournier aea1c1d586 Remove getJvmRepr 2020-08-18 11:55:19 +02:00
Clément Fournier 1cd7563f4c Test subtyping of special types 2020-08-18 11:53:27 +02:00
Clément Fournier cfd4d11e68 Doc 2020-08-18 11:29:47 +02:00
Clément Fournier 2a066c0154 Fix potential compatibility of lambda with primitive type 2020-08-18 11:21:36 +02:00
Clément Fournier 840fbbb798 Test enum constant ctor resolution 2020-08-18 10:54:00 +02:00
Clément Fournier 529ca2d798 Improve test coverage 2020-08-18 10:38:48 +02:00
Clément Fournier 98cfdc9238 Fix anon ctors 2020-08-17 16:40:44 +02:00
Clément Fournier 6cd92ad764 Doc 2020-08-17 16:11:17 +02:00
Clément Fournier 05056869ca Ensure ctors are identical 2020-08-17 16:00:03 +02:00
Clément Fournier 2238b118f2 Doc 2020-08-17 15:36:13 +02:00
Clément Fournier 52cea8eebc Fix tests 2020-08-17 10:23:32 +02:00
Clément Fournier 32e0a7a460 Fix lambdas 2020-08-17 09:08:08 +02:00
Clément Fournier 8ca835a820 Move a test 2020-08-17 08:53:09 +02:00
Clément Fournier bec37a924c Cleanup build log 2020-08-17 08:52:16 +02:00
Clément Fournier f2f3ef17ce Merge branch 'java-grammar' into typeres-jtypes 2020-08-17 08:48:27 +02:00
Clément Fournier 81379f8c3e Merge branch '7.0.x' into java-grammar 2020-08-17 08:48:05 +02:00
Clément Fournier 0f4f952a85 Merge branch 'master' into 7.0.x 2020-08-17 08:46:23 +02:00
Clément Fournier d68ffdf15c Test unresolved method recovery for arguments 2020-08-17 08:32:45 +02:00
Clément Fournier ba2e31d848 Remove noise from test rule 2020-08-17 07:48:47 +02:00
Clément Fournier 7e656cf552 Fix lambda return expression inference 2020-08-17 07:33:57 +02:00
Clément Fournier bc707c2469 Fix exact method ref with type arguments 2020-08-17 06:49:50 +02:00
Clément Fournier 64f148f36e Fix intersection subtyping 2020-08-17 06:09:57 +02:00
Clément Fournier e138a82a2f Fix problem with inference var as inference var 2020-08-17 04:57:39 +02:00
Clément Fournier 2bac362ca0 Fix tests 2020-08-17 04:22:11 +02:00
Clément Fournier bb3b593304 Remove reduction waves 2020-08-17 03:40:21 +02:00
Clément Fournier b85e64bc61 Add an F-bound reduction step
This strays away from what javac does, but
fixes bugs about raw types
2020-08-17 02:53:02 +02:00
Clément Fournier 723d43458d Handle raw types... 2020-08-17 01:26:23 +02:00
Clément Fournier 953355d874 Fix bug with C-style array declaration 2020-08-16 23:49:32 +02:00
Clément Fournier 5f98fed727 Fix tests about subtyping 2020-08-16 23:15:53 +02:00
Clément Fournier 1563fb7826 Add fallback but only for invocation 2020-08-16 22:19:15 +02:00
Clément Fournier edcb4405b7 Code style 2020-08-16 22:18:29 +02:00
Clément Fournier 07434fdfa5 Preserve unchecked conversion result 2020-08-16 20:50:01 +02:00
Clément Fournier a99698d1ba Really remove fallback
We don't need it
2020-08-16 20:08:30 +02:00
Clément Fournier 0d936f39ea Add todos for raw types 2020-08-16 20:06:48 +02:00
Clément Fournier da2b737ab8 Test sam type with default methods 2020-08-16 19:29:05 +02:00
Clément Fournier 41c8bf88b2 Fix method ref ambiguity between instance methods 2020-08-16 18:04:03 +02:00
Clément Fournier c91b9ce650 Fix getClass in invocation ctx 2020-08-16 17:01:18 +02:00
Clément Fournier d4e6daa27f Fix method ref on primitive lhs 2020-08-16 16:38:55 +02:00
Clément Fournier e990b22c93 Fix generic ctor specificity
Fix precedence of method refs
2020-08-16 16:10:30 +02:00
Andreas Dangel 7be60cc20a Merge branch 'pr-2696' into pmd/7.0.x
[core] Remove DFA #2696
2020-08-16 10:41:27 +02:00
Clément Fournier fd1797a118 Test varargs on generic array 2020-08-16 00:19:27 +02:00
Clément Fournier 9511ab0ec4 Remove fallback for compile time decl
We could add it and delete type params. Whatever
2020-08-16 00:17:45 +02:00
Clément Fournier 3940340f67 Cleanup tests 2020-08-16 00:02:55 +02:00
Clément Fournier d90ad0a210 Prefer standalone ternaries 2020-08-15 23:43:03 +02:00
Clément Fournier 8d418302b5 Add todo 2020-08-15 23:12:38 +02:00
Clément Fournier c54faaa5cb Cast context doesn't constrain return types anymore 2020-08-15 20:00:43 +02:00
Clément Fournier 00b7a1e2ef Test array initializer 2020-08-15 19:04:24 +02:00
Clément Fournier f4f1366fc2 Fix method ref selection 2020-08-15 18:44:43 +02:00
Clément Fournier 83ac5485f8 Cleanup infer 2020-08-15 18:00:35 +02:00
Clément Fournier b6eed3c8c2 Fix bug with void method refs 2020-08-15 17:54:10 +02:00
Clément Fournier 3f31593864 Fix the bug 2020-08-15 17:21:35 +02:00
Clément Fournier 2b3cbd7c07 Partial revert 2020-08-15 17:17:11 +02:00
Clément Fournier 4aaedf4931 Remove standalone types for all poly exprs
Too many bugs oh god
2020-08-15 16:42:12 +02:00
Clément Fournier 3be2d534cf Allow field access on type variables 2020-08-15 15:10:42 +02:00
Clément Fournier 768b2f691a Test capture in assignment exprs 2020-08-15 14:39:23 +02:00
Clément Fournier b63e7a1c9a Add 2 decimals to error rate 2020-08-15 14:24:43 +02:00
Clément Fournier 049cdeeb95 Fix anonymous class ctor 2020-08-15 14:22:02 +02:00
Clément Fournier 886295c9a7 Don't special case standalone ctor/method 2020-08-15 13:44:33 +02:00
Clément Fournier 2b6dd59d7c Add test for explicit lambda 2020-08-15 13:23:12 +02:00
Clément Fournier 18944356d3 Fix nested ternary with no context 2020-08-15 13:12:57 +02:00
Clément Fournier 52ec5e3dc0 Update todos 2020-08-15 12:26:25 +02:00
Clément Fournier 2faf9c933b Remove unresolved field symbol 2020-08-15 12:25:11 +02:00
Clément Fournier 76b01dec6b Support switch on enum special scoping 2020-08-15 12:24:35 +02:00
Clément Fournier f0d23075f5 Fix moved class 2020-08-15 11:48:32 +02:00
Clément Fournier 9db1d3ad2e Fix poly context of ternary condition 2020-08-15 11:47:19 +02:00
Clément Fournier 0edb601c4f Fix inherited inner types 2020-08-15 11:10:38 +02:00
Clément Fournier 0df4179b9d Improve tests 2020-08-15 10:49:36 +02:00
Clément Fournier 0803850a72 Hide ASTClassOrInterfaceType#getReferencedSym 2020-08-15 10:32:54 +02:00
Clément Fournier 99ae83719a Move back ReferenceCtx 2020-08-15 10:16:54 +02:00
Clément Fournier 1ab296a438 Move LazyTypeResolver 2020-08-15 10:15:44 +02:00
Clément Fournier 35623bd3bf Add unresolved field symbol 2020-08-15 09:53:39 +02:00
Clément Fournier 710bd187bb Add signature info to variable reference nodes 2020-08-15 09:47:38 +02:00
Clément Fournier 75b4f35bcd Describe new TODOs 2020-08-15 09:35:02 +02:00
Clément Fournier c0b2b92f9f Fix bug with foreach var not in scope 2020-08-15 09:13:33 +02:00
Clément Fournier 64a2043c7a Test inherited inner type 2020-08-15 08:34:41 +02:00
Clément Fournier cc55405447 Update todos 2020-08-15 05:45:22 +02:00
Clément Fournier 5b2d32d25c Merge branch 'java-grammar' into typeres-jtypes 2020-08-15 04:58:55 +02:00
Clément Fournier ab6395703c Rename to NamedReferenceExpr 2020-08-15 04:58:44 +02:00
Clément Fournier a78560c337 Dont fire event for non-changed bound 2020-08-15 04:52:52 +02:00
Clément Fournier c4fe0327ec Checkstyle 2020-08-15 04:34:46 +02:00
Clément Fournier 79b0148df8 Enable symbol table for compat 2020-08-14 23:40:44 +02:00
Clément Fournier 8e4820bb29 Merge branch 'java-grammar' into typeres-jtypes 2020-08-14 23:29:07 +02:00
Clément Fournier 06ad64d39f Merge branch 'java-grammar' into grammar-void-type 2020-08-14 23:23:25 +02:00
Clément Fournier e2906b020e Merge branch 'java-grammar-adjustments' into java-grammar 2020-08-14 23:20:21 +02:00
Clément Fournier 29022bf0c0 Merge branch 'java-grammar' into java-grammar-adjustments 2020-08-14 23:20:04 +02:00
Clément Fournier a36eaf63e3 Merge branch '7.0.x' into java-grammar 2020-08-14 23:19:20 +02:00
Clément Fournier fe92b7bb6a Merge branch 'master' into 7.0.x 2020-08-14 23:17:33 +02:00
Clément Fournier 03c8ca683b Make QualifierOwner public 2020-08-14 23:07:57 +02:00
Clément Fournier 6de5bf25bd Fix javadoc warnings
(only for non-deprecated things)
2020-08-14 22:58:04 +02:00
Clément Fournier e38abe08aa Add tests for labeled statements 2020-08-14 22:53:43 +02:00
Clément Fournier fc9b81c0d7 Improve JavaDesignerBindings 2020-08-14 22:41:43 +02:00
Clément Fournier 4988297f10 Make getMethodName for MethodReference total 2020-08-14 22:39:33 +02:00
Clément Fournier 4621ee3d75 Add interface for loop statements 2020-08-14 22:35:06 +02:00
Clément Fournier 9a87a639f4 Add supertype for field and var access 2020-08-14 22:33:21 +02:00
Clément Fournier d0174f40cf Remove a stream call 2020-08-14 20:28:52 +02:00
Clément Fournier 4868d43211 Break dependency cycle between disambig/typeres
Fixes the todo about qualified ctor calls in lambdas
2020-08-14 16:56:45 +02:00
Clément Fournier bc6cde7403 Better exceptions for typeres failures 2020-08-14 07:53:19 +02:00
Clément Fournier 2963dac4fc Add void type node to replace ResultType 2020-08-14 07:37:19 +02:00
Clément Fournier d449a00f0b Fix a lambda test, add todos 2020-08-14 06:59:20 +02:00
Clément Fournier 9b4ba8b8c6 Add back access to backing node to symbol table
This will be necessary for many rules
2020-08-14 06:18:47 +02:00
Clément Fournier c8ac01d015 Fix some invariants 2020-08-14 06:11:20 +02:00
Clément Fournier ec85bd0fb6 Simplify Mentions 2020-08-14 02:38:54 +02:00
Clément Fournier c05930e4b7 Complete todos
This must be fixed before merging the PR

Possibly, we need to merge typeres-fwd into
this first
2020-08-14 00:15:55 +02:00
Clément Fournier 16598df7e2 Merge branch 'java-grammar' into typeres-jtypes 2020-08-13 16:19:46 +02:00
Clément Fournier 0bf9cc224e Merge branch '7.0.x' into java-grammar 2020-08-13 16:18:48 +02:00
Clément Fournier df68f4185f Merge branch 'master' into 7.0.x 2020-08-13 16:07:07 +02:00
Clément Fournier 719d40c914 Add test case for hard dependency conflict 2020-08-13 15:14:17 +02:00
Clément Fournier 0f39a5e56d Filter out bridge methods todo test 2020-08-13 15:13:16 +02:00
Clément Fournier c68cd2e472 Doc 2020-08-13 13:58:20 +02:00
Clément Fournier 670d07a1df Move unresolved class tracker into JavaAstProcessor
This way it doesn't need to be synchronized,
and is garbage collected on each file.
2020-08-13 13:55:08 +02:00
Clément Fournier 4535707f55 Fix generic inner class constructor synthetic parameter 2020-08-13 04:20:32 +02:00
Clément Fournier 2466213052 Merge branch 'java-grammar' into typeres-jtypes 2020-08-13 03:42:26 +02:00
Clément Fournier e1e63e372f Merge branch '7.0.x' into java-grammar 2020-08-13 03:42:17 +02:00
Clément Fournier ad43a78aeb Remove wildcards from return type of asInstanceOf 2020-08-13 03:41:42 +02:00
Clément Fournier 4f0dde70bc Exclude non-static methods from scope of static inner class 2020-08-13 03:00:40 +02:00
Clément Fournier 527a43db87 Refactor method merging 2020-08-13 02:19:23 +02:00
Clément Fournier 5da567f8c3 Improve an error message 2020-08-13 02:08:36 +02:00
Clément Fournier 4eb9e62b53 Fix boolean literals having no type 2020-08-13 01:35:26 +02:00
Clément Fournier ab5c1274f1 Fix bug with GLB of captured variables 2020-08-13 01:35:21 +02:00
Clément Fournier 175a36a281 Add another test case 2020-08-13 00:36:20 +02:00
Clément Fournier 5d9060eb1b Collect some more bugs 2020-08-13 00:03:48 +02:00
Clément Fournier a229887f03 Add shorthand for array creation 2020-08-12 23:43:50 +02:00
Clément Fournier 29fb4305df Generic method refs are inexact
Bug with check for null type args instead of empty list
2020-08-12 23:25:38 +02:00
Clément Fournier 897e18da45 Document todos 2020-08-12 20:58:59 +02:00
Clément Fournier 4d45542026 Fix javadoc warnings 2020-08-12 19:21:29 +02:00
Clément Fournier e6e992489a Add special type to test wildcard capture 2020-08-12 18:36:35 +02:00
Clément Fournier 1e11874bd3 Cleanup build log 2020-08-12 16:15:10 +02:00
Clément Fournier f01a6abc4f Update last test 2020-08-12 16:08:03 +02:00
Clément Fournier e51b6d6ab2 Fix method ref conflict between static and non-static 2020-08-12 16:04:25 +02:00
Clément Fournier 5e80228c89 Single static imports should not shadow each other 2020-08-12 15:51:50 +02:00
Clément Fournier fe6902ebd1 Fix variable access capture 2020-08-12 15:35:58 +02:00
Clément Fournier e90a2b3f96 Test override with primitives 2020-08-12 15:14:03 +02:00
Clément Fournier 8a5f2cc6a0 Cleanup accessibility routines 2020-08-12 15:07:39 +02:00
Clément Fournier 6e616e9f0b Skip first parameter of inner class constructor 2020-08-12 14:55:16 +02:00
Clément Fournier 2d1f449b52 Optimizations for override equivalence 2020-08-12 14:41:29 +02:00
Clément Fournier 7cb380aae8 Fix bug with eager instantiation failing 2020-08-12 13:51:18 +02:00
Clément Fournier 2986d5801e Fix enum valueOf 2020-08-12 01:07:14 +02:00
Clément Fournier 6d3aee11bd Fix bug with wrong phase for invocation 2020-08-12 00:46:48 +02:00
Clément Fournier 778c1cf96c Fix bug with capture 2020-08-12 00:46:14 +02:00
Clément Fournier ceae97a752 Enable skipping instantiation 2020-08-11 23:24:05 +02:00
Clément Fournier ca77a44182 Extract tests into more focused classes 2020-08-11 22:25:56 +02:00
Clément Fournier a0087a20ad Fix method ref not contributing constraints to context
This happened with inexact method references
referencing a method of a generic type (return
type is generic, not parameter types)
2020-08-11 22:09:56 +02:00
Clément Fournier a5b0c17421 Remove shadow check 2020-08-11 20:50:03 +02:00
Clément Fournier 5015640d74 Fix bug with hiding of static methods,
revert some changes
2020-08-11 19:51:56 +02:00
Clément Fournier f740bb115b Try to fix bug with capture
Spot a bug with nested expressions. Skipping
instantiation is disabled until later
2020-08-11 19:30:56 +02:00
Clément Fournier bf1bfdcd38 Don't duplicate accessibility check 2020-08-11 18:07:22 +02:00
Clément Fournier 266c4c33ee Fix performance regression caught by stress test
Adapted type parameters were duplicated, so the
number of inference variables was exploding.
2020-08-11 18:07:16 +02:00
Clément Fournier 350fe31b58 Reduce test dependency on JTypeMirror#toString 2020-08-11 17:02:40 +02:00
Clément Fournier 8fb049efcb Merge branch 'java-grammar' into typeres-jtypes 2020-08-11 15:14:20 +02:00
Clément Fournier 443d576d66 Merge branch '7.0.x' into java-grammar 2020-08-11 15:13:46 +02:00
Clément Fournier b3afed9e84 Fix PLSQL compil 2020-08-11 14:16:40 +02:00
Clément Fournier 5853d44c06 Fix VM compil 2020-08-11 14:12:10 +02:00
Clément Fournier 02a98fb5bf Fix compil in modelica 2020-08-11 14:10:20 +02:00
Clément Fournier 6aa1be26f7 Cleanup AbstractJspRule 2020-08-11 13:53:33 +02:00
Clément Fournier 2673feef90 Remove some nodes that are unused in the jsp tree
Idk why they were there, but the grammar
does not produce them anywhere. Compilation
was failing because they expected a visit
method on the visitor, which is not generated
2020-08-11 13:46:13 +02:00
Clément Fournier 743d86304a MissingOverride 2020-08-10 15:46:51 +02:00
Clément Fournier 4707bb3b10 Test XPath 3.1 2020-08-10 14:40:06 +02:00
Clément Fournier 542d4b7471 Release notes 2020-08-10 12:10:23 +02:00
Clément Fournier 76baa0c3a2 Cleanup XPathRule 2020-08-10 12:02:41 +02:00
Clément Fournier 7cd691d013 Make XPathRule final 2020-08-10 12:00:09 +02:00
Clément Fournier 37b9bfabaf Remove other specific XPath rules 2020-08-10 11:59:38 +02:00
Clément Fournier a591994f36 Remove ApexXpathRule 2020-08-10 11:58:21 +02:00
Clément Fournier 546f014999 Doc + deprecate xpath 20
Basically, users shouldn't really have a choice
of XPath version, esp. if all versions we support
are compatible.
2020-08-10 11:56:47 +02:00
Clément Fournier 1e85519045 Merge branch '7.0.x' into update-saxon-version 2020-08-08 02:54:04 +02:00
Clément Fournier 3b11c3bff2 Merge branch '7.0.x' into remove-old-stuff 2020-08-08 02:38:56 +02:00
Clément Fournier 10daeed63c Fix release notes
This will cause a merge conflict after
the PMD 6.27.0 release.
2020-08-08 02:37:56 +02:00
Clément Fournier 891bbd6918 Fix compil 2020-08-07 05:32:35 +02:00
Clément Fournier 99e29645c4 Merge branch '7.0.x' into generic-visitor3 2020-08-07 03:16:00 +02:00
Clément Fournier daa51685ec Make JS visitor generic 2020-08-07 03:00:49 +02:00
Clément Fournier ab0aaadd64 Fix descendantOrSelf on leaf
With a leaf node it used to return empty
2020-08-07 02:58:27 +02:00
Clément Fournier 797aa02809 Fix projection of inferred foreach var 2020-08-06 18:59:14 +02:00
Andreas Dangel dec835f299 Merge branch 'pmd/7.0.x' into java-grammar 2020-08-06 18:23:42 +02:00
Andreas Dangel 1e7c95ab09 Fix checkstyle 2020-08-06 18:08:22 +02:00
Clément Fournier 21fb012234 Remove from controversial.xml 2020-08-06 17:47:21 +02:00
Andreas Dangel feefc08c56 Fix test - endcolums are exclusive now 2020-08-06 12:43:34 +02:00
Andreas Dangel 494b34f6d7 Update pmd-dist integration test for openjdk8 2020-08-06 12:39:37 +02:00
Andreas Dangel 63af9c14c0 Cleanup pmd-dist profile 2020-08-06 11:51:38 +02:00
Andreas Dangel 483c8796be Merge branch 'master' into pmd/7.0.x 2020-08-06 11:43:08 +02:00
Clément Fournier 7e1d066d20 Checkstyle 2020-08-05 19:37:00 +02:00
Clément Fournier 2869efc4f3 Same for import on demand 2020-08-04 02:28:14 +02:00
Clément Fournier d95a9b6dc4 Make static imports have access to inherited members 2020-08-04 00:09:33 +02:00
Clément Fournier cbef6a8b7e Merge branch '7.0.x' into remove-old-stuff 2020-08-03 23:25:42 +02:00
Clément Fournier 94766ec818 Remove core DFA 2020-08-03 23:19:34 +02:00
Clément Fournier be98a689f7 Remove PLSQL DFA 2020-08-03 23:17:01 +02:00
Clément Fournier bf3d3083eb Remove java DFA 2020-08-03 23:16:18 +02:00
Clément Fournier 2aa16b7c8a Merge branch 'java-grammar' into typeres-jtypes 2020-08-03 23:08:02 +02:00
Clément Fournier 766ab453b8 Merge branch '7.0.x' into java-grammar 2020-08-03 23:07:16 +02:00
Clément Fournier c554aceba6 Merge branch 'master' into 7.0.x 2020-08-03 23:06:21 +02:00
Clément Fournier d9d91d3636 Merge branch 'java-grammar' into typeres-jtypes 2020-08-03 11:47:08 +02:00
Clément Fournier 6d21057c94 Add license to kotlin tests 2020-08-03 11:46:13 +02:00
Clément Fournier 8a25b912c2 Cleanup build log 2020-08-02 15:19:19 +02:00
Clément Fournier 627aff740b Diamond anonymous class support 2020-08-02 15:12:41 +02:00
Clément Fournier ca7ff74501 Fix fake ambiguity 2020-08-02 13:51:16 +02:00
Clément Fournier dcaf1e3ce8 Make the shadow chain actually handle method shadowing
This makes it so that the shadow chain for methods respects
the contract of the interface: "no two method in this list
shadow each other". The implementation identifies overrides
and prunes them, so that only the methods actually in scope
are presented by `resolve`.
2020-08-02 03:38:43 +02:00
Clément Fournier 483b41d2ca Allow enabling type inference logger in single unit test 2020-08-02 03:33:33 +02:00
Clément Fournier d096004b1b Some cleanups 2020-08-02 01:04:50 +02:00
Clément Fournier 9f7d1cc65d Add main attributes for common expressions 2020-08-01 19:16:56 +02:00
Clément Fournier f8505251a1 Fix NPEs 2020-08-01 19:09:00 +02:00
Clément Fournier d6bfafc1b4 Cleanups 2020-08-01 15:13:46 +02:00
Clément Fournier a02a78d0e1 Flatten symbols.internal package 2020-08-01 03:47:07 +02:00
Clément Fournier dc35a29757 Update copyrights on test files 2020-08-01 03:44:30 +02:00
Clément Fournier 03a29cf69a Make symbol tables use types 2020-08-01 03:33:13 +02:00
Clément Fournier c571606dc0 Remove reflected symbols
Only use the ones got with ASM
2020-07-31 19:22:33 +02:00
Clément Fournier 41f87d7195 Fix compil 2020-07-31 17:50:47 +02:00
Clément Fournier e00b208497 Remove old typeres
Reactivate some tests
2020-07-31 17:07:16 +02:00
Clément Fournier 5d13e397a0 Merge branch 'java-grammar' into typeres-jtypes 2020-07-31 16:06:20 +02:00
Clément Fournier e0c15b53a2 Merge branch '7.0.x' into java-grammar 2020-07-31 16:05:56 +02:00
Clément Fournier ad1a02b032 Merge branch '7.0.x' into remove-old-stuff 2020-07-31 16:03:57 +02:00
Clément Fournier 76aec10b8a Merge branch 'master' into 7.0.x 2020-07-31 16:03:39 +02:00
Clément Fournier 3d4f709009 Merge branch '7.0.x' into remove-old-stuff 2020-07-31 16:02:34 +02:00
Clément Fournier c4b3068f81 PMD + checkstyle 2020-07-31 15:50:26 +02:00
Clément Fournier 10a8b110d3 Build passes 2020-07-31 14:55:54 +02:00
Clément Fournier 4cc58c3cf8 Workaround for ambiguity error FP 2020-07-31 14:47:06 +02:00
Clément Fournier 8f98494e94 Fix problem with qualified ctor call 2020-07-31 14:40:59 +02:00
Clément Fournier 1130709008 Remove type system scopes 2020-07-31 14:05:58 +02:00
Clément Fournier 47fe9bf28e Remove dependency on jdk 2020-07-31 14:01:43 +02:00
Clément Fournier c8ef7df900 Fix tests 2020-07-31 13:30:22 +02:00
Clément Fournier 78b6d6d684 Refactor not to use anon classes
Kotlin reflect doesn't like it
2020-07-31 13:25:56 +02:00
Clément Fournier e4c71406e5 Remove some diff 2020-07-31 02:09:22 +02:00
Clément Fournier 7620d46b89 Port tests to kotest 2020-07-31 01:10:00 +02:00
Clément Fournier 7188f50f49 Merge branch 'java-grammar' into typeres-jtypes 2020-07-31 00:22:41 +02:00
Andreas Dangel aee5a01d9e Merge branch 'pr-2665' into java-grammar
[java] Name disambiguation in annotations #2665
2020-07-30 20:50:22 +02:00
Andreas Dangel dc2948a9fd Fix PMD LiteralsFirstInComparisons 2020-07-30 20:46:45 +02:00
Andreas Dangel 3394c94b5b Merge branch 'java-grammar' into pr-2665 2020-07-30 20:45:38 +02:00
Andreas Dangel a28458ff0e [java] Add back ASTAnnotation#getAnnotationName 2020-07-30 20:33:24 +02:00
Andreas Dangel bd48133ccd Fix checkstyle 2020-07-30 19:23:39 +02:00
Andreas Dangel f58f785efd Fix ASTLiteralTest 2020-07-30 19:18:55 +02:00
Andreas Dangel 6bbc42e842 Fix duplicated test cases 2020-07-30 14:15:39 +02:00
Andreas Dangel 5a58139d79 Fix compilation 2020-07-30 14:07:40 +02:00
Andreas Dangel d26cc240fe Merge branch 'pmd/7.0.x' into java-grammar 2020-07-30 13:14:17 +02:00
Andreas Dangel c8bc39a96c Fix compilation 2020-07-30 12:48:29 +02:00
Andreas Dangel 384dd20319 Merge branch 'master' into pmd/7.0.x 2020-07-30 11:51:53 +02:00
Andreas Dangel fc44dba1df Merge branch 'pr-2664' into pmd/7.0.x
[core] Bug with node stream drop #2664
2020-07-30 11:00:25 +02:00
Andreas Dangel 3368a70191 Merge branch 'pmd/7.0.x' into java-grammar 2020-07-30 09:32:25 +02:00
Andreas Dangel 924cf162de Fix build 2020-07-30 09:24:25 +02:00
Clément Fournier 4c11082574 Cleanup report 2020-07-29 18:04:56 +02:00
Clément Fournier da3573a25a Merge branch '7.0.x' into remove-old-stuff 2020-07-29 17:24:20 +02:00
Clément Fournier 57112e4f4d Pass language registry in configuraiton 2020-07-29 15:35:37 +02:00
Clément Fournier c9bd938be2 Add LanguageLoader 2020-07-29 15:35:36 +02:00
Clément Fournier 1ce585aafb Remove many static usages of LanguageRegistry 2020-07-29 15:35:16 +02:00
Clément Fournier dcf99aea32 Merge branch '7.0.x' into java-grammar 2020-07-29 15:30:42 +02:00
Clément Fournier 4ef71cbfe6 Merge branch 'master' into 7.0.x 2020-07-29 15:03:52 +02:00
Clément Fournier ae9e416095 Checkstyle 2020-07-29 00:08:46 +02:00
Clément Fournier e0de46652b Fix tests 2020-07-28 13:08:47 +02:00
Clément Fournier d650c87d8d Remove more utils 2020-07-28 12:51:55 +02:00
Clément Fournier 942493051e Remove some utils 2020-07-28 12:31:59 +02:00
Clément Fournier 7db6f3809c Remove violation tree 2020-07-28 12:13:37 +02:00
Clément Fournier 77a8d7268e Remove benchmarker 2020-07-28 12:07:53 +02:00
Clément Fournier 5a2d84a35e Fix level checker
It shouldn't recurse
2020-07-27 03:14:13 +02:00
Clément Fournier 63cab3f339 More test fixes 2020-07-27 03:13:44 +02:00
Clément Fournier 16b59c99ce Doc 2020-07-27 01:00:22 +02:00
Clément Fournier 4e324df22e Fix more tests 2020-07-27 00:08:10 +02:00
Clément Fournier 85df4ff198 Fix some tests 2020-07-26 23:07:45 +02:00
Clément Fournier e6d4467dff Fix some tests 2020-07-26 22:08:59 +02:00
Clément Fournier 067102a9c5 Cleanup primitive type 2020-07-26 17:50:10 +02:00
Clément Fournier 2ace5798f4 Merge branch 'grammar-annot-disambig' into typeres-jtypes 2020-07-26 16:36:47 +02:00
Clément Fournier 82ff665404 Fix some tests 2020-07-26 16:35:11 +02:00
Clément Fournier 3961a62344 Cleanup typeres visitor 2020-07-26 16:35:11 +02:00
Clément Fournier 1fe0c77a2f Try to fix tests
Need disambig for annotations
2020-07-26 16:35:11 +02:00
Clément Fournier 1db6987ba7 Remove strict stream
That's a benchmarking/profiling tool.
StreamUtils still stands
2020-07-26 16:35:11 +02:00
Clément Fournier 106d09378a Remove TypedNode 2020-07-26 16:35:11 +02:00
Clément Fournier 54fd3af1ac Port StringToString as an example 2020-07-26 16:35:11 +02:00
Clément Fournier 28c1cc864c Fix compil 2020-07-26 16:35:10 +02:00
Clément Fournier 7139010581 Add info to designer bindings 2020-07-26 16:35:10 +02:00
Clément Fournier 2449f6404e New typeres framework
Ceci est la combinaison de 338+ commits.

    Make set of classes to mirror types

    Implement capture conversion

    Document

    Doc

    Implement contains for targs

    Implement toString

    Fully implement subtyping

    Check for reifiability

    Implement unchecked, fix array subtyping

    Test rec typevar building

    Test primitive subtyping

    Test array subtyping

    Test wildcards subtyping

    Doc

    Rename primitiveType

    Reify conversions

    Test boxing

    Make constants for common types

    Test type param mutual recursion

    More defensive validation

    Implement numeric promotion

    Checkstyle

    Implement supertype set

    Implement lub

    Fix infinite recursion

    Fix lub bugs

    Use linkedhashset for stable ordering

    Add primitives to common types

    Move common types into type factory

    Try a lazy class resolver, needs a symbol table

    Improve lazy resolver

    Implement conditional expr typing

    remove poly impl

    Represent primitive wrappers differently

    Better compromise for primitive wrappers

    Extract wildcard interface

    Extract array type interface

    Refactor to extract interfaces

    Don't depend on initialization of jprimitiveType

    Finish pretty printer

    Remove dependency on reflection

    Fix class initialization trouble

    Move to type constants

    Use regular impl for OBJECT

    Encapsulate ops into TypeOps

    Add inference var to model

    Impl some ops

    Add some type inference algos

    Invocation context compatibility

    Add incorporation

    Generify bound set with ExprOps

    Add applicability tests

    Fix compil

    Add incorporation actions

    Implement incorporation

    Add inference steps

    Implement brute force walk strategy

    Remove some type params

    Wire in everything

    Implement methodtype

    Access methods from JClassType

    Represent enclosing types

    Work on overriding

    Implement expr ops

    Catch easy cases

    Diamond inference

    Fix pretty printer

    Fix concurrent mod

    Test

    Add reflect info to JModifier

    Add symbolic type declaration

    Most specific check

    Test with nested invocation

    Test lub

    Add constraints for lambdas and all subexpressions

    Resolve full call chain with lambdas

    Set partial results on nodes

    Test chain

    Doc

    Generalise expr mirrors

    Fix context

    Add invocation mirror

    Add support for method references

    make infer static

    Cleanup interface

    Fix constructor access

    Test method reference

    Cleanup method ref types

    Test constructor reference

    Test overload resolution, fix TODO

    Fix ctdecl of mref on non-ground target type

    Add graph walk strategy

    Document

    Use toposort

    Make enum constant implement ctor invoc mirror

    Work on context

    Test conditional expr type

    Handle switch exprs uniformly

    Fix bugs

    Add type inference performance test case

    Add overload resolution tests

    Cache result of overload selection, only recompute invocation

    Optimise common case in graph building

    Optimise propagation by merging variables

    Fix some tests, cleanup

    Preserve applicability phase

    Improve jsinglechildnode

    Add way to get a field's type

    Make more complex stress test

    Cache bound check results

    Type projection for inference

    Simplify lazy type inference of var ids

    Improve memory usage

    - reuse constant enum sets (by far the biggest leak, given the number of PropagateBounds created)
    - implement substitution without a visitor

    Optimise imports

    Cache hash of classes

    Cleanup

    Add overloads test

    Fix context fetching

    Fix lub bug

    Test switch expr

    Fix rebase

    Remove useless type

    Factorise poly check

    Remove base poly expr

    Fix array initializer

    Remove duplicated numeric literal typing

    Fix inferred iterable type

    Move method resolution phase to upper level

    Delete useless var

    Commit pr plan

    Remove useless method

    Fix enclosing type comb rule

    REVERT ME Remove partial enclosing type support

    Add package info

    Put task list in branch description

    Fix old rebases

    Fix rebase

    Simplify for left recursive ops

    Fix comments

    Fix rebase

    Revert "REVERT ME Remove partial enclosing type support"

    This reverts commit 8080ff1585b3a760fafc957282771baf716f3c7f.

    WIP base type mirrors on symbols

    Make JMethodType not a JTypeMirror

    Figure out getSymbol & type vars

    make type factory non-static

    Add a parameter to visitors

    Fix compilation

    Use symbol table in lazy type resolver

    Move package

    Fix most tests

    Move internal api around

    Specify some stuff

    Split reflect impl from API

    Make AST impl

    Equality routines

    Fix tests

    Move internal symtable doc

    Improve symtableResolver ergonomics

    Poly res tests

    Make AST type factory

    Update

    Make lambda expressions not a MethodlikeNode

    Build local var sym

    Update for switches

    Make Infer not static, fix logging

    Don't expose visitor nature of SymbolResolver

    Cleanup

    Improve type error handling

    Don't throw away CTdecls for an arg mismatch

    Fix more tests

    Local symbol tables

    Symbol table looks in interfaces

    Incompatible changes that should stay on this branch and not be squashed

    ResolveResult

    Explicitly typed lambdas

    Fix some static bugs

    Fix a lot of bugs

    Use FQCN symtable

    Move parsing contexts to upper level

    Cleanup

    DSL to test types

    test subst

    Dont create an exception for each failure

    Stack trace creation takes a significant amount of time

    Remove laziness for fetching method streams

    Streams obfuscate performance analysis by
    delaying the computation until the last
    moment.

    Fix some bugs with unresolved classes

    Also measure performance: full typeres
    is around same time as parsing. This is
    great. At this point 80% of all types
    are resolved (though some type inference
    results are probably incorrect). Mostly
    this comes from the fact that there are
    still AmbiguousNames in the tree.

    Fix problem with varargs

    Handle enclosing types

    Enclosing types

    Fix compil

    Add another stress test

    Refactor primitive subtyping

    Fix rebase

    Fix rebase: tests

    Figure out type factories WIP

    Move type ops into TypeOps

    Move AsSuper

    Figure out type factories WIP

    Make TypeSystem object

    wip

    WIP

    WIP

    Make typeops static

Fix grounding routine

Fix bug with return type

Start fixing tests

Cleanup primitive types

Fix some tests

Add todo

Remove JDK test dependency

Test cases lubbing String and
StringBuilder produce different
outputs on JDK [8, 11[ and 11+, because
StringBuilder was made a Comparable<StringBuilder>
in JDK 11

Implement most specific method selection

Drop JVariableSig from symbol table

Use asOuterSuper instead

Fix local var type inference with foreach.

Fix a lot of stuff based on jdk 12 run

Make type system own symbol factories

Fix intersection with bound

Fix standalone ternary types

Capture field access type

Eg class Foo<T> { T[] field; }
Foo<? extends T>.field : capture(T)[]

Add tests

Delete lexical substs

Fix reflected owner type

Add graph viz

Fix bug with graph reduction

Optimise ivar dependency reduction
by a lot. The previous 60s stress
test now takes 600ms.

Btw at this point type res for the
whole JDK 12 codebase takes 25 secs,
down from 175 on 6.20.0 (7x speedup).

Implement inherited field/class lookup

Fix scoping inside switch statements

Fix a few bugs

Handle inherited methods

Interfaces should inherit Object methods

Move lub into TypeSystem

Handle class types induced by intersections

Fix lambda congruence

Test lambda with intersection type

Fix inference

Fix same type check using equals

Simplify intersection type induction

Remove type sys extension

Simplify sym factories

Finish symbol factory streamlining

Document

Cache non-erased symbols separately

Doc

Revert, erased types are only raw

Get rid of generic constants in TypeSystem

Remove some dead code

Fix exact method reference

Improve unchecked conversion handling

Fix dependency of delegated ivars

Improve logging, fix a few bugs

Test enclosing types

Improve loggin

Print file location

Fix subtyping for wildcards

Fix standalone method types

Fix boxing conversion

Fix promotion on unary exprs

Implement special treatment of getClass()

Add tests for anon classes

Make symbol tables use lists for methods

Fix method reference with void target type

Move graphUtils

Make unresolved types bottom

(instead of top)

It's more likely to be useful. Eg.

Unresolved var = ...;

knownMethod(var);

Here, var must conform to the parameter,
if it is unresolved, we assume that's the
case. Otherwise we would fail resolution
of knownMethod for this call site.

The reverse situation is rarer.

Fix conversions in loose phase

Make JInferenceVar a class

Hide TypePair

Remove special string type

Fix toString of anon classes

Implement overload specificity for generic methdos

Fix anon class ctors

Fix Object methods not in scope in interfaces

Fixing anon class ctors WIP

Fix rebase

Cleanup

Print type var bounds

Fix tests, improve pretty printing

Hide ast sym factory

Fix array method erasure

Fix superclass, uncover bug with substitution

Substitute  type param bounds

Make Array have Object methods

Fix duplicated logging categories

Make root symbolFactory thread safe

Fix overload ambiguity with hiding

Fix exact method when they shadow each other

Make PMultimap type

Make shadowGroup

Make a few utilities to replace import tables

Replace other tables

Cleanup

Compat with old impl

Fix rebase

Port to using sigs

Make base class for shadow groups

Fix method group

Test shadowing of inherited members

Fix bugs with tparams

Specialize to StringMultimap

Big optimizations

Simplify a lot of things, remove caching
of getAllMethods

Factorize group implementations

Add resolveFirst

Fix bug with ctor invocation

Fix type parsing for union types

Generify multimap

Implement nextShadowGroup

Remove unused API of pmultimap

Use interface where possible

Fix tests

Use singleton resolvers more frequently

Remove commons collections dependency

Tries don't make a significant difference
in execution time. Mostly because tries
used in symbol tables are very small.

Remove some api of jtypemirror

Fix shadow barriers

Fix accessibility check for protected member

Qualified ctor invocations have access to inner class name

Make strict stream for profiling

LOOK AT ME strict streams

Strict streams are actually *much* more
efficient for our use case

Extract some stuff into CollectionUtil

Make methods shadow each other

doc

Simplify OptionalBool

Improve strict stream

Eventually I'll remove it

Doc newer symtable

Make PMultimap type

Make shadowGroup

Make a few utilities to replace import tables

Cleanup

Checkout newer sym table from typeres branch

Port

Checkout tests

Port tests, remove old impl

Extract augment function

Move classes back into internal package

Abstract stuff away for pmd-core

Optimise singular map case even more

Fix nextShadowGroup WIP

Make ShadowIterator to replace getNextGroup

Use chain iterator

Add tests

Finish impl

Add tests for supertype enumerator

Add tests for method shadowing in imports

Port to using types etc

Fix tests

Fix outdated tests

Fix anon class ctors

Fix more outdated tests

Object methods should be in scope in interfaces

Fix compil

Make simple signature parser

Make stubs

Figure out loading logic

Progress on type param parsing

Do away with nested classes

Class signatures

It works!

Parse tvar bounds lazily

Fix a lot of stuff

No errors on pmd-core

JDK 13 under 80s

Implement toString everywhere

Try to make the whole thing thread safe

Still a spurious NPE, access flags are weird.
For j.l.invoke.DelegatingMethodHandle
(declared as `final class Holder {}`) the
access flags from the class file are 0x32, and
the enclosing type is null, while when accessed
through reflection, the access flags are correctly
0x10. The class is engineered through VM magic
so idk what happens

Remove shared caching of TypeSystem

The sub caches are not useful anymore
and creating them all the time is wasteful

Add some tests

Fix improper locking

Reorganise typeSystem initialization

Change the name

Doc

Opts

Optimise away some expensive lookaheads in the parser

Doc

Fix modifiers

Optimise big switches in parser

Placing token decls that are frequently used together closer
increases the chance that the compiler generate a TABLESWITCH
instruction instead of a LOOKUPSWITCH. Table switches take
constant lookup time, while lookupswitch is linear. Selection
of table switch is now done for the biggest switches of the
parser: the one in types, in modifiers, in statements, and
at the start of expressions. Other lookup switches are unimportant
because they have very few labels (typically 2).

Optimise variable initializer lookahead

make test rule noop

PARSER Optimise common branches in expressions

PARSER opt blocks & statements

doc

Don't accept void by default

Split signature parsers

Simplify type param parsing

Simplify type params parsing

Some optimisations

Tests

Simplify synchronization

Factorize synchronization logic

Move ConsList into pmd-core

Prune more empty nodes

Use single map for asm resolver

Remove changes to parser

Add option to suppress type inference log entry creation

Use soft references to allow class stubs to be GCed

Fix rebase
2020-07-26 16:35:10 +02:00
Clément Fournier d4febe7fdd Better errors for annotations 2020-07-26 16:24:45 +02:00
Clément Fournier 78f5500eb8 Test 2020-07-26 16:12:42 +02:00
Clément Fournier 320500d3a9 Fix bug in node streams
The drop(1) of FilteredAncestorOrSelfStream didn't work
2020-07-26 15:44:51 +02:00
Clément Fournier 2a14d7363b Complete designer bindings 2020-07-26 15:27:52 +02:00
Clément Fournier 1770cdc227 Remove some methods that depend on type image 2020-07-26 15:10:26 +02:00
Clément Fournier 516a386683 Remove image of ClassOrInterfaceType 2020-07-26 14:30:18 +02:00
Andreas Dangel 9e641a02cf Merge branch 'pmd/7.0.x' into java-grammar 2020-07-25 14:15:50 +02:00
Andreas Dangel 700289bd1a Merge branch 'master' into pmd/7.0.x 2020-07-25 14:07:13 +02:00
Clément Fournier 95d8f49010 Tighter validation 2020-07-25 01:24:57 +02:00
Clément Fournier 64ee073fca Annotation disambiguation 2020-07-25 00:30:30 +02:00
Clément Fournier c481b4e90a Merge branch '7.0.x' into apex-generic-visitor 2020-07-24 21:25:37 +02:00
Andreas Dangel f522532d40 Merge branch 'pmd/7.0.x' into java-grammar 2020-07-24 12:15:18 +02:00
Andreas Dangel 2f5cfd194f [core] Remove deprecated ImportWrapper (#2658) 2020-07-24 12:04:18 +02:00
Andreas Dangel a84c83adea Merge branch 'master' into pmd/7.0.x 2020-07-24 12:03:28 +02:00
Andreas Dangel 0edc22b877 Fix compilation errors 2020-07-24 11:42:18 +02:00
Andreas Dangel 024d411aee Merge branch 'pmd/7.0.x' into java-grammar 2020-07-24 11:25:44 +02:00
Andreas Dangel cf6915bdcd Merge branch 'master' into pmd/7.0.x 2020-07-24 10:53:18 +02:00
Andreas Dangel 7d06b053dd Fix checkstyle 2020-07-24 10:45:19 +02:00
Clément Fournier 3c68fab165 Fix compil 2020-07-23 17:41:13 +02:00
Clément Fournier 14777e5d7b cleanup AbstractJavaRule 2020-07-23 17:30:10 +02:00
Clément Fournier 1171afbfb1 Remove combine/zero from base visitor
This is just not so useful, most visitors use
side effects on the parameter, or, return the
parameter, which is only possible if `P = R`,
and so only known in the specific subclass.
2020-07-23 17:28:01 +02:00
Clément Fournier 8f6c6e429b Cleanup UnusedAssignment 2020-07-23 17:25:02 +02:00
Clément Fournier 5b15b8ad58 Fix metrics 2020-07-23 17:13:53 +02:00
Clément Fournier 437222db22 Fix rules 2020-07-23 17:07:14 +02:00
Clément Fournier b81baebf79 Convert cyclo visitor 2020-07-23 16:56:50 +02:00
Clément Fournier 783a7b0583 Update jjtAccept 2020-07-23 16:49:18 +02:00
Clément Fournier 80a75a1f42 Change names of some methods to clarify overloading
This way you don't need to upcast a node to eg JavaNode
in order to call the next method to delegate:

```java
visit((JavaNode) node, data) -> visitJavaNode(node, data)
```

This prevents writing `visit(node, data)` and not being
sure what overload is called.
2020-07-23 16:29:52 +02:00
Clément Fournier 97322010e1 Remove 'reduced' visitor 2020-07-23 16:09:45 +02:00
Clément Fournier 9dd370236b Add default method to apex visitor 2020-07-23 16:09:32 +02:00
Clément Fournier d1971c8c13 Merge branch '7.0.x' into java-grammar 2020-07-23 15:57:48 +02:00
Clément Fournier 49d0d2aebc Merge branch 'master' into 7.0.x 2020-07-23 15:55:13 +02:00
Clément Fournier 74a1cf520e Touchups 2020-07-19 20:53:00 +02:00
Clément Fournier 993e933cc4 Merge branch '7.0.x' into java-grammar 2020-07-19 20:38:56 +02:00
Andreas Dangel df44de6366 Fix unit tests (wrong merge) 2020-07-19 20:16:30 +02:00
Andreas Dangel 15925bcc9e Fix compile errors, update to new visitor 2020-07-19 20:06:44 +02:00
Clément Fournier 545aa3388d Merge branch 'master' into 7.0.x 2020-07-19 20:00:29 +02:00
Andreas Dangel 9bb5f375e3 Merge branch 'pmd/7.0.x' into java-grammar 2020-07-19 19:39:45 +02:00
Andreas Dangel 6c3f8c4bfb Merge branch 'pr-2601' into java-grammar
[java] Rewrite symbol table #2601
2020-07-19 18:46:02 +02:00
Andreas Dangel a9996ab45c Merge branch 'pr-2589' into pmd/7.0.x
[core] Add generic visitor interface in pmd-core #2589
2020-07-19 18:07:55 +02:00
Clément Fournier a3d0ebc766 Checkstyle 2020-07-18 16:39:40 +02:00
Clément Fournier 5857ff2b5f Fix eclipse compile errors (refs #2611)
- Bug with captured tvar inference in IteratorBasedNStream
  -> replaced by lambda

- Bug with improperly resolved nested type, around the antlr classes
  -> fixed by qualifying the types. This is a scoping bug of the eclipse
  compiler.

- Bug with `Node::children` not being resolved to the overridden variant
for `GenericNode<DummyNode>`, in tests using DummyRoot
  -> a bug in the eclipse compiler. Problem looks like, this declaration
of DummyRoot is not handled correctly:

```java
class DummyRoot extends DummyNode implements RootNode {}
```

  -> DummyNode implements GenericNode<DummyNode> transitively,
so inherits the refined version `NodeStream<? extends DummyNode> GenericNode<DummyNode>::children()`.
  -> But RootNode extends Node directly, and eclipse sees that
its type for the inherited `children` method is `NodeStream<? extends Node> Node::children();`
  -> A java compiler should prove that the method inherited from Node
through DummyRoot is overridden by the one inherited from GenericNode
through DummyNode
  -> A workaround is to respecify that DummyRoot implements
`GenericNode<DummyNode>` explicitly:

```java
class DummyRoot extends DummyNode implements GenericNode<DummyNode>, RootNode {}
```

- Same thing with JavaNode, still because of RootNode (and AccessNode,
which incorrectly extended Node instead of JavaNode)
2020-07-18 16:33:31 +02:00
Andreas Dangel a01729db7a Fix compilation 2020-07-17 17:28:14 +02:00
Andreas Dangel c7d884c629 Merge branch 'pmd/7.0.x' into java-grammar 2020-07-17 16:38:12 +02:00
Andreas Dangel 884c0f4e9e Fix compilation 2020-07-17 16:32:24 +02:00
Andreas Dangel dcaa8a1167 Merge branch 'master' into pmd/7.0.x 2020-07-17 16:13:02 +02:00
Andreas Dangel ffe5fadb5c Merge branch 'pmd/7.0.x' into java-grammar 2020-07-11 11:35:48 +02:00
Andreas Dangel d9106b0251 Fix checkstyle 2020-07-11 11:14:28 +02:00
Clément Fournier c4c9ef37a1 Remove duplicate pcollection dep 2020-07-06 13:47:25 +02:00
Clément Fournier ad6c976898 Merge branch 'java-grammar' into sym-optimize-symtables 2020-07-06 13:41:45 +02:00
Clément Fournier 947b57624f Fix merge 2020-07-06 13:19:53 +02:00
Clément Fournier 9577e156f9 Merge branch '7.0.x' into java-grammar 2020-07-06 13:14:11 +02:00
Clément Fournier 8cfe06f59a Remove DummyJavaNode
Refs #2627
2020-07-06 13:13:32 +02:00
Clément Fournier 94bcb0c31b Merge branch 'master' into 7.0.x 2020-07-06 13:09:40 +02:00
Clément Fournier a7d6e52c54 Fix javadoc warning 2020-07-01 11:18:17 +02:00
Clément Fournier 25beb215fc Throw on incompatible visitor type 2020-07-01 11:16:03 +02:00
Clément Fournier feeb1f0a87 Fix swift module 2020-07-01 11:09:12 +02:00
Clément Fournier 27ea6a92e5 Rename ant property 2020-07-01 11:06:48 +02:00
Clément Fournier 94595fe185 Merge branch '7.0.x' into generic-visitor2 2020-07-01 10:09:26 +02:00
Clément Fournier beecae4579 Merge branch 'master' into 7.0.x 2020-06-27 19:50:30 +02:00
Clément Fournier 6648219d8e Merge branch '7.0.x' into java-grammar 2020-06-27 18:19:14 +02:00
Clément Fournier 5dd3a2d751 Merge branch 'master' into 7.0.x 2020-06-27 18:18:55 +02:00
Andreas Dangel cffff1f87f Merge branch 'pmd/7.0.x' into java-grammar 2020-06-27 14:34:55 +02:00
Andreas Dangel bc660e8807 Merge branch 'master' into pmd/7.0.x 2020-06-27 14:24:52 +02:00
Clément Fournier 4bb98df37b Fix compil 2020-06-27 14:22:42 +02:00
Clément Fournier 623adce024 Checkstyle 2020-06-27 13:24:09 +02:00
Clément Fournier 06904e7145 Remove support for list attrs 2020-06-27 13:22:34 +02:00
Clément Fournier c6457ab9fc Merge branch '7.0.x' into generic-visitor2 2020-06-26 23:10:19 +02:00
Clément Fournier ad3e8b1fd5 Merge branch '7.0.x' into update-saxon-version 2020-06-26 23:08:50 +02:00
Andreas Dangel f9e0afe466 Merge branch 'pmd/7.0.x' into java-grammar 2020-06-26 18:48:09 +02:00
Andreas Dangel 7ccd087701 Fix compile errors 2020-06-26 18:38:15 +02:00
Andreas Dangel 5c0bc8d362 Merge branch 'master' into pmd/7.0.x 2020-06-26 18:30:03 +02:00
Andreas Dangel 173de42387 Merge branch 'pmd/7.0.x' into java-grammar 2020-06-26 11:15:18 +02:00
Andreas Dangel cc0f7ad331 [core] Simplify the rulechain #2490
Merge branch 'pr-2490' into pmd/7.0.x

Fixes #1785
2020-06-26 11:12:07 +02:00
Andreas Dangel 642121c86b Fix compile error 2020-06-26 11:11:53 +02:00
Andreas Dangel 00dbe08282 Merge branch 'pmd/7.0.x' into pr-2490 2020-06-26 10:58:18 +02:00
Andreas Dangel 2407412008 Merge branch 'master' into pmd/7.0.x 2020-06-26 10:49:58 +02:00
Clément Fournier 18f5c7f624 Remove xpath version properties in category xmls
Update default version to 3.1
2020-06-25 23:50:43 +02:00
Clément Fournier d0c45c5bb3 Checkstyle 2020-06-25 16:54:52 +02:00
Clément Fournier b03822f5a7 Fix java module, simplify it 2020-06-25 16:44:50 +02:00
Clément Fournier 532d97d3db Update to saxon 10.1 2020-06-25 16:27:46 +02:00
Clément Fournier 847c4de68b Merge branch '7.0.x' into generic-visitor2 2020-06-25 14:30:46 +02:00
Clément Fournier 436edf8091 Fix swift tests 2020-06-22 23:55:26 +02:00
Clément Fournier 5b10027187 Fix java test 2020-06-22 23:50:42 +02:00
Clément Fournier 636ea77b9e Checkstyle 2020-06-22 23:45:59 +02:00
Clément Fournier 399fdd7b47 Move classes around 2020-06-22 21:17:16 +02:00
Clément Fournier c1e242adcf Merge branch '7.0.x' into update-saxon-version 2020-06-22 19:44:46 +02:00
Clément Fournier 05021a22f6 Merge branch '7.0.x' into java-grammar 2020-06-21 18:21:22 +02:00
Clément Fournier dc207a0478 Merge branch 'master' into 7.0.x 2020-06-21 18:07:25 +02:00
Clément Fournier 74f88ace4e Merge branch '7.0.x' into update-saxon-version 2020-06-21 18:07:15 +02:00
Andreas Dangel 93edd66ddd Merge branch 'pmd/7.0.x' into java-grammar 2020-06-21 13:12:51 +02:00
Andreas Dangel a329621403 Merge branch 'pr-2463' into pmd/7.0.x
[swift] Refactor antlr implementation #2463
2020-06-21 12:25:41 +02:00
Andreas Dangel c40cbdf867 Fix tests - CPD end columns are exclusive on PMD 7
See 5b7ed588ea
2020-06-21 12:22:28 +02:00
Andreas Dangel 891010468a Merge branch 'master' into pmd/7.0.x 2020-06-21 12:00:32 +02:00
Andreas Dangel 8cc597f7b4 [swift] Add missing junit-vintage-engine 2020-06-21 11:55:34 +02:00
Andreas Dangel 36a9010a1e Condense antlr4-maven-plugin config 2020-06-21 11:45:21 +02:00
Andreas Dangel f46ff401ec [java] Disable JavaTokenizerTest until java grammar changes are finalized 2020-06-20 10:21:03 +02:00
Clément Fournier bc604ab747 Merge branch '7.0.x' into java-grammar 2020-06-19 02:22:24 +02:00
Clément Fournier 5b7ed588ea Make CPD end column exclusive
This is to align it with PMD columns,
which in 7.0 are already exclusive.
2020-06-19 02:21:45 +02:00
Clément Fournier c49d9e315f Merge branch 'master' into 7.0.x 2020-06-19 01:32:32 +02:00
Clément Fournier 2bf00f482d Remove Jaxen 2020-06-18 18:08:29 +02:00
Clément Fournier abd50366f8 Reimplement findChildNodesWithXPath with xpath 2 2020-06-18 17:55:27 +02:00
Clément Fournier 9a9f2a653c Log deprecated attributes in suppression 2020-06-18 17:32:52 +02:00
Clément Fournier bf1d6f7386 Merge branch '7.0.x' into update-saxon-version 2020-06-18 17:25:48 +02:00
Clément Fournier 11d29fce18 Merge branch 'master' into 7.0.x 2020-06-18 17:24:51 +02:00
Clément Fournier 887e57ae2c Compat with master 2020-06-18 17:15:26 +02:00
Clément Fournier 9054303b4b doc 2020-06-18 16:53:35 +02:00
Clément Fournier 8f0b62f46d Cleanup pcollections dependency 2020-06-18 16:53:35 +02:00
Clément Fournier 268a3e4529 PMD violation 2020-06-18 16:53:35 +02:00
Clément Fournier a7051c4e37 Report ambiguity errors 2020-06-18 16:53:35 +02:00
Clément Fournier a7db7824cd Fix context accessibility 2020-06-18 16:53:35 +02:00
Clément Fournier 2deef0bc28 Make disambiguation handle inherited types 2020-06-18 16:53:35 +02:00
Clément Fournier 36c9e97cde Fix socping 2020-06-18 16:53:35 +02:00
Clément Fournier a520d1df3f Move ScopeInfo into published package 2020-06-18 16:53:34 +02:00
Clément Fournier 43a60c0f89 Fix bug with shadow iterator 2020-06-18 16:53:34 +02:00
Clément Fournier 4d75f64a8e Prune more empty nodes 2020-06-18 16:53:34 +02:00
Clément Fournier 54c0b994a5 Move ConsList into pmd-core 2020-06-18 16:53:34 +02:00
Clément Fournier e43eeeaa2e Remove recursion guard 2020-06-18 16:53:34 +02:00
Clément Fournier 134c760e28 Split API 2020-06-18 16:53:34 +02:00
Clément Fournier a5856e75a4 Doc 2020-06-18 16:53:34 +02:00
Clément Fournier ab9ec47aaf Change the name 2020-06-18 16:53:34 +02:00
Clément Fournier 1b48125eb3 Doc 2020-06-18 16:53:34 +02:00
Clément Fournier 5134a33d21 Object methods should be in scope in interfaces 2020-06-18 16:53:34 +02:00
Clément Fournier 841fd6b1ba Add tests for method shadowing in imports 2020-06-18 16:53:34 +02:00
Clément Fournier 5630372750 Add tests for supertype enumerator 2020-06-18 16:53:34 +02:00
Clément Fournier eb976a1de2 Finish impl 2020-06-18 16:53:34 +02:00
Clément Fournier 46da94c915 Specify tests for ambiguity
TODO implement
2020-06-18 16:53:34 +02:00
Clément Fournier bac76fc16c Add tests 2020-06-18 16:53:34 +02:00
Clément Fournier 7bf9554570 Use chain iterator 2020-06-18 16:53:34 +02:00
Clément Fournier 5606d387a7 Make ShadowIterator to replace getNextGroup 2020-06-18 16:53:34 +02:00
Clément Fournier 849d6dd91f Fix nextShadowGroup WIP 2020-06-18 16:53:34 +02:00
Clément Fournier c4ffa795f4 Optimise singular map case even more 2020-06-18 16:53:34 +02:00
Clément Fournier 57ab1e4933 Abstract stuff away for pmd-core 2020-06-18 16:53:34 +02:00
Clément Fournier 536eab300c Move classes back into internal package 2020-06-18 16:53:34 +02:00
Clément Fournier 41b0713a72 Extract augment function 2020-06-18 16:53:34 +02:00
Clément Fournier 0cd4469746 Port tests, remove old impl 2020-06-18 16:53:34 +02:00
Clément Fournier fcb2bf6ae5 Checkout tests 2020-06-18 16:53:34 +02:00
Clément Fournier 672718c752 Port 2020-06-18 16:53:34 +02:00
Clément Fournier c32dba7004 Checkout newer sym table from typeres branch 2020-06-18 16:53:34 +02:00
Clément Fournier 691fced420 Fix rebase 2020-06-18 16:53:34 +02:00
Clément Fournier 1db3537fa3 Compat with old impl 2020-06-18 16:53:34 +02:00
Clément Fournier eaecefe404 Cleanup 2020-06-18 16:53:34 +02:00
Clément Fournier 3d2899005f Replace other tables 2020-06-18 16:53:34 +02:00
Clément Fournier 4de86bd9a4 Make a few utilities to replace import tables 2020-06-18 16:53:34 +02:00
Clément Fournier 480ee17847 Make shadowGroup 2020-06-18 16:53:34 +02:00
Clément Fournier 0b7b397c8a Make PMultimap type 2020-06-18 16:53:34 +02:00
Andreas Dangel 147cdac886 Merge branch 'pmd/7.0.x' into java-grammar 2020-06-18 15:43:01 +02:00
Andreas Dangel a9777d74de Fix compile error 2020-06-18 15:37:08 +02:00
Andreas Dangel ff6075135f Merge branch 'master' into pmd/7.0.x 2020-06-18 15:22:37 +02:00
Clément Fournier fbc93e43cb Rename nodes so they don't have the 'context' suffix 2020-06-17 22:15:18 +02:00
Clément Fournier 6c053b5edd Transform antlr visitor to be compatible with #2589 2020-06-17 21:28:23 +02:00
Clément Fournier 88b34feb22 Use wildcards for acceptVisitor 2020-06-17 21:21:00 +02:00
Clément Fournier aa1acb068b Merge branch '7.0.x' into antlr-touchups 2020-06-17 20:08:08 +02:00
Clément Fournier 0585e37e2c Merge branch '7.0.x' into java-grammar 2020-06-15 17:49:57 +02:00
Clément Fournier 550e56d873 Merge branch 'master' into 7.0.x 2020-06-15 17:48:59 +02:00
Clément Fournier e340376e6a Merge branch 'new-logo-page' into 7.0.x 2020-06-15 17:38:46 +02:00
Clément Fournier 861119a31f Merge branch '7.0.x' into new-logo-page 2020-06-15 17:38:27 +02:00
Clément Fournier ce8166c324 Merge branch '7.0.x' into antlr-touchups 2020-06-15 17:20:27 +02:00
Clément Fournier 4327112609 Merge branch '7.0.x' into generic-visitor2 2020-06-15 17:14:00 +02:00
Clément Fournier ee1afed8c5 Fix scala stackoverflow 2020-06-15 17:10:28 +02:00
Clément Fournier 843d645d87 Fix a bug 2020-06-15 17:06:33 +02:00
Clément Fournier dde2df8925 Fix ordering problem
Change behavior of LoosePackageCoupling

It stores state between visits, should not
use the rulechain
2020-06-15 15:53:32 +02:00
Clément Fournier 25d1358af1 Checkstyle 2020-06-15 01:11:32 +02:00
Clément Fournier 47667a0e35 Merge branch '7.0.x' into type-heap 2020-06-14 21:42:38 +02:00
Clément Fournier 08613786c3 Merge branch 'apex-single-rootnode-2' into 7.0.x 2020-06-14 21:39:01 +02:00
Clément Fournier 5599d54310 Merge branch 'master' into 7.0.x 2020-06-14 21:38:20 +02:00
Clément Fournier 75c7971814 Merge branch 'update-all-properties' into 7.0.x 2020-06-14 19:05:46 +02:00
Clément Fournier d3d75fa0b9 Merge branch '7.0.x' into apex-single-rootnode-2 2020-06-14 19:04:45 +02:00
Clément Fournier 57d85b7c9c Fix pmd warnings 2020-06-14 19:02:48 +02:00
Clément Fournier 4fb940df63 Update to Saxon 9
Not as stable as 8, but fixes a
bug in the optimizer
2020-06-14 18:38:51 +02:00
Clément Fournier 44cd24b958 Fix bugs 2020-06-14 16:59:46 +02:00
Clément Fournier 87c0145887 RAAA fix bug with venn expression not at toplevel
eg (//a | //b)/c
2020-06-14 15:09:07 +02:00
Clément Fournier b71adce5b9 Merge branch '7.0.x' into update-saxon-version 2020-06-14 14:09:15 +02:00
Clément Fournier f7b1c375c1 Fix scala compilation 2020-06-14 13:02:30 +02:00
Clément Fournier b88ddf41c0 Add generic visitor interface in pmd-core
Replace SideEffectingVisitor with JavaVisitor

The new visitor is generic. We don't actually need the
old Object->Object visitor, this could just be the new
generic visitor but erased

Port language level checker

Move delegators

Remove old accept methods

Remove reduced adapter

Cleanup some visitor

Make ant wrapper replace old visitor completely

Doc

Add DeprecatedUntil700 annotation

Add top interface for visitors

Convert JSP visitors

Checkstyle

Fix java module
2020-06-14 11:43:24 +02:00
Andreas Dangel 91a51f44b4 [doc] Remove tagline from logo 2020-06-12 19:00:21 +02:00
Clément Fournier 05715ac13c Merge branch '7.0.x' into update-all-properties 2020-06-12 17:32:30 +02:00
Andreas Dangel cdeff1ab5c Merge branch 'pmd/7.0.x' into java-grammar 2020-06-12 14:35:09 +02:00
Andreas Dangel c3219b91c5 Merge branch 'master' into pmd/7.0.x 2020-06-12 14:21:10 +02:00
Andreas Dangel 4c0504ba53 [doc] Create a logo page for the new logo 2020-05-29 10:40:32 +02:00
Andreas Dangel 3b16c03f9a Merge branch 'pmd/7.0.x' into java-grammar 2020-05-29 10:06:57 +02:00
Andreas Dangel fe218f8093 Merge branch 'master' into pmd/7.0.x 2020-05-29 09:31:23 +02:00
Andreas Dangel 5bf2d1e809 Merge branch 'pmd/7.0.x' into java-grammar 2020-05-24 18:13:14 +02:00
Andreas Dangel a283b9cebc [swift] remove generated rule docs 2020-05-24 18:10:26 +02:00
Andreas Dangel 9a20df621a Fix removed rule references 2020-05-24 18:09:07 +02:00
Andreas Dangel 510d5c633a Merge branch 'master' into pmd/7.0.x 2020-05-24 17:47:30 +02:00
Andreas Dangel 2ece4969f1 Fix compilation 2020-05-23 13:04:23 +02:00
Andreas Dangel 18749b01ec Merge branch 'pmd/7.0.x' into java-grammar 2020-05-23 12:05:24 +02:00
Andreas Dangel 2dae9c085f Merge branch 'master' into pmd/7.0.x 2020-05-23 11:42:20 +02:00
Clément Fournier 4b891615eb Use CaseConvention to deprecate some stuff 2020-05-21 18:38:46 +02:00
Clément Fournier adc3fcbbe1 Merge branch '7.0.x' into update-all-properties 2020-05-21 17:32:02 +02:00
Clément Fournier 5bafd8e56b Delete redundant tests 2020-05-21 17:31:59 +02:00
Clément Fournier 25e4ab8393 Fix compil 2020-05-21 14:22:00 +02:00
Clément Fournier 634a349678 Simplify benchmark keys 2020-05-21 11:03:59 +02:00
Clément Fournier 47c4d57aa2 Merge branch '7.0.x' into antlr-touchups 2020-05-21 10:55:14 +02:00
Clément Fournier cae73a8ac2 Merge branch '7.0.x' into type-heap 2020-05-21 10:51:23 +02:00
Clément Fournier 53529f0f39 Merge branch '7.0.x' into apex-single-rootnode-2 2020-05-21 10:50:59 +02:00
Clément Fournier a8ceb5d844 Merge branch '7.0.x' into java-grammar 2020-05-21 10:48:05 +02:00
Clément Fournier a2a9353f15 Merge branch 'master' into 7.0.x 2020-05-21 10:44:39 +02:00
Clément Fournier 071e0b160b Merge branch '7.0.x' into java-grammar 2020-05-18 21:51:44 +02:00
Clément Fournier 56f9da34d7 Fix compilation 2020-05-18 21:12:42 +02:00
Clément Fournier 584ccc806b Remove useless implements Node 2020-05-18 16:21:04 +02:00
Clément Fournier e198b6afb5 Fix tests 2020-05-18 16:08:25 +02:00
Clément Fournier 00a2497c9d Make apex version available 2020-05-18 16:08:25 +02:00
Clément Fournier 39ff1145c4 Remove apex CanSuppressWarnings 2020-05-18 16:08:25 +02:00
Clément Fournier e248bac57b Make apex have a single root node 2020-05-18 16:08:25 +02:00
Clément Fournier dfb1c2f080 Simplify apex parser 2020-05-18 16:08:25 +02:00
Clément Fournier eccf354861 Replace usages of addRulechainVisit 2020-05-18 15:53:44 +02:00
Clément Fournier 425e537918 Checkstyle 2020-05-18 14:57:56 +02:00
Clément Fournier e8f83dce2d Fix test 2020-05-18 14:57:56 +02:00
Clément Fournier 9df92f8ef8 Make PSet collector 2020-05-18 14:57:55 +02:00
Clément Fournier de8c4b8a5a Fix rebase 2020-05-18 14:57:55 +02:00
Clément Fournier f1b29e0d76 Doc 2020-05-18 14:57:55 +02:00
Clément Fournier 480417bde8 Document CollectionUtil, add some other useful things 2020-05-18 14:57:55 +02:00
Clément Fournier fa48db748a Cleanup 2020-05-18 14:57:55 +02:00
Clément Fournier 7ad3a4db2d Use regular set instead of PSet internally 2020-05-18 14:57:55 +02:00
Clément Fournier 62d2c516ed Use iterable in topoorder 2020-05-18 14:57:55 +02:00
Clément Fournier bb866bb5cb Factorise part of the impl 2020-05-18 14:57:55 +02:00
Clément Fournier 46bbfda2db Generalize output value with a collector 2020-05-18 14:57:55 +02:00
Clément Fournier 969f7148bf Remove need for independent read/write states 2020-05-18 14:57:55 +02:00
Clément Fournier 319e65a4a2 Remove need for blackhole node
The lattice does a transitive closure implicitly
too. And we don't need to care about diamond anymore
This is NICE
2020-05-18 14:57:55 +02:00
Clément Fournier 43f6fec88b doc 2020-05-18 14:57:55 +02:00
Clément Fournier 68dff545d9 Checkstyle 2020-05-18 14:57:55 +02:00
Clément Fournier 862c2f17d8 Doc 2020-05-18 14:57:55 +02:00
Clément Fournier 73caeff081 Extract dot graph dumper 2020-05-18 14:57:55 +02:00
Clément Fournier e54e43507c Fix JS tests 2020-05-18 14:57:55 +02:00
Clément Fournier 44eb3572f8 Take care of API
RuleTargetSelector is published,
however none of its members are,
and subclassing it is impossible.
Rest of the types are internal.
2020-05-18 14:57:55 +02:00
Clément Fournier 7126fd6c94 cleanup 2020-05-18 14:57:55 +02:00
Clément Fournier e69e8bf8e8 Go back to freeze/unfreeze cycle
This avoids recursing to invalidate successors all the time
2020-05-18 14:57:55 +02:00
Clément Fournier 17e041334f Preserve leaves 2020-05-18 14:57:55 +02:00
Clément Fournier 8e1f81eff3 Detect cycles 2020-05-18 14:57:55 +02:00
Clément Fournier b1b7cccdbf Remove freeze stuff
Everything handled by construction
2020-05-18 14:57:55 +02:00
Clément Fournier 6ad1bf75ea Filter nodes upon construction
This will remove the need for a freeze phase
2020-05-18 14:57:55 +02:00
Clément Fournier fb52188a3b Filter rule applicator by classes 2020-05-18 14:57:55 +02:00
Clément Fournier 50909dc834 More tests 2020-05-18 14:57:55 +02:00
Clément Fournier 21aa2efbbf Remove monoid abstraction
Unlikely to change because of tight contract, reduces complexity
2020-05-18 14:57:55 +02:00
Clément Fournier c13951ee46 Add set filter 2020-05-18 14:57:55 +02:00
Clément Fournier d2425a90e4 Remove 1 loop + 1 list creation 2020-05-18 14:57:55 +02:00
Clément Fournier 45471bb3f3 Remove need for path matrix
Since graph is sparse, this is much better
2020-05-18 14:57:55 +02:00
Clément Fournier eb69634370 Test 2020-05-18 14:57:55 +02:00
Clément Fournier 047e4651b6 Avoid transitive closure 2020-05-18 14:57:55 +02:00
Clément Fournier a70c93c454 Mandate idempotence
Makes it much easier to reason about
2020-05-18 14:57:55 +02:00
Clément Fournier 351e53866c Fix tests 2020-05-18 14:57:55 +02:00
Clément Fournier 7d48a1e111 Only index what's important 2020-05-18 14:57:55 +02:00
Clément Fournier e53495e762 Cleanup 2020-05-18 14:57:54 +02:00
Clément Fournier 473d96f02f Fix up2date check
Because of filtering, we're removing some
nodes that may be readded
2020-05-18 14:57:54 +02:00
Clément Fournier e70c886114 Cleanup 2020-05-18 14:57:54 +02:00
Clément Fournier 89140c9760 Comments 2020-05-18 14:57:54 +02:00
Clément Fournier 349cb1c7c1 Fix order of graph output 2020-05-18 14:57:54 +02:00
Clément Fournier dd1c82a02a Nail monoid properties
We need commutativity, but can work
around idempotence by being smarter
the impl of the reduction op
2020-05-18 14:57:54 +02:00
Clément Fournier 83fb4ce663 Actually we don't need idempotence 2020-05-18 14:57:54 +02:00
Clément Fournier 28bf4d918e Remove diamond detection
If we just mandate that the monoid
be idempotent, which is the case for
set monoids, then we can just avoid
this and reduce complexity of the
implementation.
2020-05-18 14:57:54 +02:00
Clément Fournier 1b68a2683f Add tests 2020-05-18 14:57:54 +02:00
Clément Fournier 1054dbc772 Prune non-public types 2020-05-18 14:57:54 +02:00
Clément Fournier 2ca2e77551 Cleanup lattice 2020-05-18 14:57:54 +02:00
Clément Fournier 8f13dd82f0 Replace Node#apply(List<Node>) with apply(Node) 2020-05-18 14:57:54 +02:00
Clément Fournier f27d5fb5f6 Cleanup Rule methods 2020-05-18 14:57:54 +02:00
Clément Fournier c6965c62a0 Revert changes to typeres 2020-05-18 14:57:54 +02:00
Clément Fournier 697db53c4c Doc 2020-05-18 14:57:54 +02:00
Clément Fournier ea2a4a1515 Revert changes to test framework 2020-05-18 14:57:54 +02:00
Clément Fournier 9af5268605 Cleanup 2020-05-18 14:57:54 +02:00
Clément Fournier cc23b61b03 Improve test XML schema 2020-05-18 14:57:54 +02:00
Clément Fournier e69080d9e8 Fix tests 2020-05-18 14:57:54 +02:00
Clément Fournier ce33f159a5 Force parsers to return RootNode 2020-05-18 14:57:54 +02:00
Clément Fournier 2670a9fdee Port java rules 2020-05-18 14:57:54 +02:00
Clément Fournier dc9bb62630 Cleanup 2020-05-18 14:57:54 +02:00
Clément Fournier e0ac470c5e Improve performance of classloader 2020-05-18 14:57:54 +02:00
Clément Fournier 60d276c2a0 Remove old rulechain impl 2020-05-18 14:57:53 +02:00
Clément Fournier 79e3fa264b Fix xpath rulechain 2020-05-18 14:56:54 +02:00
Clément Fournier b428629c7d Allow preserving topology 2020-05-18 14:56:54 +02:00
Clément Fournier 47fb790bd6 Use node stream lattice 2020-05-18 14:56:54 +02:00
Clément Fournier 8c82441265 Use persistent collections 2020-05-18 14:56:54 +02:00
Clément Fournier 9ff844921b Implement real toposort 2020-05-18 14:56:54 +02:00
Clément Fournier d4f1f863da Test topo order 2020-05-18 14:56:54 +02:00
Clément Fournier bd4da2c99c Fix diamond situation 2020-05-18 14:56:54 +02:00
Clément Fournier d1d498146f Test monoids 2020-05-18 14:56:54 +02:00
Clément Fournier 200bafce3a Make monoid extend BinaryOperator 2020-05-18 14:56:54 +02:00
Clément Fournier 35a966f606 Rename 2020-05-18 14:56:54 +02:00
Clément Fournier 7998622c4f Encapsulate behaviour in strategies 2020-05-18 14:56:54 +02:00
Clément Fournier 24a4a89e9e Extract monoid impls 2020-05-18 14:56:54 +02:00
Clément Fournier c0a1455aa7 Make heap freezable 2020-05-18 14:56:54 +02:00
Clément Fournier 7f03b3cc22 Remove monotonic set 2020-05-18 14:56:54 +02:00
Clément Fournier 19212f9488 Define everything in terms of rulechain with a heap structure 2020-05-18 14:56:54 +02:00
Clément Fournier 3348e634ca Optimise rulechain lookup 2020-05-18 14:56:54 +02:00
Clément Fournier 923eda931f Generalized rchain 2020-05-18 14:56:54 +02:00
Clément Fournier 41f11a9043 Merge branch '7.0.x' into java-grammar 2020-05-18 14:56:36 +02:00
Clément Fournier 1c09a4f8be Merge branch 'master' into 7.0.x 2020-05-18 14:55:38 +02:00
Clément Fournier 2dcf4598d8 Merge branch '7.0.x' into java-grammar 2020-05-13 17:47:40 +02:00
Clément Fournier b3db34042f Merge branch 'master' into 7.0.x 2020-05-13 17:47:21 +02:00
Clément Fournier 4ee801b74d WIP 2020-05-08 22:28:01 +02:00
Clément Fournier 39d3c4c35a Revert "Revert "Inline values of properties""
This reverts commit 7b282ce58b.
2020-05-08 04:56:50 +02:00
Clément Fournier 726b67ec62 Make violation suppression use XPath 2 2020-05-08 04:50:28 +02:00
Clément Fournier 52ed41c027 Remove test about list attributes 2020-05-08 04:15:41 +02:00
Clément Fournier 87c4d84d61 Fix tests 2020-05-08 04:03:08 +02:00
Clément Fournier d39378eb71 Merge branch '7.0.x' into update-saxon-version 2020-05-08 03:43:40 +02:00
Clément Fournier 7b282ce58b Revert "Inline values of properties"
This reverts commit 3d463d78f3.

This can be done later.
2020-05-08 03:41:45 +02:00
Clément Fournier f1d6e22c49 Reintroduce AntlrNode 2020-05-02 23:17:47 +02:00
Clément Fournier 7a2701fd38 Store constant images in the name dictionary 2020-05-02 22:56:42 +02:00
Clément Fournier 3190c0365c Fix rule tests 2020-05-02 22:56:42 +02:00
Clément Fournier 473ae2ef19 Fix child index 2020-05-02 22:56:42 +02:00
Clément Fournier 42308da047 Fix name dictionary (all tokens need a name) 2020-05-02 22:56:42 +02:00
Clément Fournier 06a910fe11 Doc 2020-05-02 22:56:42 +02:00
Clément Fournier 4820e812e3 Fix error nodes not extending SwiftNode 2020-05-02 22:56:42 +02:00
Clément Fournier cc97807d41 Fix error nodes 2020-05-02 22:56:42 +02:00
Clément Fournier 1359f792c2 Abstract ant wrapper for antlr 2020-05-02 22:56:42 +02:00
Clément Fournier 3aadb253a3 Use adapters to be able to make pmd nodes first-class 2020-05-02 22:56:42 +02:00
Clément Fournier b03dc09f2b WIP dont extend antlr classes 2020-05-02 22:56:42 +02:00
Clément Fournier f7560ed9fb Preserve terminal nodes 2020-05-02 22:56:42 +02:00
Clément Fournier 97fef3fbd9 Fix tree builder, add tests 2020-05-02 22:56:42 +02:00
Clément Fournier 4e55164961 Refactor antlr impl entirely
PMD Node implementations don't extend antlr
classes anymore
2020-05-02 22:56:42 +02:00
Clément Fournier 9effca7143 Build tree using a parse tree listener 2020-05-02 22:56:42 +02:00
Clément Fournier f0652dda76 Remove parser type parameter 2020-05-02 22:56:42 +02:00
Clément Fournier f779688cab Make getText @NoAttribute 2020-05-02 22:56:42 +02:00
Clément Fournier 13b7fa6152 Turn ProhibitedInterfaceBuilder into XPath rule 2020-05-02 22:56:42 +02:00
Clément Fournier cf37bba1b4 Reimplement swift rules without @Text 2020-05-02 22:56:42 +02:00
Clément Fournier a857667ef8 Fix terminal XPath names 2020-05-02 22:56:42 +02:00
Clément Fournier 7588796419 Fix coordinates 2020-05-02 22:56:42 +02:00
Clément Fournier 8ef2a14923 Add interface for SwiftNode 2020-05-02 22:56:42 +02:00
Clément Fournier 03bbab3b10 Fix index in parent 2020-05-02 22:56:42 +02:00
Clément Fournier 8be81b71fa Cleanup file node 2020-05-02 22:56:42 +02:00
Clément Fournier 164c1361a6 Add supertype to swift nodes 2020-05-02 22:56:42 +02:00
Clément Fournier e61f03aafa Remove base visitor class 2020-05-02 22:56:42 +02:00
Clément Fournier fe656d203d Remove AntlrBaseRootNode 2020-05-02 22:56:42 +02:00
Clément Fournier 7df053a998 Merge branch '7.0.x' into java-grammar 2020-05-02 22:55:32 +02:00
Clément Fournier e7512fd46d Checkout setChild from java-grammar
Remove AbstractNode::setChildren
Hide setChildIndex
2020-05-02 22:54:40 +02:00
Clément Fournier 649f93fc18 Merge branch 'merge-2447' into java-grammar 2020-05-02 21:28:55 +02:00
Clément Fournier ce790f8193 Fix merge 2020-05-02 21:02:55 +02:00
Clément Fournier 4bcbca53de Cleanup AbstractJavaNode
most methods are already part of Abstract[Jjtree]Node
2020-05-02 20:36:55 +02:00
Andreas Dangel 5ce33352ad Merge branch 'pmd/7.0.x' into java-grammar 2020-05-02 18:08:17 +02:00
Andreas Dangel 57177abba3 Merge branch 'pr-2447' into pmd/7.0.x
[core] Cleanup Node and AbstractNode #2447
2020-05-02 17:15:20 +02:00
Clément Fournier 4af4e6ea1d Checkstyle 2020-05-01 20:51:45 +02:00
Clément Fournier cbd3f9f9dc Merge branch '7.0.x' into java-grammar 2020-05-01 18:57:36 +02:00
Clément Fournier efef060e9d Merge branch '7.0.x' into cleanup-abstract-node 2020-05-01 16:25:40 +02:00
Clément Fournier 301cb8ca33 Fix merge 2020-05-01 16:20:05 +02:00
Clément Fournier fed55b0725 Merge branch 'master' into 7.0.x 2020-05-01 16:13:52 +02:00
Clément Fournier bd835c0bb5 Merge branch '7.0.x' into cleanup-abstract-node 2020-04-29 09:19:00 +02:00
Clément Fournier a263e3027c Merge branch '7.0.x' into java-grammar 2020-04-28 08:27:27 +02:00
Clément Fournier bb9341ed7c Merge branch 'master' into 7.0.x 2020-04-28 08:24:56 +02:00
Clément Fournier 3d463d78f3 Inline values of properties 2020-04-28 00:46:50 +02:00
Clément Fournier 4fb56bf32c Fix RootNode/document node mapping
The RootNode corresponds to both an element
and a document node
2020-04-27 22:31:56 +02:00
Clément Fournier 3969862db5 Merge branch '7.0.x' into update-saxon-version 2020-04-27 21:39:57 +02:00
Clément Fournier 8f363ceb3d Fix tests 2020-04-27 19:27:06 +02:00
Clément Fournier c3670e3b59 Cleanup 2020-04-27 18:49:45 +02:00
Clément Fournier 723b34e922 Checkout other replacements 2020-04-27 18:43:09 +02:00
Clément Fournier 89542dd989 Update some more usages 2020-04-27 18:43:08 +02:00
Clément Fournier adddb1bf78 Checkout renderers 2020-04-27 18:42:03 +02:00
Clément Fournier 3a445493a1 Extract escaping function 2020-04-27 18:36:17 +02:00
Clément Fournier e6f5b4c5f3 Checkout updated rules 2020-04-27 18:36:17 +02:00
Clément Fournier 020f2a9a0c Make AbstractPLSQLNode package-private 2020-04-26 22:07:16 +02:00
Clément Fournier 541b4c368d Bring back SimpleNodeTest
No real reason to remove it, but it should be
moved to pmd-core
2020-04-26 21:58:50 +02:00
Clément Fournier 1bb7e3d6e7 Checkstyle 2020-04-26 21:44:36 +02:00
Clément Fournier 7e10867973 Fix apex module 2020-04-26 21:38:38 +02:00
Clément Fournier a237ae4adc Reinstate ClassScope building of enum valueOf 2020-04-26 21:32:14 +02:00
Clément Fournier b26eb20636 Fix dataflow code 2020-04-26 21:31:57 +02:00
Clément Fournier 24c4abd9f4 Remove tparam of JjtreeBuilder 2020-04-26 20:24:43 +02:00
Clément Fournier aaceca5574 Fix compil 2020-04-26 19:33:02 +02:00
Clément Fournier 1a6d7b393c Add a type parameter to AbstractNode 2020-04-26 19:04:31 +02:00
Clément Fournier 13e414c73d Add insertChild 2020-04-26 18:28:47 +02:00
Clément Fournier 3e892e1323 Make children array private, fix comment nodes 2020-04-26 18:07:50 +02:00
Clément Fournier 7028157808 Ensure Parser returns a RootNode 2020-04-26 17:29:27 +02:00
Clément Fournier 443703f4f3 Doc 2020-04-26 17:23:31 +02:00
Clément Fournier c74446a50c Merge branch '7.0.x' into cleanup-abstract-node 2020-04-26 17:10:31 +02:00
Clément Fournier 7beb2824c1 Cleanup ecmascript visitor 2020-04-26 17:08:20 +02:00
Clément Fournier 24a9bf5df6 Merge branch '7.0.x' into cleanup-abstract-node 2020-04-26 17:03:28 +02:00
Andreas Dangel 60473babfb Merge branch 'pmd/7.0.x' into java-grammar 2020-04-25 12:11:27 +02:00
Andreas Dangel cd1aaa64de Merge branch 'master' into pmd/7.0.x 2020-04-25 11:57:53 +02:00
Clément Fournier 613309caa3 Fix rebase 2020-04-24 14:20:36 +02:00
Clément Fournier 06bd2386aa Fingerprint node names 2020-04-24 14:01:11 +02:00
Clément Fournier 8a67fd9fa4 Compute attributes lazily 2020-04-24 14:01:11 +02:00
Clément Fournier 5b018d9e14 Move classes into rule.xpath 2020-04-24 14:01:09 +02:00
Clément Fournier 60a4ac97fc Implement atomize 2020-04-24 14:00:52 +02:00
Clément Fournier bcae043853 Problems with list attributes
Saxon HE doesn't implement typed attributes,
I guess that's part of the package of schema
aware processing :( We could possibly replace
all AttributeGetter exprs with TypedAttributeGetter
or something, but this will be very hard as there
is no visitor pattern or cloning pattern implemented
widely in saxon (Expression has 166 implementations).
 We could literally replace the class for
AttributeGetter in the saxon jar, provided it's legal
2020-04-24 14:00:51 +02:00
Clément Fournier 6f84d2c019 Fix lazy exprs 2020-04-24 14:00:19 +02:00
Clément Fournier 75f07f3a87 Update tests 2020-04-24 14:00:18 +02:00
Clément Fournier 631d641724 Fix namespace declaration 2020-04-24 14:00:18 +02:00
Clément Fournier 44f896af34 Fix test 2020-04-24 14:00:18 +02:00
Clément Fournier 8f149f2397 Cleanup axis iterators 2020-04-24 14:00:18 +02:00
Clément Fournier d769f36dbc Try to port the rulechain analyser
LazyExpression does not exist anymore
2020-04-24 14:00:18 +02:00
Clément Fournier 11428f8e5b Cleanup 2020-04-24 14:00:06 +02:00
Clément Fournier b8414932e4 Move XPath version out 2020-04-24 13:59:18 +02:00
Clément Fournier cda02a2754 Update saxon version
Remove Jaxen, port function defs

Use enum to represent XPath version

Move to internal package

Fix style

Refactor functions
2020-04-24 13:59:08 +02:00
Andreas Dangel e034044c31 Merge branch 'pmd/7.0.x' into java-grammar 2020-04-24 11:28:01 +02:00
Andreas Dangel 88f2b95562 Merge branch 'master' into pmd/7.0.x 2020-04-24 11:04:05 +02:00
Andreas Dangel 3f45a99f3e Merge branch 'pmd/7.0.x' into java-grammar 2020-04-24 10:16:20 +02:00
Andreas Dangel 9c468bb671 Merge branch 'master' into pmd/7.0.x 2020-04-24 10:06:50 +02:00
Clément Fournier 81c3743430 Hide setImage 2020-04-23 21:15:52 +02:00
Clément Fournier 786a09bed0 Doc 2020-04-23 21:15:52 +02:00
Clément Fournier d41f4d84f8 Remove Dataflow methods from Node/AbstractNode
Replaced with a DataKey
2020-04-23 21:15:50 +02:00
Clément Fournier 036b2d5eca Cleanup more things 2020-04-23 20:00:17 +02:00
Clément Fournier 434881edac Fix tests 2020-04-23 19:59:52 +02:00
Clément Fournier 197f901fa6 Cleanup tests 2020-04-23 19:59:52 +02:00
Clément Fournier 83189fce77 Stop ClassScope from building nodes 2020-04-23 19:59:52 +02:00
Clément Fournier 35c2637405 Remove childrenAccept 2020-04-23 19:59:52 +02:00
Clément Fournier 11d7aeb10f Add GenericNode & JjtreeNode interfaces 2020-04-23 19:59:52 +02:00
Clément Fournier 1fd866e8b6 Fewer unchecked casts 2020-04-23 19:59:52 +02:00
Clément Fournier 0735011c7c Move AbstractNode in .impl package 2020-04-23 19:59:52 +02:00
Clément Fournier 715b28d531 Bring back the remove[child] methods 2020-04-23 19:59:51 +02:00
Clément Fournier 3cfa9cb6de Merge AbstractApexNode[Base] 2020-04-23 19:59:51 +02:00
Clément Fournier 13cacee11f Cleanup AbstractNode 2020-04-23 19:59:51 +02:00
Clément Fournier 9c9f9c458b Merge branch 'deprecate-find-xx-of-any-type' into tmp 2020-04-23 19:59:10 +02:00
Clément Fournier 0b776f338a Merge branch 'master' into 7.0.x 2020-04-23 19:39:20 +02:00
Andreas Dangel ecb73cf7ac Merge branch 'pmd/7.0.x' into java-grammar 2020-04-23 12:26:14 +02:00
Andreas Dangel 60a938e2b1 [scala] fix duplicated license header 2020-04-23 12:22:07 +02:00
Andreas Dangel 9efafc241b [core] Fix JsonRenderer + checkstyle 2020-04-23 12:19:58 +02:00
Andreas Dangel 46e966105d Merge branch 'master' into pmd/7.0.x 2020-04-23 11:47:21 +02:00
Clément Fournier 36540235e6 Merge branch '7.0.x' into java-grammar 2020-04-20 11:59:01 +02:00
Clément Fournier 99606c20d9 Merge branch 'master' into 7.0.x 2020-04-20 11:54:03 +02:00
Clément Fournier 2138b996dd Merge branch '7.0.x' into java-grammar 2020-04-20 11:50:13 +02:00
Clément Fournier 8097d5b769 Checkstyle 2020-04-20 11:43:54 +02:00
Clément Fournier 28adf89fed Move scala parser into ast package 2020-04-20 11:42:10 +02:00
Clément Fournier efbc1ce36f Cleanup scala module 2020-04-20 11:40:56 +02:00
Clément Fournier fff18842a8 Finish apex 2020-04-20 11:39:17 +02:00
Clément Fournier d91099d32b Make apex nodes final 2020-04-20 11:30:43 +02:00
Clément Fournier a47d7168c1 Hide Apex internal APIs 2020-04-20 11:29:32 +02:00
Clément Fournier 7818b90b49 Merge branch 'master' into 7.0.x 2020-04-20 11:27:35 +02:00
Clément Fournier 8c9f363f44 Fix JS constructors 2020-04-20 11:25:58 +02:00
Clément Fournier 07a75a0dbd Make JS ast nodes final 2020-04-20 11:15:30 +02:00
Clément Fournier af4504293c Hide some deprecated APIs 2020-04-20 11:14:30 +02:00
Clément Fournier 45c965539f Merge branch '7.0.x' into java-grammar 2020-04-20 08:44:22 +02:00
Clément Fournier 5ad8d7b167 Checkout JavaccToken.range from java-grammar 2020-04-20 08:43:05 +02:00
Clément Fournier d74d433b7b Remove filterIsAny
Replaced by asInstanceOf
2020-04-20 08:36:30 +02:00
Andreas Dangel c5b07d33ed Fix compile errors 2020-04-19 22:55:46 +02:00
Andreas Dangel 880abbb6fc Merge branch 'pmd/7.0.x' into java-grammar 2020-04-19 22:12:56 +02:00
Andreas Dangel abf94d2bbb Merge branch 'pr-2405' into pmd/7.0.x
[core] Add wildcards to node stream API #2405
2020-04-19 21:49:28 +02:00
Andreas Dangel e4b40816a8 Fix merge and tests 2020-04-19 21:35:18 +02:00
Andreas Dangel 1c8c631637 Merge branch 'master' into pmd/7.0.x 2020-04-19 21:06:32 +02:00
Clément Fournier 50b4898487 Fix compil 2020-04-16 14:39:34 +02:00
Clément Fournier bbc1035d71 Merge branch '7.0.x' into java-grammar 2020-04-16 14:33:09 +02:00
Clément Fournier 66612aeb98 Merge branch 'master' into 7.0.x 2020-04-16 14:31:09 +02:00
Andreas Dangel 1db09d61c7 Fix compile error with javac 11
The code compiles with java 8, but not with java 11 and 12.
It works again with java 13.

It seems that javac stumbles over the overloaded
apply method in the interface Filtermap.
2020-04-15 12:24:13 +02:00
Clément Fournier 50b708ac5f Fix examples 2020-04-14 21:18:06 +02:00
Andreas Dangel f32f5247bf Merge branch 'pmd/7.0.x' into java-grammar 2020-04-13 12:45:34 +02:00
Andreas Dangel 118875181a Fix wrong merge 2020-04-13 12:44:03 +02:00
Andreas Dangel 3621eed40d Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2020-04-13 12:34:03 +02:00
Andreas Dangel f46e958471 Merge branch 'pr-2389' into java-grammar
[java] Implement AST disambiguation #2389
2020-04-13 11:52:21 +02:00
Clément Fournier e2a420b5ff Port some other usages, introduce firstNonNull 2020-04-11 23:10:25 +02:00
Clément Fournier eb4cdea126 Merge branch 'java-grammar' into sym-disambig2 2020-04-11 15:18:58 +02:00
Clément Fournier fae45134e2 Fix merge 2020-04-11 15:15:00 +02:00
Clément Fournier e84de6c323 Merge branch '7.0.x' into java-grammar 2020-04-11 14:51:28 +02:00
Andreas Dangel bc402203f4 Merge branch 'master' into pmd/7.0.x 2020-04-10 19:04:14 +02:00
Andreas Dangel 6e6c0af839 Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2020-04-10 18:31:49 +02:00
Andreas Dangel f93e8b9a48 Merge branch 'pmd/7.0.x' into pr-2371
[core] Generify GenericToken, cleanup Token managers & CPD #2371
2020-04-10 18:22:59 +02:00
Clément Fournier 82c35aa3e8 Unimportant grammar cleanups 2020-04-08 21:23:49 +02:00
Clément Fournier 9d87a7bb90 Rename to asInstanceOf
Makes more explicit that it should be used
with map and not filter
2020-04-07 16:23:27 +02:00
Clément Fournier 09adb287eb Use filterIsAny as a map function to preserve fluent API 2020-04-07 16:03:09 +02:00
Clément Fournier 396567636f Hide disambiguation façade 2020-04-07 15:30:30 +02:00
Clément Fournier 52e9730054 Test some usages, fix a bug 2020-04-06 16:11:33 +02:00
Clément Fournier 8163a4a088 Checkout filterIsAny from java-grammar 2020-04-06 15:32:40 +02:00
Clément Fournier f3d4cd81ed Add wildcards to nodestream API
This makes the API more flexible, for example
you can get a NodeStream<JavaNode> by filtering
with any subclass of JavaNode.
2020-04-06 15:29:27 +02:00
Clément Fournier 643555bb1d Checkout normal collectionUtil 2020-04-05 01:19:07 +02:00
Clément Fournier 403b1ab7c0 Merge branch 'java-grammar' into sym-disambig2 2020-04-05 01:12:30 +02:00
Clément Fournier a41283b7cd Fix compil 2020-04-05 01:09:26 +02:00
Andreas Dangel 8a6b2b3918 Fix compile errors 2020-04-04 19:39:39 +02:00
Andreas Dangel 735cbad432 Merge branch 'pmd/7.0.x' into java-grammar 2020-04-04 19:15:53 +02:00
Andreas Dangel ef1c50707b [java] Fix compile errors 2020-04-04 19:03:22 +02:00
Andreas Dangel 78974f450d Fix compile errors 2020-04-04 18:43:25 +02:00
Andreas Dangel c8ffb63e40 Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2020-04-04 18:36:27 +02:00
Andreas Dangel 6e47c2845d Fix checkstyle 2020-04-03 12:44:13 +02:00
Clément Fournier e92093e1fb Merge branch 'java-grammar' into sym-disambig2 2020-04-03 00:21:16 +02:00
Clément Fournier cd0c91ca15 Merge branch '7.0.x' into java-grammar 2020-04-03 00:20:51 +02:00
Clément Fournier 09a44809a9 Fix compil 2020-04-03 00:02:07 +02:00
Clément Fournier eca2ee54fe Merge branch 'java-grammar' into sym-disambig2 2020-04-03 00:00:43 +02:00
Clément Fournier bc460b4776 Merge branch '7.0.x' into java-grammar 2020-04-02 23:59:58 +02:00
Clément Fournier 399273015b Add some utilities to CollectionUtil 2020-04-02 23:58:37 +02:00
Clément Fournier 2f69db63c0 Don't use ASTList in the end 2020-04-02 23:57:02 +02:00
Clément Fournier 179fddc502 Merge branch 'java-grammar' into sym-disambig2 2020-04-02 23:49:05 +02:00
Clément Fournier 56cb4f41a3 Fix compil 2020-04-02 23:48:39 +02:00
Clément Fournier cd5798650a Merge branch 'java-grammar' into sym-disambig2 2020-04-02 20:59:52 +02:00
Clément Fournier 0e6092fbdd Make TypeBody extend ASTList 2020-04-02 20:57:41 +02:00
Clément Fournier cdbae0ebd6 Find another node to implement ASTList 2020-04-02 20:52:30 +02:00
Clément Fournier d2704d8919 Use ASTList return type 2020-04-02 20:52:08 +02:00
Clément Fournier 84988e6f65 Rename method of AnyTypeDeclaration to match its 6.0 name
Remove it from ClassOrInterfaceDeclaration
2020-04-02 20:28:56 +02:00
Clément Fournier 4d1e8d0671 Fix class cast with records 2020-04-02 20:25:47 +02:00
Clément Fournier 18af64a5c3 Merge branch 'java-grammar' into sym-disambig2 2020-04-02 20:12:43 +02:00
Clément Fournier a066f1ec14 Simplify record component mapping 2020-04-02 20:10:48 +02:00
Clément Fournier 5cb0881f36 Merge branch 'sym-record-support' into java-grammar 2020-04-02 20:07:10 +02:00
Clément Fournier 9b0cb2c99a Merge branch '7.0.x' into java-grammar 2020-04-02 20:04:48 +02:00
Clément Fournier c9457f6f15 Don't create a usermap for each node
This saves a significant amount of
heap space
2020-04-02 16:22:00 +02:00
Clément Fournier 53a43f61af Cleanup test utils 2020-04-02 13:47:50 +02:00
Clément Fournier 6ba8497f05 Fix static method import 2020-03-31 10:34:33 +02:00
Clément Fournier 5d80e6d1ff Fix pmd 2020-03-30 10:50:19 +02:00
Clément Fournier b243c05232 Ensure list is mutable 2020-03-29 16:25:12 +02:00
Clément Fournier 618f51c9a4 Cleanup 2020-03-29 14:06:03 +02:00
Clément Fournier 1d66682e77 Fix tests 2020-03-29 13:58:06 +02:00
Clément Fournier 1ce2d46e54 Merge branch 'java-grammar' into sym-record-support 2020-03-29 13:38:05 +02:00
Clément Fournier fae6a68664 Test superclass 2020-03-29 13:31:38 +02:00
Clément Fournier ff03e3e565 Checkout updated version with early disambig, etc 2020-03-29 13:31:38 +02:00
Clément Fournier 653efd09bf Fix tests 2020-03-29 13:31:38 +02:00
Clément Fournier 490f57ce62 Revert "REVERT ME Remove disambig stuff"
This reverts commit bda0f88614.
2020-03-29 13:31:38 +02:00
Clément Fournier b223a9db33 Fix blocklike scoping
Local vars and classes are only in scope
following their declaration. This affects
shadowing and cannot be ignored
2020-03-29 13:30:49 +02:00
Clément Fournier 742f4a419c Merge branch 'sym-ast-processor' into java-grammar 2020-03-28 15:33:52 +01:00
Clément Fournier 9a2810a4e3 Merge branch '7.0.x' into java-grammar 2020-03-28 15:28:34 +01:00
Clément Fournier 571a4167b8 Merge branch 'master' into 7.0.x 2020-03-28 15:14:09 +01:00
Clément Fournier fc8900cbfd Test 2020-03-28 15:02:38 +01:00
Clément Fournier b58d5007e8 Doc 2020-03-28 13:44:33 +01:00
Clément Fournier a1cd16698c Checkstyle + PMD 2020-03-28 13:39:11 +01:00
Clément Fournier cbdca2f73a Fix record component list being maybe empty 2020-03-28 13:30:04 +01:00
Clément Fournier ea05443ddf Fix visitor delegation 2020-03-28 13:30:04 +01:00
Clément Fournier d5212f363c Fix fake symbol toString + equals 2020-03-28 13:30:04 +01:00
Clément Fournier 32aac35b5f Generate record component accessors 2020-03-28 13:30:04 +01:00
Clément Fournier 4bb1a3acd0 Test 2020-03-28 13:30:04 +01:00
Clément Fournier 80e70a3e16 Add symbol table support 2020-03-28 13:30:04 +01:00
Clément Fournier ab67576787 Support record constructors 2020-03-28 13:30:04 +01:00
Clément Fournier 904832f335 Barebones record support 2020-03-28 13:30:04 +01:00
Clément Fournier 233686fb54 Don't use ClassScope in node signatures 2020-03-27 16:42:35 +01:00
Clément Fournier bda0f88614 REVERT ME Remove disambig stuff 2020-03-27 10:34:46 +01:00
Clément Fournier 72f472c7d0 Improve AST symbol resolver 2020-03-27 10:25:19 +01:00
Andreas Dangel 1f8a3cbf0b [core] Improve workaround for ejc/jdt
see 89b3b2f49f
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=561482
2020-03-27 10:20:44 +01:00
Clément Fournier 884989ca45 Replace Stream with List in symbol table 2020-03-27 10:16:10 +01:00
Clément Fournier 8ad3e114f3 Add superclass info to ast symbols 2020-03-27 10:16:10 +01:00
Clément Fournier 8484357422 Make ClassOrInterfaceType always have a symbol 2020-03-27 10:16:10 +01:00
Clément Fournier 53bb719487 Handle type arity for unresolved symbols 2020-03-27 10:16:10 +01:00
Clément Fournier 02f697f3e8 Treat tvars like class types
Makes error handling logic smoother
2020-03-27 10:16:10 +01:00
Clément Fournier 35b6142d74 Cleanup 2020-03-27 10:16:10 +01:00
Clément Fournier 76339f35b2 WIP 2020-03-27 10:16:10 +01:00
Clément Fournier 1c2fc9b814 Adapt tests 2020-03-27 10:16:10 +01:00
Clément Fournier 87c8014375 Add AST sym resolver 2020-03-27 10:16:10 +01:00
Clément Fournier 7f6e53eccb Test 2020-03-27 10:16:10 +01:00
Clément Fournier 578ee68213 Make qualified name lookup linear instead of quadratic 2020-03-27 10:16:10 +01:00
Clément Fournier 750487fe11 Remove old impl 2020-03-27 10:16:10 +01:00
Clément Fournier 09a74b274a Reuse new machinery for PackageOrTypeName 2020-03-27 10:16:10 +01:00
Clément Fournier c777b1d842 Prototype disambig for exprs 2020-03-27 10:16:10 +01:00
Clément Fournier e5fa9da638 Make preliminary disambig pass 2020-03-27 10:16:10 +01:00
Clément Fournier bc06bfec3b Merge branch 'remove-qualified-names' into java-grammar 2020-03-27 10:14:10 +01:00
Andreas Dangel 89b3b2f49f [core] Make eclipse jdt happy
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=561482
2020-03-26 11:57:50 +01:00
Clément Fournier a8af14676d Add isEof method 2020-03-22 01:03:59 +01:00
Clément Fournier 2ea78db0dc Checkstyle 2020-03-22 00:56:10 +01:00
Clément Fournier f6260463d7 Make Antlr token implementation respect its contract 2020-03-22 00:50:26 +01:00
Clément Fournier 16f30c9ece Make Antlr token manager throw TokenMgrError directly 2020-03-22 00:48:16 +01:00
Clément Fournier 3cf06909fb Merge branch 'master' into 7.0.x 2020-03-21 20:05:16 +01:00
Clément Fournier 62a9d5b655 Fix build 2020-03-20 18:07:56 +01:00
Clément Fournier 7b091f2be2 Fix other generic uses of GenericToken 2020-03-20 18:07:56 +01:00
Clément Fournier 96feed7b83 Do it for the other languages 2020-03-20 18:07:56 +01:00
Clément Fournier f64acb6c38 python 2020-03-20 18:07:56 +01:00
Clément Fournier cd5af6a12d do it in c++ 2020-03-20 18:07:56 +01:00
Clément Fournier 368573e7c7 Start removing TokenManager wrappers 2020-03-20 18:07:56 +01:00
Clément Fournier e9b65823bf Cleanup TokenMgrError 2020-03-20 18:07:56 +01:00
Clément Fournier 3cdcba2299 Fix file name for token manager error 2020-03-20 18:07:56 +01:00
Clément Fournier 2b36ef5e39 Merge branch 'deprecate-token-mgr-stuff' into tmp 2020-03-20 18:07:42 +01:00
Clément Fournier dc12aaadfa Merge branch '7.0.x' into java-grammar 2020-03-20 18:04:49 +01:00
Clément Fournier 0ef6dd144d Merge branch 'master' into 7.0.x 2020-03-20 18:04:17 +01:00
Clément Fournier 9ff522c0f5 [plsql] Add token description 2020-03-20 14:53:35 +01:00
Clément Fournier ec884bc216 Merge branch 'plsql-javacc' into 7.0.x 2020-03-20 14:52:33 +01:00
Clément Fournier 0763ccd384 Merge branch '7.0.x' into plsql-javacc 2020-03-20 14:49:06 +01:00
Andreas Dangel db6d57cd1d [plsql] grammar: set TRACK_TOKENS=false 2020-03-20 10:53:03 +01:00
Andreas Dangel 3399cfe0d4 [plsql] Fix CodeFormatRule
Node::getEndColumn() is exclusive now with javacc based parsers
See JavaccToken
2020-03-20 10:52:42 +01:00
Andreas Dangel 2f93795609 [plsql] remove BOM token, skip BOM in parser 2020-03-20 10:49:13 +01:00
Clément Fournier 48c8a38116 Merge branch '7.0.x' into java-grammar 2020-03-20 05:37:49 +01:00
Clément Fournier 9aeefdb817 Dont delete jjtSetLastToken
JJT grammars should mention TRACK_TOKENS=false;
On the java-grammar branch some tokens are adjusted
manually with calls to jjtSetLastToken and deleting
these calls messes that up
2020-03-20 05:37:23 +01:00
Clément Fournier 39d1c9be28 Merge branch '7.0.x' into java-grammar 2020-03-20 03:09:40 +01:00
Clément Fournier fa39505f5a Checkstyle 2020-03-20 03:00:43 +01:00
Clément Fournier ee4257d8fc Fix JSP CPD tests
CPD "normalizes" line separators to the
platform-specific separator. This should
be fixed later when we move to TextDocument
2020-03-20 02:58:43 +01:00
Clément Fournier e577169862 Cleanup some usages of CollectionUtil 2020-03-20 01:32:55 +01:00
Clément Fournier 170360b309 Add a firstChild axis method
Fix bug with filter on children stream
2020-03-20 01:21:50 +01:00
Andreas Dangel f6d27c6c61 [plsql] Adapt PLSQL to new javacc wrapper 2020-03-19 20:33:17 +01:00
Clément Fournier ea3085e560 Normalize line endings
Tries to fix build failure on windows...
2020-03-19 19:34:16 +01:00
Clément Fournier 26350fb96f Fix NPE
ArrayDeque doesn't support null elements
2020-03-19 18:25:46 +01:00
Clément Fournier c93ac0e69b Compute canonical name in symbol maker 2020-03-19 18:18:53 +01:00
Clément Fournier 9a62a662c1 Remove track-tokens for vf, jsp 2020-03-19 17:57:30 +01:00
Clément Fournier b530d3e5a4 Don't duplicate setLastToken for jjtree nodes
This is handled by the closeNodeScope routine
of the JjtreeBuilder, the parser shouldn't call
this itself
2020-03-19 17:37:25 +01:00
Clément Fournier 5be4fa2f54 Merge branch 'java-grammar' into remove-qualified-names 2020-03-19 16:55:11 +01:00
Clément Fournier 18febf367c Merge branch '7.0.x' into java-grammar 2020-03-19 16:54:44 +01:00
Clément Fournier 33eb1501db Use base JJTree class for the VF parser 2020-03-19 16:53:22 +01:00
Clément Fournier 242432237c Use base JJTree class for the JSP parser 2020-03-19 16:45:24 +01:00
Andreas Dangel a290204d00 Merge branch 'pmd/7.0.x' into java-grammar 2020-03-19 15:52:02 +01:00
Andreas Dangel 40a262cfae Merge branch 'pr-2362' into pmd/7.0.x
[js] Use new javacc wrapper in JS module
2020-03-19 15:41:35 +01:00
Andreas Dangel 75c4377b14 [js] Ecmascript5TokenManager is internalapi 2020-03-19 15:41:25 +01:00
Andreas Dangel 0a31e15193 [js] License headers 2020-03-19 15:41:13 +01:00
Andreas Dangel 2620fc60be [cpp] License headers 2020-03-19 15:38:39 +01:00
Andreas Dangel 0556719648 Merge branch 'pr-2361' into pmd/7.0.x
[objectivec] Use new javacc wrapper script in Objective C module
2020-03-19 15:37:40 +01:00
Andreas Dangel 356be6393e [objectivec] License headers 2020-03-19 15:37:33 +01:00
Andreas Dangel 319769ac30 Merge branch 'pr-2360' into pmd/7.0.x
[cpp] Use new javacc wrapper script in C++ module
2020-03-19 15:35:48 +01:00
Andreas Dangel 007b05f610 Merge branch 'pr-2359' into pmd/7.0.x
[matlab] Use new javacc wrapper script in Matlab module
2020-03-19 15:35:05 +01:00
Andreas Dangel 47a06fbc6a Merge branch 'pr-2294' into pmd/7.0.x
[vf, jsp] Adapt JSP & VF modules to new javacc wrapper
2020-03-19 15:24:33 +01:00
Andreas Dangel ff39a5503a [vf] Make remaining setters package-private, remove deprecated 2020-03-19 15:24:06 +01:00
Andreas Dangel 3b5c08a095 [vf] License headers 2020-03-19 15:23:12 +01:00
Andreas Dangel 02595f846a [jsp] OpenTagRegister is package-private 2020-03-19 15:22:40 +01:00
Andreas Dangel 8268e479dd [jsp] Remove deprecated annotation 2020-03-19 15:16:48 +01:00
Andreas Dangel 8baaef915b [jsp] License headers 2020-03-19 15:16:32 +01:00
Andreas Dangel 8a8e9d9d06 Fix imports 2020-03-19 15:01:02 +01:00
Andreas Dangel 886d5c2413 Merge branch 'pmd/7.0.x' into java-grammar 2020-03-19 14:55:54 +01:00
Andreas Dangel 55915fe5ab Fix build (java: ASTRecord::getDeclarations()) 2020-03-19 12:41:27 +01:00
Andreas Dangel 235e5f4160 Fix build (Apex Metrics) 2020-03-19 12:37:53 +01:00
Clément Fournier 4c2d5c687b Fix class name 2020-03-18 02:54:08 +01:00
Clément Fournier af5ff286ec Simplify some more 2020-03-18 02:10:36 +01:00
Clément Fournier fb699c9429 Move into symbol package 2020-03-18 01:49:55 +01:00
Clément Fournier 787dcb9622 Remove immutable list 2020-03-18 01:39:28 +01:00
Clément Fournier dbd66adc59 Simplify qualified name resolver 2020-03-18 01:39:07 +01:00
Clément Fournier b7e317fb22 Remove qualified names 2020-03-18 01:13:50 +01:00
Clément Fournier 14bc46fe0d Fix comments 2020-03-18 00:44:45 +01:00
Clément Fournier be57373152 Merge branch '7.0.x' into java-grammar 2020-03-18 00:38:57 +01:00
Clément Fournier fd87420953 Merge branch '7.0.x' into simplify-metrics-framework-on-7 2020-03-18 00:34:38 +01:00
Clément Fournier f083a6b27b Remove alljavacc.xml 2020-03-17 18:06:49 +01:00
Clément Fournier e23df57ccd Port js (es5) module 2020-03-17 18:05:32 +01:00
Clément Fournier 2ecc60ec71 Port objectivec module 2020-03-17 17:52:48 +01:00
Clément Fournier f767903b0c Checkstyle 2020-03-17 17:25:57 +01:00
Clément Fournier c4ec36b2b6 Port cpp module 2020-03-17 17:23:29 +01:00
Clément Fournier 925c22472e Port Matlab cpd module 2020-03-17 17:04:14 +01:00
Clément Fournier 3cd2027492 Merge branch '7.0.x' into java-grammar 2020-03-17 16:29:41 +01:00
Clément Fournier c07535927f Merge branch 'master' into 7.0.x 2020-03-17 16:29:23 +01:00
Clément Fournier affb0461c9 Skip bom 2020-03-17 15:53:37 +01:00
Clément Fournier 7108a166d4 Make setters package-private 2020-03-17 15:51:22 +01:00
Clément Fournier 7ecdd394b2 Make VF nodes final 2020-03-17 15:48:30 +01:00
Clément Fournier 5fe9fb8f52 Make JSP nodes final 2020-03-17 15:47:51 +01:00
Clément Fournier fd0d53b590 Merge branch '7.0.x' into port-jsp-vf-modules 2020-03-17 15:46:41 +01:00
Clément Fournier 2ca7101b10 Merge branch 'sym-local-tables-impl' into java-grammar 2020-03-17 15:35:36 +01:00
Clément Fournier c0cb472db8 Merge branch 'java-grammar' into sym-local-tables-impl 2020-03-17 15:35:20 +01:00
Clément Fournier 56bd639be2 Fix record ctor declaration 2020-03-17 15:28:29 +01:00
Clément Fournier 080c0c15cb Merge branch 'grammar-flatten-body-declarations' into java-grammar 2020-03-17 15:22:02 +01:00
Clément Fournier df6788059a Merge branch '7.0.x' into java-grammar 2020-03-17 15:19:38 +01:00
Clément Fournier 84ca3c63c0 Merge branch 'remove-multifile' into 7.0.x 2020-03-17 15:18:45 +01:00
Clément Fournier 6183fc0b62 Merge branch '7.0.x' into java-grammar 2020-03-17 15:16:03 +01:00
Clément Fournier 903383d7cf Merge branch 'master' into 7.0.x 2020-03-17 15:14:46 +01:00
Andreas Dangel b988b9f894 Merge branch 'pmd/7.0.x' into java-grammar 2020-03-13 10:49:37 +01:00
Andreas Dangel 01d9664fc7 Merge branch 'pr-2293' into pmd/7.0.x
[python] Make python use new javacc wrapper
2020-03-13 10:37:08 +01:00
Andreas Dangel 940d3ae4c6 Merge branch 'master' into pmd/7.0.x 2020-03-13 10:36:11 +01:00
Andreas Dangel bb61591081 Merge branch 'pmd/7.0.x' into java-grammar 2020-03-13 10:21:13 +01:00
Andreas Dangel c111c64356 Java/VmTokenManager: Remove @Deprecated/@InternalApi 2020-03-13 10:20:31 +01:00
Andreas Dangel 79f843dea8 Merge branch 'pr-2289' into pmd/7.0.x
[vm] Adapt VM module to the new javacc wrapper
2020-03-13 10:06:58 +01:00
Andreas Dangel 48df56a8fa Merge branch 'master' into pmd/7.0.x 2020-03-13 10:04:51 +01:00
Andreas Dangel bb58fcb47f [vm] NodeUtils::tokenLiteral should be package private 2020-03-13 09:27:21 +01:00
Andreas Dangel 1ac1cff01a [vm] Fix more license headers 2020-03-13 09:27:06 +01:00
Andreas Dangel 36a23e108f [vm] test data - whitespaces and CDATA 2020-03-13 09:26:50 +01:00
Andreas Dangel e685c6aade [vm] Refactor checkstyle warnings and suppressions 2020-03-13 09:04:55 +01:00
Andreas Dangel 68a93e13c4 [vm] Refactor ASTDirective
* remove directive mapper
* remove all directive helper classes
2020-03-13 08:30:14 +01:00
Andreas Dangel 4fd87dab4a [vm] Remove deprecated VelocityCharStream 2020-03-12 21:45:05 +01:00
Andreas Dangel 0aa0333312 [vm] small refactoring for NodeUtils 2020-03-12 21:44:47 +01:00
Andreas Dangel 0680c4354b [vm] Make AST nodes final 2020-03-12 21:37:12 +01:00
Andreas Dangel 888340666c Merge branch 'pmd/7.0.x' into pr-2289 2020-03-12 21:19:43 +01:00
Andreas Dangel 05b8ae4059 Merge branch 'pmd/7.0.x' into java-grammar 2020-03-12 15:42:37 +01:00
Andreas Dangel 60ae7a18cc Merge branch 'master' into pmd/7.0.x 2020-03-12 15:31:08 +01:00
Andreas Dangel 9c54cc3a54 [java] Fix tests
* pattern matching tests are in ASTPatternTest.kt
* type resolution for record components is TODO
2020-03-12 14:57:35 +01:00
Andreas Dangel 370df25121 Merge branch 'pmd/7.0.x' into java-grammar 2020-03-12 14:30:23 +01:00
Andreas Dangel bc59bb2f97 Fix build 2020-03-12 14:21:04 +01:00
Andreas Dangel 16cb7767b7 Merge branch 'master' into pmd/7.0.x 2020-03-12 14:03:20 +01:00
Clément Fournier 946df6fc07 Use List instead of Stream in symbol tables
Laziness is not useful, to determine
the most specific method we have to
fetch all methods anyway.

Plus, using streams obscure control
flow and make profiling more difficult.
2020-03-03 06:43:01 +01:00
Clément Fournier b2b85e51bd Remove multifile stuff
This is the last component that depends
on JavaQualifiedName on the java-grammar
branch.
2020-03-03 01:01:10 +01:00
Clément Fournier 9d6a67fc75 Handle switch blocks 2020-03-03 00:52:46 +01:00
Clément Fournier f54298127b Merge branch 'java-grammar' into sym-local-tables-impl 2020-03-03 00:32:00 +01:00
Clément Fournier fa58ac98d2 Add empty modifier list for pattern variables 2020-03-03 00:01:23 +01:00
Clément Fournier 9b720c81b1 Merge branch 'java-grammar' into grammar-flatten-body-declarations 2020-03-02 22:35:47 +01:00
Clément Fournier f98fec8a44 Merge branch '7.0.x' into java-grammar 2020-03-02 22:34:38 +01:00
Clément Fournier ea0122a656 Merge branch 'master' into 7.0.x 2020-03-02 22:26:41 +01:00
Clément Fournier 2910303dd8 Merge branch '7.0.x' into java-grammar 2020-03-02 22:06:32 +01:00
Clément Fournier f574b7929b Merge branch 'master' into 7.0.x 2020-03-02 20:46:59 +01:00
Clément Fournier f63deac878 Remove wrongly committed file 2020-03-02 20:32:42 +01:00
Clément Fournier c8c8a04dda Fix new java nodes 2020-03-02 20:31:52 +01:00
Clément Fournier bfc704fa05 Cleanup language level checker 2020-03-02 20:06:38 +01:00
Clément Fournier bd5720749d Fix CS module 2020-03-02 19:18:50 +01:00
Clément Fournier 9788a3af5d Merge branch 'master' into 7.0.x 2020-03-02 19:12:28 +01:00
Clément Fournier 77da06cd87 Cleanup 2020-02-22 10:11:34 +01:00
Clément Fournier 6787294501 Handle try/catch 2020-02-21 21:53:17 +01:00
Clément Fournier 97a6484edf Handle try-with-resources 2020-02-21 18:03:01 +01:00
Clément Fournier 2fda450929 Cleanup 2020-02-21 17:51:16 +01:00
Clément Fournier 58fb8c71cf Fix scoping of type params 2020-02-21 17:19:05 +01:00
Clément Fournier d2c7baa1ef Fix tests 2020-02-21 17:19:05 +01:00
Clément Fournier 6172b78c23 Revert "REVERT ME: Remove local sym tables"
This reverts commit f1154c7493.
2020-02-21 17:19:05 +01:00
Clément Fournier b3aad20fca Fix merge 2020-02-21 15:02:18 +01:00
Clément Fournier 326784f5db Merge branch 'java-grammar' into grammar-flatten-body-declarations 2020-02-21 14:56:22 +01:00
Clément Fournier e32589e010 Delete old method 2020-02-21 14:56:15 +01:00
Clément Fournier 6483d3bc2f Merge branch '7.0.x' into java-grammar 2020-02-21 14:50:00 +01:00
Clément Fournier 2650063541 Merge branch 'master' into 7.0.x 2020-02-21 14:45:43 +01:00
Clément FournierandAndreas Dangel b7cbab5d47 Update pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/ASTBlock.java
Co-Authored-By: Andreas Dangel <andreas.dangel@pmd-code.org>
2020-02-21 14:42:52 +01:00
Andreas Dangel a67043edc5 Merge branch 'pr-2282' into java-grammar
[java] Use single node for annotations
2020-02-20 11:08:16 +01:00
Andreas Dangel fee7bd83bb Merge branch 'pr-2281' into java-grammar
[java] Implement AST-based symbols
2020-02-20 10:37:04 +01:00
Andreas Dangel e2734cdacc Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.java 2020-02-20 10:36:39 +01:00
Clément Fournier 53cc2d0f28 Simplify VariableDeclaratorId 2020-02-19 21:53:31 +01:00
Clément Fournier b4eaeb6cf0 Doc 2020-02-19 18:38:24 +01:00
Clément Fournier 32faa6b3f9 Update more code 2020-02-19 18:38:24 +01:00
Clément Fournier 05e1ba0c10 Remove TypeDeclaration 2020-02-19 18:38:24 +01:00
Clément Fournier 297b177b3a Remove ASTClassOrInterfaceBodyDeclaration 2020-02-19 18:38:24 +01:00
Clément Fournier 184b368c82 Merge branch 'java-grammar' into sym-ast-impl3 2020-02-19 14:53:35 +01:00
Clément Fournier 9685ba5999 Merge branch '7.0.x' into java-grammar 2020-02-19 14:50:06 +01:00
Andreas Dangel 3ad6b06d21 [doc] List the removed rules in 7.0.0 release notes 2020-02-18 20:09:28 +01:00
Andreas Dangel c3e5cf5965 Merge branch 'pr-2273' into java-grammar
[java] Make lambda expression not a methodlike
2020-02-18 19:45:56 +01:00
Andreas Dangel 8e8eec62d9 Merge branch 'pr-2272' into java-grammar
[java] Make enum body track trailing comma/semi
2020-02-18 19:23:17 +01:00
Andreas Dangel 58d3e17b69 Merge branch 'pr-2022' into pmd/7.0.x
[java,apex] Remove deprecated and unused rules
2020-02-18 19:17:25 +01:00
Andreas Dangel 0f241b0efc Merge branch 'pmd/7.0.x' into pr-2022 2020-02-18 19:04:25 +01:00
Andreas Dangel b06772b953 Update rulesets
* add comment for removed rules in the releases rulesets
* remove rules completely in normal rulesets
  (instead of commenting)
2020-02-18 18:54:47 +01:00
Clément Fournier 3a7e2766f8 Revert "REVERT ME remove dependency on #2271"
This reverts commit 19d8e2fc69.
2020-02-17 23:40:04 +01:00
Clément Fournier a39819a473 Merge branch 'java-grammar' into sym-ast-impl3 2020-02-17 23:39:25 +01:00
Andreas Dangel 866e51083a Merge branch 'pr-2271' into java-grammar
[java] Add supertype for "list nodes"
2020-02-17 19:58:54 +01:00
Clément Fournier a9b6e78cfc Normalise line endings in test 2020-02-17 16:59:14 +01:00
Clément Fournier a69fa93a32 Remove whitespace changes 2020-02-17 08:31:47 +01:00
Clément Fournier 8060e37da4 Restrict visibility of node ctors 2020-02-17 08:06:11 +01:00
Clément Fournier b5bc047b21 Fix jsp node class visibility 2020-02-17 08:06:11 +01:00
Clément Fournier 137a6a74f4 Port VF module 2020-02-17 08:06:11 +01:00
Clément Fournier c96f9b1734 Fix tests 2020-02-17 08:06:11 +01:00
Clément Fournier f914319bcb Port JSP module 2020-02-17 08:06:11 +01:00
Clément Fournier 57429b0ff9 Fix class cast exception 2020-02-17 01:43:08 +01:00
Clément Fournier 579c134061 Port python module 2020-02-16 22:27:09 +01:00
Clément Fournier d40fdc0e4d Remove deprecated stuff 2020-02-16 21:05:15 +01:00
Clément Fournier 96097a80e8 Move metric key static creator to interface 2020-02-16 20:40:42 +01:00
Clément Fournier 4fa3a05ebb Move some tests to core 2020-02-16 20:17:29 +01:00
Clément Fournier bb3368f3ae Cleanup PMD core metrics 2020-02-16 20:08:31 +01:00
Clément Fournier 9c770ac6bb Simplify Java metrics framework further 2020-02-16 19:52:15 +01:00
Clément Fournier 43f5252d7e Expose statistics instead of result option 2020-02-16 19:41:21 +01:00
Clément Fournier 4e2ae0d4b2 Simplify apex metrics framework further 2020-02-16 19:36:09 +01:00
Clément Fournier 93e18e06c9 Merge branch 'java-grammar' into grammar-new-list-nodes 2020-02-16 19:22:04 +01:00
Clément Fournier f152859770 Merge branch '7.0.x' into java-grammar 2020-02-16 19:17:29 +01:00
Clément Fournier 8ab362c0ad Fix java metrics handler 2020-02-16 19:09:23 +01:00
Clément Fournier d227038df2 Port Apex NOPMD comment implementation to 7.0 version 2020-02-16 19:09:07 +01:00
Clément Fournier 31ee5c3845 Simplify metrics result options 2020-02-16 19:05:52 +01:00
Clément Fournier 653c02c263 Adapt Antlr nodes to DataMap 2020-02-16 18:54:08 +01:00
Clément Fournier ac18d3162a Merge branch 'master' into 7.0.x 2020-02-16 18:41:04 +01:00
Clément Fournier 5cd705dd35 Restrict ctor visibility 2020-02-15 09:26:26 +01:00
Clément Fournier 9983a52486 Fix windows build 2020-02-15 00:50:14 +01:00
Clément Fournier c1b7c1da2b Cleanup VM parser 2020-02-14 23:47:29 +01:00
Clément Fournier e46a875f2c Port velocity module to new script
Remove a bunch of useless copy pasted goo
* LogUtil
* TemplateParseException
* MacroParseException
* Many methods of AbstractVmNode

Rename ASTprocess to ASTTemplate.
2020-02-14 23:20:57 +01:00
Clément Fournier 66e43ba07d checkstyle 2020-02-14 01:55:27 +01:00
Clément Fournier cc07fa3c32 Fix odd refactoring 2020-02-12 22:25:04 +01:00
Clément Fournier 1d4a540544 Remove old classes 2020-02-12 22:25:04 +01:00
Clément Fournier 97b1870472 Unify repr of annotations 2020-02-12 22:25:04 +01:00
Clément Fournier 35193446c4 Fix tests 2020-02-12 22:20:58 +01:00
Clément Fournier 4c81633a88 Add a bunch of additional tests 2020-02-12 21:46:30 +01:00
Clément Fournier 33afd7e0de Simplify factory logic 2020-02-12 21:46:30 +01:00
Clément Fournier 9e6da00069 Make base class for symbol declarators 2020-02-12 21:46:30 +01:00
Clément Fournier 19d8e2fc69 REVERT ME remove dependency on #2271 2020-02-12 21:46:30 +01:00
Clément Fournier 9719637b88 Fix build 2020-02-12 21:46:30 +01:00
Clément Fournier 7a4efa268d Add sym visitor 2020-02-12 21:46:30 +01:00
Clément Fournier 094ba5f447 Cleanup toString 2020-02-12 21:46:30 +01:00
Clément Fournier f1154c7493 REVERT ME: Remove local sym tables 2020-02-12 21:46:26 +01:00
Clément Fournier 9c6f5a2e3a Checkstyle 2020-02-12 18:01:56 +01:00
Clément Fournier f1404ce062 Reactivate old symtable 2020-02-12 18:01:56 +01:00
Clément Fournier 87afc7360c Add tests for ast symbols 2020-02-12 18:01:56 +01:00
Clément Fournier 2b1d3a9ee7 Checkstyle 2020-02-12 18:01:56 +01:00
Clément Fournier dd6c639843 Handle synthetic symbols more generally 2020-02-12 18:01:56 +01:00
Clément Fournier a451a4aae8 Simplify some things 2020-02-12 18:01:55 +01:00
Clément Fournier 65329d60bd Fix scope of for statements 2020-02-12 18:01:24 +01:00
Clément Fournier c53aed240c Fix scoping in modifier lists 2020-02-12 18:01:24 +01:00
Clément Fournier de9daf4360 Make decent toStrings 2020-02-12 18:01:24 +01:00
Clément Fournier 65263b3285 Test type params scoping 2020-02-12 18:01:24 +01:00
Clément Fournier e9ccaa6821 Add tests 2020-02-12 18:01:24 +01:00
Clément Fournier 16b8be05db Checkout ast sym tables 2020-02-12 18:01:22 +01:00
Clément Fournier 9d17bb59d5 Checkout AST symbols 2020-02-12 18:00:42 +01:00
Clément Fournier 8938756997 Make AbstractAnyTypeDeclaration extend AbstractJavaTypeNode 2020-02-12 17:58:19 +01:00
Clément Fournier f16f671aac Merge branch '7.0.x' into java-grammar 2020-02-12 17:54:40 +01:00
Clément Fournier 01c7b12df4 Enrich CollectionUtil 2020-02-12 17:54:24 +01:00
Clément Fournier 143608a3db Cleanup ForeachStatement 2020-02-12 17:53:36 +01:00
Clément Fournier d4ddb4ab0e Make ASTAnyTypeDeclaration::getDeclarations return a NodeStream 2020-02-12 17:52:45 +01:00
Clément Fournier bb0d16da58 Remove lambda counters 2020-02-12 17:33:19 +01:00
Clément Fournier 857a4507ae Checkstyle 2020-02-12 15:28:24 +01:00
Clément Fournier 48c1b95697 Merge branch 'java-grammar' into grammar-new-list-nodes 2020-02-12 14:51:10 +01:00
Clément Fournier a5944922d0 Merge branch 'java-grammar' into make-lambda-not-methodlike 2020-02-12 14:50:27 +01:00
Clément Fournier db75acd6a9 Merge branch '7.0.x' into java-grammar 2020-02-12 14:50:11 +01:00
Clément Fournier 934691c106 Merge branch 'cleanup-language-version-handlers' into 7.0.x 2020-02-12 14:40:05 +01:00
Clément Fournier 31f50775bf Merge branch 'master' into 7.0.x 2020-02-12 14:39:29 +01:00
Clément Fournier 826094fe71 Fix compil 2020-02-12 14:35:20 +01:00
Clément Fournier 8f871b9d5c Fix visitor
X.super.visit is not virtual
2020-02-11 12:33:27 +01:00
Clément Fournier 337457a601 checkstyle 2020-02-08 02:25:33 +01:00
Clément Fournier 4b4f76b62f Fix forgotten rbrace 2020-02-08 01:45:20 +01:00
Clément Fournier 3ec340cc92 Fix compil 2020-02-08 01:17:20 +01:00
Clément Fournier f5b7a19987 Checkstyle 2020-02-08 01:16:29 +01:00
Clément Fournier 1c5028fa41 Fix compil 2020-02-08 01:15:13 +01:00
Clément Fournier 2cd7a29d9b Cleanup getImage calls in parser 2020-02-07 23:43:26 +01:00
Clément Fournier 1c09b28e56 Simplify Block::containsComment
Move logic out of the parser
2020-02-07 23:23:54 +01:00
Clément Fournier 91ee842238 Remove DeclarationKind 2020-02-07 20:17:08 +01:00
Clément Fournier b35d33214a Remove MethodLikeKind 2020-02-07 20:06:14 +01:00
Clément Fournier ef1b7b410f Make LambdaExpression not a MethodLikeNode 2020-02-07 20:05:13 +01:00
Clément Fournier c5fbfe5d87 Make enum body track trailing comma/semi 2020-02-07 20:02:25 +01:00
Clément Fournier 646d61b660 Add common supertype for all list nodes 2020-02-07 19:53:27 +01:00
Clément Fournier 91872dfe60 Cleanup some more tests
Goal is to cleanup duplicate methods
of ParserTestCtx and promote single
way to write tests, explicitly using
the NodeParsingCtx.

The transformation is very mechanical
and uninterestng, hence why I'm not
opening a PR.
2020-02-07 19:52:46 +01:00
Clément Fournier f0d417e8df Cleanup tests for ASTList PR 2020-02-07 18:50:36 +01:00
Clément Fournier fca96691dd Cleanup compilation unit 2020-02-07 18:38:50 +01:00
Clément Fournier b7cc31ac65 Abstract type param owners
This introduces a TypeParamOwnerNode interface,
for those nodes that declare a type parameter
list. This will be useful later on to implement
AST symbols.
2020-02-07 17:43:23 +01:00
Clément Fournier 131f2488c5 Cleanup symbol tests 2020-02-07 17:38:11 +01:00
Clément Fournier 69ad3a7087 Simplify some jjtree aspects 2020-02-07 16:35:58 +01:00
Clément Fournier 1c5c80a516 Merge branch 'grammar-literals' into java-grammar 2020-02-07 14:58:41 +01:00
Clément Fournier 3bb1595b24 Merge branch 'grammar-modifier-node' into java-grammar 2020-02-07 14:36:12 +01:00
Clément Fournier 2fe23f5e35 Merge branch '7.0.x' into cleanup-language-version-handlers 2020-02-07 14:33:23 +01:00
Clément Fournier 41c4a53497 Merge branch '7.0.x' into java-grammar 2020-02-05 20:45:48 +01:00
Clément Fournier e971e9bc95 Merge branch 'master' into 7.0.x 2020-02-05 20:45:28 +01:00
Clément Fournier e3200a8ecb Make scala end-column exclusive
Javacc nodes now use this convention,
and since this PR updates the test
module to take implicit nodes into
account, the scala module needs to
be ported too.

Refs #2021
2020-01-28 16:30:02 +01:00
Clément Fournier a1b6048d60 Fix tests 2020-01-28 16:06:13 +01:00
Clément Fournier 694d473f4d Catch a few numbers that shouldn't parse
Fix literals
2020-01-28 15:57:21 +01:00
Clément Fournier 147a098141 Remove TypeKind 2020-01-28 15:36:48 +01:00
Clément Fournier 3191ef360d Rework AccessNode
Introduce a ModifierList node, that ranges
 over the modifiers of a declaration (including
annotations).

This is a combination of a few old commits:

Figure out modifiers

Fix tests

Remove AccessTypeNode

Document

Remove specific methods

Fix symboltable test

Fix tests

Rename to JModifier

Fix copypaste default/abstract

Improve doc

Test anon classes

Remove useless impl

Static modifier should not be present on toplevel classes

Simplify impl

Add visibility enum

Port some tests

Fix test ranges

Fix modifier ordering

Cleanup

Fix unnecessary modifier rule

Rename to use plural

Improve visibility doc

Simplify some things

Checkstyle

Remove some usages of typekind

Fix missing import

Remove irrelevant method

REmove some duplication

Replace AccessNode with ModifierOwner

Rename to AccessNode to reduce diff

Remove changes to rules

Add convenience methods

Make VariableDeclaratorId a ModifierOwner

Fix variable name decl

Make enum constant an implicit AccessNode

Fix compil

Checkstyle

Cleanup

Deprecate TypeKind

Cleanup

Remove TypeKind

Revert "Remove TypeKind"

This reverts commit 222c169c3401a01507726f339ae9f9b2b20dc69a.

Fix doc

Fix UnnecessaryModifierRule

Use special node instead of ModifierSet

Remove useless tests

Fix tests WIP

Work should be resumed when #2211 is merged into java-grammar

Fix some tests

Doc
2020-01-28 15:28:21 +01:00
Clément Fournier 01ef998d17 Cleanup more left recursive nodes 2020-01-28 15:27:00 +01:00
Clément Fournier f74ac3e000 Avoid LeftRecursiveNode on some types 2020-01-28 14:56:00 +01:00
Clément Fournier 77a3b3014b Merge branch 'java-grammar' into sym-table-impl 2020-01-28 14:28:47 +01:00
Clément Fournier 9b3c27eb42 Merge branch '7.0.x' into java-grammar 2020-01-28 14:19:09 +01:00
Clément Fournier 3c622ca188 Merge branch 'node-stream-traversal' into 7.0.x 2020-01-28 13:48:20 +01:00
Clément Fournier 35137bf51c Fix usage of deprecated method 2020-01-28 13:37:48 +01:00
Clément Fournier c3ec3961d2 Merge branch 'master-ant-script' into 7.0.x 2020-01-28 13:36:47 +01:00
Clément Fournier 1fddb03d99 Merge branch 'master' into 7.0.x 2020-01-28 13:35:50 +01:00
Clément Fournier 2db32f8ea6 Simplify comparable behavior of processing stages
Instead of overriding compareTo we can just use an
external comparator
2020-01-27 10:40:00 +01:00
Clément Fournier 7cd64e4374 Merge branch '7.0.x' into cleanup-language-version-handlers 2020-01-27 10:28:48 +01:00
Clément Fournier d726990e09 Make base parser adapter for jjtree 2020-01-25 16:36:42 +01:00
Clément Fournier 152801bb39 Merge branch '7.0.x' into master-ant-script 2020-01-25 14:28:37 +01:00
Clément Fournier b4eb6f106e Merge branch '7.0.x' into java-grammar 2020-01-25 11:13:23 +01:00
Clément Fournier faeeb38ffa Merge branch 'master' into 7.0.x 2020-01-25 11:13:09 +01:00
Clément Fournier bd42f5edc0 Fix pmd 2020-01-25 10:50:27 +01:00
Clément Fournier 64c8342cf4 Compact identifier token definitions 2020-01-25 09:54:56 +01:00
Clément Fournier f7cec6f13c Cleanup tests 2020-01-25 09:35:43 +01:00
Clément Fournier 8c076bd657 Checkstyle 2020-01-25 00:15:37 +01:00
Clément Fournier cceba2210f Merge branch 'java-grammar' into sym-table-impl 2020-01-24 23:53:13 +01:00
Clément Fournier 83b8827a26 Merge branch '7.0.x' into java-grammar 2020-01-24 23:49:31 +01:00
Clément Fournier 35da350007 Merge branch '7.0.x' into master-ant-script 2020-01-24 23:48:35 +01:00
Clément Fournier ec1eb208eb Merge branch 'master' into 7.0.x 2020-01-24 23:48:22 +01:00
Clément Fournier 925944289d Merge branch '7.0.x' into master-ant-script 2020-01-24 20:15:16 +01:00
Clément Fournier 450eb62b1f Merge branch 'master' into 7.0.x 2020-01-24 20:11:43 +01:00
Andreas Dangel dde479b496 Merge branch 'pmd/7.0.x' into java-grammar 2020-01-24 19:29:08 +01:00
Andreas Dangel b02ab00e87 Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2020-01-24 19:18:17 +01:00
Clément Fournier 06e8f24875 Remove DFAGraph*
These were only used by the old designer
2020-01-24 14:58:34 +01:00
Clément Fournier b4384dca32 Remove AbstractRule fields 2020-01-24 14:24:21 +01:00
Clément Fournier 84c87a6f2a Revert autoformat 2020-01-23 19:00:37 +01:00
Clément Fournier 5a3ef0965f remove typeres attributes 2020-01-23 18:43:38 +01:00
Clément Fournier 4b9f121ec3 Remove modelica rule violation factory 2020-01-23 18:33:30 +01:00
Clément Fournier 59e6f4de3f Remove VisitorStarter 2020-01-23 18:28:09 +01:00
Clément Fournier b51b5d4c38 Checkstyle 2020-01-23 18:27:29 +01:00
Clément Fournier 14a8eeec76 Remove typeres/dfa/multifile stuff 2020-01-23 18:27:29 +01:00
Clément Fournier 34e6e8bf08 Cleanup language version handlers 2020-01-23 18:27:29 +01:00
Clément Fournier 12ca77e1e0 Cleanup LambdaParameter 2020-01-22 11:51:05 +01:00
Clément Fournier cb4ade9eee Merge branch 'java-grammar' into sym-table-impl 2020-01-21 16:13:21 +01:00
Clément Fournier a04b7e45cd Checkstyle 2020-01-21 00:00:24 +01:00
Clément Fournier b8d0d229fe Merge branch '7.0.x' into node-stream-traversal 2020-01-20 23:56:09 +01:00
Clément Fournier b537d31004 Merge branch '7.0.x' into java-grammar 2020-01-20 23:55:16 +01:00
Clément Fournier 127b232f2e Fix duplicate method on Node 2020-01-20 23:55:05 +01:00
Clément Fournier 10a28d811d Merge branch 'master' into 7.0.x 2020-01-20 23:53:27 +01:00
Clément Fournier e9fe1e698a Merge branch '7.0.x' into java-grammar 2020-01-20 23:52:05 +01:00
Clément Fournier 86a18194de Merge branch '7.0.x' into node-stream-traversal 2020-01-19 13:11:12 +01:00
Clément Fournier a24375a7e4 Merge branch 'master' into 7.0.x 2020-01-19 13:08:52 +01:00
Clément Fournier b5b0bcb921 Replace more direct usages of parser 2020-01-19 08:36:35 +01:00
Clément Fournier f3246d6fc3 Merge branch '7.0.x' into master-ant-script 2020-01-19 06:09:56 +01:00
Clément Fournier aa9a9c2bed Merge branch 'master' into 7.0.x 2020-01-19 05:59:09 +01:00
Clément Fournier 23cb9f41fb Fix PLSQL 2020-01-19 05:54:16 +01:00
Clément Fournier 96500f90fc Autofix tokens of JJTree definite nodes 2020-01-19 04:55:35 +01:00
Clément Fournier 842e871b0e Fix compil 2020-01-19 00:22:24 +01:00
Clément Fournier 4f88f5dde2 Merge branch 'java-grammar' into sym-table-impl 2020-01-19 00:21:32 +01:00
Clément Fournier 3b530ce27d Merge branch '7.0.x' into java-grammar 2020-01-19 00:21:20 +01:00
Clément Fournier f986497758 Fix pmd-vm 2020-01-19 00:19:55 +01:00
Clément Fournier 44535a2fc2 Fix wrong cast
TODO revert when all languages are ported
2020-01-19 00:09:58 +01:00
Clément Fournier 2a7d770121 Merge branch '7.0.x' into master-ant-script 2020-01-18 22:25:07 +01:00
Clément Fournier 47382281ef Merge branch '7.0.x' into node-stream-traversal 2020-01-18 22:21:42 +01:00
Clément Fournier 2c856d9ce8 Fix compil 2020-01-18 22:21:40 +01:00
Clément Fournier 3fde986563 Merge branch 'master' into 7.0.x 2020-01-18 22:19:23 +01:00
Clément Fournier 256e873710 Merge branch '7.0.x' into node-stream-traversal 2020-01-18 21:28:24 +01:00
Clément Fournier 404162afb6 Remove duplicated license header 2020-01-18 20:46:13 +01:00
Clément Fournier 035217ab25 Merge branch 'master-ant-script' of github.com:oowekyala/pmd into master-ant-script 2020-01-18 20:43:06 +01:00
Clément Fournier ebb65621fd Merge branch '7.0.x' into master-ant-script 2020-01-18 00:53:28 +01:00
Clément Fournier 560f912769 Merge branch 'master' into 7.0.x 2020-01-17 20:15:18 +01:00
Clément Fournier d21ab33ea8 Merge branch 'master' into 7.0.x 2020-01-17 20:13:38 +01:00
Andreas Dangel c2b37ff034 Fix checkstyle 2020-01-17 20:01:54 +01:00
Clément Fournier 8adc292d6d Merge branch '7.0.x' into master-ant-script 2020-01-17 16:45:29 +01:00
Clément Fournier c3f31f2ff2 Merge branch 'java-grammar' into sym-table-impl 2020-01-17 16:45:12 +01:00
Clément Fournier deab28ef47 Merge branch '7.0.x' into java-grammar 2020-01-17 16:44:55 +01:00
Clément Fournier 85ec7892c6 Fix build 2020-01-17 16:43:41 +01:00
Clément Fournier e5800c0b3b Fix kotlin imports 2020-01-17 16:25:08 +01:00
Clément Fournier b09b58513b Merge branch '7.0.x' into master-ant-script 2020-01-17 16:22:46 +01:00
Clément Fournier 7756ad9de0 Merge branch 'master' into 7.0.x 2020-01-17 16:09:45 +01:00
Clément Fournier 1262e4ba27 Merge branch 'java-grammar' into sym-table-impl 2020-01-17 15:47:09 +01:00
Clément Fournier 26a5971af3 Replace deprecated usages 2020-01-17 15:46:54 +01:00
Clément Fournier 8d38036015 Merge branch '7.0.x' into java-grammar 2020-01-17 15:03:06 +01:00
Clément Fournier 240b1fe68a Fix build 2020-01-17 14:48:43 +01:00
Clément Fournier a773203f46 Replace usages of old jjtree methods 2020-01-17 14:39:02 +01:00
Clément Fournier c4d06f7558 Ignore some antlr attributes 2020-01-17 14:16:53 +01:00
Clément Fournier 53b2b4f201 Definitely fix swift impl 2020-01-17 14:01:20 +01:00
Clément Fournier db424fc1e6 Changes to antlr impl
* AntlrBaseVisitor does not extend AbstractRule anymore
* An AntlrBaseRule *uses* a visitor, it *is* not a visitor
2020-01-17 13:41:52 +01:00
Clément Fournier ecef88aa0a Merge branch 'master' into 7.0.x 2020-01-17 12:10:51 +01:00
Clément Fournier 286de16e7e Fix test
Autoformat of IDE removed imports
2020-01-16 23:26:56 +01:00
Clément Fournier e8f30fdcd2 Merge branch 'java-grammar' into sym-table-impl 2020-01-16 23:22:08 +01:00
Clément Fournier 92caad7b60 Merge branch '7.0.x' into java-grammar 2020-01-16 23:21:46 +01:00
Clément Fournier af929cc689 Merge branch 'remove-filters' into 7.0.x 2020-01-16 23:21:09 +01:00
Clément Fournier 83f6442d4b Merge branch 'grammar-switches' into java-grammar 2020-01-16 22:46:56 +01:00
Clément Fournier 0a6b18542a Merge branch '7.0.x' into java-grammar 2020-01-16 22:36:45 +01:00
Clément Fournier b936fce37b Merge branch 'master' into 7.0.x 2020-01-16 22:29:56 +01:00
Clément Fournier c8b967135d Change some names 2020-01-16 05:48:37 +01:00
Clément Fournier 80d9255cf5 Merge branch 'java-grammar' into sym-table-impl 2020-01-16 04:35:06 +01:00
Clément Fournier 1eccf8ec7f Merge branch 'java-grammar' into grammar-switches 2020-01-16 03:57:33 +01:00
Clément Fournier 340a63fa09 Fix bug in symbol table 2020-01-16 03:54:30 +01:00
Clément Fournier 86d7c3e009 Merge branch 'grammar-dimensions' into java-grammar 2020-01-16 03:45:23 +01:00
Clément Fournier 4b1e8fc536 Merge branch 'grammar-catch-formal' into java-grammar 2020-01-16 03:43:34 +01:00
Clément Fournier eed4df923d Merge branch 'java-grammar' into grammar-catch-formal 2020-01-16 03:39:20 +01:00
Clément Fournier b4d03c2b4f Merge branch 'java-grammar' into grammar-dimensions 2020-01-16 03:39:10 +01:00
Clément Fournier 5e939970d0 Remove superfluous DSL methods 2020-01-16 03:37:49 +01:00
Clément Fournier 94ebcdec82 Don't forget annotation methods 2020-01-16 03:25:16 +01:00
Clément Fournier a465d4b585 Merge branch 'java-grammar' into grammar-catch-formal 2020-01-16 02:43:32 +01:00
Clément Fournier d3908cb2bb Merge branch 'java-grammar' into grammar-dimensions 2020-01-16 02:42:45 +01:00
Clément Fournier 5fba0aeb5b Remove failed resolve result 2020-01-16 00:38:35 +01:00
Clément Fournier 3b7c849f2f Merge branch 'java-grammar' into sym-table-impl 2020-01-16 00:13:12 +01:00
Clément Fournier f79bbb88fc Checkstyle 2020-01-16 00:12:54 +01:00
Clément Fournier fb7d0747a9 Merge branch 'java-grammar' into sym-table-impl 2020-01-16 00:06:27 +01:00
Clément Fournier 148dea085a Fix language level checks 2020-01-16 00:06:07 +01:00
Clément Fournier 7ca7fb331f Cleanup 2020-01-16 00:02:04 +01:00
Clément Fournier cb0aa4d4d0 Merge branch 'java-grammar' into sym-table-impl 2020-01-15 12:19:43 +01:00
Clément Fournier 34632949b9 Merge branch '7.0.x' into node-stream-traversal 2020-01-15 12:18:16 +01:00
Clément Fournier 9f042165a2 Merge branch '7.0.x' into java-grammar 2020-01-15 12:14:21 +01:00
Clément Fournier 181a37c37c Fix bug in nodestreams
Also fixed by #2220
2020-01-15 12:14:11 +01:00
Clément Fournier 17389accba Merge branch '7.0.x' into java-grammar 2020-01-15 11:58:40 +01:00
Clément Fournier bb8d612256 Checkstyle 2020-01-15 11:51:41 +01:00
Clément Fournier 42a3f1f6e0 Merge branch 'port-language-level-checks' into 7.0.x
Ports back the changes about language level
checks introduced by #2120 from java-grammar
to 7.0.x. That way we can refactor semantic
error handling on 7.0.x and not java-grammar.
2020-01-15 11:44:12 +01:00
Clément Fournier 2ceff761e7 Checkstyle 2020-01-15 11:39:28 +01:00
Clément Fournier 96b1498a79 Something else to revert 2020-01-15 11:35:14 +01:00
Clément Fournier 5e7b2c5721 Convert some jdk tests to kotlin 2020-01-15 11:28:08 +01:00
Clément Fournier 1072c49f46 Update grammar 2020-01-15 11:07:17 +01:00
Clément Fournier 1254addc09 Make it compile
When merging back to java grammar resolve
conflicts by preferring the java-grammar version
2020-01-15 10:55:24 +01:00
Clément Fournier 342a0bac08 Checkout some code from java grammar 2020-01-15 10:24:42 +01:00
Clément Fournier edeac4bf20 Test language level checker 2020-01-15 09:39:48 +01:00
Clément Fournier c7bf177616 Remove special casing of end offset
Fixed by 47fcfb6f3c
2020-01-15 04:53:31 +01:00
Clément Fournier be7417f774 Checkstyle 2020-01-15 04:40:42 +01:00
Clément Fournier 8c5615547b Fix rule expecting mutable list
Now the pipeline may return singleton list in
some cases
2020-01-15 00:17:37 +01:00
Clément Fournier 0cc9740279 Fix windows build
Line separators in regex are replaced
with platform independent \R. Good thing
we have that automatic windows build
2020-01-15 00:07:06 +01:00
Clément Fournier b12e04e2da Remove change to findBoundary in pmd-java
Those changes anticipated changes that are only
on java-grammar atm. To be reverted on java-grammar
2020-01-14 22:45:46 +01:00
Clément Fournier c84addbef5 Share more implementations 2020-01-14 19:25:29 +01:00
Clément Fournier 311ef6728a Cleanup 2020-01-14 18:37:21 +01:00
Clément Fournier c2740361c3 Fix end column being exclusive in pmd-java 2020-01-13 23:04:51 +01:00
Clément Fournier b7311537ae Simplify 2020-01-13 22:27:28 +01:00
Clément Fournier ef8ff666f7 Rename TreeWalker 2020-01-13 19:51:16 +01:00
Clément Fournier ec4a0b6d81 Evaluate child stream eagerly 2020-01-13 19:03:57 +01:00
Clément Fournier e679b4b43b Cleanups 2020-01-13 17:15:04 +01:00
Clément Fournier a6b7cdf510 Eager evaluation of children 2020-01-13 17:03:10 +01:00
Clément Fournier ff35f301c1 Main doc 2020-01-13 16:46:49 +01:00
Clément Fournier d3aa76c237 Make forkJoin static 2020-01-13 16:24:57 +01:00
Clément Fournier 927f43534e Doc 2020-01-13 16:21:54 +01:00
Clément Fournier 3da261aa6b Config flatmapped descendant streams 2020-01-13 05:03:53 +01:00
Clément Fournier 5786a86f54 Use config object 2020-01-13 03:18:12 +01:00
Clément Fournier c9b7f4c9b2 Customize traversal of descendant node streams 2020-01-13 03:09:48 +01:00
Clément Fournier 4552c04a74 Simplify 2020-01-13 01:49:33 +01:00
Clément Fournier 83e86c20c5 Test modelica text 2020-01-13 01:15:04 +01:00
Clément Fournier 47fcfb6f3c Make end column exclusive 2020-01-13 01:05:54 +01:00
Clément Fournier dff3cc6bf8 Merge branch '7.0.x' into java-grammar 2020-01-11 20:35:03 +01:00
Clément Fournier 88f45cdb76 Merge branch 'master' into 7.0.x 2020-01-11 20:34:38 +01:00
Clément Fournier d56fa74518 Resolve results 2020-01-11 13:22:09 +01:00
Clément Fournier 571018244b Fix tests 2020-01-11 10:01:39 +01:00
Clément Fournier 2d51379949 Stash stuff for later 2020-01-11 09:58:22 +01:00
Clément Fournier 50d6229849 Checkout symbol tables 2020-01-11 09:58:22 +01:00
Clément Fournier 30d3d4615d Move parsing contexts to upper level 2020-01-11 09:57:47 +01:00
Clément Fournier a0b67a75ea Fix char stream line+col 2020-01-11 09:08:53 +01:00
Clément Fournier 0d6f03553a Port java module 2020-01-11 08:13:31 +01:00
Clément Fournier 2d280d0fb0 Make constants file 2020-01-11 04:47:40 +01:00
Clément Fournier 8a128a3bea Replace token tracking function 2020-01-11 01:21:09 +01:00
Clément Fournier ad7e9eb75d Make token document store first token 2020-01-11 00:23:43 +01:00
Clément Fournier f715e6af72 Use maven properties from within the build.xml 2020-01-10 23:27:07 +01:00
Clément Fournier efc3becc01 Checkout wrapper script, pmd-core, pmd-modelica 2020-01-10 22:57:47 +01:00
Clément Fournier 88aa7746f0 Merge branch '7.0.x' into java-grammar 2020-01-10 21:34:48 +01:00
Clément Fournier 99700d7526 Extract changes from #2166 to 7.0.x
* Make Java nodes text-available
* Introduce shared JavaccToken in pmd-core
* Use factory to produce char streams

Tests are still on java-grammar,
since they use the DSL & newer
AST structure.

This is to prepare for other changes
that concern all javacc languages and
should not be done on java-grammar
2020-01-10 21:15:15 +01:00
Clément Fournier d6296bd85f Fix apex multifile tests 2020-01-10 20:22:57 +01:00
Clément Fournier ac399e4473 Merge branch '7.0.x' into java-grammar 2020-01-10 18:19:17 +01:00
Clément Fournier 178fa28414 Merge branch 'master' into 7.0.x 2020-01-10 18:19:07 +01:00
Clément Fournier db1a8d7649 [lang-test] Use processing stages only in BaseParsingHelper 2020-01-10 17:55:41 +01:00
Andreas Dangel 121da26219 [java] Fix tests
* enum entry is at the moment matched as variable by (old?)
  symbol table. Just avoiding null pointer there
* Add missing overrides to support visiting base interface ASTStatement
  this is needed by the current DFA impl.
2020-01-10 17:45:48 +01:00
Andreas Dangel 57209f2af3 Merge branch 'pmd/7.0.x' into java-grammar 2020-01-10 17:44:11 +01:00
Clément Fournier b763a980ec Merge branch 'master' into 7.0.x 2020-01-10 17:15:49 +01:00
Andreas Dangel 8739b2bd12 [xml] Fix compile errors 2020-01-10 15:55:45 +01:00
Andreas Dangel 511c928670 [plsql] Fix compile and test errors 2020-01-10 15:46:13 +01:00
Andreas Dangel 0877917faf [java] Add missing multi file processing stage 2020-01-10 15:33:00 +01:00
Andreas Dangel a6c95b17d9 [lang-test] BaseParsingHelper uses AstProcessingStages 2020-01-10 15:20:04 +01:00
Andreas Dangel b2b17fc4f5 [java] Fix compile errors
Introduce JavaParsingHelper.convertList again,
it was previously on ParserTstUtil
2020-01-10 14:45:55 +01:00
Andreas Dangel ea86a23b73 Merge branch 'master' into pmd/7.0.x 2020-01-10 14:41:27 +01:00
Andreas Dangel cf89b742b0 Merge branch 'pr-2177'
[lang-test] Factorize parsing logic for tests
2020-01-10 12:29:38 +01:00
Clément Fournier a30fa67bf1 Fix checkstyle 2020-01-08 22:39:18 +01:00
Clément Fournier 62aa613381 Fix bug, SwitchArrowBranch not implementing SwitchBranch 2020-01-08 22:37:59 +01:00
Clément Fournier 77664d9d7f Improve switch grammar 2020-01-08 18:34:06 +01:00
Clément Fournier efe4943f26 Merge branch 'sym-reflect-impl' into java-grammar 2020-01-07 23:48:01 +01:00
Clément Fournier 1fefbd2c4a Make FieldDeclaration not a TypeNode 2020-01-07 23:13:05 +01:00
Clément Fournier 1eab9448e7 Use ArrayDimensions for VariableDeclaratorId
* Remove `Dimensionable`, remove its methods from the former implementations (except from ASTArrayDimsAndInits, which is itself deprecated)

* The varargs ellipsis is now represented as an ArrayTypeDim.
  * This affects FormalParameter and LambdaParameter

Closes #997. All forms of type annotations are now supported.
2020-01-07 23:12:53 +01:00
Clément Fournier 17305f3781 Cleanup 2020-01-07 22:35:37 +01:00
Clément Fournier ee1e9bf286 Fix final catch param 2020-01-07 21:19:49 +01:00
Clément Fournier 56ed5823cf Remove useless methods 2020-01-07 21:19:49 +01:00
Clément Fournier ecfea6bebd Remove asList 2020-01-07 21:19:49 +01:00
Clément Fournier b90399b87d Update tests 2020-01-07 21:19:49 +01:00
Clément Fournier bba0367b10 Cleanup FormalParameter 2020-01-07 21:18:41 +01:00
Clément Fournier db1344d5aa Separate catch formal from method formal 2020-01-07 21:16:39 +01:00
Clément Fournier d4da257dc6 Merge branch 'node-text-charseq' into java-grammar 2020-01-07 15:19:30 +01:00
Clément Fournier c9f9bdbbaa Merge branch 'java-grammar' into node-text-charseq 2020-01-06 22:15:19 +01:00
Clément Fournier 160c4c1446 Merge branch '7.0.x' into java-grammar 2020-01-06 22:14:23 +01:00
Clément Fournier 5f37276cf5 Merge branch 'master' into 7.0.x 2020-01-06 22:14:05 +01:00
Clément Fournier ac14db90bd Checkstyle 2020-01-06 18:37:54 +01:00
Clément Fournier 4ce104a41b Move CharStream into impl.javacc package 2020-01-06 16:41:25 +01:00
Clément Fournier 65a28827e3 Checkstyle 2020-01-06 16:41:25 +01:00
Clément Fournier c1191253a6 Add tests for text access 2020-01-06 16:41:24 +01:00
Clément Fournier 82834c0faa Revert changes to token managers 2020-01-06 16:40:58 +01:00
Clément Fournier 0d0a45c7ac Cleanup 2020-01-06 16:40:58 +01:00
Clément Fournier 99cc1afd1b Remove StringUtil#lineNumberAt(offset) 2020-01-06 16:40:58 +01:00
Clément Fournier f6d25ccf33 Cleanup token manager errors 2020-01-06 16:40:58 +01:00
Clément Fournier b1260ff13a Move classes around, make base jjtree node 2020-01-06 16:40:58 +01:00
Clément Fournier 122a72c7be Use charsequences more consistently 2020-01-06 16:40:58 +01:00
Clément Fournier 4c07f606df Rename token to JavaccToken in pmd-java 2020-01-06 16:40:58 +01:00
Clément Fournier baba1464fc Doc 2020-01-06 16:40:58 +01:00
Clément Fournier 821c4c41d1 Rename JavaTokenFactory 2020-01-06 16:40:58 +01:00
Clément Fournier b3860a3d57 Compute image of whitespace tokens lazily
Nobody cares and they make up a significant part of
token sequences. Alternatively we could intern them
which would most likely yield near 100% cache hit,
because of indentation patterns.
2020-01-06 16:40:58 +01:00
Clément Fournier 1339ea888d Add implicit assertions 2020-01-06 16:40:58 +01:00
Clément Fournier 450dfa91ea Simplify JavaNode 2020-01-06 16:40:58 +01:00
Clément Fournier 1f96b28fe2 Add tests for column/ line num 2020-01-06 16:40:58 +01:00
Clément Fournier 8ae188b7ef Document 2020-01-06 16:40:58 +01:00
Clément Fournier dabe123f4e Remove RichCharSeq and impl 2020-01-06 16:40:58 +01:00
Clément Fournier 3f14a88282 Use string instead of RichCharSeq 2020-01-06 16:40:58 +01:00
Clément Fournier 0ce6234ba7 Simplify GTToken 2020-01-06 16:40:58 +01:00
Clément Fournier 1cebd1d59e Checkstyle 2020-01-06 16:40:58 +01:00
Clément Fournier b146a09566 Test column numbers 2020-01-06 16:40:58 +01:00
Clément Fournier 38c41f0b21 Test line numbers 2020-01-06 16:40:58 +01:00
Clément Fournier 460bab6bd6 Fix inclusivity 2020-01-06 16:40:58 +01:00
Clément Fournier ba1c4dfe89 Simplify implementation 2020-01-06 16:40:58 +01:00
Clément Fournier cfe720d9be Don't copy initial string array 2020-01-06 16:40:57 +01:00
Clément Fournier 5032a4d71f Figure out equals and hashcode 2020-01-06 16:40:57 +01:00
Clément Fournier e8615e850f Compute getBeginLine dynamically 2020-01-06 16:40:57 +01:00
Clément Fournier 1327d99307 Use token document instead 2020-01-06 16:40:57 +01:00
Clément Fournier 7239201f1d Fix compil of other modules 2020-01-06 16:40:57 +01:00
Clément Fournier c8b1e8dada Make JavaccToken#image private 2020-01-06 16:40:57 +01:00
Clément Fournier a77e38dea4 Publish RichCharSequence instead of SharingCharSeq 2020-01-06 16:40:57 +01:00
Clément Fournier 615d2ab58c Add convenience methods on the charseq 2020-01-06 16:40:57 +01:00
Clément Fournier a70e70ad15 Refactor JavaCharStream to buffer whole file in memory, provide access to underlying text for all java nodes 2020-01-06 16:40:57 +01:00
Clément Fournier 1e1a13da42 Merge branch 'master' into java-grammar 2020-01-06 15:10:11 +01:00
Clément Fournier 523d3ec791 Merge branch 'master' into 7.0.x 2020-01-06 15:09:42 +01:00
Clément Fournier 2da8628ad3 Merge branch 'java-grammar' into grammar-new-statements 2020-01-05 21:22:43 +01:00
Clément Fournier 92bba816a7 Merge branch '7.0.x' into java-grammar 2020-01-05 21:11:37 +01:00
Clément Fournier 40170f2089 Fix checkstyle 2020-01-05 21:06:51 +01:00
Clément Fournier 0459d0379c Merge branch 'master' into 7.0.x 2020-01-05 20:31:39 +01:00
Clément Fournier 26bcbd839a Simplify 2020-01-05 19:43:09 +01:00
Clément Fournier 3458c02649 Replace Filter with predicate 2020-01-03 02:09:16 +01:00
Clément Fournier 86086bc04a Factorize javacc jar property 2020-01-02 17:41:27 +01:00
Clément Fournier 48752516fe Small cleanups 2020-01-02 17:40:08 +01:00
Clément Fournier fcd446fcfd Fix dead links 2019-12-27 12:15:41 +01:00
Clément Fournier b13bab2bee Merge branch '7.0.x' into remove-unused-rules 2019-12-26 18:55:28 +01:00
Clément Fournier 4ed6236a69 Merge branch 'master' into 7.0.x 2019-12-23 12:49:19 +01:00
Clément Fournier 5be83448b0 Merge branch 'java-grammar' into grammar-new-statements 2019-12-23 12:38:48 +01:00
Clément Fournier b74fd94897 Test primitives 2019-12-21 01:17:33 +01:00
Clément Fournier 47dcc6798e Merge branch 'java-grammar' into sym-reflect-impl 2019-12-21 00:19:16 +01:00
Clément Fournier a802874a9a Checkstyle 2019-12-21 00:18:38 +01:00
Clément Fournier e945f8f64e Checkstyle 2019-12-20 23:54:39 +01:00
Clément Fournier ab056a7b56 Add moar tests 2019-12-20 23:39:25 +01:00
Clément Fournier b0849dc38f Cleanups & doc 2019-12-20 23:27:21 +01:00
Clément Fournier 663c9381ac Merge branch 'java-grammar' into sym-reflect-impl 2019-12-20 21:35:48 +01:00
Clément Fournier 618ba3bf59 Fix compil 2019-12-20 07:24:50 +01:00
Clément Fournier cbd5f28d10 Merge branch '7.0.x' into java-grammar 2019-12-19 15:48:13 +01:00
Clément Fournier fc5426ab53 Update modelica for 7.0.0 2019-12-19 15:36:12 +01:00
Clément Fournier ffcacd6edd Merge branch 'master' into 7.0.x 2019-12-19 15:25:47 +01:00
Clément Fournier b302b4d0cf Update modelica pom 2019-12-19 15:01:26 +01:00
Clément Fournier 5866d9e9dd Merge branch 'master' into 7.0.x 2019-12-19 15:00:25 +01:00
Clément Fournier 933141913a Test arrays 2019-12-15 03:39:19 +01:00
Clément Fournier 3070555c7e remove symbol tables 2019-12-15 02:44:12 +01:00
Clément Fournier ebe09ef80b Make reflected symbols 2019-12-15 02:33:39 +01:00
Clément Fournier 5cc235dc94 Merge branch 'java-grammar' into grammar-new-statements 2019-12-15 01:45:08 +01:00
Clément Fournier 9857644882 Fix compilation 2019-12-15 01:34:48 +01:00
Clément Fournier 5aef7be2a8 Merge branch 'grammar-prefix-postfix' into java-grammar 2019-12-15 01:27:55 +01:00
Clément Fournier 218fdc7264 Merge branch 'java-grammar' into grammar-prefix-postfix 2019-12-15 01:27:36 +01:00
Clément Fournier b03e233647 Turn Statement into an interface
Remove BlockStatement
Introduce LocalClassDeclStatement
Introduce EmptyDeclaration (in preparation for PR about declarations)
Replace StatementExpression with ExpressionStatement

Make YieldStatement, ExplicitConstructorInvocation implement ASTStatement

Extract ForeachStatement from ForStatement

Rename
(ASTWhileStmt,
 ASTDoStmt,
 ASTForStmt,
 ASTIfStmt,
 ASTAssertStmt)#getGuardExpressionNode() -> getCondition()

Rename ASTCatchStatement -> ASTCatchClause
Rename ASTFinallyStatement -> ASTFinallyClause
Rename ASTTryStatement#getCatchStatements() -> getCatchClauses()

Make ASTYieldStatement not a TypeNode

Remove ASTTryStatement#hasFinally()

Add (ASTThrowStatement,  ASTYieldStatement, ASTReturnStatement)#getExpression()
Add ASTTryStatement#getBody()
2019-12-15 01:21:49 +01:00
Clément Fournier 5960740d18 Make jjtAccept methods abstract
Several nodes lacked an implementation, which
defeats the visitor
2019-12-15 01:11:21 +01:00
Clément Fournier 58d8eaa81a Remove comments 2019-12-15 01:07:53 +01:00
Andreas Dangel f5d54927d6 Merge branch 'pmd/7.0.x' into java-grammar 2019-12-14 17:58:42 +01:00
Andreas Dangel 0cc8e49ae6 Merge branch 'pr-1622' into pmd/7.0.x
[core] NodeStream API
2019-12-14 17:18:14 +01:00
Andreas Dangel e4903c1a28 Merge remote-tracking branch 'origin/pmd/7.0.x' into pr-1622 2019-12-14 17:07:12 +01:00
Clément Fournier c7e52ad176 Add some default methods
This is to avoid changes of the 7.0 branch
breaking the designer's PlainTextLanguage
implementation.
2019-12-13 21:35:14 +01:00
Clément Fournier 44106075f4 Merge branch 'grammar-isolate-version-checks' into java-grammar 2019-12-11 20:41:11 +01:00
Clément Fournier e70c714fca Fix merge 2019-12-11 20:36:45 +01:00
Clément Fournier ff174620f4 Merge branch '7.0.x' into java-grammar 2019-12-11 20:22:55 +01:00
Clément Fournier 37fc2dc95c Merge branch 'violation-suppressors' into 7.0.x 2019-12-11 20:13:53 +01:00
Clément Fournier 9c66e15758 Merge branch 'master' into 7.0.x 2019-12-11 20:09:42 +01:00
Clément Fournier 07c53cd28c Fix tests 2019-12-10 13:12:08 +01:00
Clément Fournier ae8c70b7c9 Checkstyle 2019-12-10 13:03:35 +01:00
Clément Fournier 282932baa6 Merge branch '7.0.x' into violation-suppressors 2019-12-10 12:54:29 +01:00
Clément Fournier 8987b69f51 Add back AbstractRVFactory for compat with designer 2019-12-10 12:54:07 +01:00
Clément Fournier 51b4307a52 Fix imports
Fix integration test
2019-12-10 12:54:03 +01:00
Andreas Dangel 0c0f911343 Fix build 2019-12-09 19:45:30 +01:00
Clément Fournier 03e9b64f10 Remove whitespace changes 2019-12-09 15:23:50 +01:00
Clément Fournier 76439a47f2 Use a single node for unary exprs 2019-12-09 15:12:09 +01:00
Clément Fournier a374c843ac Merge branch 'java-grammar' into grammar-isolate-version-checks 2019-12-09 12:14:14 +01:00
Clément Fournier 9d831d0035 Merge branch '7.0.x' into java-grammar 2019-12-09 12:07:29 +01:00
Clément Fournier ad6cef479e Fix tests 2019-12-09 12:07:05 +01:00
Clément Fournier 1d54ec9093 Merge branch '7.0.x' into java-grammar 2019-12-09 11:49:08 +01:00
Clément Fournier 22a964f99b Fix compil 2019-12-09 11:48:13 +01:00
Clément Fournier b3eed6e020 Merge branch 'java-grammar' into grammar-isolate-version-checks 2019-12-09 01:07:29 +01:00
Clément Fournier e06165584f Merge branch '7.0.x' into violation-suppressors 2019-12-09 01:03:34 +01:00
Clément Fournier 3c23044f2f Merge branch '7.0.x' into java-grammar 2019-12-09 00:57:49 +01:00
Clément Fournier 442a414ca6 Move internal API introduced in #2152 2019-12-09 00:56:50 +01:00
Clément Fournier 9e186ca78b Merge branch '7.0.x' into java-grammar 2019-12-09 00:43:33 +01:00
Clément Fournier 9e1327e9b4 Merge branch 'master' into 7.0.x 2019-12-09 00:42:59 +01:00
Andreas Dangel e7ca26ca72 Fix build 2019-11-29 21:04:58 +01:00
Andreas Dangel e3ff77433d Merge branch 'pmd/7.0.x' into java-grammar 2019-11-29 20:44:44 +01:00
Andreas Dangel ece63cb3cc Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2019-11-29 20:18:57 +01:00
Clément Fournier 99a91d22ef Checkstyle 2019-11-22 18:41:00 +01:00
Clément Fournier bc394dcf67 Fix tests 2019-11-22 17:59:38 +01:00
Clément Fournier 928be5de6f Fix style 2019-11-19 16:38:21 +01:00
Clément Fournier c7da6e94b2 Merge branch 'java-grammar' into grammar-prefix-postfix 2019-11-19 16:22:12 +01:00
Clément Fournier 8c5fd6956d Use reporting strategy 2019-11-19 15:53:24 +01:00
Clément Fournier 585e123c09 Cleanup 2019-11-19 03:58:32 +01:00
Clément Fournier 1c6e57b5db Fix tests 2019-11-19 03:43:46 +01:00
Clément Fournier b9d113abc9 Generify checker 2019-11-19 03:43:46 +01:00
Clément Fournier b9882c4268 Remove abstract java parser 2019-11-19 03:43:46 +01:00
Clément Fournier ac2b77b472 Pull version checks out of the parser 2019-11-19 03:43:46 +01:00
Clément Fournier f57afff745 Merge branch '7.0.x' into java-grammar 2019-11-19 03:43:06 +01:00
Clément Fournier 9f3a3dfb85 Merge branch 'master' into 7.0.x 2019-11-19 03:36:57 +01:00
Andreas Dangel c0d9538144 Merge branch 'pmd/7.0.x' into java-grammar 2019-11-08 14:42:08 +01:00
Andreas Dangel 544ad701ba Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2019-11-08 14:35:20 +01:00
Andreas Dangel c90004298d Merge branch 'pmd/7.0.x' into java-grammar 2019-10-31 21:21:46 +01:00
Andreas Dangel 31fdb59be0 Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2019-10-31 20:59:13 +01:00
Juan Martín Sotuyo Dodero b5caa8c4ca Merge pull request #1566 from oowekyala/sym-reference-framework
[java] Symbol reference framework
2019-10-23 20:05:27 -03:00
Clément Fournier 1bfcd91cba Merge branch 'master' into 7.0.x 2019-10-16 17:29:34 +02:00
Andreas Dangel deab05f3b8 [java] Mention ASTModuleDeclaration 2019-10-13 14:56:47 +02:00
Clément Fournier 3d6f660700 Checkstyle 2019-10-09 19:51:01 +02:00
Clément Fournier 4f8ed4c1c2 Merge branch '7.0.x' into violation-suppressors 2019-10-08 01:48:46 +02:00
Clément Fournier cb65fa35b6 Cleanup
Fix PMD warnings

Remove unused method
2019-10-08 01:47:38 +02:00
Clément Fournier 2133d5a479 Update symbol API to newer guidelines
About Optional for example
2019-10-08 01:47:38 +02:00
Clément Fournier 003af13c8f Fix rebase 2019-10-08 01:47:38 +02:00
Clément Fournier 2a11c98843 Remove type parameter 2019-10-08 01:47:38 +02:00
Clément Fournier f16193f338 Fix checkstyle 2019-10-08 01:47:38 +02:00
Clément Fournier ce55da95df Fix JSymbolTable 2019-10-08 01:47:38 +02:00
Clément Fournier bd8fafecc2 REVERT ME remove changes to ClassTypeResolverTest 2019-10-08 01:47:38 +02:00
Clément Fournier 7702bf43fc REVERT ME Remove implementation and tests 2019-10-08 01:47:38 +02:00
Clément Fournier dd66e4372e Extract interfaces 2019-10-08 01:47:38 +02:00
Clément Fournier b154c5e3ee Remove irrelevant changes 2019-10-08 01:47:38 +02:00
Clément Fournier f535a2372f Add some insights about global caching 2019-10-08 01:47:38 +02:00
Clément Fournier 6a6f20d899 Make getEnclosingClass always resolved 2019-10-08 01:47:38 +02:00
Clément Fournier 3acf89f54f Test class symbol 2019-10-08 01:47:38 +02:00
Clément Fournier df693dcd1c Use weak reference for node 2019-10-08 01:47:38 +02:00
Clément Fournier 423e1c38e9 Add owner symbol to type parameters 2019-10-08 01:47:38 +02:00
Clément Fournier d123869c65 Update tests 2019-10-08 01:47:38 +02:00
Clément Fournier 6433118696 Add getEnclosingClass 2019-10-08 01:47:38 +02:00
Clément Fournier a5dc9ea2be Organise test utils
Some utilities used by the symbol table tests
were deleted in this commit to reduce the diff.
TODO restore them with the next PR
2019-10-08 01:47:38 +02:00
Clément Fournier 7063fde136 Test field and method symbols 2019-10-08 01:47:38 +02:00
Clément Fournier b2ca9b18a3 Cleanup the symbol impls 2019-10-08 01:47:38 +02:00
Clément Fournier aab1a19f95 Remove symbol table implementations and tests
This is only done to split the work into two PRs.
TODO revert me
2019-10-08 01:47:38 +02:00
Clément Fournier f5cc4f919a Reduce visibility 2019-10-08 01:47:38 +02:00
Clément Fournier 242713dec5 Move files around 2019-10-08 01:47:38 +02:00
Clément Fournier 17684b06d8 Fix static-single-import should import types 2019-10-08 01:47:38 +02:00
Clément Fournier 330075307f Test laziness 2019-10-08 01:47:38 +02:00
Clément Fournier 6a23d073ce Improve PMDASMClassLoader fetching 2019-10-08 01:47:38 +02:00
Clément Fournier 38e88dd759 Encapsulate config inside a ResolveHelper 2019-10-08 01:47:38 +02:00
Clément Fournier 7526cb741d Cleanups 2019-10-08 01:47:38 +02:00
Clément Fournier 4da71bdc9f Update doc, rename 2019-10-08 01:47:38 +02:00
Clément Fournier ba6d5c0849 Brush-up terminology 2019-10-08 01:47:38 +02:00
Clément Fournier 1a1d9ad56d Remove getDeclaringScope from JCodeReference, reorganise scopes 2019-10-08 01:47:38 +02:00
Clément Fournier 1976439e38 Document 2019-10-08 01:47:38 +02:00
Clément Fournier a1cba57aee Add tests 2019-10-08 01:47:38 +02:00
Clément Fournier 2dfcd9db90 Refactor ClassTypeResolverTest 2019-10-08 01:47:38 +02:00
Clément Fournier a11490ddb8 Update JavaNode interface 2019-10-08 01:47:38 +02:00
Clément Fournier 0a5a6a198c Some improvements 2019-10-08 01:47:38 +02:00
Clément Fournier 5e3afe2c0d Document 2019-10-08 01:47:38 +02:00
Clément Fournier 8ee8b05945 Accessibility check 2019-10-08 01:47:38 +02:00
Clément Fournier 52bbd0937f Make SamePackageScope 2019-10-08 01:47:38 +02:00
Clément Fournier 3ad956727e Finish import on demand based on an existing resolver 2019-10-08 01:47:38 +02:00
Clément Fournier 5dd2f6ddc0 Create import scopes 2019-10-08 01:47:38 +02:00
Clément Fournier a59c216049 Create symbolic class reference 2019-10-08 01:47:38 +02:00
Clément Fournier ec670cdbf5 Add refs, JScope interface 2019-10-08 01:47:38 +02:00
Clément Fournier 185432c22d Fix build 2019-10-08 01:46:30 +02:00
Clément Fournier 0bc02039ad Merge branch 'grammar-method-alignment' into java-grammar 2019-10-07 16:50:34 +02:00
Clément Fournier db2bea5dce Merge branch '7.0.x' into java-grammar 2019-10-07 16:47:01 +02:00
Clément Fournier 6a2c87cd94 Merge branch 'master' into 7.0.x 2019-10-07 16:46:28 +02:00
Clément Fournier cd79d64873 Fix build after rebase 2019-10-07 00:10:54 +02:00
Clément Fournier 2f0d672ae2 Fix class init bug 2019-10-07 00:04:10 +02:00
Clément Fournier 80f5afb14a Revert "Tighten visibility of AST internals"
This reverts commit 111c0fd08ba479f2b4b7f0321071d1acce8df4fd.
2019-10-07 00:04:09 +02:00
Clément Fournier 795234c446 Revert changes to visibility 2019-10-07 00:03:59 +02:00
Clément Fournier a455e7834d Tighten visibility of AST internals 2019-10-07 00:03:33 +02:00
Clément Fournier e16a5c9868 Checkstyle 2019-10-07 00:03:19 +02:00
Clément Fournier 31db265af9 Remove antlr violation factory 2019-10-07 00:03:19 +02:00
Clément Fournier 12d04beb9b Fix some pr comments 2019-10-07 00:03:17 +02:00
Clément Fournier ac9cc97313 Cleanup, avoid recreating set 2019-10-07 00:03:09 +02:00
Clément Fournier a597cbd537 Rename #id to #getId 2019-10-07 00:03:09 +02:00
Clément Fournier d0a3174f20 Remove useless violation factories 2019-10-07 00:03:09 +02:00
Clément Fournier 9431ce4d9f Cleanup a bit 2019-10-07 00:03:08 +02:00
Clément Fournier 70abdfc0ba Doc 2019-10-07 00:03:00 +02:00
Clément Fournier c61c77b055 Remove useless suppress method 2019-10-07 00:03:00 +02:00
Clément Fournier b270076e13 Remove useless violation factories 2019-10-07 00:03:00 +02:00
Clément Fournier eb88113ed1 Fix tests 2019-10-07 00:03:00 +02:00
Clément Fournier c29f1a6b84 Remove suppress map 2019-10-07 00:03:00 +02:00
Clément Fournier d1479d9fcf Make suppressors lighter 2019-10-07 00:02:59 +02:00
Clément Fournier 98ab2c1665 Simplify apex violations 2019-10-07 00:02:12 +02:00
Clément Fournier 0d7d23aa4f Figure out suppressors 2019-10-07 00:02:11 +02:00
Clément Fournier 6b3e4f1b34 WIP3 2019-10-07 00:02:01 +02:00
Clément Fournier 8140ae9cbc Extract suppressor interface 2019-10-07 00:01:31 +02:00
Clément Fournier 38165a5bc5 Merge branch '7.0.x' into java-grammar 2019-10-05 16:11:52 +02:00
Clément Fournier 2d74ec4012 Merge branch 'wire-processing-stages' into 7.0.x 2019-10-05 15:58:47 +02:00
Clément Fournier 3c31b2df30 Merge branch 'java-grammar' into grammar-method-alignment 2019-10-05 14:56:19 +02:00
Clément Fournier 50bfd90eea Merge branch 'grammar-type-expr' into java-grammar 2019-10-05 14:52:05 +02:00
Clément Fournier a62ecf0f4c Merge branch 'java-grammar' into grammar-method-alignment 2019-10-05 14:50:27 +02:00
Clément Fournier 6d9c4b3d39 Merge branch '7.0.x' into java-grammar 2019-10-05 14:48:06 +02:00
Clément Fournier cb54f45800 Merge branch 'master' into 7.0.x 2019-10-05 14:46:13 +02:00
Andreas Dangel 9da3067ec6 Merge branch 'pr-2035' into pmd/7.0.x 2019-10-05 14:08:11 +02:00
Clément Fournier d56f61b9aa Merge branch 'java-grammar' into grammar-type-expr 2019-09-30 15:49:18 +02:00
Clément Fournier 1258db21ea Use better names for assignment operators
Also, %= had been forgotten
2019-09-30 15:47:29 +02:00
Clément Fournier 60aaaffc12 Fix compilation
Use AtLeastOneChild to remove nullability warnings.
2019-09-30 15:08:17 +02:00
Clément Fournier 420cc4d0a1 Remove JSingleChildNode
See https://github.com/pmd/pmd/pull/2039#discussion_r329493940
2019-09-30 12:11:01 +02:00
Clément Fournier 341a833ee7 Remove InstanceOfExpression, use regular InfixExpression 2019-09-30 12:08:15 +02:00
Clément Fournier 43a8c6dd80 PR review comments
* Don't abbreviate getLhs/getRhs
* Make ExplicitConstructorInvocation implement QualifierOwner
2019-09-30 11:36:50 +02:00
Clément Fournier e6e05dc725 Remove DCD
Fixes #2038
2019-09-28 12:48:01 +02:00
Clément Fournier a5d6203b1e Merge branch 'master' into 7.0.x 2019-09-28 12:45:32 +02:00
Clément Fournier 8b4e308c3b Suppress PMD warnings 2019-09-28 12:25:03 +02:00
Clément Fournier 9451961e1f Fix qualifier being ASTExpression
Since parentheses are flattened, any expression may be in any position
(which is good tbh, the API is simpler, and the AST is uniform)
2019-09-28 11:36:01 +02:00
Clément Fournier 0e43f81461 Fix singularField 2019-09-28 10:48:33 +02:00
Clément Fournier a792e5ef25 Remove findLanguageVersionByTerseName
This method was stupid, most usages actually concatenate two strings
to pass as an argument. The only place this is used appropriately is
when parsing the sourceType of rule tests, with the caveat that the
source may be a different language than the rule, which makes no sense
at all.
2019-09-28 10:37:15 +02:00
Clément Fournier 90df330e52 Cleanup LanguageRegistry
Use sets, document
2019-09-28 10:19:32 +02:00
Clément Fournier 34e936c5e3 Fix wrong language version message 2019-09-28 10:06:37 +02:00
Clément Fournier e6a2a60aaa Forgot golang and groovy 2019-09-27 18:24:22 +02:00
Clément Fournier dadef8d990 Revert a change 2019-09-27 16:19:59 +02:00
Clément Fournier 6a3fbd5185 Merge branch '7.0.x' into remove-dummy-modules 2019-09-27 15:55:06 +02:00
Clément Fournier 764f4a10d3 Test annotation methods 2019-09-27 07:42:38 +02:00
Clément Fournier 4644eb1a4c Test annotated throws list 2019-09-27 06:58:23 +02:00
Clément Fournier 9eb1b35e10 Remove AbstractJavaRule#getDeclaringType 2019-09-27 06:35:16 +02:00
Clément Fournier e3e0911ca4 Use throwslist instead of namelist 2019-09-27 06:24:26 +02:00
Clément Fournier 8744fa953d Checkstyle 2019-09-26 07:20:54 +02:00
Clément Fournier 9c906849fa Checkstyle 2019-09-26 07:14:38 +02:00
Clément Fournier 8a4911498e Fix violation names
Make JavaRuleViolation not depend on the old symbol table
2019-09-26 07:11:24 +02:00
Clément Fournier 6fb3d54a72 Fix tests 2019-09-26 06:31:31 +02:00
Clément Fournier 9efe40f729 Merge branch 'java-grammar-merged' into grammar-method-alignment 2019-09-26 06:05:39 +02:00
Clément Fournier 555c98d621 Test precedence of cast 2019-09-26 05:57:30 +02:00
Clément Fournier b769629a10 Split UnaryExpr into Prefix and Postfix
Among the different possible categorisations
of unary expressions, this is probably the
most logical and easiest to document.

Here's a comparison of different possible
categorisations. Note: `_++` is the postfix
increment operator, while `++_` is the prefix
one - idem for decrement. The last one is the
one implemented by this commit.

\## 6.0.x

```
  Unary = { -, + }
  UnaryNotPlusMinus { !, ~ }
  PreIncrement = { ++_ }
  PreDecrement { --_ }
  Postfix { _++, _++ }
```

* Very assymmetric, splits operators based on parsing
concerns

\## Before #1890:

```
  Unary = { -, + , !, ~ }
  PreIncrement = { ++_ }
  PreDecrement { --_ }
  Postfix { _++, _++ }
```

* Minor simplification

\## #1890:

```
  Unary = Prefix \ { ++_, --_ })
  Increment ( { ++ , -- } x (postfix, prefix) )
```
* Names are weird (IncrementExpr may be decrement, Unary != Increment
  even though semantically, Increment \subset Unary)
* No possibility to introduce a supertype (what would it be?)
* But easy to match all increment/decrement expressions

\## JLS (also, Eclipse):

```
  Prefix = { !, ~, -, +, ++_, --_ }
  Postfix = { _++, _-- }
```

* Both can have super interface UnaryExpr
  * This allows matching all increment/decrement expressions easily too
* Easiest to document, JLS like, AST like
* Fits well with `InfixExpr`
2019-09-26 05:57:30 +02:00
Clément Fournier b4d188adcd Use imports to reduce merge conflicts 2019-09-26 05:54:52 +02:00
Clément Fournier 49d5da51eb Uniformise some method names 2019-09-26 05:54:51 +02:00
Clément Fournier e20c1fe4f7 Rename to getQualifier 2019-09-26 05:53:53 +02:00
Clément Fournier f777e3bcfe Fix tests 2019-09-26 05:53:53 +02:00
Clément Fournier 163d1be01f Simplify doc comments 2019-09-26 05:53:53 +02:00
Clément Fournier 1e8195726b Same for qualifiable exprs 2019-09-26 05:53:53 +02:00
Clément Fournier d4b0440c7f Treat instanceof expression as an infix expression 2019-09-26 05:53:53 +02:00
Clément Fournier 90f645f4d9 Correct documentation 2019-09-26 05:53:53 +02:00
Clément Fournier fbebe72bc0 Merge branch 'grammar-array-dims' into java-grammar 2019-09-26 05:44:11 +02:00
Clément Fournier 8b7ecd7576 Merge branch 'grammar-receiver' into java-grammar 2019-09-26 05:44:03 +02:00
Clément Fournier 5f40f54821 Merge branch 'grammar-left-recursive-ops' into java-grammar 2019-09-26 05:43:52 +02:00
Clément Fournier 16a89b57e2 Fix parser corner test 2019-09-25 23:42:41 +02:00
Clément Fournier ae378fd89b Fix dead link 2019-09-25 23:39:20 +02:00
Clément Fournier b97f5652da Remove isSuppressed 2019-09-25 23:11:18 +02:00
Clément Fournier 17ef272ee1 Merge branch '7.0.x' into java-grammar 2019-09-25 23:10:27 +02:00
Clément Fournier 5aec74eb9f Merge branch '7.0.x' into remove-unused-rules 2019-09-25 23:09:20 +02:00
Clément Fournier b425f3f067 Merge branch 'master' into 7.0.x 2019-09-25 23:07:31 +02:00
Clément Fournier 8d47824b41 Merge branch 'java-grammar' into grammar-left-recursive-ops 2019-09-25 22:59:37 +02:00
Clément Fournier 6a04f6af25 Merge branch 'java-grammar' into grammar-array-dims 2019-09-25 22:55:50 +02:00
Clément Fournier f702295e24 Merge branch 'java-grammar' into grammar-receiver 2019-09-25 22:55:11 +02:00
Clément Fournier 0d2e3d5cf8 Merge branch 'grammar-annotation-suppression' into java-grammar 2019-09-25 22:53:50 +02:00
Clément Fournier cf9860974a Fix wrong comment 2019-09-25 22:53:07 +02:00
Clément Fournier e293d57681 Checkstyle 2019-09-25 11:06:03 +02:00
Clément Fournier a2790fa671 Cleanup 2019-09-25 10:30:31 +02:00
Clément Fournier b51c02f93b Reorganise antlr files
Antlr root nodes need to implement RootNode.

Also, I didn't like the fact that the swift
module didn't use the conventional package
structure (lang.swift.ast) but was rolling
its own convention (lang.swift.antlr4).

I moved base classes for the antlr implementations
into nspmd.lang.ast.impl.antlr4. The fact that a
module is implemented with antlr is an implementation
detail, and it doesn't deserve its own toplevel package
in nspmd.lang.
2019-09-25 03:49:36 +02:00
Clément Fournier b059f0a70b Checkstyle 2019-09-25 02:21:59 +02:00
Clément Fournier 36741b2ff4 Fix xpath handler 2019-09-25 02:08:11 +02:00
Clément Fournier 7d0079a1c6 Merge branch '7.0.x' into wire-processing-stages 2019-09-25 01:59:21 +02:00
Clément Fournier 8e89b802d5 Checkstyle 2019-09-25 01:36:34 +02:00
Clément Fournier d058c17144 Merge branch '7.0.x' into node-stream-api 2019-09-25 01:33:53 +02:00
Clément Fournier 9734091f1d Ignore integration test 2019-09-25 01:14:10 +02:00
Clément Fournier 16cfc43ef0 Merge branch 'java-grammar' into grammar-annotation-suppression 2019-09-25 00:56:32 +02:00
Clément Fournier 82e393b7a5 Ignore some of the remaining tests
* nspmd.lang.java.dfa
* nspmd.lang.java.symboltable
* Some of nspmd.lang.java.metrics

The remaining failures are fixed by #1927
2019-09-25 00:55:50 +02:00
Clément Fournier 537ac89895 Merge branch 'java-grammar' into grammar-annotation-suppression 2019-09-25 00:44:23 +02:00
Clément Fournier f69e7bf047 Merge branch '7.0.x' into java-grammar 2019-09-25 00:40:42 +02:00
Juan Martín Sotuyo Dodero 173519694f Merge pull request #2005 from oowekyala/remove-statistical-rule
[core] Remove statistical rule (final step)
2019-09-24 10:46:26 -03:00
Clément Fournier 4890905699 Remove Parser#canParse 2019-09-24 09:13:15 +02:00
Clément Fournier 505b1efe78 Cleanup 2019-09-24 09:11:52 +02:00
Clément Fournier 41c3158570 REmove useless stuff 2019-09-24 06:15:34 +02:00
Clément Fournier 8164586604 Remove remaining service files 2019-09-24 06:15:34 +02:00
Clément Fournier 1fe9c59212 Remove cpp lang 2019-09-24 06:15:34 +02:00
Clément Fournier 9cff38b4ac Remove deprecated rules of java/errorprone.xml
* LoggerIsNotStaticFinal
2019-09-24 06:04:48 +02:00
Clément Fournier 96eaa32b68 Remove deprecated rules of java/multithreading.xml
* UnsynchronizedStaticDateFormatter
2019-09-24 03:51:08 +02:00
Clément Fournier 8a8e0646a8 Remove deprecated rules of java/codestyle.xml
* AbstractNaming
* AvoidFinalLocalVariable
* AvoidPrefixingMethodParameters
* ForLoopsMustUseBraces
* IfElseStmtsMustUseBraces
* IfStmtsMustUseBraces
* MIsLeadingVariableName
* SuspiciousConstantFieldName
* WhileLoopsMustUseBraces
2019-09-24 03:48:21 +02:00
Clément Fournier 15a59f5938 Merge branch '7.0.x' into remove-unused-rules 2019-09-24 03:10:38 +02:00
Clément Fournier 95eeb53941 Fix old rulesets 2019-09-24 03:08:04 +02:00
Clément Fournier df6b166ce0 Fix apex tests 2019-09-19 01:00:42 +02:00
Clément Fournier f615b9df17 Remove more unused rules with old properties 2019-09-19 00:55:52 +02:00
Clément Fournier ad822f7e2b Accomodate tests for scala empty nodes
refs #2021
2019-09-19 00:30:17 +02:00
Clément Fournier c42a66c40f Remove transitional classes of property framework 2019-09-19 00:15:21 +02:00
Clément Fournier 551eb83470 Remove useless assignment 2019-09-18 22:17:44 +02:00
Clément Fournier 38e9aa9960 Merge branch '7.0.x' into remove-unused-rules 2019-09-18 10:34:29 +02:00
Clément Fournier d1578aba17 Merge branch 'master' into 7.0.x 2019-09-18 10:22:52 +02:00
Clément Fournier 049f659ef9 Merge branch '7.0.x' into node-stream-api 2019-09-16 13:58:17 +02:00
Clément Fournier 636445a31c Merge branch '7.0.x' into wire-processing-stages 2019-09-16 13:50:59 +02:00
Clément Fournier fe8cbe1b6d Merge branch 'master' into 7.0.x 2019-09-16 13:25:22 +02:00
Clément Fournier c7419b8c12 Fix merge 2019-09-16 13:18:10 +02:00
Clément Fournier 9111119076 Merge branch 'master' into 7.0.x 2019-09-16 13:05:55 +02:00
Clément Fournier 0f13725b3d Use kotlin tests for text blocks 2019-09-14 16:25:44 +02:00
Clément Fournier 7b7fc2bd75 Fix merge 2019-09-14 15:36:12 +02:00
Clément Fournier 88e3a88cd8 Adapt text blocks to new grammar
They're parsed as StringLiteral nodes.
2019-09-14 15:31:03 +02:00
Clément Fournier dc7d990280 Merge branch '7.0.x' into java-grammar 2019-09-14 15:14:22 +02:00
Clément Fournier 052c298a85 Merge branch 'master' into 7.0.x 2019-09-14 15:08:12 +02:00
Clément Fournier b5104768df Remove old cyclo rules 2019-09-13 03:23:18 +02:00
Clément Fournier d3c98dd148 Remove variable naming convention rules 2019-09-13 03:20:20 +02:00
Clément Fournier 463e268341 Remove unused rule classes 2019-09-13 03:17:35 +02:00
Clément Fournier 5b32c4c28c Simplify 2019-09-12 11:38:50 +02:00
Clément Fournier 29e481df2a Add singleton iterator 2019-09-12 10:29:16 +02:00
Clément Fournier 61a9b0a989 Implement regular children stream with slice 2019-09-12 10:08:49 +02:00
Clément Fournier e86902fde9 Cleanup slice checks 2019-09-12 09:09:36 +02:00
Clément Fournier ccd9c19c7a Add tests 2019-09-11 17:08:05 +02:00
Clément Fournier 83a88524f0 Improve children slice 2019-09-11 14:58:29 +02:00
Clément Fournier 550de74565 Cleanup defaults and doc 2019-09-11 14:31:53 +02:00
Clément Fournier d0da7fd552 Property testing of implementations 2019-09-11 08:14:09 +02:00
Clément Fournier 405df25255 Hide filtermap 2019-09-10 23:53:59 +02:00
Clément Fournier e5a67a55fb Test iterator util 2019-09-10 23:45:24 +02:00
Clément Fournier bc25e58dfc Cleanup, add annotations 2019-09-10 22:13:04 +02:00
Clément Fournier a3770a4cb5 Remove many default implementations,
use iterator as main implementation
2019-09-10 13:39:21 +02:00
Clément Fournier 4a826120ec Implement flatmap and filter in terms of Iterator 2019-09-10 11:00:03 +02:00
Clément Fournier a4bfd7dc9f Add more singleton methods 2019-09-10 10:07:19 +02:00
Clément Fournier cf5e37bbc4 Use filtermap to share implementation 2019-09-10 09:22:07 +02:00
Clément Fournier 5724ebe667 Implement ancestors in terms of ancestorOrSelf 2019-09-10 07:05:37 +02:00
Clément Fournier 2c61271c61 Add #last operation 2019-09-10 06:08:03 +02:00
Clément Fournier 0ef24090c4 Opt sibling methods 2019-09-10 05:21:54 +02:00
Clément Fournier 6843571dbd Hide impl 2019-09-10 02:55:03 +02:00
Clément Fournier 6f3848eca1 Remove NodeChildrenIterator 2019-09-10 01:06:35 +02:00
Clément Fournier d57ef4d269 Revert 2019-09-10 00:23:59 +02:00
Clément Fournier d3c21150c3 Specialize flatmap impl 2019-09-10 00:21:53 +02:00
Clément Fournier e2bf9c1803 Merge branch '7.0.x' into remove-statistical-rule 2019-09-09 19:39:38 +02:00
Clément Fournier 45e71f45e6 Merge branch '7.0.x' into node-stream-api 2019-09-09 18:51:42 +02:00
Clément Fournier 8f3472310a Fix scala module 2019-09-09 18:51:13 +02:00
Clément Fournier 1e525f72f9 Checkstyleee 2019-09-09 18:09:53 +02:00
Clément Fournier 399ddc1f01 Fix children count method 2019-09-09 17:51:09 +02:00
Clément Fournier bec15e15b2 Fix getNthParent 2019-09-09 17:38:47 +02:00
Clément Fournier b35fb07d1d Checkstyle + pmd 2019-09-09 16:50:17 +02:00
Clément Fournier bc99112092 Finalize impls 2019-09-09 16:44:42 +02:00
Clément Fournier 34fcec9a77 Don't use optional on node stream api 2019-09-09 16:11:48 +02:00
Clément Fournier fc77ddaedd Optimise singleton stream 2019-09-09 05:35:28 +02:00
Clément Fournier 2214c1c9e2 Optimise descendant implementation 2019-09-09 01:44:47 +02:00
Clément Fournier 1f173a14c4 Checkstyle 2019-09-08 23:30:04 +02:00
Clément Fournier e04baa403c Merge branch '7.0.x' into remove-statistical-rule 2019-09-08 22:30:34 +02:00
Clément Fournier b986bed9fb Merge branch 'master' into 7.0.x 2019-09-08 21:55:58 +02:00
Clément Fournier 547ed82d75 Uniformise names, correct documentation 2019-09-08 20:08:31 +02:00
Clément Fournier 6eb26c7a4d Make node list implementation 2019-09-08 19:52:42 +02:00
Clément Fournier 4a94008fb4 Checkstyle 2019-09-07 02:52:39 +02:00
Clément Fournier c4ae0b3f79 Fix wrongful deletions 2019-09-06 17:17:57 +02:00
Clément Fournier 775a5d1559 Remove duplicate classes
Residues of the rebase
2019-09-06 16:46:59 +02:00
Clément Fournier fbcc96bc21 Remove duplicated copyright 2019-09-06 16:46:59 +02:00
Clément Fournier 27803a198b Checkstyle 2019-09-06 16:46:59 +02:00
Clément Fournier 1b7119ed64 Add abstract rulechain rule 2019-09-06 16:46:59 +02:00
Clément Fournier 191f996ab8 Remove pmd core stuff 2019-09-06 16:46:59 +02:00
Clément Fournier ab1b50a3f6 Port VM rule 2019-09-06 16:46:59 +02:00
Clément Fournier 0ede213953 Port npath complexity 2019-09-06 16:46:59 +02:00
Clément Fournier 6ef31ace17 Remove logging 2019-09-06 16:46:59 +02:00
Clément Fournier 8db2a69c29 Port plsql parameter count 2019-09-06 16:46:59 +02:00
Clément Fournier 5ad5a29b87 Update plsql ncss rules 2019-09-06 16:46:59 +02:00
Clément Fournier 3ca9353a7f Port PLSQL length rules 2019-09-06 16:46:59 +02:00
Clément Fournier 8b193dffcc Share common property descriptors 2019-09-06 16:46:59 +02:00
Clément Fournier 2a2337c9da Port SwitchDensity 2019-09-06 16:46:59 +02:00
Clément Fournier 21a764a916 Port java length rules 2019-09-06 16:46:59 +02:00
Clément Fournier 3c9cfd62ea Rename apex base class 2019-09-06 16:46:59 +02:00
Clément Fournier d6f216a086 Remove old java ncss rules 2019-09-06 16:46:59 +02:00
Clément Fournier 30b9e99cb4 Remove old base classes 2019-09-06 16:46:59 +02:00
Clément Fournier 60f65cbb99 Port apex ncss rules 2019-09-06 16:46:59 +02:00
Clément Fournier 38b5486fda Convert subclasses of ExcessiveNodeCount 2019-09-06 16:46:59 +02:00
Clément Fournier 2bcda3d6c4 Port ExcessiveClassLength 2019-09-06 16:46:59 +02:00
Juan Martín Sotuyo Dodero 61ee224c7b Merge pull request #1772 from oowekyala/remove-java-stat-rules
[java] Remove java statistical rules
2019-09-06 11:24:40 -03:00
Clément Fournier 7644c23e1b Use concurrent maps 2019-09-06 15:23:15 +02:00
Clément Fournier a7253d4a93 Make test method package private 2019-09-06 15:21:53 +02:00
Clément Fournier 713d09190e Merge branch '7.0.x' into wire-processing-stages 2019-09-06 15:20:12 +02:00
Juan Martín Sotuyo Dodero 1ae63347e9 Merge pull request #1800 from oowekyala/xml-unimplement-dom
[xml] Unimplement org.w3c.dom.Node from the XmlNodeWrapper
2019-09-05 20:07:32 -03:00
Juan Martín Sotuyo Dodero 1989662f1e Merge pull request #1825 from adangel/pmd7-xpath-no-attribute
[core] Support NoAttribute for XPath
2019-09-05 20:07:10 -03:00
Clément Fournier 08fd64acfe Merge branch '7.0.x' into remove-java-stat-rules 2019-08-17 14:06:20 +02:00
Clément Fournier e26133906f Merge branch 'master' into 7.0.x 2019-08-17 14:05:57 +02:00
Clément Fournier 423401c7d2 Merge branch '7.0.x' into grammar-annotation-suppression 2019-08-17 10:49:22 +02:00
Clément Fournier c6ba7ac695 Move whole annotation suppression logic into util 2019-08-17 08:56:47 +02:00
Clément Fournier 198c621c15 Fix class cast exceptions 2019-08-17 02:37:01 +02:00
Clément Fournier d7f6855aec Remove image attribute of InfixExpression 2019-08-16 15:41:05 +02:00
Clément Fournier af74c1f970 Fix rebase 2019-08-16 14:17:33 +02:00
Clément Fournier 8a5f4c4266 Document 2019-08-16 14:06:41 +02:00
Clément Fournier 8d50f3592d Represent annotation methods directly with method declarations 2019-08-16 14:06:39 +02:00
Clément Fournier 953e3a37c6 Fix tests 2019-08-16 14:06:10 +02:00
Clément Fournier 86ab49448e Add some doc 2019-08-16 14:04:56 +02:00
Clément Fournier 36ec136282 Test for constructor 2019-08-16 14:04:54 +02:00
Clément Fournier 4660e22a48 Remove MethodDeclarator, align constructor declaration and methodDeclaration
* Remove ASTConstructorDeclaration::getParameters -> use getFormalParameters
* Remove ASTConstructorDeclaration::getParameterCount -> use getArity
* Remove MethodDeclarator from MethodDeclaration grammar, deprecate node class
* Add an ASTBlock to ASTConstructorDeclaration grammar and
ASTMethodOrConstructorDeclaration::getBody
* Remove ASTMethodDeclaration::getBlock in favour of getBody
2019-08-16 14:02:46 +02:00
Clément Fournier 31cd079c94 Remove duplicated copyright 2019-08-16 13:39:08 +02:00
Clément Fournier 3e521d3e62 Merge branch 'java-grammar' into grammar-left-recursive-ops 2019-08-16 13:38:46 +02:00
Clément Fournier 84bc03eb08 Rename to ArrayDimensions 2019-08-15 17:39:44 +02:00
Clément Fournier 00649ac5d9 Merge ArrayAllocationDims with ArrayTypeDims
This simplifies the grammar of allocation expressions,
they now have an array type as a child
2019-08-15 17:27:16 +02:00
Clément Fournier aca7c2eb82 Merge branch 'java-grammar' into grammar-receiver 2019-08-15 16:46:18 +02:00
Clément Fournier 94f47f216d Update comment 2019-08-15 16:46:06 +02:00
Clément Fournier 5234c2fe70 Merge branch '7.0.x' into java-grammar 2019-08-15 16:43:39 +02:00
Clément Fournier e92502bb6b Fix compilation 2019-08-15 15:39:43 +02:00
Clément Fournier 70be475693 Remove duplicate copyright headers 2019-08-15 15:17:28 +02:00
Clément Fournier 92e0b4114d Fix lookaheads 2019-08-15 14:25:42 +02:00
Clément Fournier 111ab93eb0 Fix FormalParameter*s* not being a SingleChildNode anymore 2019-08-15 13:55:56 +02:00
Clément Fournier fe37b6b2e6 Remove stuff for later
(revert me when improving MethodOrConstructorDeclaration
2019-08-15 13:55:56 +02:00
Clément Fournier a234e33b89 Add some tests 2019-08-15 13:55:56 +02:00
Clément Fournier 86cb07cfad Revert changes to annotation methods 2019-08-15 13:55:56 +02:00
Clément Fournier 06f82c6e71 Remove VariableDeclaratorId::isExplicitReceiverParameter 2019-08-15 13:55:56 +02:00
Clément Fournier 121d4c7942 Deal with receiver parameter explicitly 2019-08-15 13:55:56 +02:00
Clément Fournier 9bf646b393 Fix getOperator 2019-08-15 01:32:14 +02:00
Clément Fournier df681ce39a Update image 2019-08-15 01:03:44 +02:00
Clément Fournier 9369eb1657 Remove useless base class 2019-08-15 00:24:54 +02:00
Clément Fournier 1bd6d3d986 Update images 2019-08-14 23:10:23 +02:00
Clément Fournier 7b9ccffca6 Make expressions left-recursive, merge them into a single node 2019-08-14 21:53:05 +02:00
Juan Martín Sotuyo Dodero 3c2d26c60e Merge branch 'pr-1882' into pmd/7.0.x 2019-08-14 14:45:03 -03:00
Juan Martín Sotuyo Dodero 6f805dabb6 Update changelog, refs #1882 2019-08-14 14:44:42 -03:00
Juan Martín Sotuyo Dodero a46aef3b40 Use Void in ProhibitedInterfaceBuilderRule 2019-08-14 14:44:26 -03:00
Tomi De Lucca 6281f81ea9 Adding to rulechain 2019-08-13 23:46:51 -03:00
Tomi De Lucca da6aec2000 Merge branch 'pmd/7.0.x' of github.com:pmd/pmd into feature/swift-available-rule 2019-08-13 23:15:28 -03:00
Juan Martín Sotuyo Dodero be4bef7427 Merge branch 'pr-1877' into pmd/7.0.x 2019-08-13 17:24:42 -03:00
Juan Martín Sotuyo Dodero af72ddda9d Update changelog, refs #1877 2019-08-13 17:24:21 -03:00
Juan Martín Sotuyo Dodero 53eba5549c Fix RuleChain indexation
- Remove Context suffix from Antlr grammar XPath names
2019-08-12 01:25:42 -03:00
Juan Martín Sotuyo Dodero 76c1af5e5e Filter out terminal nodes 2019-08-12 00:36:27 -03:00
Clément Fournier 55a815db79 Cleanup some tests 2019-08-07 15:27:58 +02:00
Clément Fournier 1356e6e5b5 Remove getOp, use getOperator instead 2019-08-07 15:27:58 +02:00
Clément Fournier fccd98ff3f Cleanup relationalExpr tests 2019-08-07 15:27:58 +02:00
Clément Fournier 0795e9798f Cleanup shiftExpr tests 2019-08-07 15:27:24 +02:00
Clément Fournier affae1d43c Cleanup equalityExpr tests 2019-08-07 15:26:53 +02:00
Matias Fraga 5768e3503f Merge branch 'antlr-documentation' of github.com:teamraptor/pmd into antlr-documentation 2019-08-06 13:11:31 -03:00
Matias Fraga c45e5682a4 Merge branch 'pmd/7.0.x' of github.com:pmd/pmd into antlr-documentation 2019-08-06 13:10:51 -03:00
Andreas Dangel e49e2df1ad [java] Kotlin Tests: variableRef -> variableAccess 2019-08-06 17:03:30 +02:00
Andreas Dangel 8f8b445a6e Merge branch 'pr-1897' into java-grammar 2019-08-06 16:31:40 +02:00
Andreas Dangel ad4c71a663 Merge branch 'pr-1890' into java-grammar 2019-08-06 16:22:43 +02:00
Clément Fournier ec57361a7f Cleanup grammar as suggested by adangel
Rename ResourceSpecification production to ResourceList,
remove Resources production
2019-08-06 02:04:41 +02:00
Clément Fournier bc11a665b0 Test stable name 2019-08-06 01:58:17 +02:00
Clément FournierandAndreas Dangel d0b30444e7 Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/IncrementOp.java
Co-Authored-By: Andreas Dangel <andreas.dangel@adangel.org>
2019-08-06 01:41:22 +02:00
Clément Fournier 7d99c84590 Rename getBaseExpression to getOperand 2019-08-06 01:38:20 +02:00
Clément Fournier ca604ea678 Merge branch 'java-grammar' into grammar-assignable-expression 2019-08-06 01:24:32 +02:00
Clément Fournier 85404876f4 Fix swift source generation bound to process-sources
By convention it should be the phase generate-sources
2019-08-05 15:49:44 +02:00
Clément Fournier a182d1a9aa Add few lines of doc 2019-08-05 15:36:58 +02:00
Clément Fournier c71f1faf24 Fix enum constant bug
getId was throwing ClassCastException
when annotations were present.
2019-08-05 15:33:24 +02:00
Tomi De Lucca 89ede940d3 Addressed some PR comments 2019-08-04 15:25:30 -03:00
Tomi De Lucca 443be1715f Merge branch 'pmd/7.0.x' of github.com:pmd/pmd into feature/swift-rules 2019-08-04 14:57:05 -03:00
Tomi De Lucca 0f89950bfc PR Review 2019-08-04 14:49:45 -03:00
Tomi De LuccaandJuan Martín Sotuyo Dodero 56a9979417 Documentation changes
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-04 14:23:52 -03:00
Matías Fraga e8ae35073b Update adding_a_new_antlr_based_language.md 2019-08-03 19:59:15 -03:00
Matías FragaandJuan Martín Sotuyo Dodero 738031d6a9 Apply suggestions from code review
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:54:03 -03:00
Matías FragaandJuan Martín Sotuyo Dodero 83f5064769 Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:53:37 -03:00
Matías FragaandJuan Martín Sotuyo Dodero 0d701273a8 Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:53:21 -03:00
Matías FragaandJuan Martín Sotuyo Dodero c9123780a4 Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:53:13 -03:00
Matías FragaandJuan Martín Sotuyo Dodero b9d4e3b2c5 Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:53:05 -03:00
Matías FragaandJuan Martín Sotuyo Dodero 7ffe656eb5 Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:52:09 -03:00
Matías FragaandJuan Martín Sotuyo Dodero 104954d611 Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:51:57 -03:00
Matías FragaandJuan Martín Sotuyo Dodero e614bc2ab2 Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:51:50 -03:00
Matías FragaandJuan Martín Sotuyo Dodero 71ffdb8295 Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:51:43 -03:00
Matías FragaandJuan Martín Sotuyo Dodero d1c20008a0 Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:51:34 -03:00
Matías FragaandJuan Martín Sotuyo Dodero e70235824b Update docs/pages/pmd/devdocs/major_contributions/adding_a_new_antlr_based_language.md
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-08-03 19:51:25 -03:00
Clément Fournier 425af935ae Merge branch 'java-grammar' into grammar-improve-resource 2019-07-31 15:49:39 +02:00
Clément Fournier 6b7f447d4a Simplify relational expr 2019-07-31 03:29:37 +02:00
Clément Fournier f4fb3fba93 Merge branch '7.0.x' into node-stream-api 2019-07-31 03:01:25 +02:00
Clément Fournier 8ebf9c7133 Remove wildcard in childrenStream
This will probably be a pain to deal with. The other method
may be used with a node class to provide better type safety..
2019-07-31 02:53:38 +02:00
Andreas Dangel 6f3ec48bb7 Fix compile errors 2019-07-28 19:16:37 +02:00
Andreas Dangel afc206d439 Merge branch 'pr-1888' into java-grammar 2019-07-28 19:09:55 +02:00
Andreas Dangel a7b9f27bef Merge branch 'pmd/7.0.x' into java-grammar 2019-07-28 19:08:29 +02:00
Clément Fournier f13e303db5 Update ResourceSpecification to ResourceList 2019-07-28 19:00:07 +02:00
Clément Fournier 682da633dd Merge branch 'java-grammar' into grammar-improve-resource 2019-07-28 18:59:11 +02:00
Andreas Dangel 7c970991cd Merge branch 'master' into pmd/7.0.x 2019-07-28 18:56:13 +02:00
Clément Fournier ac7e2a8d08 Fix node name 2019-07-28 18:37:15 +02:00
Andreas Dangel d1a5cb36eb Fix build 2019-07-28 18:36:35 +02:00
Clément Fournier 556e713a7e Merge branch 'java-grammar' into grammar-assignable-expression 2019-07-28 18:34:08 +02:00
Clément Fournier 25040c2116 Merge branch '7.0.x' into java-grammar 2019-07-28 16:48:32 +02:00
Clément Fournier 3d11d5692d Merge branch 'master' into 7.0.x 2019-07-28 16:46:51 +02:00
Clément Fournier a305660504 Remove some warnings in grammar
Unused productions
Unnecessary parentheses
Consecutive parser actions
2019-07-28 15:47:20 +02:00
Clément Fournier 3218c25665 Use extendLeft a bit less 2019-07-28 15:30:52 +02:00
Clément Fournier faf3747f28 Fix doc 2019-07-24 14:56:40 +02:00
Clément Fournier 075faf7a1b Remove useless test 2019-07-23 16:47:12 +02:00
Clément Fournier cf43a6f18e Fix text bounds of parenthesized expressions 2019-07-22 12:36:01 +02:00
Clément Fournier 15c93b17e2 Use JavaNode in place of Node 2019-07-22 12:16:20 +02:00
Clément Fournier a9af61bec6 Optimise imports 2019-07-22 11:59:02 +02:00
Clément Fournier 3723dc75f7 Use set 2019-07-21 16:13:41 +02:00
Clément Fournier 15a8f50dfd Add todos 2019-07-21 15:43:46 +02:00
Clément Fournier b7ea055954 Remove need for CanSuppressWarnings 2019-07-21 15:38:45 +02:00
Clément Fournier 28069e47c4 Fix doc of ConstructorCall, test qualified 2019-07-21 15:09:16 +02:00
Clément Fournier 8dbf95d8e4 Remove unused imports 2019-07-16 14:06:34 +02:00
Clément Fournier eab8e6a241 Merge branch 'java-grammar' into grammar-improve-resource 2019-07-16 14:05:11 +02:00
Clément Fournier 5fd8a26b45 Merge branch 'java-grammar' into grammar-assignable-expression 2019-07-16 14:01:21 +02:00
Clément Fournier 6f8adcd158 Merge branch 'java-grammar' into grammar-remove-names 2019-07-16 13:58:02 +02:00
Clément Fournier f2dcfc8eb5 Fix comment 2019-07-16 13:56:00 +02:00
Andreas Dangel d5fad8f42b Rename test case FullTypeAnnotations 2019-07-15 20:14:43 +02:00
Andreas Dangel efc3bc7d5f Merge branch 'pr-1875' into java-grammar 2019-07-15 20:13:08 +02:00
Clément Fournier 0d6e2f34ce Fix choice amibiguity with annotated local class
Fixes some failing tests
2019-07-12 02:57:54 +02:00
Clément Fournier d664b175aa Fix type annot on method ref in cast ctx 2019-07-12 02:53:50 +02:00
Clément Fournier 968c7d019a Improve try-with-resources grammar 2019-07-01 12:57:21 +02:00
Clément Fournier fb850aba82 Remove unused node types 2019-06-27 08:46:47 +02:00
Clément Fournier 6a50cc52f4 Cleanup impl 2019-06-27 00:51:39 +02:00
Clément Fournier 866e8391cd Cleanup diff 2019-06-27 00:35:33 +02:00
Clément Fournier 13c1f74fef Move AccessType into AssignableExpr 2019-06-27 00:29:29 +02:00
Clément Fournier e59d10fc37 Rename VariableReference to VariableAccess 2019-06-27 00:03:54 +02:00
Clément Fournier 613f6bb47a Merge Pre[Inc|Dec]rementExpr and PostfixExpr into IncrementExpr 2019-06-27 00:00:42 +02:00
Clément Fournier ddb0ca97f6 Test feature 2019-06-26 23:15:57 +02:00
Clément Fournier 4ef3156762 Add assignable expression 2019-06-26 23:01:36 +02:00
Clément Fournier 7db00d1ce6 Circumvent noAttribute, keep image of imports & package null 2019-06-26 19:29:03 +02:00
Clément Fournier d774aef5e3 Doc 2019-06-26 19:16:53 +02:00
Clément Fournier 8715a8556c Fix compilation 2019-06-26 19:04:58 +02:00
Clément Fournier 303b9628e4 Remove name node in import & package decl
Make ImportDeclaration not a TypeNode
2019-06-26 18:18:09 +02:00
Clément Fournier a64c467293 Fix some cases of type annotations failure 2019-06-26 04:55:43 +02:00
Clément Fournier b47aa62dc9 Fix text bounds on declarations 2019-06-25 16:51:05 +02:00
Clément Fournier 9356d12968 Merge branch 'java-grammar' into grammar-annotation-floating 2019-06-25 16:38:12 +02:00
Clément Fournier 46fcccb7f7 Fix compilation 2019-06-25 16:13:53 +02:00
Matias Fraga 9119370302 Rerun CI 2019-06-21 18:59:45 -03:00
Tomi De Lucca 107ccbf145 Added docs 2019-06-21 18:56:23 -03:00
Tomi De Lucca 6d9066067d Improved rule description 2019-06-21 16:36:23 -03:00
Tomi De Lucca 4fca74b0e0 Merge branch 'feature/swift-rules' of github.com:teamraptor/pmd into feature/swift-available-rule 2019-06-21 16:24:15 -03:00
Matias Fraga 9f406333d2 Add antlr documentation 2019-06-21 16:13:01 -03:00
Matias Fraga eb80ef42e5 Rerun CI 2019-06-21 14:27:22 -03:00
Matias Fraga 499a31ca85 Enhance rules description 2019-06-21 13:26:08 -03:00
Tomi De Lucca 7425bbe54c Remove test 2019-06-21 01:40:29 -03:00
Tomi De Lucca 623764ebb0 Minor fixes 2019-06-21 01:35:40 -03:00
Tomi De Lucca ec031d6ad7 Merge branch 'feature/swift-rules' of github.com:teamraptor/pmd into feature/swift-available-rule 2019-06-20 23:06:28 -03:00
Matias Fraga 93a52b7669 Fix checkstyle 2019-06-20 22:50:57 -03:00
Matias Fraga 07c19ff631 Add another xpath rule 2019-06-20 22:27:37 -03:00
Matias Fraga de006b17f4 Fix pmd test 2019-06-20 22:22:29 -03:00
Matias Fraga a2756dcdcd Return null by default on getimage 2019-06-20 21:53:36 -03:00
Tomi De Lucca af1b8a12aa Optimizing rule 2019-06-20 21:51:05 -03:00
Matias Fraga ca39fc36e6 PR review 2019-06-20 21:31:48 -03:00
Tomi De Lucca a81e68f6da Added UnavailableFunctionRule 2019-06-20 20:36:42 -03:00
Matias Fraga 5c02aadcf5 Add final modifiers 2019-06-20 20:21:27 -03:00
Matias Fraga dcfc7e822d Autoformat 2019-06-20 20:19:39 -03:00
Matias Fraga cf6b1ac2b2 remove old rule 2019-06-20 20:14:13 -03:00
Matias Fraga 0f57fa460f remove unused method 2019-06-20 20:10:56 -03:00
Matias Fraga 766ccf578a Adjust some xpath rules 2019-06-20 20:02:50 -03:00
Matias Fraga 56040b403c Remove deprecated method 2019-06-20 18:30:29 -03:00
Matias Fraga 14618259dc Merge branch 'pmd/7.0.x' of github.com:pmd/pmd into feature/swift-rules 2019-06-20 18:05:33 -03:00
Clément Fournier 4248c442de Make type param implement annotatable 2019-06-20 16:27:00 +02:00
Andreas Dangel f021cde6e4 Fix javadoc for ArrayTypeDims 2019-06-19 19:29:24 +02:00
Andreas Dangel b4409eefc6 Merge branch 'pr-1872' into java-grammar 2019-06-19 19:10:32 +02:00
Clément Fournier 926c008012 Fix instanceof with annotated type 2019-06-19 00:37:46 +02:00
Clément Fournier 2a40d49cfc Add changelog notice 2019-06-19 00:37:46 +02:00
Clément Fournier cbc336a040 Fix tests 2019-06-19 00:37:46 +02:00
Clément Fournier 176eb23cba Add local class annotation tests 2019-06-19 00:37:46 +02:00
Clément Fournier 4030f0f861 Array type annotations 2019-06-19 00:37:46 +02:00
Clément Fournier 154b37626b Generalise annotatable 2019-06-19 00:37:46 +02:00
Clément Fournier 388c952376 Remove annotation list, parse annotations flatly 2019-06-19 00:37:46 +02:00
Clément Fournier 8262e38708 remove wrapLeft 2019-06-19 00:37:46 +02:00
Clément Fournier 0351b5976e Test other annotation positions 2019-06-19 00:37:46 +02:00
Clément Fournier eec53bcf2c Add test for enum constants 2019-06-19 00:37:46 +02:00
Clément Fournier 93ceb24881 Fix wildcard type annotations 2019-06-19 00:37:46 +02:00
Clément Fournier 69f722731b Fix comment 2019-06-19 00:37:46 +02:00
Clément Fournier d84eb67ab3 Remove test to enable later 2019-06-19 00:37:46 +02:00
Clément Fournier 5b91d2f38c Update grammar hints 2019-06-19 00:37:46 +02:00
Clément Fournier a9bcb0016b Fix tests 2019-06-19 00:37:46 +02:00
Clément Fournier a709ce5cf2 Extract annotation changes 2019-06-19 00:37:46 +02:00
Clément Fournier dd074c9771 Merge branch 'java-grammar' into grammar-parentheses-flat 2019-06-19 00:37:23 +02:00
Andreas Dangel fae70fb35a Merge branch 'pr-1857' into java-grammar 2019-06-18 18:59:32 +02:00
Andreas Dangel 554c026326 Fixes from review #1857 2019-06-18 18:58:07 +02:00
Clément Fournier 68ed455f44 Remove default method 2019-06-18 15:08:03 +02:00
Clément Fournier 946e64a290 Add some tests 2019-06-17 20:50:54 +02:00
Clément Fournier 62ea1d167f Represent parentheses with attribute, not node 2019-06-17 20:23:53 +02:00
Andreas Dangel 4774a6089b (doc) Update generated rule doc 2019-06-17 20:06:08 +02:00
Andreas Dangel 0d00b92353 Merge branch 'pr-1856' into java-grammar 2019-06-17 19:55:28 +02:00
Andreas Dangel 4867777097 Fix checkstyle 2019-06-17 19:35:46 +02:00
Clément Fournier 26db55e18f Simplify tests of switchExpression 2019-06-17 08:03:58 +02:00
Clément Fournier 9da2a975fc Merge branch 'java-grammar' into grammar-hide-internal-ast-api 2019-06-17 07:55:35 +02:00
Clément Fournier bf616559b9 Merge branch 'java-grammar' into grammar-fix-class-literal 2019-06-17 07:55:10 +02:00
Clément Fournier e9a8174a64 Checkstyle 2019-06-17 07:54:49 +02:00
Clément Fournier ca17b8deaa Merge branch '7.0.x' into java-grammar 2019-06-17 07:50:49 +02:00
Clément Fournier 2d4a30fa10 Merge branch 'master' of github.com:pmd/pmd into 7.0.x 2019-06-17 07:47:12 +02:00
Clément Fournier da5812ba6d Merge branch 'java-grammar' into grammar-fix-class-literal 2019-06-17 07:43:12 +02:00
Clément Fournier 5fdea30294 Merge branch 'master' into java-grammar 2019-06-17 07:36:11 +02:00
Andreas Dangel 712070ad47 Merge branch 'pr-1855' into java-grammar 2019-06-16 19:56:15 +02:00
Andreas Dangel dcc718d10b Merge branch 'pr-1774' into pmd/7.0.x 2019-06-15 12:17:54 +02:00
Andreas Dangel ec3ba3e867 Update release notes, refs #1774 2019-06-15 12:12:14 +02:00
Andreas Dangel a7906a5da3 Don't swallow the exception 2019-06-15 12:09:58 +02:00
Andreas Dangel d8cfd83a50 Merge branch 'pr-1698' into pmd/7.0.x 2019-06-15 11:55:35 +02:00
Andreas Dangel e40359c961 Update release notes, refs #1698 2019-06-15 11:55:24 +02:00
Andreas Dangel ec7855b5d7 Cleanup duplicated license headers 2019-06-11 21:24:44 +02:00
Clément Fournier ac665a22d1 Merge branch 'java-grammar' into grammar-hide-internal-ast-api 2019-06-08 16:15:36 +02:00
Clément Fournier 4159675d71 Merge branch 'java-grammar' into grammar-opt-expressions 2019-06-08 16:14:57 +02:00
Clément Fournier cba4a47483 Cleanup 2019-06-08 16:14:11 +02:00
Clément Fournier 5a4893f809 Make ClassLiteral not an ASTLiteral 2019-06-02 08:47:54 +02:00
Clément Fournier 9b4cc37007 Merge branch 'java-grammar' into grammar-hide-internal-ast-api 2019-06-02 08:30:47 +02:00
Clément Fournier 863790a1af Checkstyle 2019-06-02 08:30:25 +02:00
Clément Fournier 19006f10a1 Cleanup 2019-06-02 08:27:39 +02:00
Clément Fournier 37a384513f Fix compilation 2019-06-02 08:20:45 +02:00
Clément Fournier ec5fe86cb5 Document 2019-06-02 07:59:52 +02:00
Clément Fournier ce0a766ca7 Hide method like 2019-06-02 07:13:58 +02:00
Clément Fournier 9c4253754c Hide abstract type nodes 2019-06-02 07:10:54 +02:00
Clément Fournier 85debc5b84 Hide abstract type decl 2019-06-02 07:00:00 +02:00
Clément Fournier f714a0d905 Hide abstract access node 2019-06-02 06:57:10 +02:00
Clément Fournier 57e8042a39 Create type body interface 2019-06-02 06:43:44 +02:00
Clément Fournier a4ef1f9a46 Hide setComment and AbstractJavaNode 2019-06-02 06:43:44 +02:00
Clément Fournier 6ec3e0975b Hide setScope 2019-06-02 06:43:44 +02:00
Clément Fournier 1daccab405 Fix compilation 2019-06-02 06:43:09 +02:00
Clément Fournier 7f6506c23e Merge branch 'java-grammar' into grammar-opt-expressions 2019-06-02 00:27:36 +02:00
Clément Fournier 048d39449e Checkstyle 2019-06-02 00:24:33 +02:00
Clément Fournier f7dd808886 Merge branch 'java-grammar-merge-master' into java-grammar
Also fix some annotations: if they can already be made package
private on this branch, then we remove them.

If the node class is deprecated, then InternalApi annotations
are removed, to reduce the noise when searching for usages.
2019-06-02 00:08:49 +02:00
Clément Fournier 9cdb3ba27d Fix other annotations 2019-06-02 00:05:48 +02:00
Clément Fournier 90d1467735 Use interface where possible 2019-06-01 23:52:09 +02:00
Clément Fournier 78383625df Remove setters from AccessNode interface 2019-06-01 23:46:16 +02:00
Clément Fournier db41f58a52 Fix some internal annots 2019-06-01 23:38:08 +02:00
Clément Fournier 634c4a0bd5 Fix compilation 2019-06-01 23:23:14 +02:00
Clément Fournier db1da56551 Fix some internal annotations 2019-06-01 23:18:31 +02:00
Clément Fournier 8f0c982a09 Merge branch 'master' into java-grammar 2019-06-01 23:18:03 +02:00
Clément Fournier 53d696a6a1 Document 2019-05-28 16:33:59 +02:00
Clément Fournier 0e16462166 Remove unused prod 2019-05-28 16:14:26 +02:00
Clément Fournier 6a8cb2cd32 REVERT ME Extract lambda changes 2019-05-26 16:47:26 +02:00
Clément Fournier 45f040fa9f Improve statement expression placement 2019-05-26 16:39:19 +02:00
Clément Fournier 4d0042f9d0 Fix type arg/shift ambig corner case 2019-05-26 16:39:19 +02:00
Clément Fournier 0939d4e1fc Fix some corner cases found in jdk12 sources 2019-05-26 16:39:19 +02:00
Clément Fournier 501bfa80b0 Forbid method references to be stacked 2019-05-26 16:39:19 +02:00
Clément Fournier 2379c099cd Remove jjtclose hook of array access 2019-05-26 16:39:19 +02:00
Clément Fournier 691537eeff Remove jjtclose hook of constructor call 2019-05-26 16:39:19 +02:00
Clément Fournier c18b3803d4 Simplify qualified this & super 2019-05-26 16:39:19 +02:00
Clément Fournier 066ec0f022 Make super keyword stricter 2019-05-26 16:39:19 +02:00
Clément Fournier 5af835ef86 Test method reference 2019-05-26 16:39:19 +02:00
Clément Fournier c42723fa53 Fix lambda allowed in ternaries 2019-05-26 16:39:19 +02:00
Clément Fournier 17abff76ee Fix explicit constructor invoc args 2019-05-26 16:39:19 +02:00
Clément Fournier 13f052dcf2 Move lambda out of primary prefix 2019-05-26 16:39:19 +02:00
Clément Fournier cfc31e42e9 Fix ambiguity between type args & LT comp 2019-05-26 16:39:19 +02:00
Clément Fournier 06d9e5a583 Checkstyle 2019-05-26 16:39:19 +02:00
Clément Fournier cbb153ed12 Cleanup tests 2019-05-26 16:39:18 +02:00
Clément Fournier 8ab8009be6 Fix constructor invoc ambiguity 2019-05-26 16:39:18 +02:00
Clément Fournier 68fa6198a1 Cleanup 2019-05-26 16:39:18 +02:00
Clément Fournier 0ef4ec74af Optimise primary prefix lookaheads 2019-05-26 16:39:18 +02:00
Andreas Dangel 399ef5c172 Merge branch 'pr-1759' into java-grammar 2019-05-26 12:56:44 +02:00
Andreas Dangel bbbb0807c2 Merge branch 'master' into pmd/7.0.x 2019-05-26 12:45:48 +02:00
Clément Fournier 4fa15cea7a pmd warning 2019-05-25 08:54:12 +02:00
Matias Fraga e984eff27b Add rule visitor 2019-05-25 00:15:23 -03:00
lsoncini cd71c35a0b rule fixes to match name conventions 2019-05-24 23:31:31 -03:00
lsoncini 33983cbf55 swift ruleset boilerplate + rule tests + rules advance 2019-05-24 18:43:41 -03:00
Matias Fraga 5307f8ad20 Generify visit 2019-05-24 12:49:23 -03:00
Matias Fraga f2f0494566 PR review 2019-05-24 12:28:44 -03:00
Clément Fournier d75b6dee3f Remove outdated todos 2019-05-23 01:00:33 +02:00
Clément Fournier c5ba6c7990 Rename TokenOps 2019-05-23 00:59:07 +02:00
Clément Fournier e3ccff3240 Comment fixes 2019-05-23 00:58:11 +02:00
Clément Fournier 58c72058e9 Cleanup tests 2019-05-23 00:31:54 +02:00
Clément Fournier 326b361c42 Fix comment & visibility 2019-05-23 00:15:22 +02:00
Clément Fournier 08fda65e28 Improve explicit constructor invocation parsing 2019-05-22 23:51:03 +02:00
Clément Fournier b8a02be75f Doc corrections 2019-05-22 22:51:19 +02:00
Clément Fournier 04b702d9ce Simplify XPathAttributesIterator 2019-05-22 21:31:52 +02:00
Clément Fournier bc400b65dd Add tests for NoAttribute,
change the contract a bit
2019-05-22 21:20:55 +02:00
Clément Fournier d8b665f9f8 Comment fix 2019-05-22 20:12:47 +02:00
Clément Fournier ee27db8c60 Add type alias to shorten signatures 2019-05-22 20:07:05 +02:00
Clément Fournier 8cc2c2377b Improve number literal test coverage 2019-05-22 19:49:17 +02:00
Clément Fournier 5463f3b770 Improve testing utils a bit
No numeric promotion is performed when comparing numeric
values.

Some implicit assertions are added to check an invariant
about literals.
2019-05-22 19:28:42 +02:00
Clément Fournier aec8b4827c Simplify numeric literal 2019-05-22 15:57:00 +02:00
Clément Fournier 748076b0a6 Test annotation syntax 2019-05-22 15:35:52 +02:00
Clément Fournier b3bb5531be Replace some matchers 2019-05-22 15:20:31 +02:00
Clément Fournier 3de285151f Ignore metrics until we're done with AST 2019-05-22 04:07:45 +02:00
Clément Fournier e1ac1f6d3e Ignore doc nav tests 2019-05-22 04:07:26 +02:00
Clément Fournier 1df3dc5400 Fix parser choosing cast expression too easily 2019-05-22 03:58:15 +02:00
Clément Fournier 8597d18308 Ignore unfixable failing tests 2019-05-22 03:08:56 +02:00
Clément Fournier d2f3968411 Patch typeres for annotations
This fixes missing suppression
2019-05-22 02:53:40 +02:00
Clément Fournier 3a8c65d65a Fix array type tests 2019-05-22 02:42:06 +02:00
Clément Fournier 72c931c4b9 Fix occurrence finder 2019-05-22 02:38:11 +02:00
Clément Fournier f067b29aac Fix AstLiteral tests 2019-05-22 02:37:57 +02:00
Andreas Dangel 361b5c5642 Fix ASTArrayTypeTest 2019-05-20 20:27:07 +02:00
Andreas Dangel 24791844e2 Remove workaround for SwitchLabeled* nodes. They are now LeftRecursiveNodes. 2019-05-20 20:27:07 +02:00
Clément Fournier e89d5315f5 Delete useless method 2019-05-20 20:27:07 +02:00
Clément Fournier 96ea14008a Optimise cast lookahead 2019-05-20 20:27:07 +02:00
Clément Fournier 835e773846 Remove jsr305, use checker-qual 2019-05-20 20:27:07 +02:00
Clément Fournier a392208a84 Push conflicting methods down
Need to refactor XML DOM node proxy
2019-05-20 20:27:07 +02:00
Clément Fournier ee77b10adb Fix some comments 2019-05-20 20:27:07 +02:00
Clément Fournier 05761b068b Rename ArgumentsList to ArgumentList 2019-05-20 20:27:07 +02:00
Clément Fournier dd5afcfc90 Flesh out explicit constructor invoc API 2019-05-20 20:27:07 +02:00
Clément Fournier ef7605ad6b Fix some nested lookeahead corner cases 2019-05-20 20:27:07 +02:00
Clément Fournier 592557e948 Fix constructor invocation ambiguity 2019-05-20 20:27:07 +02:00
Clément Fournier 920b061083 Fix a test of classtyperesolver 2019-05-20 20:27:07 +02:00
Clément Fournier ec544512d2 Fix tests of qualified names 2019-05-20 20:27:07 +02:00
Clément Fournier dc4a0777e5 Use AnonymousClassDeclaration in enum constants too 2019-05-20 20:27:07 +02:00
Clément Fournier b61c5558bb Remove unary plus 2019-05-20 20:27:07 +02:00
Clément Fournier d77c5e962c Simplify algo 2019-05-20 20:27:07 +02:00
Clément Fournier 67e04cb110 Improve coverage 2019-05-20 20:27:07 +02:00
Clément Fournier ebdd74b8bf Delegate text coordinates to the tokens 2019-05-20 20:27:07 +02:00
Clément Fournier 2edc599844 Fix wrong migration doc 2019-05-20 20:27:07 +02:00
Clément Fournier d5d574daed Remove unused var 2019-05-20 20:27:07 +02:00
Juan Martín Sotuyo Doderoandoowekyala 31505fc649 Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceType.java
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2019-05-20 20:27:07 +02:00
Clément Fournier e631ddc5f6 Style 2019-05-20 20:27:07 +02:00
Clément Fournier abe8b07e70 Add FIXMEs 2019-05-20 20:27:07 +02:00
Juan Martín Sotuyo Doderoandoowekyala 7e234e699c Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/AstImplUtil.java
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2019-05-20 20:27:07 +02:00
Clément Fournier e5e79cf6ce Don't return Optional in PrimitiveType 2019-05-20 20:27:07 +02:00
Clément Fournier 1a068c84ef Remove useless method isTernary 2019-05-20 20:27:07 +02:00
Clément Fournier f3674f6357 Fix delegation 2019-05-20 20:27:07 +02:00
Clément Fournier 1765fd2e67 Last touches 2019-05-20 20:27:07 +02:00
Clément Fournier 9c52cf2d7f Remove getChildAs from JavaNode 2019-05-20 20:27:07 +02:00
Clément Fournier 91246087c3 Remove SemanticCheck attr 2019-05-20 20:27:04 +02:00
Clément Fournier 5cf138f884 Move annotation impl util out 2019-05-20 20:25:05 +02:00
Clément Fournier a4533648bb Update jjt changelog 2019-05-20 20:25:05 +02:00
Clément Fournier e9b0c763f6 Hide constructors of some node 2019-05-20 20:25:05 +02:00
Clément Fournier 00c48c9708 Revert changes to dropped nodes 2019-05-20 20:25:05 +02:00
Clément Fournier c07e64150e Add some switchexpr tests 2019-05-20 20:25:05 +02:00
Clément Fournier f2257efec7 Improve dsl 2019-05-20 20:25:05 +02:00
Clément Fournier 2dc46ab696 Make the children array never null 2019-05-20 20:25:05 +02:00
Clément Fournier 1966a7648c Cleanup grammar 2019-05-20 20:23:06 +02:00
Clément Fournier e83ae65dad Checkstyle 2019-05-20 20:23:06 +02:00
Clément Fournier 86d5d7f1c8 Add some missing switch tests 2019-05-20 20:23:06 +02:00
Clément Fournier 5adccd362e Fix switch expression tests 2019-05-20 20:23:06 +02:00
Clément Fournier c54db1f435 Fix doc 2019-05-20 20:23:06 +02:00
Clément Fournier b8d3225377 Improve dsl a bit 2019-05-20 20:23:06 +02:00
Clément Fournier 048a422e59 Remove useless stuff from grammar 2019-05-20 20:23:06 +02:00
Clément Fournier 7f2d3534cc Use LambdaParameter for lambda expressions 2019-05-20 20:23:06 +02:00
Clément Fournier 9c17341676 Revert changes to rules 2019-05-20 20:23:06 +02:00
Clément Fournier 6ffa2f32b9 Simplify CastExpression Lookahead 2019-05-20 20:23:06 +02:00
Clément Fournier 425c2743a0 Test unary expr corner cases 2019-05-20 20:23:06 +02:00
Clément Fournier f2ecaf18d1 More unary expression tests 2019-05-20 20:23:06 +02:00
Clément Fournier 8d8ef2ebf7 Make EqualityExpression same as ShiftExpr 2019-05-20 20:23:06 +02:00
Clément Fournier 6b97f8363d Stricter RelationalExpression parsing 2019-05-20 20:23:06 +02:00
Clément Fournier c0eaa44540 Also make ShiftExpr like AdditiveExpr 2019-05-20 20:23:06 +02:00
Clément Fournier 1f4b885a1f Remove AnnotatedType 2019-05-20 20:23:06 +02:00
Clément Fournier 8095c4a2d2 Fix AbstractLrBinaryExpr type check 2019-05-20 20:23:05 +02:00
Clément Fournier e2b49e4b86 Make base class 2019-05-20 20:23:05 +02:00
Clément Fournier 8486825445 Do the same for MultiplicativExpr 2019-05-20 20:23:05 +02:00
Clément Fournier 614e083f01 Document 2019-05-20 20:23:05 +02:00
Clément Fournier ef38d24544 Fix tests 2019-05-20 20:23:05 +02:00
Clément Fournier 87271412fb Flatten them 2019-05-20 20:23:05 +02:00
Clément Fournier 16b50a6ecf Remove some duplication 2019-05-20 20:23:05 +02:00
Clément Fournier 163529ccfd Left-recursive AdditiveExpr 2019-05-20 20:23:05 +02:00
Clément Fournier 0a3c438767 Checkstyle 2019-05-20 20:23:05 +02:00
Clément Fournier d1fc2111cf Brush up docs 2019-05-20 20:13:12 +02:00
Clément Fournier a231d4761d Use ant replace instead of checking in JJTJavaParserState 2019-05-20 20:13:12 +02:00
Clément Fournier 6ae6c1c068 Test shift expr 2019-05-20 20:13:12 +02:00
Clément Fournier d1f0c0fcd0 Test unary expressions 2019-05-20 20:13:12 +02:00
Clément Fournier 96915574dc Figure out Array alloc dims 2019-05-20 20:13:12 +02:00
Clément Fournier 7213a7d5d8 Get rid of AnnotatedType, reintroduce TypeBound
This is todo later
2019-05-20 20:13:12 +02:00
Clément Fournier 3e36c1621b Remove LateInitNode 2019-05-20 20:13:12 +02:00
Clément Fournier 089b7999d2 Remove need for late init completely 2019-05-20 20:13:12 +02:00
Clément Fournier 9af293b694 Start removing LateInitNode w/ ArrayAccess 2019-05-20 20:13:12 +02:00
Clément Fournier 9fb592a0b0 Fix tests by unwrapping removed nodes 2019-05-20 20:13:12 +02:00
Clément Fournier 5f670412cd Add test for additiveexpr 2019-05-20 20:13:12 +02:00
Clément Fournier c3d1d3269f Fix grammar doc 2019-05-20 20:13:12 +02:00
Clément Fournier a9b5801650 Revert "Remove annotated type"
This reverts commit 6068851275447712a8d9ff08dae28f698b4b76e6.
2019-05-20 20:13:12 +02:00
Clément Fournier 90d4ce5fbd Remove annotated type 2019-05-20 20:13:12 +02:00
Clément Fournier 5e37483c63 Fix resource being a Name 2019-05-20 20:13:12 +02:00
Clément Fournier b4741702c6 Update ctresolver 2019-05-20 20:13:12 +02:00
Clément Fournier 2d83c9284e Make TypeBound #void 2019-05-20 20:13:12 +02:00
Clément Fournier 839698dc21 Make annotation an interface 2019-05-20 20:13:12 +02:00
Clément Fournier ec5e1e43f8 Add way to make negative test cases 2019-05-20 20:13:12 +02:00
Clément Fournier ebe5c101c5 Make parsing contexts objects 2019-05-20 20:13:12 +02:00
Clément Fournier 96c885b33c Test wildcard type 2019-05-20 20:13:12 +02:00
Clément Fournier ae8bcb8b20 Intersection & wildcard types 2019-05-20 20:13:12 +02:00
Clément Fournier 131840a6ab Patch ctresolver 2019-05-20 20:13:12 +02:00
Clément Fournier d8e044672c Make RelationalExpression implement ASTExpression 2019-05-20 20:13:12 +02:00
Clément Fournier e9762cc944 Make CastExpression implement ASTExpression 2019-05-20 20:13:12 +02:00
Clément Fournier c1e6c39522 Set up delegation for types 2019-05-20 20:13:12 +02:00
Clément Fournier 3eea199f8b Set up delegation for other expressions 2019-05-20 20:13:12 +02:00
Clément Fournier 2e4e300949 Add doc on ASTExpression 2019-05-20 20:13:12 +02:00
Clément Fournier 4f052cc19d Set up parser visitor delegation 2019-05-20 20:13:12 +02:00
Clément Fournier 5069983e9b Add SemanticCheck attribute 2019-05-20 20:13:12 +02:00
Clément Fournier f5849b3178 Fix documentation 2019-05-20 20:13:12 +02:00
Clément Fournier f8d09779e5 Fix null parent 2019-05-20 20:13:12 +02:00
Clément Fournier edc92c543e Test additive expression 2019-05-20 20:13:12 +02:00
Clément Fournier af75629269 Filter out some noisy properties 2019-05-20 20:13:12 +02:00
Clément Fournier c1df058757 Use special printer 2019-05-20 20:13:12 +02:00
Clément Fournier 4d887408df Fix parent not set 2019-05-20 20:13:12 +02:00
Clément Fournier f962d6e811 Replace Optional with nullable annots 2019-05-20 20:13:12 +02:00
Clément Fournier 736d005f21 Perform preliminary ambig counting
13% of all expressions are ambiguous names
55% percent of those ambiguous names can be resolved to values declared in the ACU
20% other percent can be resolved to an imported type name
In total, only 3% of all expressions are ambiguous without any classpath support

Those measurements are skewed by the shitty type resolving of TypeSet,
which throws away a resolved FQCN when the class is not on the classpath
Probably, many more names can be resolved to types.

The remaining semantically ambiguous names would be all resolved when the
auxclasspath is complete.

When it isn't, a naming convention and other heuristics could be used to remove
the remaining ambiguous names with minimal risk of error.
Rules like UnnecessaryQualifiedName already use heuristics themselves
and their level of precision is very good. So if that's acceptable, why not share
that analysis with everything and have a more semantic AST?
2019-05-20 20:13:12 +02:00
Clément Fournier 92ac6967e8 Introduce LhsExprNode 2019-05-20 20:13:12 +02:00
Clément Fournier 8d468dfbee Split tests 2019-05-20 20:13:12 +02:00
Clément Fournier 09b56d5e31 Handle tokens 2019-05-20 20:13:12 +02:00
Clément Fournier 87025463fe Fix compilation 2019-05-20 20:13:12 +02:00
Clément Fournier a4216ea4e3 Deprecate VariableInitializer 2019-05-20 20:13:12 +02:00
Clément Fournier b3e287ae2a Rename operator enums for consistency 2019-05-20 20:13:12 +02:00
Clément Fournier 58b4660147 Deprecate some nodes 2019-05-20 20:13:12 +02:00
Clément Fournier a4bbc44773 Make variable initializer void 2019-05-20 20:13:12 +02:00
Clément Fournier 8e9d8ea08c Make LateInitNode an abstract class 2019-05-20 20:13:12 +02:00
Clément Fournier 779917e2d2 Array access is a LateInitNode 2019-05-20 20:13:12 +02:00
Clément Fournier 0bb9f4f60f Super and this implement LateInitNode 2019-05-20 20:13:12 +02:00
Clément Fournier e39c160f7c Document 2019-05-20 20:13:12 +02:00
Clément Fournier beebb1f956 Use AmbiguousName in types 2019-05-20 20:13:12 +02:00
Clément Fournier a650289c27 Figure out some disambiguation 2019-05-20 20:13:12 +02:00
Clément Fournier 312f200e03 Create variable reference expr 2019-05-20 20:13:12 +02:00
Clément Fournier 55bf813216 Split ASTExpressionTest 2019-05-20 20:13:12 +02:00
Clément Fournier 171a7c4c3b Refactor test DSL to have container tests 2019-05-20 20:13:12 +02:00
Clément Fournier 09b2c4fe7f Make all expression nodes implement ASTExpression 2019-05-20 20:13:12 +02:00
Clément Fournier 800abc9d4a Add assignment expression 2019-05-20 20:13:12 +02:00
Clément Fournier 09d41fd464 Remove useless methods 2019-05-20 20:13:12 +02:00
Clément Fournier ea067cc676 Remove useless productions 2019-05-20 20:13:12 +02:00
Clément Fournier dc56dd0676 Test literals 2019-05-20 20:13:12 +02:00
Clément Fournier 56b2e6c420 Document 2019-05-20 20:13:12 +02:00
Clément Fournier 0b0211c615 Test array creation 2019-05-20 20:13:12 +02:00
Clément Fournier 5a554101fd Split allocation expression 2019-05-20 20:13:12 +02:00
Clément Fournier 42de08d64e Do the same for method calls 2019-05-20 20:13:12 +02:00
Clément Fournier 9eb05f5e95 Do the same for field accesses 2019-05-20 20:13:12 +02:00
Clément Fournier 69f0507d44 Delete the name node in method references 2019-05-20 20:13:12 +02:00
Clément Fournier 55fe20667c Introduce LateInitNode to always perform full init 2019-05-20 20:13:12 +02:00
Clément Fournier f7fda54c01 Test method references 2019-05-20 20:13:12 +02:00
Clément Fournier dd3275e06a Add AmbiguousNameExpr 2019-05-20 20:13:11 +02:00
Clément Fournier ca08b0e9e4 Fix compilation 2019-05-20 20:13:11 +02:00
Clément Fournier 732aa3657f Remove visitor decorators 2019-05-20 20:13:11 +02:00
Clément Fournier d700abf1a2 Turn ASTExpression and primary into interfaces, add a bunch of left recursive expressions 2019-05-20 20:13:11 +02:00
Clément Fournier d994544cd6 Add ClassLiteral 2019-05-20 20:13:11 +02:00
Clément Fournier 6021f22f07 Make Literal an interface 2019-05-20 20:13:11 +02:00
Clément Fournier 9a733cd665 Add TODO comments 2019-05-20 20:13:11 +02:00
Clément Fournier 49bec00d3f Extract injection method 2019-05-20 20:13:11 +02:00
Clément Fournier f2d023b78a PR proofreading 2019-05-20 20:13:11 +02:00
Clément Fournier bd82f826aa Checkstyle + PMD 2019-05-20 20:13:11 +02:00
Clément Fournier e381712b57 Structure test for arrays 2019-05-20 20:13:11 +02:00
Clément Fournier e4a739ee89 Fix a test in CTRT 2019-05-20 20:13:11 +02:00
Clément Fournier 2c6adec812 Fix some xpath rules 2019-05-20 20:13:11 +02:00
Clément Fournier b7b05df703 Fix UseVarargs 2019-05-20 20:13:11 +02:00
Clément Fournier 18ec597556 "Fix" LinguisticNaming, see comment 2019-05-20 20:13:11 +02:00
Clément Fournier 3c2e036f52 Fix more tests 2019-05-20 20:13:11 +02:00
Clément Fournier 6dcbf19067 Update SuspiciousHashcodeMethodNameRule 2019-05-20 20:13:11 +02:00
Clément Fournier 49b8cb9bf2 Improve JUnitTestsShouldIncludeAssert 2019-05-20 20:13:11 +02:00
Clément Fournier 795eeed193 Fix some more rules 2019-05-20 20:13:11 +02:00
Clément Fournier 3ee7dd7244 Update CloseResource 2019-05-20 20:13:11 +02:00
Clément Fournier 303c3cf935 Update CTResolver 2019-05-20 20:13:11 +02:00
Clément Fournier e5375034f7 Fix UselessStringValueOf rule 2019-05-20 20:13:11 +02:00
Clément Fournier f9c448936d Fix ConsecutiveLiteralAppends 2019-05-20 20:13:11 +02:00
Clément Fournier 5f100128f0 Fix CouplingBetweenObjects 2019-05-20 20:13:11 +02:00
Clément Fournier 22f5061544 Fix XPath rules 2019-05-20 20:13:11 +02:00
Clément Fournier 5bf5067897 Fix MoreThanOneLogger 2019-05-20 20:13:11 +02:00
Clément Fournier 2f39e4e9cd Refine tests 2019-05-20 20:13:11 +02:00
Clément Fournier 2b67f9a1cc Update other tests 2019-05-20 20:13:11 +02:00
Clément Fournier 4f9c8f7f60 Add tests 2019-05-20 20:13:11 +02:00
Clément Fournier 8ce91fc3e4 Update comments 2019-05-20 20:13:11 +02:00
Clément Fournier 6ae534f6bd Fix some leftovers 2019-05-20 20:13:11 +02:00
Clément Fournier 056a8b3468 Add TODOs 2019-05-20 20:13:11 +02:00
Clément Fournier 44d591628f Tests 2019-05-20 20:13:11 +02:00
Clément Fournier 18581b82ae Parse ClassOrInterfaceType recursively 2019-05-20 20:13:11 +02:00
Clément Fournier 8a588f565f Fix compilation
Left many bugs here and there
2019-05-20 20:13:11 +02:00
Clément Fournier 4ec95b527d Make Type and ReferenceType #void 2019-05-20 20:13:11 +02:00
Clément Fournier dafa4a4d44 Structure test for arrays 2019-05-20 20:13:11 +02:00
Clément Fournier 7f33e53346 Add ASTArrayTypeTest 2019-05-20 20:13:11 +02:00
Andreas Dangel d340075bc7 Exclude rule tests from surefire since we are fixing these tests at the end 2019-05-20 20:13:11 +02:00
Clément Fournier 70b8c384e6 Update CTResolver 2019-05-20 20:13:11 +02:00
Clément Fournier d76b6f3545 Update comments 2019-05-20 20:13:11 +02:00
Clément Fournier 7bed35f2dd Fix some leftovers 2019-05-20 20:13:11 +02:00
Clément Fournier ecbeb0f615 Add TODOs 2019-05-20 20:13:11 +02:00
Clément Fournier 2e7742b48a Parse ClassOrInterfaceType recursively 2019-05-20 20:13:11 +02:00
Clément Fournier d27a754feb Improve Array AST 2019-05-20 20:13:11 +02:00
Clément Fournier 6378080a37 Add nodes for array type dimensions 2019-05-20 20:13:11 +02:00
Clément Fournier 4f48e3a33e Merge branch 'pmd7-checkers-framework' into 7.0.x
From PR #1827

* This PR is for PMD 7
* It's extracted from #1759

This only adds the dependency (compile time), and does not make use of
it yet.
I've added a section in the wiki:
https://github.com/pmd/pmd/wiki/PMD-7.0.0-API
We'll need to flesh out the details over time and verify our APIs, that
we have properly annotated them (if we all agree, that we use
`@Nullable`).
2019-05-18 16:45:29 +02:00
Clément Fournier 606e700a1e Merge branch '7.0.x' into pmd7-checkers-framework 2019-05-18 16:44:40 +02:00
Clément Fournier fd5cce93b0 Merge branch 'pmd7-ast-children-non-null' into 7.0.x
From PR #1823

* This PR is for PMD 7.
* It's extracted from #1759

Changes:
* The children array in AbstractNode is now initialized with an empty
* array.
* This means, it is now never null, thus the null checks can be removed.
* The only change to the children array is, when adding a new child
* (`jjtAddChild`), or removing a child (`removeChildAtIndex`).

Future:
* the children array is protected. This means, sub classes could assign
* null to it... do we really need field available in subclasses? I'd
* assume, the already available methods are enough. -> this is something
* for defining a general AST API (which methods should be package
* private only, as they are only used by the parser, which methods
* define the API, when do we implement iterator, etc..)
2019-05-18 16:36:36 +02:00
Clément Fournier d31c66cd5b Remove CC categories in new rules
Fixes compilation
2019-05-18 16:35:57 +02:00
Clément Fournier 5e733ee2bb Merge branch '7.0.x' into pmd7-ast-children-non-null
Fix conflicts in AbstractNode
2019-05-18 16:30:06 +02:00
Clément Fournier a2e7bf27b0 Merge branch 'pmd7-lang-test-improvements' into 7.0.x
From PR #1824

* This PR is for PMD 7
* It's extracted from #1759

Changes:
* adds the new `assertTextRangeIsOk`, that is executed on every node in
* the kotlin-based tests
* this ensures, that the position of the nodes in the AST is the same as
* they appear in the source code
* For the new switch labeled rules, we have the following grammar

```
void SwitchStatement():
{}
{
  "switch" "(" Expression() ")" SwitchBlock()
}

void SwitchBlock() #void :
{}
{
    "{"
        (
            SwitchLabel()
            (
                "->" SwitchLabeledRulePart() (SwitchLabeledRule())*
            |
                ":" (LOOKAHEAD(2) SwitchLabel() ":")*
(BlockStatement())* (SwitchLabeledStatementGroup())*
            )
        )?
    "}"
}

void SwitchLabeledRulePart() #void:
{checkForSwitchRules();}
{
    (
        ( Expression() ";" ) #SwitchLabeledExpression(2)
      |
        ( Block() ) #SwitchLabeledBlock(2)
      |
        ( ThrowStatement() ) #SwitchLabeledThrowStatement(2)
    )
}
```

`#SwitchLabeledBlock(2)` takes the last two nodes (SwitchLabel + Block)
and adds them as SwitchLabeledBlock to SwitchStatement. JavaCC sets the
first token of SwitchLabeledBlock to be the Block node, but it should be
the SwitchLabel node.

This is fixed in the `jjtClose` methods in the three related
SwitchLabeled* nodes.

On the expression grammar PR, there is a better solution (you can mark
the nodes via the interface `LeftRecursiveNode`).

* So, this actually fixes a bug, that is present in PMD 6.
2019-05-18 16:27:35 +02:00
Clément Fournier bfc60d30c7 Merge branch '7.0.x' into pmd7-lang-test-improvements 2019-05-18 16:23:34 +02:00
Clément Fournier b56306c8c8 Merge branch 'pmd7-abstract-node' into 7.0.x
From PR #1826

* This PR is for PMD 7
* It's extracted from #1759

Changes:
* Ensures that a node has it's parent, when it is added as a child.
* Makes `getXPathNodeName()` abstract by removing the default
* implementation.
2019-05-18 16:20:52 +02:00
Clément Fournier e6c505f4ca Merge branch '7.0.x' into pmd7-abstract-node 2019-05-18 16:16:35 +02:00
Clément Fournier 5343a7674b Merge branch 'master' into 7.0.x
Fix conflicts with Apex CC category properties
2019-05-18 16:13:43 +02:00
Andreas Dangel 0c28170a85 [doc] Update generated documentation 2019-05-11 12:11:25 +02:00
Andreas Dangel 47f8192764 Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2019-05-11 12:03:08 +02:00
Andreas Dangel fe4ba1433a Add checker-qual dependency 2019-05-03 18:16:39 +02:00
Clément Fournier ef619af7c4 Delegate text coordinates to the tokens 2019-05-02 19:44:55 +02:00
Clément Fournier 4ea3911b8d Make AbstractNode.getXPathNodeName() abstract 2019-05-02 19:44:30 +02:00
Clément Fournier 8dcda9e2a4 Fix null parent 2019-05-02 19:29:27 +02:00
Clément Fournier 117ee28cc9 Checkstyle 2019-05-02 19:14:00 +02:00
Clément Fournier 98b3b73ac6 Add NoAttribute annotation 2019-05-02 19:13:47 +02:00
Andreas Dangel a0657dd015 Fix node positions of ASTSwitchLabeled* nodes
Note: this is a temporary fix. A more general fix is in
branch java-grammar
2019-05-01 19:54:29 +02:00
Andreas Dangel 9a93a6c5e9 Delegate text coordinates to the tokens 2019-05-01 17:29:32 +02:00
Andreas Dangel 5ec4324fbc Fix AbstractLrBinaryExpr type check 2019-05-01 17:25:01 +02:00
Andreas Dangel 367ae2a4a9 Remove need for late init completely 2019-05-01 17:23:34 +02:00
Clément Fournier eedc3210fc Add text bounds implicit assertions 2019-05-01 17:18:52 +02:00
Clément Fournier 13bbbfb2c4 Expose default config 2019-05-01 17:18:33 +02:00
Clément Fournier d0eaf73e29 Remove pmd-java test dependency 2019-05-01 17:17:58 +02:00
Clément Fournier 113ad74ddb refactor: Make the children array never null 2019-05-01 12:40:11 +02:00
Clément Fournier 7d6a6dd146 Fix some root nodes not being RootNode 2019-04-30 01:01:39 +02:00
Clément Fournier 02347b7d9f Fix mockito 2019-04-30 01:01:39 +02:00
Clément Fournier 4dd9395f7c Moar tests 2019-04-30 01:01:39 +02:00
Clément Fournier 41200f2c53 Doc 2019-04-30 01:01:39 +02:00
Clément Fournier 9a590becac Avoid duplicates 2019-04-30 01:01:39 +02:00
Clément Fournier d838c988ee Style 2019-04-30 01:01:39 +02:00
Clément Fournier d5ccb713c1 Implement stage dependencies 2019-04-30 01:01:39 +02:00
Clément Fournier 4bfc2017ca Add tests 2019-04-30 01:01:39 +02:00
Clément Fournier 53b46fd6ca Extract helper class 2019-04-30 01:01:39 +02:00
Clément Fournier e77f64c95f Doc 2019-04-30 01:01:39 +02:00
Clément Fournier 12422820ad Simplify 2019-04-30 01:01:39 +02:00
Clément Fournier 1ebd57eb12 Remove double dispatch for stage dependency 2019-04-30 01:01:39 +02:00
Clément Fournier a103244c6f Revert changes to benchmark 2019-04-30 01:01:39 +02:00
Clément Fournier 13682a5f5c Wire AstProcessingStage into SourceCodeProcessor 2019-04-30 01:01:39 +02:00
Juan Martín Sotuyo Dodero 291cbabd1c Merge branch 'pr-1801' into pmd/7.0.x 2019-04-28 20:37:17 -03:00
Juan Martín Sotuyo Dodero f21f5c8bd6 Remove unused imports 2019-04-28 20:36:35 -03:00
Clément Fournier a660a3731f Remove changes to MemberValuePairs
They conflict with #1759
2019-04-28 21:47:18 +02:00
Clément Fournier 97c3dd1ad6 Merge branch '7.0.x' into remove-dump-facade 2019-04-28 20:59:03 +02:00
Clément Fournier fbd936aa26 Move to internal packages 2019-04-28 20:55:53 +02:00
Clément Fournier 5844d5c594 Remove AttributeNode interface 2019-04-28 20:49:20 +02:00
Clément Fournier ef3dedd5ef Unimplement org.w3c.dom.Node for Xml wrapper
This is to help extend the Node interface later on.
This class' implementing both interfaces helped nothing
but would certainly have caused conflicts wrt method names
and incompatible return types.

For example, adding a method `Node getFirstChild()` to our
Node interface would have conflicted with the getFirstChild of
the w3c interface.
2019-04-28 20:49:20 +02:00
Clément Fournier 8cea774776 Remove usages of AttributeNode 2019-04-28 20:48:13 +02:00
Andreas Dangel 0b9e68cf86 Merge branch 'master' into pmd/7.0.x 2019-04-28 11:44:57 +02:00
Andreas Dangel e5bafbc475 Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2019-04-27 19:26:05 +02:00
Clément Fournier 038ca21376 Remove dump façade 2019-04-27 15:47:54 +02:00
Clément Fournier cb122590ba Merge branch 'master' into 7.0.x 2019-04-26 15:10:04 +02:00
lsoncini 3469834ebc abstract getRootNode method 2019-04-21 02:13:04 -03:00
lsoncini ed7a6f0951 minor fixes 2019-04-21 02:13:04 -03:00
lsoncini 10bbe24c45 added AntlrBaseParser adapter and SwiftParserAdapter 2019-04-21 02:13:04 -03:00
lsoncini dd841d6ccb ant file to make all swift nodes implement Node 2019-04-21 02:13:04 -03:00
Matias Fraga 3cbcedf37d Replace foreach 2019-04-13 19:30:33 -03:00
Matias Fraga 8af348dfd5 Merge branch 'feature/antlr-base-parser' of github.com:teamraptor/pmd into feature/antlr-visitor-rules 2019-04-13 14:35:29 -03:00
Matias Fraga bc0438e3ac Merge branch 'pmd/7.0.x' of github.com:pmd/pmd into feature/antlr-base-parser 2019-04-13 14:21:28 -03:00
Clément Fournier fc3747d035 Update release 3.9 ruleset 2019-04-13 19:11:34 +02:00
Clément Fournier ca821f1917 Fix ruleset 2019-04-12 12:01:38 +02:00
Clément Fournier ce749747f2 Add experimental annot 2019-04-11 19:41:43 +02:00
Clément Fournier ead5aedec6 Remove unused base classes 2019-04-11 19:40:45 +02:00
Clément Fournier 2995f156ca Remove Java stat rules 2019-04-11 19:39:44 +02:00
Juan Martín Sotuyo Dodero 0b650f6a00 Merge pull request #1750 from oowekyala/remove-apex-stat-rules
[apex] Remove apex statistical rules
2019-04-11 12:21:11 -03:00
Clément Fournier 9f1f2a591d Style 2019-04-11 16:10:09 +02:00
Clément Fournier bff72a1d74 Merge branch '7.0.x' into remove-apex-stat-rules 2019-04-11 16:09:32 +02:00
Clément Fournier b8380aaefd Merge branch '7.0.x' into node-stream-api 2019-04-11 15:41:21 +02:00
Clément Fournier df048f6b6b Update pmd-dart version 2019-04-11 15:30:31 +02:00
Clément Fournier 7f55a5ce0d Implement childrenStream in AntlrBaseNode 2019-04-11 15:23:33 +02:00
Clément Fournier ae984910b2 Merge branch '7.0.x' into node-stream-api 2019-04-11 15:19:47 +02:00
Clément Fournier 093687048d Merge branch 'master' into 7.0.x 2019-04-11 15:18:54 +02:00
Clément Fournier 90eec8f315 Move base class in internal package 2019-04-11 15:11:40 +02:00
Clément Fournier c2a90fa56b Fix PR comments 2019-04-11 15:09:04 +02:00
Clément Fournier e136459a26 Merge branch '7.0.x' into node-stream-api 2019-04-07 22:15:53 +02:00
Clément Fournier d1f532de5b Merge branch 'master' into 7.0.x 2019-04-07 18:25:54 +02:00
Clément Fournier 021407943c Merge branch 'remove-visitor-decorators' into 7.0.x 2019-04-03 09:40:29 +02:00
Clément Fournier a6f63397d7 Merge branch '7.0.x' into remove-visitor-decorators 2019-04-03 09:17:01 +02:00
Clément Fournier a6062b5f5a Remove base rule class 2019-04-02 10:32:51 +02:00
Clément Fournier 9bf1e274ad Simplify 2019-04-02 10:32:23 +02:00
Clément Fournier a64b757699 Remove apex statistical rules 2019-04-02 10:21:04 +02:00
Juan Martín Sotuyo Dodero 926868692e Merge branch 'pr-1658' into pmd/7.0.x 2019-04-01 12:17:48 -03:00
Juan Martín Sotuyo Dodero cb5172a163 Update changelog, refs #1658 2019-04-01 12:17:27 -03:00
Juan Martín Sotuyo Dodero d55f40a88f Merge branch 'pmd/7.0.x' into abstract-antlr-node 2019-04-01 01:46:02 -03:00
Clément Fournier 2ef63354ea Merge branch 'master' into 7.0.x 2019-04-01 02:02:04 +02:00
Clément Fournier e9231394a3 Merge branch '7.0.x' into remove-visitor-decorators 2019-03-27 15:14:41 +01:00
Clément Fournier dd2df813a7 Add takeWhile 2019-03-20 17:58:58 +01:00
Clément Fournier ba19734187 Merge branch '7.0.x' into node-stream-api 2019-03-20 17:56:35 +01:00
Clément Fournier 134d3d745e Merge branch 'master' into 7.0.x 2019-03-11 22:16:13 +01:00
Andreas Dangel 4c6a1ba0a1 Merge branch 'master' into pmd/7.0.x 2019-03-09 15:12:34 +01:00
Robert Sösemann 4d90f23bca Optimized imports (again) 2019-02-27 20:42:29 +01:00
Robert Sösemann 6d0fd67b6c Optimized imports (again) 2019-02-26 17:12:14 +01:00
Robert Sösemann 3564e16a7a Optimized imports (again) 2019-02-26 17:00:13 +01:00
Robert Sösemann 6f7a79ae43 Optimized imports 2019-02-26 15:44:52 +01:00
Robert Sösemann 5d92a5bc50 Adjust Release Notes 2019-02-26 14:52:32 +01:00
Robert Sösemann 67efdb55dd Fix #1648 ([apex,vf] Remove CodeClimate dependency) 2019-02-26 14:36:56 +01:00
lsoncini 8255af258f added Antlr visitor infrastructure and swift implementation 2019-02-25 18:34:51 -03:00
Matias Fraga d8a2a06009 Fix checkstyle issues 2019-02-25 18:06:46 -03:00
Matias Fraga c8bfd8e83e PR review 2019-02-25 15:07:07 -03:00
lsoncini 47bc813caf added AntlrBaseParser adapter and SwiftParserAdapter 2019-02-25 14:33:09 -03:00
lsoncini d5ffdc0b04 Merge branch 'antrun-process-antlr-sources' of https://github.com/teamraptor/pmd into feature/antlr-base-parser 2019-02-25 13:17:24 -03:00
lsoncini e4448c918e Merge branch 'abstract-antlr-node' of https://github.com/teamraptor/pmd into feature/antlr-base-parser 2019-02-25 13:14:27 -03:00
Matias Fraga 0ce87a5b77 Create traversal utils and implement all traversal method on Node API 2019-02-24 20:24:08 -03:00
Matias Fraga adf5ea2c80 Add findDescendant to Node API 2019-02-24 19:48:03 -03:00
Matias Fraga 4eb34997e8 Implement several methods as default on Node 2019-02-24 19:25:34 -03:00
Clément Fournier 6d84530d52 Merge branch 'master' into 7.0.x 2019-02-18 19:32:55 +01:00
Clément Fournier f98fff4def Fix dead links 2019-02-18 08:52:02 +01:00
Clément Fournier 3545792f9b Move metrics 2019-02-18 08:14:02 +01:00
Clément Fournier 3b6d68e915 Checkstyl 2019-02-17 23:29:32 +01:00
Matias Fraga 63d7c7f0dc Implement get parent and move document traversal to utility class 2019-02-17 17:22:28 -03:00
Clément Fournier ef4e013a44 Fix a typo i make often 2019-02-17 20:56:58 +01:00
Clément Fournier ef5102c4ac Update links 2019-02-17 20:56:47 +01:00
Clément Fournier 1d336f44b9 Move metric visitors into internal package 2019-02-17 20:51:42 +01:00
Clément Fournier 4ae044eee1 Remove visitor decorators 2019-02-17 20:50:45 +01:00
Matias Fraga 1f51b2bd28 Suppress unused constructor warning 2019-02-17 13:37:14 -03:00
lsoncini ae05641f8c ant file to make all swift nodes implement Node 2019-02-17 02:16:24 -03:00
Matias Fraga 6df6673664 Comment empty constructor 2019-02-17 01:25:44 -03:00
Matias Fraga d9e963ef72 Add required constructors 2019-02-17 01:22:09 -03:00
Matias Fraga 826034316f Fix typo 2019-02-17 01:12:23 -03:00
Matias Fraga ffc0d22efc Fix checkstyle issues 2019-02-17 01:01:59 -03:00
Matias Fraga 503ce05e60 Rename Antlr Node impl to AntlrBaseNode 2019-02-17 00:33:30 -03:00
Matias Fraga 0dcb4592a0 Implement missing Node methods 2019-02-17 00:31:10 -03:00
Matias Fraga e9b363cde9 Extend parser rule context 2019-02-17 00:27:24 -03:00
Matias Fraga faf37c1a28 Add unsupported features 2019-02-17 00:13:36 -03:00
Matias Fraga 830b4cdff0 Initial version of Antlr Node interface and abstract implementation 2019-02-16 20:58:41 -03:00
Matias Fraga 8b3af13526 Lint fixes 2019-02-16 20:26:49 -03:00
Matias Fraga 7401e836fe Add final modifiers 2019-02-16 20:26:20 -03:00
Clément Fournier 3cb00f2274 Add get 2019-01-30 02:54:25 +01:00
Clément Fournier fe82a951ae Override Iterable methods 2019-01-29 23:10:42 +01:00
Andreas Dangel 3bfa33ab0d Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2019-01-27 19:50:28 +01:00
Clément Fournier e51e162209 Fix doc link 2019-01-27 16:37:37 +01:00
Clément Fournier d20bbd7b48 Fix tests 2019-01-27 16:32:33 +01:00
Clément Fournier caf7773a1e Add ancestors(Class) 2019-01-27 16:11:42 +01:00
Clément Fournier 3a28733b30 Add usage doc 2019-01-27 15:50:36 +01:00
Clément Fournier 40f619f67e Brushup 2019-01-27 08:27:48 +01:00
Clément Fournier 6e2aeea26a Merge branch '7.0.x' into node-stream-api 2019-01-27 08:20:08 +01:00
Clément Fournier 6893e23500 Add some tests 2019-01-27 08:19:26 +01:00
Clément Fournier 82abeeb7b2 Remove dependency on DocumentNavigator 2019-01-27 06:39:48 +01:00
Clément Fournier ad7c1c3b1b Fix javadoc warnings 2019-01-27 05:31:07 +01:00
Clément Fournier 7af212fcde Refactor more of ForLoopCanBeForeach 2019-01-27 04:40:05 +01:00
Clément Fournier 7b5361b13f Add methods for more axes 2019-01-27 03:14:44 +01:00
Clément Fournier 77ddf5d0a5 Add some tests 2019-01-27 01:37:43 +01:00
Clément Fournier 9a947ccb2a Test laziness 2019-01-27 01:36:20 +01:00
Clément Fournier 43fa708ab4 Make functional interface 2019-01-27 01:23:54 +01:00
Clément Fournier 5389e716db Simplify implementation 2019-01-27 00:59:02 +01:00
Clément Fournier af7ccce236 Avoid caching by default, provide a cached() method instead 2019-01-26 23:59:42 +01:00
Clément Fournier 1c73f6fd63 Union streams fetch values from their substreams 2019-01-26 22:48:07 +01:00
Clément Fournier a8d499a932 Test laziness 2019-01-26 21:55:10 +01:00
Clément Fournier f0d3b34e27 Move NodeStream into ast package 2019-01-26 20:30:41 +01:00
Clément Fournier 86dde893af Make streams iterable multiple times 2019-01-26 20:29:35 +01:00
Clément Fournier 31167f2591 Add forkJoin 2019-01-26 19:14:46 +01:00
Clément Fournier 06f7a00684 Document API 2019-01-26 19:00:38 +01:00
Clément Fournier 7cfe69d8e5 Fix compilation 2019-01-26 17:35:42 +01:00
Juan Martín Sotuyo Dodero 4a6a67d1d8 Merge pull request #1567 from oowekyala/share-ctrt-utils
[java] Share utilities defined in ClassTypeResolverTest
2019-01-12 21:11:17 -03:00
Clément Fournier 3d073c22d5 Share utilities defined in ClassTypeResolverTest
Revert "REVERT ME remove changes to ClassTypeResolverTest"

This reverts commit a96c5704e1bbd503ba993f6eaee59edbec2101b0.
2019-01-09 02:05:44 +01:00
Clément Fournier a5d23116e5 Merge branch 'master' into 7.0.x 2019-01-08 23:36:45 +01:00
Clément Fournier e4502b1a87 Add SingleChildNode interface 2019-01-07 06:03:21 +01:00
Clément Fournier 23ce8fc5f4 Add NodeStream 2019-01-07 05:06:20 +01:00
Clément Fournier 17d6ab31dd Merge branch 'master' into 7.0.x 2019-01-05 23:07:17 +01:00
Clément Fournier 12b647c548 Merge branch 'master' into 7.0.x
Conflicts:
	pmd-apex-jorje/pom.xml
	pmd-apex/pom.xml
	pmd-core/pom.xml
	pmd-core/src/main/java/net/sourceforge/pmd/lang/LanguageVersionHandler.java
	pmd-core/src/main/java/net/sourceforge/pmd/util/designer/Designer.java
	pmd-cpp/pom.xml
	pmd-cpp/src/main/java/net/sourceforge/pmd/lang/cpp/CppHandler.java
	pmd-cs/pom.xml
	pmd-dist/pom.xml
	pmd-doc/pom.xml
	pmd-fortran/pom.xml
	pmd-go/pom.xml
	pmd-groovy/pom.xml
	pmd-java/pom.xml
	pmd-java8/pom.xml
	pmd-javascript/pom.xml
	pmd-jsp/pom.xml
	pmd-kotlin/pom.xml
	pmd-lang-test/pom.xml
	pmd-matlab/pom.xml
	pmd-matlab/src/main/java/net/sourceforge/pmd/lang/matlab/MatlabHandler.java
	pmd-objectivec/pom.xml
	pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.java
	pmd-perl/pom.xml
	pmd-php/pom.xml
	pmd-plsql/pom.xml
	pmd-python/pom.xml
	pmd-python/src/main/java/net/sourceforge/pmd/lang/python/PythonHandler.java
	pmd-ruby/pom.xml
	pmd-scala/pom.xml
	pmd-swift/pom.xml
	pmd-test/pom.xml
	pmd-ui/pom.xml
	pmd-visualforce/pom.xml
	pmd-vm/pom.xml
	pmd-xml/pom.xml
	pom.xml
2018-12-13 18:53:10 +01:00
Andreas Dangel 9768b5d98e Merge branch 'pr-1490' into pmd/7.0.x 2018-12-08 11:05:24 +01:00
Andreas Dangel 9c4c067942 Remove module java8 and merge tests into java
Since we switched now to java8 in general, we can remove the extra module.
2018-12-01 11:18:18 +01:00
Andreas Dangel db630557ba Merge branch 'pr-1446' into pmd/7.0.x 2018-11-29 18:52:06 +01:00
Andreas Dangel 75703733f7 Fix version of new pmd-kotlin module 2018-11-28 21:16:41 +01:00
Andreas Dangel b5a8ac4e9c Delete Designer.java which appeared after merge 2018-11-28 21:16:32 +01:00
Clément Fournier 360d8d2c4c Merge branch 'java-visitor-default-methods' of github.com:oowekyala/pmd into java-visitor-default-methods 2018-11-27 18:12:07 +01:00
Clément Fournier 8b0dbee237 Merge branch '7.0.x' into java-visitor-default-methods 2018-11-27 18:11:05 +01:00
Clément Fournier 725f8d7039 Merge branch 'master' into 7.0.x 2018-11-27 18:09:31 +01:00
Clément Fournier 6a843b657e Merge branch 'master' into java-visitor-default-methods 2018-11-27 18:06:38 +01:00
Clément Fournier 800ffed9b2 Merge branch 'pmd/7.0.x' into java-visitor-default-methods 2018-11-26 22:09:58 +01:00
Andreas Dangel cc75f3b48a Merge branch 'pr-1426' into pmd/7.0.x 2018-11-26 20:23:45 +01:00
Clément Fournier 938efd1e00 fix message 2018-11-10 10:07:31 +01:00
Clément Fournier 82aa804103 cstyle 2018-11-09 18:56:18 +01:00
Clément Fournier 6168e0e376 Document 2018-11-09 17:54:52 +01:00
Clément Fournier 0a08c9e30c Style 2018-11-09 17:30:59 +01:00
Clément Fournier 076ca989d1 Make alljavacc watch itself
Invalidates the last generated sources if alljavacc.xml has changed
2018-11-09 17:27:40 +01:00
Clément Fournier 23a3f59fe2 Add deprecation annotations 2018-11-09 17:16:39 +01:00
Clément Fournier a32c177117 Remove duplication of JavaParserVisitor methods 2018-11-09 16:31:14 +01:00
Clément Fournier 2892e55e44 Remove visitChildren 2018-11-09 16:05:22 +01:00
Clément Fournier dd2783760a Add method to Rule interface 2018-11-09 15:50:20 +01:00
Clément Fournier cf7d7eb3e1 Add GenericSideEffectingVisitor, add default methods on interface 2018-11-06 02:24:11 +01:00
Juan Martín Sotuyo Dodero 5925578229 Merge pull request #1431 from oowekyala/remove-old-guis
[ui] Remove old GUI applications (designerold, bgastviewer)
2018-11-04 18:45:56 -03:00
Clément Fournier 4381c9e0ea Duplicate release notes to avoid merge conflicts 2018-11-04 16:12:24 +01:00
Clément Fournier b78af8b42c Remove old GUI applications 2018-11-04 16:11:13 +01:00
Clément Fournier 847f2944c0 Checkstyle 2018-11-02 08:40:14 +01:00
Clément Fournier 5eb1d23a38 Create system to declare processing stages in an extensible fashion 2018-11-02 07:39:16 +01:00
Clément Fournier efc22da116 Fix pom version 2018-11-02 07:32:19 +01:00
Clément Fournier 77b509576f Merge branch 'master' into 7.0.x 2018-11-02 02:31:16 +01:00
Andreas Dangel c67c51334a java.version=8 2018-10-28 20:00:29 +01:00
Andreas Dangel 38ab2abc46 Merge branch 'master' into pmd/7.0.x 2018-10-28 19:39:32 +01:00
Andreas Dangel 48d54b0af2 Set version to 7.0.0-SNAPSHOT 2018-06-17 11:08:05 +02:00
5194 changed files with 278966 additions and 223952 deletions

No files matched your search

+500 -10
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -138,7 +138,7 @@ f=check-environment.sh; \
Calling `.ci/build.sh` directly would re-release the tag $TAG_NAME - that's why it is commented out.
All the side-effects of a release would be carried out like creating and publishing a release on github,
uploading the release to sourceforge, uploading the docs to pmd.github.io/docs.pmd-code.org, uploading a
uploading the release to sourceforge, uploading the docs to docs.pmd-code.org, uploading a
new baseline for the regression tester and so on. While the release should be reproducible and therefore should
produce exactly the same artifacts, re-uploading artifacts is not desired just for testing.
+134 -67
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="All Regression Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
+27
View File
@@ -134,6 +134,25 @@ index 6021fa574d..15d29ed699 100644
EOF
) | patch --strip=1
# Patch 4: Add https://maven.repository.redhat.com/ga/ as repository in order to resolve
# dependency com.ibm.websphere/uow/6.0.2.17
# See https://spring.io/blog/2020/10/29/notice-of-permissions-changes-to-repo-spring-io-fall-and-winter-2020
(cat <<EOF
diff --git a/build.gradle b/build.gradle
index 6021fa57..8319ff76 100644
--- a/build.gradle
+++ b/build.gradle
@@ -291,6 +291,7 @@ configure(allprojects) { project ->
}
repositories {
mavenCentral()
+ maven { url "https://maven.repository.redhat.com/ga/" }
maven { url "https://repo.spring.io/libs-spring-framework-build" }
}
}
EOF
) | patch --strip=1
./gradlew --console=plain --build-cache --no-daemon --max-workers=4 build testClasses -x test -x javadoc -x api -x asciidoctor -x asciidoctorPdf
./gradlew --console=plain --build-cache --no-daemon --max-workers=4 createSquishClasspath -q > classpath.txt
]]></build-command>
@@ -169,4 +188,12 @@ EOF
<tag>v2.3.0</tag>
<src-subpath>samples</src-subpath>
</project>
<project>
<name>java-regression-tests</name>
<type>git</type>
<connection>https://github.com/pmd/java-regression-tests</connection>
<tag>main</tag>
<auxclasspath-command>realpath java-regression-tests-*.jar</auxclasspath-command>
</project>
</projectlist>
+1
View File
@@ -18,6 +18,7 @@ function pmd_code_uploadDocumentation() {
scp "${filename}" ${PMD_CODE_SSH_USER}@pmd-code.org:${PMD_CODE_DOCS_PATH}
# shellcheck disable=SC2029
ssh ${PMD_CODE_SSH_USER}@pmd-code.org "cd \"${PMD_CODE_DOCS_PATH}\" && \
( test -h pmd-doc-${pmdVersion} && rm pmd-doc-${pmdVersion} || true ) && \
unzip -qo \"${basefilename}\" && \
rm \"${basefilename}\""
pmd_ci_log_info "Docs updated: https://docs.pmd-code.org/pmd-doc-${pmdVersion}/"
+3 -51
View File
@@ -35,62 +35,14 @@ function pmd_doc_create_archive() {
echo -e "\n\n"
pmd_ci_log_info "Creating pmd-doc archive..."
mv _site "pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}"
zip -qr "pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}.zip" "pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}/"
pmd_ci_log_success "Successfully created pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}.zip"
zip -qr "pmd-dist-${PMD_CI_MAVEN_PROJECT_VERSION}-doc.zip" "pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}/"
pmd_ci_log_success "Successfully created pmd-dist-${PMD_CI_MAVEN_PROJECT_VERSION}-doc.zip"
popd || exit 1
}
#
# Publishes the site to https://pmd.github.io/pmd-${PMD_CI_MAVEN_PROJECT_VERSION} and
# https://pmd.github.io/latest/
#
function publish_release_documentation_github() {
echo -e "\n\n"
pmd_ci_log_info "Adding the new doc to pmd.github.io..."
# clone pmd.github.io. Note: This uses the ssh key setup earlier
# In order to speed things up, we use a sparse checkout - no need to checkout all directories here
mkdir pmd.github.io
(
cd pmd.github.io || { echo "Directory 'pmd.github.io' doesn't exist"; exit 1; }
git init
git config user.name "PMD CI (pmd-bot)"
git config user.email "pmd-bot@users.noreply.github.com"
git config core.sparsecheckout true
git remote add origin git@github.com-pmd.github.io:pmd/pmd.github.io.git
echo "/latest/" > .git/info/sparse-checkout
echo "/sitemap.xml" >> .git/info/sparse-checkout
git pull --depth=1 origin master
pmd_ci_log_info "Copying documentation from ../docs/pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}/ to pmd-${PMD_CI_MAVEN_PROJECT_VERSION}/ ..."
rsync -ah --stats "../docs/pmd-doc-${PMD_CI_MAVEN_PROJECT_VERSION}/" "pmd-${PMD_CI_MAVEN_PROJECT_VERSION}/"
git status
pmd_ci_log_debug "Executing: git add pmd-${PMD_CI_MAVEN_PROJECT_VERSION}"
git add --sparse "pmd-${PMD_CI_MAVEN_PROJECT_VERSION}"
pmd_ci_log_debug "Executing: git commit..."
git commit -q -m "Added pmd-${PMD_CI_MAVEN_PROJECT_VERSION}"
pmd_ci_log_info "Copying pmd-${PMD_CI_MAVEN_PROJECT_VERSION} to latest ..."
git rm -qr latest
cp -a "pmd-${PMD_CI_MAVEN_PROJECT_VERSION}" latest
pmd_ci_log_debug "Executing: git add latest"
git add latest
pmd_ci_log_debug "Executing: git commit..."
git commit -q -m "Copying pmd-${PMD_CI_MAVEN_PROJECT_VERSION} to latest"
pmd_ci_log_info "Generating sitemap.xml"
../docs/sitemap_generator.sh > sitemap.xml
pmd_ci_log_debug "Executing: git add sitemap.xml"
git add sitemap.xml
pmd_ci_log_debug "Executing: git commit..."
git commit -q -m "Generated sitemap.xml"
pmd_ci_log_info "Executing: git push origin master"
git push origin master
)
}
#
# Updates github pages of the main repository,
# Updates github pages branch "gh-pages" of the main repository,
# so that https://pmd.github.io/pmd/ has the latest (snapshot) content
#
function pmd_doc_publish_to_github_pages() {
+1
View File
@@ -50,6 +50,7 @@ function regression_tester_uploadBaseline() {
--patch-branch "${baseline_branch}" \
--patch-config ./pmd/.ci/files/all-regression-rules.xml \
--list-of-project ./pmd/.ci/files/project-list.xml --html-flag \
--threads "$(nproc)" \
--error-recovery
pushd target/reports || { echo "Directory 'target/reports' doesn't exist"; exit 1; }
BRANCH_FILENAME="${baseline_branch/\//_}"
@@ -13,13 +13,13 @@ assignees: ''
**Rule:**
Please provide the rule name and a link to the rule documentation:
<https://pmd.github.io/latest/pmd_rules_XXX_XXX.html#XXX>
<https://docs.pmd-code.org/latest/pmd_rules_XXX_XXX.html#XXX>
**Description:**
**Code Sample demonstrating the issue:**
```
```java
```
@@ -13,13 +13,13 @@ assignees: ''
**Rule:**
Please provide the rule name and a link to the rule documentation:
<https://pmd.github.io/latest/pmd_rules_XXX_XXX.html#XXX>
<https://docs.pmd-code.org/latest/pmd_rules_XXX_XXX.html#XXX>
**Description:**
**Code Sample demonstrating the issue:**
```
```java
```
+1 -1
View File
@@ -17,7 +17,7 @@ assignees: ''
**Code Sample:** This should include code, that should be flagged by the rule. If possible, the "correct" code
according to this new rule should also be demonstrated.
```
```java
```
+1 -1
View File
@@ -25,7 +25,7 @@ A clear and concise description of what the bug is.
**Code Sample demonstrating the issue:**
```
```java
```
+21 -3
View File
@@ -9,21 +9,30 @@ on:
tags:
- '**'
pull_request:
merge_group:
schedule:
# build it monthly: At 04:00 on day-of-month 1.
- cron: '0 4 1 * *'
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
# read to fetch code (actions/checkout)
# write to push code to gh-pages, create releases
# note: forked repositories will have maximum read access
contents: write
continue-on-error: false
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/cache@v3
@@ -45,8 +54,8 @@ jobs:
shell: bash
run: |
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
echo "MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3 -DautoReleaseAfterClose=true -DstagingProgressTimeoutMinutes=30" >> $GITHUB_ENV
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/18/scripts" >> $GITHUB_ENV
echo "MAVEN_OPTS=-Daether.connector.http.connectionMaxTtl=180 -DautoReleaseAfterClose=true -DstagingProgressTimeoutMinutes=30" >> $GITHUB_ENV
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/22/scripts" >> $GITHUB_ENV
- name: Check Environment
shell: bash
run: |
@@ -61,3 +70,12 @@ jobs:
env:
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Workaround actions/upload-artifact#176
run: |
echo "artifacts_path=$(realpath ..)" >> $GITHUB_ENV
- name: Upload regression tester report
uses: actions/upload-artifact@v3
with:
name: pmd-regression-tester
path: ${{ env.artifacts_path }}/target/pr-*-diff-report-*.tar.gz
if-no-files-found: ignore
+5 -2
View File
@@ -9,19 +9,22 @@ on:
- '**'
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Setup Environment
shell: bash
run: |
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/18/scripts" >> $GITHUB_ENV
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/22/scripts" >> $GITHUB_ENV
- name: Sync
run: .ci/git-repo-sync.sh
shell: bash
+3 -3
View File
@@ -15,7 +15,7 @@ jobs:
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
@@ -35,8 +35,8 @@ jobs:
shell: bash
run: |
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
echo "MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3 -DstagingProgressTimeoutMinutes=30" >> $GITHUB_ENV
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/18/scripts" >> $GITHUB_ENV
echo "MAVEN_OPTS=-Daether.connector.http.connectionMaxTtl=180 -DstagingProgressTimeoutMinutes=30" >> $GITHUB_ENV
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/22/scripts" >> $GITHUB_ENV
- name: Check Environment
shell: bash
run: |
+1
View File
@@ -21,3 +21,4 @@ node_modules
# rule docs are generated
docs/pages/pmd/rules
.history/*
+2 -2
View File
@@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
+3 -3
View File
@@ -33,11 +33,11 @@ When filing a bug report, please provide as much information as possible, so tha
## Documentation
There is some documentation available under <https://pmd.github.io/latest>. Feel free to create a bug report if
There is some documentation available under <https://docs.pmd-code.org/latest>. Feel free to create a bug report if
documentation is missing, incomplete or outdated. See [Bug reports](#bug-reports).
The documentation is generated as a Jekyll site, the source is available at: <https://github.com/pmd/pmd/tree/master/docs>. You can find build instructions there.
For more on contributing documentation check <https://pmd.github.io/pmd/pmd_devdocs_writing_documentation.html>
For more on contributing documentation check <https://docs.pmd-code.org/latest/pmd_devdocs_writing_documentation.html>
## Questions
@@ -47,7 +47,7 @@ There are various channels, on which you can ask questions:
* Create a new discussion for your question at <https://github.com/pmd/pmd/discussions>.
* Ask your question on Gitter <https://gitter.im/pmd/pmd>.
* Ask your question in our [Gitter room](https://app.gitter.im/#/room/#pmd_pmd:gitter.im).
## Code Style
+12 -22
View File
@@ -2,6 +2,7 @@ require 'pmdtester'
require 'time'
require 'logger'
require 'fileutils'
require 'etc'
@logger = Logger.new(STDOUT)
@@ -16,6 +17,7 @@ def get_args(base_branch, autogen = TRUE, patch_config = './pmd/.ci/files/all-re
'--keep-reports',
'--error-recovery',
'--baseline-download-url', 'https://pmd-code.org/pmd-regression-tester/',
'--threads', Etc.nprocessors.to_s,
# '--debug',
]
end
@@ -49,18 +51,16 @@ def run_pmdtester
message2 = create_message
end
report_url = upload_report
tar_report
if report_url
message1 += "[Full report](#{report_url}/diff1/index.html)"
message1 += "[Download full report as build artifact](#{ENV['PMD_CI_JOB_URL']})"
# set value of sticky to true and the message is kept after new commits are submitted to the PR
message(message1, sticky: true)
if message2
message2 += "[Download full report as build artifact](#{ENV['PMD_CI_JOB_URL']})"
# set value of sticky to true and the message is kept after new commits are submitted to the PR
message(message1, sticky: true)
if message2
message2 += "[Full report](#{report_url}/diff2/index.html)"
# set value of sticky to true and the message is kept after new commits are submitted to the PR
message(message2, sticky: true)
end
message(message2, sticky: true)
end
rescue StandardError => e
@@ -82,23 +82,13 @@ def create_message
"#{@summary[:configerrors][:removed]} configuration errors.\n"
end
def upload_report
def tar_report
Dir.chdir('target') do
tar_filename = "pr-#{ENV['PMD_CI_PULL_REQUEST_NUMBER']}-diff-report-#{Time.now.strftime("%Y-%m-%dT%H-%M-%SZ")}.tar.gz"
`tar czf #{tar_filename} diff1/ diff2/`
tar_size = (10 * File.size(tar_filename) / 1024 / 1024)/10.0
@logger.info "Uploading file #{tar_filename} (#{tar_size}mb) now..."
report_url = `curl -u #{ENV['PMD_CI_CHUNK_TOKEN']} -T #{tar_filename} https://chunk.io`
if $?.success?
report_url.chomp!
@logger.info "Successfully uploaded #{tar_filename} to #{report_url}"
report_url
else
@logger.error "Error while uploading #{tar_filename} to chunk.io: #{report_url}"
warn("Uploading the diff report failed, this message is mainly used to remind the maintainers of PMD.")
nil
end
@logger.info "Created file #{tar_filename} (#{tar_size}mb)"
end
end
+33 -50
View File
@@ -1,106 +1,89 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.2.0)
claide (1.1.0)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
colored2 (3.1.2)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.2)
cork (0.3.0)
colored2 (~> 3.1)
danger (8.6.1)
danger (9.4.0)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (>= 0.9.0, < 2.0)
faraday (>= 0.9.0, < 3.0)
faraday-http-cache (~> 2.0)
git (~> 1.7)
git (~> 1.13)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 4.7)
octokit (>= 6.0, < 8.0)
terminal-table (>= 1, < 4)
differ (0.1.2)
et-orbi (1.2.7)
tzinfo
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-http-cache (2.4.0)
faraday-http-cache (2.5.0)
faraday (>= 0.8)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
fugit (1.5.3)
faraday-net_http (3.0.2)
fugit (1.9.0)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
git (1.11.0)
git (1.18.0)
addressable (~> 2.8)
rchardet (~> 1.8)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (5.3.0)
liquid (5.4.0)
logger-colors (1.0.0)
mini_portile2 (2.8.0)
multipart-post (2.2.3)
mini_portile2 (2.8.5)
nap (1.1.0)
no_proxy_fix (0.1.2)
nokogiri (1.13.7)
mini_portile2 (~> 2.8.0)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (4.25.1)
octokit (7.2.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
pmdtester (1.5.1)
pmdtester (1.5.5)
differ (~> 0.1)
liquid (~> 5.2)
liquid (~> 5.4)
logger-colors (~> 1.0)
nokogiri (~> 1.13)
rufus-scheduler (~> 3.8)
slop (~> 4.6)
public_suffix (4.0.7)
slop (~> 4.9)
public_suffix (5.0.3)
raabro (1.4.0)
racc (1.6.0)
racc (1.7.3)
rchardet (1.8.0)
rexml (3.2.5)
rouge (3.29.0)
rexml (3.2.6)
rouge (4.2.0)
ruby2_keywords (0.0.5)
rufus-scheduler (3.8.2)
rufus-scheduler (3.9.1)
fugit (~> 1.1, >= 1.1.6)
safe_yaml (1.0.5)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
slop (4.9.2)
slop (4.10.1)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
tzinfo (2.0.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.2.0)
unicode-display_width (2.5.0)
PLATFORMS
ruby
@@ -113,4 +96,4 @@ DEPENDENCIES
safe_yaml
BUNDLED WITH
2.1.4
2.4.5
+16 -12
View File
@@ -1,13 +1,15 @@
# PMD - source code analyzer
[![Join the chat at https://gitter.im/pmd/pmd](https://badges.gitter.im/pmd/pmd.svg)](https://gitter.im/pmd/pmd?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![PMD Logo](https://raw.githubusercontent.com/pmd/pmd/pmd/7.0.x/docs/images/logo/pmd-logo-300px.png)
[![Join the chat](https://img.shields.io/gitter/room/pmd/pmd)](https://app.gitter.im/#/room/#pmd_pmd:gitter.im?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://github.com/pmd/pmd/workflows/build/badge.svg?branch=master)](https://github.com/pmd/pmd/actions)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd)
[![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green?labelColor=blue)](https://github.com/jvm-repo-rebuild/reproducible-central#net.sourceforge.pmd:pmd)
[![Coverage Status](https://coveralls.io/repos/github/pmd/pmd/badge.svg)](https://coveralls.io/github/pmd/pmd)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a674ee8642ed44c6ba7633626ee95967)](https://www.codacy.com/app/pmd/pmd?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=pmd/pmd&amp;utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ea550046a02344ec850553476c4aa2ca)](https://www.codacy.com/gh/pmd/pmd/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=pmd/pmd&amp;utm_campaign=Badge_Grade)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)
[![Documentation (latest)](https://img.shields.io/badge/docs-latest-green)](https://pmd.github.io/latest/)
[![Documentation (latest)](https://img.shields.io/badge/docs-latest-green)](https://docs.pmd-code.org/latest/)
**PMD** is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks,
unnecessary object creation, and so forth. It supports many languages. It can be extended with custom rules.
@@ -15,11 +17,13 @@ It uses JavaCC and Antlr to parse source files into abstract syntax trees (AST)
Rules can be written in Java or using a XPath query.
It supports Java, JavaScript, Salesforce.com Apex and Visualforce,
Modelica, PLSQL, Apache Velocity, XML, XSL, Scala.
Modelica, PLSQL, Apache Velocity, HTML, XML and XSL.
Scala is supported, but there are currently no Scala rules available.
Additionally it includes **CPD**, the copy-paste-detector. CPD finds duplicated code in
C/C++, C#, Dart, Fortran, Go, Groovy, Java, JavaScript, JSP, Kotlin, Lua, Matlab, Modelica,
Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex, Scala, Swift, Visualforce and XML.
Additionally, it includes **CPD**, the copy-paste-detector. CPD finds duplicated code in
C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Kotlin, Lua, Matlab, Modelica,
Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and Visualforce, Scala, Swift, T-SQL,
Apache Velocity, and XML.
In the future we hope to add support for data/control flow analysis and automatic (quick) fixes where
it makes sense.
@@ -29,9 +33,9 @@ it makes sense.
Download the latest binary zip from the [releases](https://github.com/pmd/pmd/releases/latest)
and extract it somewhere.
Execute `bin/run.sh pmd` or `bin\pmd.bat`.
Execute `bin/pmd check` or `bin\pmd.bat check`.
See also [Getting Started](https://pmd.github.io/latest/pmd_userdocs_installation.html)
See also [Getting Started](https://docs.pmd-code.org/latest/pmd_userdocs_installation.html)
**Demo:**
@@ -40,7 +44,7 @@ This shows how PMD can detect for loops, that can be replaced by for-each loops.
![Demo](docs/images/userdocs/pmd-demo.gif)
There are plugins for Maven and Gradle as well as for various IDEs.
See [Tools / Integrations](https://pmd.github.io/latest/pmd_userdocs_tools.html)
See [Tools / Integrations](https://docs.pmd-code.org/latest/pmd_userdocs_tools.html)
## ️ How to get support?
@@ -50,8 +54,8 @@ See [Tools / Integrations](https://pmd.github.io/latest/pmd_userdocs_tools.html)
or on [discussions](https://github.com/pmd/pmd/discussions).
* I got this error and I'm sure it's a bug -- file an [issue](https://github.com/pmd/pmd/issues).
* I have an idea/request/question -- create a new [discussion](https://github.com/pmd/pmd/discussions).
* I have a quick question -- ask on our [Gitter chat](https://gitter.im/pmd/pmd).
* Where's your documentation? -- <https://pmd.github.io/latest/>
* I have a quick question -- ask in our [Gitter room](https://app.gitter.im/#/room/#pmd_pmd:gitter.im).
* Where's your documentation? -- <https://docs.pmd-code.org/latest/>
## 🤝 Contributing
+151
View File
@@ -0,0 +1,151 @@
<!--
~ BSD-style license; for more info see http://pmd.sourceforge.net/license.html
-->
<project name="pmd" default="adapt-antlr-sources" basedir="../../../../">
<!-- Input properties:
- lang-name: matches the grammar name (eg "Swift")
- lang-terse-name: uncapitalized package name (eg "swift")
- node-prefix: prefix for generated AST nodes (eg "Sw")
- root-node-name: name of the root node without prefix (eg "TopLevel"), will be made to implement RootNode
See AntlrGeneratedParserBase
-->
<property name="target-package-dir" value="${antlr4.outputDirectory}/net/sourceforge/pmd/lang/${lang-terse-name}/ast"/>
<property name="lang-ast-package" value="net.sourceforge.pmd.lang.${lang-terse-name}.ast" />
<property name="ast-api-package" value="net.sourceforge.pmd.lang.ast" />
<property name="ast-impl-package" value="${ast-api-package}.impl.antlr4" />
<property name="parser-name" value="${lang-name}Parser"/>
<property name="parser-file" value="${target-package-dir}/${parser-name}.java"/>
<property name="visitor-name" value="${lang-name}Visitor"/>
<property name="visitor-file" value="${target-package-dir}/${visitor-name}.java"/>
<property name="base-visitor-name" value="${lang-name}BaseVisitor"/>
<property name="base-visitor-file" value="${target-package-dir}/${base-visitor-name}.java"/>
<property name="listener-name" value="${lang-name}Listener"/>
<property name="listener-file" value="${target-package-dir}/${visitor-name}.java"/>
<property name="base-listener-name" value="${lang-name}BaseListener"/>
<property name="base-listener-file" value="${target-package-dir}/${base-visitor-name}.java"/>
<property name="node-itf-name" value="${lang-name}Node"/>
<property name="base-class-name" value="Abstract${lang-name}Node"/>
<condition property="rename-parser">
<and>
<not>
<available file="${parser-file}"/>
</not>
<available file="${target-package-dir}/${lang-name}.java"/>
</and>
</condition>
<target name="rename-parser" description="Rename the parser to our conventional name if needed"
if="rename-parser">
<replace file="${target-package-dir}/${lang-name}.java">
<replacefilter token="class ${lang-name} "
value="class ${parser-name} "/>
<replacefilter token="public ${lang-name}(TokenStream input)"
value="public ${parser-name}(TokenStream input)"/>
</replace>
<replace dir="${target-package-dir}">
<include name="${lang-name}.java"/>
<include name="${visitor-name}.java"/>
<include name="${base-visitor-name}.java"/>
<include name="${listener-name}.java"/>
<include name="${base-listener-name}.java"/>
<replacefilter token="${lang-name}." value="${parser-name}."/>
</replace>
<move file="${target-package-dir}/${lang-name}.java"
tofile="${parser-file}"/>
</target>
<target name="cpd-language" description="Adapt Antlr sources for CPD-only languages">
<!-- We only need the Lexer file. -->
<delete file="${parser-file}"/>
<delete>
<fileset dir="${target-package-dir}">
<include name="*"/>
<exclude name="*Lexer.java"/>
</fileset>
</delete>
</target>
<target name="pmd-language" description="Adapt Antlr sources for PMD languages" depends="rename-parser">
<!-- Adapt parser. -->
<replace file="${parser-file}">
<replacefilter token="${root-node-name}Context extends ${lang-name}InnerNode"
value="${root-node-name}Context extends ${lang-name}RootNode"/>
<replacefilter token="_ctx = _localctx;"
value="_ctx = _localctx.asAntlrNode();"/>
<replacefilter token="public &lt;T> T accept(ParseTreeVisitor&lt;? extends T> visitor)"
value="public &lt;P, R> R acceptVisitor(AstVisitor&lt;? super P, ? extends R> visitor, P data)" />
<replacefilter token="((${visitor-name}&lt;? extends T>)visitor)"
value="((${visitor-name}&lt;? super P, ? extends R>) visitor)" />
<replacefilter token="return visitor.visitChildren(this);"
value="return super.acceptVisitor(visitor, data);" />
</replace>
<replaceregexp flags="g" file="${parser-file}">
<regexp pattern="\.visit(\w++)\(this\);"/>
<substitution expression=".visit\1(this, data);"/>
</replaceregexp>
<replaceregexp flags="g" file="${parser-file}">
<regexp pattern="_sempred\(\((\w+)\)_localctx,"/>
<substitution expression="_sempred\((\1) asPmdNode(_localctx),"/>
</replaceregexp>
<!-- Transform the visitor to PMD-style. -->
<replace file="${visitor-file}">
<replacefilter token="Visitor&lt;T> extends ParseTreeVisitor&lt;T> {"
value="Visitor&lt;P, R> extends net.sourceforge.pmd.lang.ast.AstVisitor&lt;P, R> {&#10;
&#10;
/**&#10;
* The default visit method for ${lang-name} nodes. Unless overridden,&#10;
* the default implementations of the methods of this interface delegate&#10;
* to this method. The default calls {@link #visitNode(Node, Object)}.&#10;
* &#10;
* @param node Node to visit&#10;
* @param data Parameter of the visit&#10;
* @return Result of the visit&#10;
*/&#10;
default R visit${node-itf-name}(${node-itf-name} node, P data) { return visitNode(node, data); }&#10;&#10;
&#10;
"/>
<replacefilter token="T visit" value="default R visit"/>
<replacefilter token="ctx);" value="node, P data) { return visit${node-itf-name}(node, data); }"/>
</replace>
<!-- This is in the main sources (not much to do). -->
<delete file="${base-visitor-file}" />
<replaceregexp flags="g">
<fileset dir="${target-package-dir}" />
<regexp pattern="\b([A-Z]\w*)Context\b(?&lt;!\b(Parser)?RuleContext\b)"/>
<substitution expression="${node-prefix}\1"/>
</replaceregexp>
</target>
</project>
+58 -23
View File
@@ -15,17 +15,18 @@ if [ ! -f pom.xml ] || [ ! -d ../pmd.github.io ]; then
exit 1
fi
LAST_VERSION=
RELEASE_VERSION=
DEVELOPMENT_VERSION=
CURRENT_BRANCH=
echo "-------------------------------------------"
echo "Releasing PMD"
echo "-------------------------------------------"
CURRENT_VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)
RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT}
# allow to override the release version, e.g. via "RELEASE_VERSION=7.0.0-rc1 ./do-release.sh"
if [ "$RELEASE_VERSION" = "" ]; then
CURRENT_VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)
RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT}
fi
MAJOR=$(echo "$RELEASE_VERSION" | cut -d . -f 1)
MINOR=$(echo "$RELEASE_VERSION" | cut -d . -f 2)
PATCH=$(echo "$RELEASE_VERSION" | cut -d . -f 3)
@@ -41,15 +42,16 @@ else
LAST_MINOR="${MINOR}"
LAST_PATCH=$(("${PATCH}" - 1))
fi
LAST_VERSION="$MAJOR.$LAST_MINOR.$LAST_PATCH"
DEVELOPMENT_VERSION="$MAJOR.$NEXT_MINOR.$NEXT_PATCH"
DEVELOPMENT_VERSION="${DEVELOPMENT_VERSION}-SNAPSHOT"
# allow to override the next version, e.g. via "NEXT_VERSION=7.0.0 ./do-release.sh"
if [ "$NEXT_VERSION" != "" ]; then
DEVELOPMENT_VERSION="${NEXT_VERSION}-SNAPSHOT"
# allow to override the next version, e.g. via "DEVELOPMENT_VERSION=7.0.0-SNAPSHOT ./do-release.sh"
if [ "$DEVELOPMENT_VERSION" = "" ]; then
DEVELOPMENT_VERSION="$MAJOR.$NEXT_MINOR.$NEXT_PATCH-SNAPSHOT"
fi
# allow to override the last version, e.g. via "LAST_VERSION=6.55.0 ./do-release.sh"
if [ "$LAST_VERSION" = "" ]; then
LAST_VERSION="$MAJOR.$LAST_MINOR.$LAST_PATCH"
fi
# http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
CURRENT_BRANCH=$(git symbolic-ref -q HEAD)
@@ -99,8 +101,8 @@ echo " the new release based on the release notes. Also add any deprecated ru
echo
echo "* Update **../pmd.github.io/_config.yml** to mention the new release"
echo
echo "* Update property \`pmd-designer.version\` in **pom.xml** to reference the latest pmd-designer release"
echo " See <https://search.maven.org/search?q=g:net.sourceforge.pmd%20AND%20a:pmd-ui&core=gav> for the available releases."
echo "* Update property \`pmd-designer.version\` in **pom.xml** to reference the version, that will be released"
echo " later in this process."
echo
echo "Press enter to continue..."
read -r
@@ -109,14 +111,14 @@ read -r
# calculating stats for release notes
STATS=$(
echo "### Stats"
echo "### 📈 Stats"
echo "* $(git log pmd_releases/"${LAST_VERSION}"..HEAD --oneline --no-merges |wc -l) commits"
echo "* $(curl -s "https://api.github.com/repos/pmd/pmd/milestones?state=all&direction=desc&per_page=5"|jq ".[] | select(.title == \"$RELEASE_VERSION\") | .closed_issues") closed tickets & PRs"
echo "* Days since last release: $(( ( $(date +%s) - $(git log --max-count=1 --format="%at" pmd_releases/"${LAST_VERSION}") ) / 86400))"
)
TEMP_RELEASE_NOTES=$(cat docs/pages/release_notes.md)
TEMP_RELEASE_NOTES=${TEMP_RELEASE_NOTES/\{\% endtocmaker \%\}/$STATS$'\n'$'\n'\{\% endtocmaker \%\}$'\n'}
TEMP_RELEASE_NOTES=${TEMP_RELEASE_NOTES/\{\% endtocmaker \%\}/${STATS//\&/\\\&}$'\n'$'\n'\{\% endtocmaker \%\}$'\n'}
echo "${TEMP_RELEASE_NOTES}" > docs/pages/release_notes.md
echo
@@ -167,8 +169,9 @@ git commit -a -m "Prepare pmd release ${RELEASE_VERSION}"
-Dtag="pmd_releases/${RELEASE_VERSION}" \
-DreleaseVersion="${RELEASE_VERSION}" \
-DdevelopmentVersion="${DEVELOPMENT_VERSION}" \
-Pgenerate-rule-docs
-DscmCommentPrefix="[release] " \
-Darguments='-Pgenerate-rule-docs,!cli-dist' \
'-Pgenerate-rule-docs,!cli-dist'
echo
echo "Tag has been pushed.... now check github actions: <https://github.com/pmd/pmd/actions>"
@@ -217,13 +220,13 @@ This is a {{ site.pmd.release_type }} release.
{% tocmaker is_release_notes_processor %}
### New and noteworthy
### 🚀 New and noteworthy
### Fixed Issues
### 🐛 Fixed Issues
### API Changes
### 🚨 API Changes
### External Contributions
### External Contributions
{% endtocmaker %}
@@ -232,14 +235,46 @@ EOF
git commit -a -m "Prepare next development version [skip ci]"
git push origin "${CURRENT_BRANCH}"
./mvnw -B release:clean
echo
echo
echo
echo "* Wait until the new version is synced to maven central and appears as latest version in"
echo " <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/maven-metadata.xml>."
echo
echo
echo "Then proceed with releasing pmd-designer..."
echo "<https://github.com/pmd/pmd-designer/blob/master/releasing.md>"
echo
echo "Press enter to continue when pmd-designer is available in maven-central..."
echo "<https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd-ui/maven-metadata.xml>."
read -r
echo
echo "Continuing with release of pmd-cli and pmd-dist..."
git checkout "pmd_releases/${RELEASE_VERSION}"
./mvnw versions:update-parent -DparentVersion="${RELEASE_VERSION}" -DskipResolution=true -DgenerateBackupPoms=false -pl pmd-cli,pmd-dist
git add pmd-cli/pom.xml pmd-dist/pom.xml
git commit -m "[release] prepare release pmd_releases/${RELEASE_VERSION}-dist"
git tag -m "[release] copy for tag pmd_releases/${RELEASE_VERSION}-dist" "pmd_releases/${RELEASE_VERSION}-dist"
git push origin tag "pmd_releases/${RELEASE_VERSION}-dist"
git checkout master
# make sure parent reference is correct
./mvnw versions:update-parent -DparentVersion="${DEVELOPMENT_VERSION}" -DskipResolution=true -DgenerateBackupPoms=false -pl pmd-cli,pmd-dist
git add pmd-cli/pom.xml pmd-dist/pom.xml
changes=$(git status --porcelain 2>/dev/null | grep -c -E "^[AMDRC]" || true)
if [ "$changes" -gt 0 ]; then
git commit -m "Prepare next development version [skip ci]"
git push origin "${CURRENT_BRANCH}"
fi
echo
echo "Second tag 'pmd_releases/${RELEASE_VERSION}-dist' has been pushed ... now check github actions: <https://github.com/pmd/pmd/actions>"
echo
echo
echo "Verify the new release on github: <https://github.com/pmd/pmd/releases/tag/pmd_releases/${RELEASE_VERSION}>"
echo "and the news entry at <https://sourceforge.net/p/pmd/news/>"
echo
echo "* Wait until the new version is synced to maven central and appears as latest version in"
echo " <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/maven-metadata.xml>."
echo "* Send out an announcement mail to the mailing list:"
echo
echo "To: PMD Developers List <pmd-devel@lists.sourceforge.net>"
+1
View File
@@ -5,3 +5,4 @@ _pdf
.idea/
vendor/
.bundle/
assets/*.zip
+1
View File
@@ -2,3 +2,4 @@ source 'https://rubygems.org'
gem 'jekyll'
gem 'github-pages'
gem "webrick"
+43 -42
View File
@@ -1,43 +1,44 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.5.1)
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.1.1)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.23.5)
concurrent-ruby (1.1.10)
dnsruby (1.61.9)
simpleidn (~> 0.1)
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
dnsruby (1.70.0)
simpleidn (~> 0.2.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.15.0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.8.1)
faraday (2.3.0)
faraday-net_http (~> 2.0)
execjs (2.9.1)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (2.0.3)
ffi (1.15.5)
faraday-net_http (3.0.2)
ffi (1.16.2)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (227)
github-pages (228)
github-pages-health-check (= 1.17.9)
jekyll (= 3.9.2)
jekyll (= 3.9.3)
jekyll-avatar (= 0.7.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.2.0)
jekyll-commonmark-ghpages (= 0.4.0)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.15.1)
jekyll-gist (= 1.5.0)
@@ -71,7 +72,7 @@ GEM
jemoji (= 0.12.0)
kramdown (= 2.3.2)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.3)
liquid (= 4.0.4)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.13.6, < 2.0)
@@ -83,17 +84,17 @@ GEM
octokit (~> 4.0)
public_suffix (>= 3.0, < 5.0)
typhoeus (~> 1.3)
html-pipeline (2.14.2)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (0.9.5)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (3.9.2)
jekyll (3.9.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (>= 1.17, < 3)
@@ -109,11 +110,11 @@ GEM
coffee-script-source (~> 1.11.1)
jekyll-commonmark (1.4.0)
commonmarker (~> 0.22)
jekyll-commonmark-ghpages (0.2.0)
commonmarker (~> 0.23.4)
jekyll-commonmark-ghpages (0.4.0)
commonmarker (~> 0.23.7)
jekyll (~> 3.9.0)
jekyll-commonmark (~> 1.4.0)
rouge (>= 2.0, < 4.0)
rouge (>= 2.0, < 5.0)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.15.1)
@@ -201,19 +202,19 @@ GEM
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.8.0)
mini_portile2 (2.8.4)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.16.2)
nokogiri (1.13.7)
mini_portile2 (~> 2.8.0)
minitest (5.20.0)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
@@ -221,11 +222,11 @@ GEM
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.7)
racc (1.6.0)
rb-fsevent (0.11.1)
racc (1.7.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rexml (3.2.6)
rouge (3.26.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
@@ -242,16 +243,15 @@ GEM
unf (~> 0.1.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.10)
thread_safe (~> 0.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
zeitwerk (2.6.0)
webrick (1.8.1)
PLATFORMS
ruby
@@ -259,6 +259,7 @@ PLATFORMS
DEPENDENCIES
github-pages
jekyll
webrick
BUNDLED WITH
2.1.4
2.4.5
+4 -2
View File
@@ -1,8 +1,10 @@
# PMD Documentation
The documentation is available at: <https://pmd.github.io/pmd/>
The snapshot documentation (build by github pages) is available at: <https://pmd.github.io/pmd/>.
The documentation for the latest release is at: <https://pmd.github.io/latest/>
The same documentation (build with our own scripts) is available at: <https://docs.pmd-code.org/snapshot/>.
The documentation for the latest release is at: <https://docs.pmd-code.org/latest/>
## Site Theme
+7 -9
View File
@@ -1,10 +1,10 @@
repository: pmd/pmd
pmd:
version: 6.49.0
previous_version: 6.48.0
date: 31-August-2022
release_type: minor
version: 7.0.0-SNAPSHOT
previous_version: 6.55.0
date: ??-?????-2023
release_type: major
# release types: major, minor, bugfix
@@ -23,9 +23,6 @@ company_name: PMD Open Source Project
github_editme_path: pmd/pmd/blob/master/docs/
# if you're using Github, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank.
disqus_shortname:
# if you're using disqus for comments, add the shortname here. if not, leave this value blank.
host: 127.0.0.1
# the preview server used. Leave as is.
@@ -42,10 +39,11 @@ exclude:
- README.md
- Dockerfile
- build-docs.sh
- assets/*.zip
- assets/README.md
- pdf-*.sh
- pdfconfigs/
- pdf/
- sitemap_generator.sh
- render_release_notes.rb
feedback_subject_line: PMD Source Code Analyzer
@@ -118,7 +116,7 @@ description: "Intended as a documentation theme based on Jekyll for technical wr
# the description is used in the feed.xml file
# needed for sitemap.xml file only
url: https://pmd.github.io/pmd
url: https://docs.pmd-code.org/latest
baseurl: ""
# used by javadoc_tag.rb
+4 -4
View File
@@ -1,7 +1,7 @@
tip: '<div class="alert alert-success" role="alert"><i class="fa fa-check-square-o"></i> <b>Tip: </b>'
note: '<div class="alert alert-info" role="alert"><i class="fa fa-info-circle"></i> <b>Note: </b>'
important: '<div class="alert alert-warning" role="alert"><i class="fa fa-warning"></i> <b>Important: </b>'
warning: '<div class="alert alert-danger" role="alert"><i class="fa fa-exclamation-circle"></i> <b>Warning: </b>'
tip: '<div class="alert alert-success" role="alert"><i class="fas fa-check-square-o"></i> <b>Tip: </b>'
note: '<div class="alert alert-info" role="alert"><i class="fas fa-info-circle"></i> <b>Note: </b>'
important: '<div class="alert alert-warning" role="alert"><i class="fas fa-warning"></i> <b>Important: </b>'
warning: '<div class="alert alert-danger" role="alert"><i class="fas fa-exclamation-circle"></i> <b>Warning: </b>'
end: '</div>'
callout_danger: '<div class="bs-callout bs-callout-danger">'
File diff suppressed because it is too large. Load diff
Loaded 30 of 5194 files, more files were not shown because too many files have changed in this diff. Show more