1381 Commits

Author SHA1 Message Date
Andreas Dangel
0b88caacea [core] Add more cases for Saxon rule chain 2020-03-13 20:48:35 +01:00
Andreas Dangel
5fb6df7daa [core] Add support for rule chain execution for XPath 2.0
Very similar approach to what has been implemented for Jaxen.
The existing rules still work as before.

Refs #1687
2020-03-13 15:29:20 +01:00
Andreas Dangel
4c020bfbf7 [maven-release-plugin] prepare for next development iteration 2020-03-12 15:15:18 +01:00
Andreas Dangel
eb93aaeca7 [maven-release-plugin] prepare release pmd_releases/6.22.0 2020-03-12 15:15:09 +01:00
Andreas Dangel
76e1ff5da3 Merge branch 'pr-2336'
[core] Call SymbolFacade without classloader by default
2020-03-12 10:28:19 +01:00
Andreas Dangel
0bfe70092a Merge branch 'pr-2338'
[cs] CPD: fixes in filtering of using directives
2020-03-07 09:13:46 +01:00
Maikel Steneker
d8e04ecc11 [cs] CPD: Fix for issue where statements following a using directive were ignored. 2020-03-06 12:33:59 +01:00
Andreas Dangel
4468db2428 [core] Call SymbolFacade without classloader by default
This allows languages, that don't need a classloader while creating
symbol table to just override the one method.
In the test, we call always the overloaded method with class loader
with made the symbol table processing not being run for tests
in plsql.

Fixes #2325
2020-03-06 10:59:02 +01:00
Andreas Dangel
94e28557db Merge branch 'pr-2317'
[apex] New Rule - Test Methods Must Be In Test Classes
2020-03-02 20:18:25 +01:00
Andreas Dangel
b50f4f48d8 [doc] Update release notes, fixes #639, refs #2317 2020-03-02 20:17:33 +01:00
Clément Fournier
e880c72ed2 Merge branch 'java14' 2020-03-02 19:06:03 +01:00
Andreas Dangel
90f286a4a1 Merge branch 'pr-2280'
[cs] CPD: Replace C# tokenizer by an Antlr-based one
2020-02-29 11:36:14 +01:00
Andreas Dangel
3a283559b4 Merge remote-tracking branch 'oowekyala/jdk14-pattern-matching' into jdk14 2020-02-27 15:03:24 +01:00
Maikel Steneker
4bd5a159e5 Rewrite to avoid Guava dependency. 2020-02-27 11:36:28 +01:00
Andreas Dangel
8b08e5449c Merge branch 'pr-2297'
[apex] Cognitive complexity metrics
2020-02-22 12:07:57 +01:00
Andreas Dangel
ddd338dc78 [doc] Update release notes, refs #2297, fixes #2162 2020-02-22 12:07:43 +01:00
Andreas Dangel
59e4be3648 Update gitignore
files generated by eclipse m2e plugin and pmd plugin
2020-02-20 11:29:10 +01:00
Andreas Dangel
4ce85c4656 [java] Fix deprecated usage of ArgumentCount/ParameterCount in rules 2020-02-16 14:41:37 +01:00
Andreas Dangel
da7596a027 [core] Add missing @Deprecated annotations for Node 2020-02-16 14:16:27 +01:00
Andreas Dangel
9e2368257f Merge branch 'pr-2241'
[core] Simplify metrics framework
2020-02-16 10:57:10 +01:00
Andreas Dangel
dfb1315ff5 [core] Use concurrent hash map in ParameterizedMetricKey 2020-02-16 10:43:35 +01:00
Clément Fournier
d61ec4c737 Deprecations for #2248 2020-02-12 14:39:01 +01:00
Maikel Steneker
bdfbfae231 C# tokenizer is now Antlr-based.
This is based on the Antlr grammar from https://github.com/antlr/grammars-v4/tree/master/csharp.

This adds column information for C# and fixes #2139.
2020-02-12 11:46:12 +01:00
Maikel Steneker
659e709f79 Adjusted BaseTokenFilter to allow filtering on more than one token.
When filtering tokens, the analyzeToken method can be overriden to access the current token. This can then be used to implement isLanguageSpecificDiscarding. However, it may be desirable to "look ahead" and base the decision of whether to filter or not on multiple tokens. In order to support this new use case, a new extension point analyzeTokens is provided, which not only has access to the current token, but can also iterate over the upcoming tokens.

The functionality of iterating over remaining tokens uses Guava for its implementation. Since pmd-core targets Java 7, the Android flavour of Guava is used. In order to stay consistent with pmd-apex-jorje, this has also been adjusted to the Android flavour. For PMD 7.0, the jre flavour can be used instead.
2020-02-12 11:12:14 +01:00
Clément Fournier
ad023e8fa6 Support type test patterns 2020-02-09 00:10:50 +01:00
Clément Fournier
6e4daadc43 Add java version 14 2020-02-08 20:22:59 +01:00
Andreas Dangel
470358ec88 Update checkstyle to 8.29
See https://github.com/checkstyle/checkstyle/security/advisories/GHSA-763g-fqq7-48wg

Note: this also requires a new pmd-build-tools with
an updated checkstyle configuration
2020-02-04 20:28:10 +01:00
Clément Fournier
d90d5d267c Remove trailing whitespace everywhere 2020-01-24 23:40:06 +01:00
Clément Fournier
58fa793e67 Fix indentation in poms
For some reason pmd-apex and pmd-apex-jorje
use 2 spaces while the rest use 4.
2020-01-24 23:17:26 +01:00
Andreas Dangel
d994700617 [maven-release-plugin] prepare for next development iteration 2020-01-24 17:20:47 +01:00
Andreas Dangel
a28e9e22e5 [maven-release-plugin] prepare release pmd_releases/6.21.0 2020-01-24 17:20:38 +01:00
Andreas Dangel
024fd7bd85 Merge branch 'pr-2244'
[core] Deprecate CharStream & generated classes
2020-01-24 16:31:38 +01:00
Clément Fournier
153f9dac74 Fix tests 2020-01-23 13:11:28 +01:00
Clément Fournier
a5be8968cf Fix Language::getVersions duplicating aliased versions 2020-01-23 10:44:54 +01:00
Clément Fournier
2c670339d8 Deprecate CharStream and impls 2020-01-22 17:09:06 +01:00
Clément Fournier
08544a7539 Throw on metric not supported 2020-01-20 21:54:53 +01:00
Clément Fournier
11c2b201c1 Fix self references in javadoc 2020-01-20 21:14:48 +01:00
Clément Fournier
31497715e7 Merge branch 'node-api' 2020-01-19 13:05:32 +01:00
Clément Fournier
2123ab3d5d Simplify metrics framework 2020-01-19 12:35:55 +01:00
Clément Fournier
84b59c3350 Add DataMap on Node 2020-01-19 10:54:50 +01:00
Clément Fournier
27d7a6c02c Accomodate children iterable for specialization 2020-01-19 05:57:39 +01:00
Clément Fournier
6e6440df79 Checkstyle 2020-01-18 21:35:33 +01:00
Clément Fournier
7e6ef38c46 Fix tests 2020-01-17 20:15:11 +01:00
Clément Fournier
96182fe736 Improve tree export CLI
* Use defaults for format & language
* Allow typing source into stdin
* Add attribute for XML renderer to
ignore common attributes
2020-01-17 19:56:35 +01:00
Clément Fournier
7d7857b5e6 Make renderers configurable from CLI 2020-01-17 19:21:10 +01:00
Clément Fournier
436409e707 Merge branch 'issue-1984' 2020-01-17 18:32:16 +01:00
Clément Fournier
46e4d8bd59 Merge branch 'issue-2218' 2020-01-17 18:31:38 +01:00
Andreas Dangel
fa85b4786d [core] Add Node#findDescendantsOfType with crossFindBoundaries that
returns a list like all other find-methods
2020-01-17 18:29:41 +01:00
Clément Fournier
d68c072c87 Merge branch 'master' of github.com:pmd/pmd 2020-01-17 15:51:34 +01:00
Clément Fournier
bf7732695b Fix comment on Node 2020-01-17 15:51:23 +01:00