Andreas Dangel
01db024df7
Update asm to 7.3.1
...
This add support for java 14 and java 15
2020-02-27 21:29:21 +01:00
Andreas Dangel
9a80f13164
[java] Fix new escape sequence "\s" detection
2020-02-27 21:23:33 +01:00
Andreas Dangel
81bb8090cf
[java] Don't throw IllegalArgument if Literal is not a text block
2020-02-27 21:14:29 +01:00
Andreas Dangel
da01ed4fde
Fix checkstyle
2020-02-27 21:12:00 +01:00
Andreas Dangel
d16751d136
[java] Add support for TextBlocks in Java14
...
* New escape sequence "\s" added
* Added experimental ASTLiteral::getTextBlockContent to retrieve
the text block with stripped indentation
2020-02-27 21:11:02 +01:00
Andreas Dangel
9d5b7554f0
[java] Make sure, SwitchExpressions with yield work with java14
...
Add additional tests for java14, so that we can later simply remove
the java13 preview tests
2020-02-27 18:30:39 +01:00
Andreas Dangel
f3da33944b
[java] version 14 is now the new default
2020-02-27 15:15:50 +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
Pham Hai Trung
9cec4c3ac7
Add version to plugin
...
The maven configuration will generate an issue if we don't specify the maven-pmd-plugin's version. Without the version, maven wouldn't be able to find the pmd plugin in central.
2020-02-27 09:38:43 +01:00
Joshua Arquilevich
6efc10eb4c
Fixed syntax error with 'Accepts Clause WITH SECURITY_ENFORCED in a list' Test
2020-02-25 16:08:18 -08:00
Joshua Arquilevich
7bbb65720a
Removed 'Accepts Clause WITH SECURITY_ENFORCED Failed' Test
2020-02-25 10:10:33 -08:00
Joshua Arquilevich
a2aba08c9a
Updated regex
2020-02-24 16:27:12 -08:00
Andreas Dangel
918be2a419
[java] UselessOverridingMethod - add another test case for synchronized
...
See https://sourceforge.net/p/pmd/bugs/423/
2020-02-24 19:55:57 +01:00
Andreas Dangel
36d6439270
[apex] Make the new ast nodes final
2020-02-22 15:38:30 +01:00
Andreas Dangel
4c7b48c8e9
[apex] Expose type and name of TypeWhenBlock
2020-02-22 15:21:44 +01:00
Andreas Dangel
c090bfbd8b
[apex] Add parser support for EmptyReferenceExpression
2020-02-22 15:02:48 +01:00
Andreas Dangel
00c2d5cc6b
[apex] Add parser support for Switch Statements
...
Fixes #2306
2020-02-22 14:54:28 +01:00
Andreas Dangel
d21e2565ae
[doc] Fix jdoc links in release notes
2020-02-22 12:27:46 +01:00
Andreas Dangel
827cdfd053
[apex] Fix test code using apex strings
2020-02-22 12:23:24 +01:00
Andreas Dangel
96f9efcb8e
[apex] Update quickstart ruleset - add commented cognitive complexity rule
2020-02-22 12:10:24 +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
Joshua Arquilevich
c54c9887a9
Updated the regex to support case insensitivity in apex
2020-02-20 15:57:46 -08:00
Joshua Arquilevich
8b94463074
Modify CURD rule to support regex for SECURITY_ENFORCE clause
2020-02-20 15:31:19 -08:00
Andreas Dangel
f3b98d7140
[vm] Mark generated AST node constructor InternalApi
2020-02-20 21:35:50 +01:00
Andreas Dangel
9a7bf4df04
[vm] Deprecate AST constructors / setters
2020-02-20 21:25:25 +01:00
Joshua Arquilevich
df16093562
Modify CURD rule to support SECURITY_ENFORCE clause
2020-02-20 12:03:01 -08:00
Andreas Dangel
c6825d6dbf
[java] UselessOverridingMethod: consider package-level elevation as well
2020-02-20 16:44:24 +01:00
Andreas Dangel
f0f06b8d84
[java] Refactor/simplify UselessOverridingMethod
2020-02-20 15:54:05 +01:00
Andreas Dangel
1a50010dfa
[java] UselessOverridingMethod false positive when elevating access modifier
...
Fixes #911
2020-02-20 15:15:10 +01:00
Andreas Dangel
174bdd6b0d
[java] UselessOverridingMethod - remove unnecessary CDATA in tests
2020-02-20 12:17:07 +01:00
Andreas Dangel
4b832b24fb
Merge branch 'pr-1741'
...
[apex] Throw parse errors for invalid code
2020-02-20 11:30:07 +01:00
Andreas Dangel
59e4be3648
Update gitignore
...
files generated by eclipse m2e plugin and pmd plugin
2020-02-20 11:29:10 +01:00
Gwilym Kuiper
68e4f52da1
Fill in TODO in documentation for coginitive complexity
2020-02-19 16:28:02 +00:00
Gwilym Kuiper
413d64ff39
Increase default values for cognitive complexity based on authors opinions
2020-02-19 14:22:30 +00:00
Gwilym Kuiper
a22d6f62b4
Optimistically say that cognitive complexity is in the next release
2020-02-19 10:24:40 +00:00
Gwilym Kuiper
de878175c8
Use correct message for cognitive complexity rule
2020-02-18 17:29:37 +00:00
Gwilym Kuiper
5d55b84f96
Fix checkstyle errors
2020-02-18 17:24:40 +00:00
Gwilym Kuiper
acfbb132d1
We don't actually support switch statements yet
2020-02-18 17:07:22 +00:00
Gwilym Kuiper
9d0fb82d6f
Increase cognitive complexity on recursion
2020-02-18 17:06:18 +00:00
Gwilym Kuiper
0231350dea
Handle boolean expressions on different statements
2020-02-18 16:59:12 +00:00
Gwilym Kuiper
a4db0ea069
Any boolean expression causes increases in cognative complexity
2020-02-18 16:32:28 +00:00
Gwilym Kuiper
4b26d22c73
Ternary operators increase nesting complexity
2020-02-18 15:56:08 +00:00
Gwilym Kuiper
5ea69530d7
Add do-while loop nesting complexity
2020-02-18 15:40:46 +00:00
Gwilym Kuiper
559c1d9c39
Catch blocks incur nesting complexity
2020-02-18 15:19:39 +00:00
Gwilym Kuiper
ec870225f2
While statements incur nesting complexity
2020-02-18 15:16:26 +00:00
Gwilym Kuiper
b2a42bf8cc
Break statements incur complexity
2020-02-18 14:12:49 +00:00
Gwilym Kuiper
7d3bb60d83
Continue statements incur complexity
2020-02-18 14:12:07 +00:00
Gwilym Kuiper
d9e7928d75
For each statements incur cognitive complexity
2020-02-18 14:10:32 +00:00