2532 Commits

Author SHA1 Message Date
andi
ea6174ebed Fix computation of metrics with annotations 2019-09-28 12:32:31 +02:00
Clément Fournier
54b7679329 Same for apex 2019-09-25 01:11:46 +02:00
Clément Fournier
bcb7774795 [pmd-java] Deprecate CanSuppressWarnings following #1927 2019-09-25 01:08:19 +02:00
Juan Martín Sotuyo Dodero
494a5bc3f8 Fix #2017 2019-09-19 16:12:08 -03:00
Juan Martín Sotuyo Dodero
8d5cb1968d Add failing test for UnnecessaryFullyQualifiedName
- Tests for #2017
2019-09-19 16:11:35 -03:00
Andreas Dangel
e536ca1947 [maven-release-plugin] prepare for next development iteration 2019-09-15 10:14:14 +02:00
Andreas Dangel
3f42cca200 [maven-release-plugin] prepare release pmd_releases/6.18.0 2019-09-15 10:14:05 +02:00
Andreas Dangel
8f3abf9349 Merge branch 'pr-2015' 2019-09-15 09:47:04 +02:00
Andreas Dangel
eeb147e594 formatting 2019-09-15 09:46:07 +02:00
Amish Shah
73006a420e Update doc for unused formal parameter 2019-09-14 14:17:06 -05:00
Clément Fournier
9ae5342eb5 Normalise line terminators in tests
Comparison was failing because the test file was checked
out with CRLF and the expected result is written with LF.

Maybe we should normalise consistently across tests. Using
PMD.EOL in tests is just code obfuscation.
2019-09-14 02:06:39 +02:00
Clément Fournier
c7b83fc0bc Merge branch 'adangel-java13' 2019-09-14 01:08:20 +02:00
Andreas Dangel
76bf20a0c7 Analyze only src/main/java and not src anymore, since mixing
java12 preview and java13 preview is now not possible anymore

see
src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java12
src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java13
2019-09-12 20:35:36 +02:00
Andreas Dangel
eba98b3898 Fixes from review, refs #1973 2019-09-12 20:22:45 +02:00
Clément Fournier
f9f7062a65 Mark typeres implementation as internal API 2019-09-12 18:43:22 +02:00
Andreas Dangel
a2df7e2d29 Merge branch 'master' into java13 2019-09-11 20:41:00 +02:00
Andreas Dangel
970c86f557 [java] Introduce language version 12-preview and 13-preview 2019-09-11 20:36:29 +02:00
Clément Fournier
be7d439134 Checkstyle 2019-09-08 16:10:45 +02:00
Clément Fournier
0b52f6427a Add regression test for MissingOverride
Refs #2007
2019-09-08 16:07:05 +02:00
Andreas Dangel
09a183702c Revert "[java] Remove java12 break-with-expression support"
This reverts commit 2ba142274717238ee0862eed4aa2df3de2070218.
2019-09-07 10:13:02 +02:00
Andreas Dangel
580549a07e Merge branch 'master' into java13 2019-09-06 15:23:51 +02:00
Andreas Dangel
f3e4a77105 [java] Adjust grammar for text blocks
Refs #1973
2019-09-06 15:21:08 +02:00
Juan Martín Sotuyo Dodero
bb0379ef4f Merge pull request #1982 from adangel/issue-1923
[core] Use real file name in ruleContext during analysis
2019-09-05 20:04:21 -03:00
Andreas Dangel
ddd07e517a Merge branch 'master' into issue-1923 2019-09-03 19:43:27 +02:00
Juan Martín Sotuyo Dodero
282f29f781 Add more missing imports 2019-09-02 17:51:33 -03:00
Juan Martín Sotuyo Dodero
e72a92d2fb Merge branch 'master' into issue-1952 2019-09-02 17:46:20 -03:00
Juan Martín Sotuyo Dodero
de13f7a0ae Add missing imports to fix tests 2019-09-02 17:40:33 -03:00
Juan Martín Sotuyo Dodero
3a7f747c05 Improve TypeHelper.isA to better handle edge cases 2019-09-02 17:40:03 -03:00
Juan Martín Sotuyo Dodero
780edaa5f5 Merge branch 'pr-1970' 2019-08-18 01:37:02 -03:00
Juan Martín Sotuyo Dodero
febf512e9c Merge branch 'pr-1968' 2019-08-18 01:28:07 -03:00
Andreas Dangel
bdd0f2c525 [core] Use real file name in ruleContext during analysis
* This is needed to fix #1923
* RuleContext, RuleViolations all use the real name
* The shortname is only applied by the renderers now
  at the end of the processing
* Error logging and reporting also uses the real, full name
  of the file being analysed
2019-08-16 11:22:48 +02:00
Andreas Dangel
2ba1422747 [java] Remove java12 break-with-expression support
This preview language feature has been replaced with
the yield statement in java 13.
2019-08-13 20:48:06 +02:00
Andreas Dangel
ac4a0daff9 [java] Add Java 13 support
Fix type resolution of switch with yields
2019-08-13 20:48:01 +02:00
Andreas Dangel
b110186ed7 [java] Add Java 13 support
* Add text block literal
2019-08-13 20:00:40 +02:00
Andreas Dangel
969972214c [java] Add Java 13 support
* Java 13 is the new default
* New yield statement
2019-08-13 18:42:40 +02:00
Anton Kot
e581bba71e review_changes 2019-08-13 17:48:25 +02:00
Anton Kot
ce4b2c6041 Issue_1862_No_Message_Digest_class_field 2019-08-12 13:02:26 +02:00
Tobias Weimer
f8bb126c6c [java] DoubleBraceInitialization:
* Updated documentation to make the example compile (there is no varargs version of addAll(..))
2019-08-11 11:16:33 +02:00
Andreas Dangel
7f7213b8e7 [java] CloseResource: Fix NPE if type of method parameter is not known 2019-08-10 19:04:08 +02:00
Andreas Dangel
27164804f1 [java] CloseResource: fix false-negative when byte array is passed in 2019-08-10 18:11:28 +02:00
Andreas Dangel
c87af46d3f Update release notes
* Reference fixed issues in test cases for CloseResources
* Fixes #1922
* Fixes #1966
* Fixes #1967
2019-08-10 12:25:42 +02:00
Andreas Dangel
cb63f5f8c4 [java] CloseResource: add test case for #1076
The problem is not reproducible.
2019-08-10 12:03:17 +02:00
Andreas Dangel
377275edae [java] CloseResource: possible false positive with Streams
By default `java.util.stream.Stream` is now ignored.
Fixes #1922
2019-08-10 12:03:09 +02:00
Andreas Dangel
e0535f4bce [java] CloseResource: add additional test case 2019-08-10 12:03:09 +02:00
Andreas Dangel
ef8ed08ee0 [java] CloseResource: fix false positive with assignments before try 2019-08-10 12:03:09 +02:00
Andreas Dangel
619172560b [java] CloseResource: consider method parameters in general 2019-08-10 12:03:09 +02:00
Andreas Dangel
5b63d787c7 [java] CloseResource: ignore variables that are initialized from parameters
If a closable local variable is initialized from a method/constructor
parameter, then it is ignored. In that case, the resource is not created
in this method, but somewhere else. Therefore the resources should
be closed there.
2019-08-10 12:03:03 +02:00
Andreas Dangel
1a5486dc30 Merge branch 'pr-1954' 2019-08-04 11:22:56 +02:00
Andreas Dangel
f9d8898f7a [java] Fix FP for UnnecessaryFQNRule with sub packages 2019-08-04 10:39:56 +02:00
Andreas Dangel
8fdea448e4 [java] Compare ignored annotations by fully qualified names only
Fixes #1952
2019-08-03 12:31:28 +02:00