958 Commits

Author SHA1 Message Date
Andreas Dangel
821f7a849b [maven-release-plugin] prepare for next development iteration 2021-07-31 19:02:07 +02:00
Andreas Dangel
18df47ce6e [maven-release-plugin] prepare release pmd_releases/6.37.0 2021-07-31 19:01:59 +02:00
Jonathan Wiesel
a6c56fdd50 Fixed docs 2021-07-03 15:02:30 +02:00
Jonathan Wiesel
9e727034fe Add support for inline no-arg obj and lists 2021-07-03 14:57:37 +02:00
Jonathan Wiesel
77e7d2b4e2 Add ApexCRUDViolation support for database class 2021-07-03 14:52:20 +02:00
Andreas Dangel
ff5deed193 Merge pull request #3367 from jonathanwiesel:apex-crud-forloop
[apex] Check SOQL CRUD on for loops #3367
2021-07-02 10:08:27 +02:00
Jonathan Wiesel
ac238e1636 Remove debug statement 2021-06-27 16:53:33 +02:00
Jonathan Wiesel
4d884520d3 Check SOQL CRUD on for loops 2021-06-27 15:42:27 +02:00
Andreas Dangel
f68bf5ce05 [maven-release-plugin] prepare for next development iteration 2021-06-26 10:24:15 +02:00
Andreas Dangel
45d1605a03 [maven-release-plugin] prepare release pmd_releases/6.36.0 2021-06-26 10:24:07 +02:00
Andreas Dangel
07bfe2c43b Merge pull request #3333 from adangel:issue-3332
[apex] Fix Cognitive Complexity metric #3333
2021-06-24 09:18:01 +02:00
Andreas Dangel
bb70866871 Merge pull request #3276 from jonathanwiesel:apexdocs
[apex] Update ApexCRUDViolation and OperationWithLimitsInLoop docs #3276
2021-06-18 15:00:05 +02:00
Andreas Dangel
e79facb141 Merge pull request #3319 from jonathanwiesel:avoiddebugstatements
[apex] New AvoidDebugStatements rule to mitigate performance impact
#3319
2021-06-18 14:37:12 +02:00
Andreas Dangel
ea74775439 [doc] Update release notes (#3307, #3319) 2021-06-18 14:34:03 +02:00
Jonathan Wiesel
e1529f084f More clarification 2021-06-10 16:31:17 +02:00
Jonathan Wiesel
5dc62f1fd4 Add more clarification on rule usage 2021-06-10 16:24:26 +02:00
Jonathan Wiesel
3bdac315bd Fix typo
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2021-06-10 16:08:44 +02:00
Andreas Dangel
90c95db775 [apex] Fix Cognitive Complexity metric
* else if blocks are only hybrid increments (fixes #3332)
* add rule test
* also report current threshold in rule violations
* ignore continue/break statements. These don't support labels
  in apex
* add documentation
2021-06-10 12:24:35 +02:00
Andreas Dangel
0606c6dd5f [doc] New apex rule InaccessibleAuraEnabledGetter 2021-06-10 09:59:36 +02:00
pozil
634cf32b8b Reformatted examples and added comments 2021-06-02 21:19:32 +02:00
pozil
f70fd18238 Applied proper code formatting 2021-06-02 20:51:52 +02:00
pozil
b957352ef2 Feat: added rule to detect inaccessible AuraEnabled getters 2021-06-01 12:59:37 +02:00
Jonathan Wiesel
cb60488bcc Add apex AvoidDebugStatements rule 2021-05-30 00:06:25 +02:00
Andreas Dangel
4fb19e2a5e Bump pmd from 6.34.0 to 6.35.0 2021-05-29 09:06:39 +02:00
Andreas Dangel
9fdfecf731 [maven-release-plugin] prepare for next development iteration 2021-05-29 07:24:47 +02:00
Andreas Dangel
b49fb2014d [maven-release-plugin] prepare release pmd_releases/6.35.0 2021-05-29 07:24:39 +02:00
William Brockhus
649f62409d chore: rename is->has 2021-05-19 12:04:21 +10:00
William Brockhus
14a796ba0f fix: add test for false-positive on @TestSetup 2021-05-19 11:58:43 +10:00
William Brockhus
d6dff2ee4b fix: use xpath 2.0 2021-05-19 11:58:05 +10:00
William Brockhus
ecbb57cdea fix: rename ambiguous isTestMethod function 2021-05-18 09:48:06 +10:00
William Brockhus
291a27cf73 fix: update a failing test due to new isTestMethod 2021-05-18 09:48:06 +10:00
William Brockhus
cf39de85b2 feat: rewrite rule as xpath 2021-05-18 09:48:06 +10:00
William Brockhus
4b2457a307 feat: add isTestMethod to ASTModifierNode 2021-05-18 09:48:06 +10:00
William Brockhus
738aca9744 fix: update test for false positives 2021-05-18 09:48:06 +10:00
William Brockhus
f80a53186f chore: case sensitivity, update docs 2021-05-18 09:48:06 +10:00
William Brockhus
9a7933b6d7 fix: remove unused imports 2021-05-18 09:48:06 +10:00
William Brockhus
b202472ca0 fix: check for deprecated testmethod
Instead of checking methods in a test class that have system.assert, which gives false positives, check for the presence of the testmethod modifier.
2021-05-18 09:48:06 +10:00
Jonathan Wiesel
d92c7ffb56 Update docs for ApexCRUDViolation 2021-05-13 19:23:34 +02:00
Jonathan Wiesel
de000a033c Update docs for OperationWithLimitsInLoop 2021-05-13 19:13:59 +02:00
Andreas Dangel
48c8654f3b [apex] Correct findBoundary when traversing AST
FindBoundary was not considered yet in Apex. That means, that
`node.findDescendantsOfType(ASTVariableExpression.class)` found
variables usages within the current class and within any nested
class.

Now the nested classes are not considered by default. Rules that
make use of rulechain for ASTUserClass will visit both classes.
Rules, that use a standard visitor, need to call `super.visit(...)`
when visiting ASTUserClass. Note that this applies for all root nodes
ASTUserClass, ASTUserEnum, ASTUserInterface, ASTUserTrigger.

Some rules are fixed to use rulechain.
2021-04-29 17:00:57 +02:00
Andreas Dangel
319900cd43 [maven-release-plugin] prepare for next development iteration 2021-04-24 16:41:17 +02:00
Andreas Dangel
bfeaa1b377 [maven-release-plugin] prepare release pmd_releases/6.34.0 2021-04-24 16:41:10 +02:00
Jonathan Wiesel
8e224ed32b [apex] COUNT is CRUD checkable 2021-04-23 11:26:17 +02:00
Andreas Dangel
6f8c7e3940 [apex] Document new behavior of ApexCRUDViolation 2021-04-23 09:23:51 +02:00
Jonathan Wiesel
c453f5c936 Deleting unused import 2021-04-11 00:24:50 +02:00
Jonathan Wiesel
c4b1d9db90 Do not assume method is VF getter and enforce CRUD 2021-04-10 22:23:54 +02:00
Jonathan Wiesel
9af635047e Add more limit consuming static method invocations 2021-04-05 18:23:11 +02:00
Andreas Dangel
37e5525fd5 [maven-release-plugin] prepare for next development iteration 2021-03-27 16:25:18 +01:00
Andreas Dangel
dc1c9d0aed [maven-release-plugin] prepare release pmd_releases/6.33.0 2021-03-27 16:25:13 +01:00
Andreas Dangel
0c16a321dc Fix build under Windows - line endings... 2021-03-04 15:03:40 +01:00