1511 Commits

Author SHA1 Message Date
Andreas Dangel
95d8e80c1b [maven-release-plugin] prepare for next development iteration 2020-06-27 11:31:27 +02:00
Andreas Dangel
a219b2e1be [maven-release-plugin] prepare release pmd_releases/6.25.0 2020-06-27 11:31:16 +02:00
Andreas Dangel
842bdb000c Merge branch 'pr-2609'
[core] Deprecate support for List attributes with XPath 2.0 #2609
2020-06-26 18:04:15 +02:00
Andreas Dangel
3831a8589c Merge branch 'pr-2574'
[java] New Performance Rule UseIOStreamsWithApacheCommonsFileItem #2574
2020-06-26 17:58:49 +02:00
Andreas Dangel
91868f3156 Deprecations for #2490 2020-06-26 10:37:24 +02:00
Andreas Dangel
6fded20178 Merge branch 'master' into perf-UseIOStreamsWithApacheCommonsFileItem 2020-06-22 19:32:29 +02:00
Andreas Dangel
c098936708 [core] Use DeprecatedAttribute.NO_REPLACEMENT for List attributes
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2020-06-22 19:18:55 +02:00
Clément Fournier
ae2b481aa2 Merge branch 'master' into perf-AvoidCalendarDateCreation 2020-06-21 17:42:25 +02:00
Andreas Dangel
9c48ad1523 [core] Deprecate support for List attributes with XPath 2.0
Fixes #2451
2020-06-20 14:44:21 +02:00
Andreas Dangel
534bfe3c55 Merge branch 'pr-2572'
[cpd] Allow CPD tests based on a text dump #2572
2020-06-18 20:09:58 +02:00
Clément Fournier
2cfec287db Merge branch 'master' into fix-xpath-rulechain 2020-06-18 17:16:23 +02:00
Clément Fournier
121fb55567 Add test case 2020-06-18 17:12:37 +02:00
Andreas Dangel
db89c43fb6 Merge branch 'pr-2566'
[java] Auxclasspath in PMD CLI does not support relative file path #2566
2020-06-18 15:04:49 +02:00
Andreas Dangel
4e0e2d14ba [core] Fix XPath 2.0 Rule Chain Analyzer
For the XPath expression

(//ForStatement | //WhileStatement | //DoStatement)//AssignmentOperator

we threw away "AssignmentOperator" and started visiting at this node.
But that's not possible, because that's not at the root of the expr.
2020-06-18 12:44:18 +02:00
Clément Fournier
05f3740832 Make method private 2020-06-14 02:31:28 +02:00
Clément Fournier
b976d6550d Preserve column numbers in AnyTokenizer 2020-06-14 00:42:15 +02:00
Clément Fournier
6eba9a827f Fix ruby lexer 2020-06-13 22:51:00 +02:00
Clément Fournier
d8c3831db8 Fix getSlice
The method path for when the
code is not loaded yet was incorrect.

This was hidden by the fact that tests
use a dummy tokenizer *before* cutting
out a slice, so that the code is in the
soft reference, and that code path is
never taken in the relevant tests.
2020-06-13 21:24:36 +02:00
Andreas Dangel
488f38871e [doc] Update release notes, refs #1932 2020-06-13 19:49:12 +02:00
Andreas Dangel
b8e1ec95e1 [doc] Update release notes, refs #1932 2020-06-13 18:59:23 +02:00
Clément Fournier
a976e9af47 Fix sourceCode test 2020-06-13 17:11:47 +02:00
Clément Fournier
1ee33c7c20 Normalize CPD newlines
Otherwise tests are not platform-independent.
Denormalizing to a platform-specific delimiter
should be done in the renderers
2020-06-13 16:57:57 +02:00
Clément Fournier
ceda6bb965 Fix newline-only tokens
This happens eg in XML. Previously the end column would have been zero. We can't blindly make it 1 because the end column is inclusive. So we instead use the last column of the previous line.
2020-06-13 14:46:55 +03:00
Clément Fournier
d405eab97f Fix java 7 incompatibility 2020-06-12 18:22:21 +02:00
Clément Fournier
43412b532b Fix column problem with Antlr multiline tokens 2020-06-12 18:15:33 +02:00
Andreas Dangel
5653400257 Merge branch 'pr-2519'
[java] Enable rule UnnecessaryCast (codestyle) #2519
2020-06-12 13:55:44 +02:00
Andreas Dangel
a171ab8512 [doc] Update release notes and releases ruleset 2020-06-12 13:54:40 +02:00
Andreas Dangel
28ea13e4f9 Merge branch 'pr-2567'
[c#] Fix CPD suppression with comments doesn't work #2551 #2567
2020-06-12 12:49:21 +02:00
Andreas Dangel
8defb2fde2 Add missing relativePath configuration in all pom modules 2020-06-07 12:36:58 +02:00
Andreas Dangel
1483918308 [core] Fix tests under Windows, fix space handling in test
Absolute paths under Windows use a drive letter...
2020-06-05 11:53:52 +02:00
LixonLookose
c7c31be6cc [c#] CPD suppression with comments doesn't work #2551
CPD Suppressions for c# fixed
test added
2020-06-04 17:53:22 +05:30
Andreas Dangel
08c6ffd719 [java] Auxclasspath in PMD CLI does not support relative file path
Fixes #2549
2020-06-04 12:27:07 +02:00
Andreas Dangel
ab04bdacdd [maven-release-plugin] prepare for next development iteration 2020-05-24 17:34:34 +02:00
Andreas Dangel
229cb2bdca [maven-release-plugin] prepare release pmd_releases/6.24.0 2020-05-24 17:34:25 +02:00
Andreas Dangel
6049126228 Merge branch 'pr-2465'
[dependencies] Upgrade hamcrest, mockito and JUnit #2465
2020-05-22 11:46:04 +02:00
Andreas Dangel
0cc00277d3 Merge branch 'pr-2474'
[core] Stop JavaCharStream from throwing Error #2474
2020-05-18 20:28:37 +02:00
Andreas Dangel
3449c9a372 Merge branch 'pr-2478'
[java] New rule: LiteralsFirstInComparisons #2478
2020-05-18 20:17:23 +02:00
Andreas Dangel
3305eeedd2 [core] Add new rule to releases ruleset for 6.24.0 2020-05-18 20:11:25 +02:00
Clément Fournier
35e9f7d1bd Doc 2020-05-16 19:19:48 +02:00
Clément Fournier
c5f73d137a Add test for invalid language version NPE
Refs https://github.com/pmd/pmd/pull/2486#discussion_r425381773
2020-05-16 19:07:09 +02:00
Juan Martín Sotuyo Dodero
465dead81c Optimize imports 2020-05-15 11:44:09 -03:00
Juan Martín Sotuyo Dodero
0f552ee620 Further refine the addVersion API 2020-05-15 11:42:28 -03:00
Juan Martín Sotuyo Dodero
d1e0f8c5fa Bring back binary compatibility 2020-05-14 16:30:06 -03:00
Juan Martín Sotuyo Dodero
8c7a49eb69 [core] Revamp the language version alias APIs
- The old experimental API allowed calls such as
`addVersions(langHandler, false)` which were not only invalid, but would
throw an `ArrayIndexOutOfBoundsException`, so we split the name
(required) and the aliases (varargs, and therefore optional)
 - In doing so, I was bothered by parameter order. The version name is
the most significant change when setting 2 versions for a language, so I
liked it being first as the old `addVersion` method did, so I moved
that ahead.
 - With that, I now had 2 methods that where equivalent, except one
allowed for varargs and the other didn't… so I merged them. This is not
100% binary compatible, but it is source compatible (that is, unless you
used reflection, all valid calls to the old non-experimental method
still work).
2020-05-14 16:03:45 -03:00
Artem Krosheninnikov
5053b7beb4 review fixes: exclude hamcrest-library, hamcrest-core from junit, rm assertj-core from root pom, move mockito, wiremock and system-rules to test scope 2020-05-11 15:25:07 +03:00
Andreas Dangel
9eba0a03c3 [core] AntlrTokenizer.getCharStreamFromSourceCode is now public 2020-05-08 10:55:35 +02:00
Clément Fournier
bf027382f5 Test 2020-05-07 18:14:42 +02:00
Clément Fournier
eeed02ab86 Fix tests 2020-05-07 18:01:41 +02:00
Clément Fournier
f8b8c229f8 Make JavaCharStream not throw Error 2020-05-07 17:59:00 +02:00
Clément Fournier
551620bbad Checkout TokenMgrError from 7.0.x, make binary compatible with master 2020-05-07 17:59:00 +02:00