Andreas Dangel
345bb24a25
[release] prepare for next development iteration
2023-09-30 17:15:59 +02:00
Andreas Dangel
720b9a328b
[release] prepare release pmd_releases/7.0.0-rc4
2023-09-30 17:15:54 +02:00
Andreas Dangel
abbee4bb5c
Merge pull request #4610 from adangel:issue-4453-apex-link-arrayoutofbounds
...
[apex] Add rule test for UnusedMethod #4610
2023-09-28 11:16:36 +02:00
Andreas Dangel
4d185d5a76
Merge branch 'master' into pr-4605
2023-09-28 09:26:01 +02:00
Andreas Dangel
3e7e050251
[apex] Remove ApexNode.getApexVersion()
2023-09-22 19:39:42 +02:00
Andreas Dangel
e191bb913a
Fix unused import
2023-09-21 17:31:09 +02:00
Andreas Dangel
3757191d4b
[apex] Refactor AntlrVersionCheckSuppression
2023-09-21 17:20:39 +02:00
Andreas Dangel
b015bda6ce
[apex] Use current languageVersion for ApexVersion property
2023-09-21 17:05:52 +02:00
Andreas Dangel
55ee8b3461
[apex] Improve handling of <clinit> and such...
2023-09-21 16:47:58 +02:00
Andreas Dangel
22f5a09715
Fix pmd issues - LooseCoupling
2023-09-14 11:03:28 +02:00
Thomas Prouvot
2d7521401d
Add apex new rule OperationWithHighCostInLoop
2023-09-14 10:10:37 +02:00
Andreas Dangel
82bc73c825
Merge branch 'master' into pr-4479
2023-09-14 09:56:38 +02:00
Andreas Dangel
30416aee1a
[apex] ASTMethod#getImage - Use BaseApexClass
...
Refs #4479
2023-09-14 09:34:14 +02:00
Andreas Dangel
17601960a3
[core][apex] Support TextDocument#offsetAtLineColumn
...
- not for FragmentedTextDocuments
Refs #4479
2023-09-14 09:33:31 +02:00
Andreas Dangel
347d5992d1
Merge pull request #4649 from rcorfieldffdc:defect/4646-apex-soql-injection-sobjecttype-token-variables
...
[apex] Add SObjectType and SObjectField to list of injectable SOQL variable types #4649
2023-09-09 12:19:10 +02:00
Andreas Dangel
7d0e1f00cc
[doc] Update release notes ( #4649 , #4646 )
2023-09-09 12:11:19 +02:00
Andreas Dangel
32afa53f8e
All language modules: getInstance()
...
Use a consistent implementation of getInstance().
Now all modules resolve against the LanguageRegistry.
2023-08-24 16:01:27 +02:00
Andreas Dangel
80856732cc
Fix checkstyle
2023-08-24 14:19:36 +02:00
Andreas Dangel
8511c7b0e1
[core] Move PmdCapableLanguage to n.sf.pmd.lang
2023-08-24 11:42:50 +02:00
Andreas Dangel
932ac33d15
Merge branch 'master' into pr-4397
2023-08-24 09:48:28 +02:00
Andreas Dangel
df08d08608
[apex] Remove cpd property CASE_SENSITIVE
2023-08-24 09:10:06 +02:00
Richard Corfield
4151ca13f2
Fix Checkstyle errors by changing tab indentation to spaces
...
mvnw clean verify - now passes.
2023-08-18 17:53:19 +01:00
Richard Corfield
8f19067535
A neater set instantiation
2023-08-18 17:33:57 +01:00
Richard Corfield
2ab8447654
Remove the tests related to issue 4650
...
This commit will need to be reverted in 4650's branch.
2023-08-18 17:28:06 +01:00
Richard Corfield
bcbaffcf21
Add unit tests for the behavior I hope to see
...
Two of these tests are failing. It doesn't recognise constants.
I guess that it never has recognised constants, and this is another
problem in the code. I don't know whether to try to fix this or consider
it a different problem so I can make smaller pull requests.
2023-08-17 10:59:59 +01:00
Richard Corfield
d85a1a7cfe
Add SObjectType and SObjectField to list of injectable SOQL variable types
2023-08-17 10:07:51 +01:00
Andreas Dangel
894d9fba84
Merge branch 'master' into pr-4397
2023-08-17 09:31:53 +02:00
Andreas Dangel
b73611f013
Merge branch 'master' into pr-4380
2023-08-10 17:37:36 +02:00
Andreas Dangel
256ae42830
[apex] Fix rule test for UnusedMethod
...
Refs #4453
2023-06-29 11:52:02 +02:00
Andreas Dangel
670eea4f3b
[apex] Add rule test for UnusedMethod
...
Refs #4453
2023-06-29 09:45:03 +02:00
Andreas Dangel
60dfa53f77
Fix checkstyle
2023-06-26 19:32:07 +02:00
Andreas Dangel
68cc4e7315
Fix test - add workaround for differing antlr versions
2023-06-26 19:27:30 +02:00
Andreas Dangel
79b5904827
Merge branch 'master' into pr-4528
2023-06-26 18:17:29 +02:00
Andreas Dangel
0b9d5ec5e4
[apex] ApexCRUDViolation: Add support for "as user"
...
Refs #4368
2023-06-24 22:46:17 +02:00
Andreas Dangel
25539e1fc0
Guava is needed for apex at runtime as well - remove default scope test
2023-06-24 22:46:17 +02:00
Andreas Dangel
aeb1504079
[apex] Update jorje to latest version from 2023-06-05
...
Fixes #3973
2023-06-24 22:46:16 +02:00
Andreas Dangel
03a5b7549e
[apex] ExcessivePublicCount: consider properties
...
Fixes #4596
2023-06-24 16:51:51 +02:00
Clément Fournier
baf3417bff
Fix compilation issue with regex (illegal escape character)
2023-06-02 15:01:52 +02:00
Andreas Dangel
8a89a4c786
Use explicit encoding in ruleset files
2023-06-01 17:29:24 +02:00
Andreas Dangel
835b625d51
[release] prepare for next development iteration
2023-05-30 20:15:08 +02:00
Andreas Dangel
7d6d303488
[release] prepare release pmd_releases/7.0.0-rc3
2023-05-30 20:15:02 +02:00
Clément Fournier
f2cd5abbab
Merge branch 'master' into clem.pmd7-refactor-cpd
2023-05-26 12:21:08 +02:00
Clément Fournier
fd0416c85a
Merge branch 'master' into port-properties
2023-05-26 11:42:11 +02:00
nwcm
49dc7b75b7
Update APEX bind regex match for all possible combinations
...
Matches variables with underscores
Matches `=:food` and `=: foo`
2023-05-15 10:55:57 +10:00
Clément Fournier
ac86bb21dc
Merge branch 'master' into pmd7-textfile-display-name
2023-05-02 17:12:39 +02:00
Kevin Jones
460fddd18c
Update to apexlink 2.3.5
2023-04-30 20:37:22 +01:00
Andreas Dangel
b79e6bd92b
[release] prepare for next development iteration
2023-04-29 23:39:34 +02:00
Andreas Dangel
a97e108269
[release] prepare release pmd_releases/7.0.0-rc2
2023-04-29 23:39:28 +02:00
Andreas Dangel
e493db664e
Merge branch 'master' into pr-4501
2023-04-29 22:42:31 +02:00
Clément Fournier
b89970d5fe
Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd
2023-04-29 19:20:38 +02:00
Clément Fournier
4834aca95c
Tests and doc
2023-04-29 18:59:23 +02:00
Clément Fournier
68a4e84b5e
Merge branch 'master' into pmd7-textfile-display-name
2023-04-29 18:21:30 +02:00
Andreas Dangel
aef2c175e5
Merge pull request #4465 from adangel:apex-link-error-handling
...
[apex] Handle ApexLink initialization errors #4465
2023-04-28 22:43:15 +02:00
Andreas Dangel
3b31913146
[doc] Update release notes ( #4509 )
...
Closes #4509
2023-04-27 09:34:12 +02:00
Andreas Dangel
5882dda016
[apex] Fix compile errors after merge
2023-04-22 10:31:16 +02:00
Andreas Dangel
9fc7ab55a1
Merge branch 'master' into apex-excessive-public-count
2023-04-22 10:27:14 +02:00
Andreas Dangel
3e9d6081a4
[apex] Add limit in ExcessivePublicCount message
2023-04-22 09:43:19 +02:00
Andreas Dangel
646fb09908
[apex] Improve ExcessivePublicCount message
...
and verify inner class behavior.
2023-04-21 14:21:46 +02:00
Andreas Dangel
e899909c3f
[apex] Fix NcssMethodCount message
2023-04-21 12:08:39 +02:00
Aaron Hurst
c26003f8b2
Merge remote-tracking branch 'origin/master' into experimental-apex-parser
2023-04-18 01:04:44 +00:00
Aaron Hurst
9a8698915c
Fix checkstyle violations.
2023-04-17 22:13:42 +00:00
Aaron Hurst
81c53eefd8
Fix PMD violations.
2023-04-17 15:29:47 +00:00
Aaron Hurst
293afd29f1
Passing testsuite.
...
Changes include:
* Create root ASTApexFile nodes
* Correct source locations
* Insert comments by offset rather than line/column, using more of the mainline code
* Removed some unused methods
* Suppress Summit logger INFO output
* Suppress some (but not all) ANTLR version mismatch output
2023-04-17 14:25:12 +00:00
Andreas Dangel
71d7bbe1dc
[apex] Handle ApexLink initialization errors
...
When running PMD as an Eclipse plugin, ApexLink can't initialize due to the special bundle classloader used for plugins.
This change just catches the additional possible errors.
2023-04-11 19:20:11 +02:00
Aaron Hurst
50a470af8a
Fix compilation errors in test code.
2023-04-06 19:57:52 +00:00
Aaron Hurst
45b3470365
Fix compilation errors.
...
Changes include:
* Eliminate ASTFormalComment.getToken()
* Remove deleted APIs: getLocation, hasSuppressWarningsAnnotationsFor, getModifiers
* Remove code that was factored into BaseApexClass
* Replace all references to Jorje in rules
2023-04-05 23:37:24 +00:00
Aaron Hurst
d94f5dd2c2
Remove old ApexTreeBuilder
2023-04-05 20:00:49 +00:00
Aaron Hurst
8412124e07
First pass on ApexTreeBuilder compilation.
...
This included:
* Passing AbstractApexNode instead of ApexNode during tree building
* Extending and using TextFileContent to convert line+column (as is native in Summit) to offset
* Using the new visitor method and interface
* Adding a top-level ASTApexFile node
2023-04-05 19:45:54 +00:00
Clément Fournier
ccd364b065
Merge branch 'master' into pmd7-textfile-display-name
2023-04-04 22:44:20 +02:00
Clément Fournier
837c7952f5
Merge branch 'master' into clem.pmd7-refactor-cpd
2023-04-04 22:11:38 +02:00
Aaron Hurst
88807474f2
Post-merge fixup: node type hierarchy.
...
* Replace ApexRootNode with BaseApexClass.
* Remove AbstractApexNodeBase
2023-04-04 18:21:17 +00:00
nwcm
702318a41d
Update design.xml
2023-04-04 23:07:08 +10:00
Aaron Hurst
32a4ca45a3
Merge remote-tracking branch 'origin/master' into experimental-apex-parser
2023-04-03 22:25:04 +00:00
Aaron Hurst
65ec632100
Bump summit-ast to new release 2.1.0 (and remove workaround).
2023-03-31 23:11:20 +02:00
Andreas Dangel
d9b2444d7e
[release] prepare for next development iteration
2023-03-25 12:47:33 +01:00
Andreas Dangel
356af8b636
[release] prepare release pmd_releases/7.0.0-rc1
2023-03-25 12:30:51 +01:00
Steve Stearns
ba297a2a8e
Fine tuning style issues
2023-03-20 09:45:22 -05:00
Steve Stearns
e922278497
Fixing imports for code style issues
2023-03-20 09:28:48 -05:00
Clément Fournier
f2dc3805af
Cleanups
2023-03-20 15:18:12 +01:00
Steve Stearns
d181b565b3
Fixing a bug in ApexBadCrypto related to inline detection
2023-03-20 09:09:23 -05:00
Clément Fournier
6eabac7d44
Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd
2023-03-20 15:00:23 +01:00
Clément Fournier
344b2cc17b
Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd
2023-03-20 14:41:17 +01:00
Clément Fournier
b71e1711e5
Cleanups and renamings
2023-03-20 13:31:00 +01:00
Clément Fournier
129b111ee6
Rename PathId -> FileId
2023-03-19 23:20:49 +01:00
Clément Fournier
37e2f8f208
Improve jjt error messages
2023-03-19 22:57:51 +01:00
Clément Fournier
2d7e200db1
add PathId class
2023-03-19 13:08:14 +01:00
Clément Fournier
5db8be42a3
Merge remote-tracking branch 'upstream/master' into clem.pmd7-refactor-cpd
2023-03-17 15:39:01 +01:00
Clément Fournier
e483f5846d
Lint
2023-03-15 22:37:19 +01:00
Clément Fournier
5a662ecb3e
Merge branch '7.0.x' into clem.pmd7-remove-pmd-eol
2023-03-14 21:54:45 +01:00
Clément Fournier
f55c01ac1f
Merge branch '7.0.x' into port-properties
2023-03-14 21:07:35 +01:00
Clément Fournier
255fdf050b
Fix compil
2023-03-04 15:38:40 +01:00
Andreas Dangel
28ac77141a
Use apex-parser 2.17.0
2023-03-02 15:11:16 +01:00
Andreas Dangel
e97da89056
Merge branch 'master' into experimental-apex-parser
2023-03-02 14:51:29 +01:00
Clément Fournier
0b2f1517ba
Merge branch '7.0.x' into clem.pmd7-refactor-cpd
2023-02-27 00:41:11 +01:00
Andreas Dangel
2fc85cfe24
[maven-release-plugin] prepare for next development iteration
2023-02-25 11:50:54 +01:00
Andreas Dangel
ef34553486
[maven-release-plugin] prepare release pmd_releases/6.55.0
2023-02-25 11:50:49 +01:00
Clément Fournier
b25c16f94d
Remove usages of PMD.EOL
2023-02-20 15:17:41 +01:00
Clément Fournier
a12bbf8dde
Remove duplicated options in AbstractConfiguration
...
Fix logging issue
2023-02-19 16:51:53 +01:00
Clément Fournier
0ba2460f92
Merge branch '7.0.x' into port-properties
2023-02-17 16:27:42 +01:00
Andreas Dangel
be6a46ccff
[vf] Refactor dependency to apex language module
2023-02-17 11:22:52 +01:00
Andreas Dangel
e2bb0c8480
Reuse names and extensions for CPD language
2023-02-17 09:04:15 +01:00
Andreas Dangel
d7d2ad541e
Add explicit language versions ( #4120 )
2023-02-17 09:04:12 +01:00
Clément Fournier
30a7f07d1c
Cleanups
2023-02-16 20:44:17 +01:00
Clément Fournier
9c3434a07b
Split cpd/pmd specific methods into...
...
subinterfaces of Language
2023-02-13 15:16:48 +01:00
Clément Fournier
51b5016163
Cleanups
2023-02-12 20:47:09 +01:00
Clément Fournier
ddbfc90c14
Fix build
2023-02-12 20:06:28 +01:00
Clément Fournier
9f35966ec6
Refactor EOF handling
...
Mandate that no coordinate is missing in a TokenEntry.
2023-02-12 15:59:14 +01:00
Clément Fournier
65d953bfb4
Progress
2023-02-11 18:10:35 +01:00
Clément Fournier
27a4aba871
Progress
2023-02-11 16:34:24 +01:00
Clément Fournier
cf81809990
Change a ton of stuff in CPD
2023-02-10 18:21:23 +01:00
Clément Fournier
d4c05d1fb5
Make pmd language have a hook to launch CPD
...
This allows removing the CPD language instances,
sharing more logic between CPD and PMD, and using
language properties to configure CPD and PMD uniformly.
2023-02-10 16:45:52 +01:00
Clément Fournier
a586a9bf11
Merge branch '7.0.x' into port-properties
2023-02-05 19:41:51 +01:00
Clément Fournier
872a41b4e9
Make ApexProcessor not implement LVH
2023-02-04 20:22:49 +01:00
Clément Fournier
7a31f67ee5
Fix some details
2023-02-04 19:53:38 +01:00
Clément Fournier
ef365cd9aa
Merge branch '7.0.x' into pmd7-language-lifecycle
2023-02-02 01:04:53 +01:00
Clément Fournier
a7cf226dae
Merge branch '7.0.x' into pmd7-language-lifecycle
2023-01-30 16:28:19 +01:00
Andreas Dangel
014c28bb1e
Merge branch 'pmd/7.0.x' into pmd7-junit5-part3
2023-01-30 13:36:15 +01:00
Andreas Dangel
d8b41bab6e
Merge branch 'pmd/7.0.x' into pr-4354
2023-01-30 10:21:50 +01:00
Andreas Dangel
5772440a79
[maven-release-plugin] prepare for next development iteration
2023-01-28 10:31:53 +01:00
Andreas Dangel
de1b12b060
[maven-release-plugin] prepare release pmd_releases/6.54.0
2023-01-28 10:31:46 +01:00
Clément Fournier
55eabe2de1
Add back named versions
2023-01-27 15:12:14 +01:00
Clément Fournier
6e02e4f2fd
Fix apex module
2023-01-27 14:06:58 +01:00
Clément Fournier
32d95a46e8
Merge branch '7.0.x' into pmd7-language-lifecycle
2023-01-27 13:55:39 +01:00
Andreas Dangel
0d2acf6000
Merge branch 'pmd/7.0.x' into pmd7-junit5-part3
2023-01-27 10:02:58 +01:00
Andreas Dangel
4e56cd70be
[apex] Fix apexlink integration under Windows
2023-01-26 20:34:28 +01:00
Andreas Dangel
712e5b56d9
Merge branch 'master' into pmd/7.0.x
2023-01-26 11:26:12 +01:00
Clément Fournier
2078692d39
Merge branch '7.0.x' into pmd7-language-lifecycle
2023-01-25 00:48:36 +01:00
Clément Fournier
403fcdae82
[core] Move utility classes around
2023-01-23 18:47:52 +01:00
Andreas Dangel
a03a55ba44
[apex] Enhance UnusedLocalVariable to consider SOQL binding vars
...
Fixes #2669
2023-01-23 14:47:35 +01:00
Thomas Prouvot
cd88b367ab
Add test to check if false positive is fixed
2023-01-23 14:46:38 +01:00
Andreas Dangel
c23ecab2c6
Make test classes and methods package-private
2023-01-17 15:41:31 +01:00
Andreas Dangel
8fb578866c
Merge branch 'pmd/7.0.x' into pmd7-junit5-part3
2023-01-17 11:54:18 +01:00
Andreas Dangel
a220b2c2d2
Merge 'master' into pmd/7.0.x
2023-01-16 11:42:20 +01:00
Andreas Dangel
a9cbe7edfd
Fix typo for @TestVisible annotation
2023-01-14 12:03:00 +01:00
Andreas Dangel
9d05cff8cc
Merge branch 'master' into experimental-apex-parser
2023-01-14 11:48:12 +01:00
Andreas Dangel
8985c9dbf3
[doc] Update release notes ( #4280 )
2023-01-14 11:00:27 +01:00
Andreas Dangel
c5a9e785ff
Merge branch 'pmd/7.0.x' into pmd7-junit5-part3
2023-01-10 12:58:51 +01:00
Clément Fournier
6a5888cb8b
Merge branch '7.0.x' into violation-decorators
2023-01-08 18:28:14 +01:00
Clément Fournier
089e9b1f23
Merge branch '7.0.x' into pmd7-language-lifecycle
2023-01-08 18:26:25 +01:00
Aaron Hurst
b8ccafa672
Fix checkstyle issue.
2023-01-06 03:53:56 +00:00
Aaron Hurst
ebb861a282
Sort children of ASTUserClass to order ASTField nodes earlier, immediately after modifiers.
...
This matches one observed property in the way that Jorje ordered nodes.
Update the dump test.
2023-01-06 03:50:14 +00:00
Aaron Hurst
58ca81da06
Updated test after removing getApexVersion.
2023-01-06 02:59:44 +00:00
Aaron Hurst
b4b9dd2b93
Remove ApexRootNode.getApexVersion.
...
The deprecation was proposed for master/pmd6.
2023-01-06 01:38:50 +00:00
Aaron Hurst
0715bd91d5
Remove unused imports.
2023-01-05 13:39:17 +00:00
Aaron Hurst
f0137f2907
Deprecate ApexRootNode.getApexVersion.
...
Assume Apex version is >= V176.
2023-01-03 22:42:49 +00:00
Aaron Hurst
60da7bd129
Reduce visibility of ApexCommentBuilder. Remove @Deprecated for new class.
2023-01-03 21:48:50 +00:00
Aaron Hurst
8745d00824
Update pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTLiteralExpression.java
...
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2023-01-03 16:39:51 -05:00
Andreas Dangel
a653fb498c
Fix dogfood pmd violations
2022-12-31 18:47:39 +01:00
Andreas Dangel
6a6acb9b43
[maven-release-plugin] prepare for next development iteration
2022-12-31 18:22:10 +01:00
Andreas Dangel
37103451bf
[maven-release-plugin] prepare release pmd_releases/6.53.0
2022-12-31 18:22:04 +01:00
Andreas Dangel
44914419e2
Merge branch 'master' into pmd/7.0.x
2022-12-31 16:17:32 +01:00
Andreas Dangel
b81df9681e
Merge pull request #4262 from adangel:issue-2127-deprecate-excessive-length-rules
...
[java] Deprecate rules ExcessiveClassLength and ExcessiveMethodLength #4262
2022-12-31 15:09:40 +01:00
Andreas Dangel
930b77876b
[apex] ApexCRUDViolation - support AccessLevel
...
Also support more DML methods: *async and *immediate
2022-12-16 18:58:31 +01:00
Andreas Dangel
93e768319c
[apex] ApexCRUDViolation - no violation for explicit system mode
2022-12-16 17:45:58 +01:00
Andreas Dangel
637663212e
[apex] ApexCRUDViolation - fix rule tests
2022-12-16 16:06:11 +01:00
Tarush Singh
1ce1a2fcef
Simple change in voilation check
2022-12-15 00:58:59 +05:30
Andreas Dangel
7237d0c076
[doc] Consistently document deprecated and renamed rules
2022-12-09 20:37:23 +01:00
Aaron Hurst
6d35496e0c
Property getter and setter methods default to visibility of property.
...
Change-Id: Ib8d4a2d5941b47c47cbd469c1af5ab5f405b120f
2022-12-02 17:11:30 +00:00
Aaron Hurst
e9eafdde3e
Change case normalization of primitive from 'ID' to 'Id' to match existing behavior.
...
Change-Id: I7b3406a60bbc18dc2b1e441b8c0122452f709404
2022-12-02 17:11:30 +00:00
Aaron Hurst
16a492f66d
Fix checkstyle violations.
...
Change-Id: I6c371bdecaf08d306bee7308e94f2f1bc5ef0e4c
2022-12-02 17:11:30 +00:00
Aaron Hurst
8734d45bb8
Fix PMD dogfood issues.
...
Change-Id: I3371e80418e11766657e7f461d26f440fcd78e79
2022-12-02 17:11:30 +00:00
Aaron Hurst
9fef04fee8
ASTField: store String type name instead of either typeRef or enumValue node.
...
Change-Id: I1542cdd3da3675a04f36c0b0627ea837e2005ac3
2022-12-02 17:11:30 +00:00
Aaron Hurst
62080c69f2
Refactor ASTMethod to support synthetic definitions, and add a synthetic "invoke" method inside triggers.
...
Change-Id: I21344a36c9795deffd9c62aa0e768eb6f6742796
2022-12-02 05:46:32 +00:00
Aaron Hurst
19225dc2aa
Update test with Jorje vs. Summit source location and node count differences.
...
Re-enable some tests that were disabled due to Jorje limitations.
Change-Id: Id81582231afcc3b2e9f13ac52860ac0de538f41b
2022-12-01 18:53:08 +00:00
Aaron Hurst
6897164462
Upgrade Summit AST dependency to release version 2.0.0.
...
Update code to remove reference to deleted MODULO operator.
Change-Id: I39d9f7adc0407aafa9af31d3b2253c6c37c735b1
2022-12-01 18:53:08 +00:00
Aaron Hurst
072bb72daf
Update test to use getOp replacement for deprecated and now retired getOperator.
...
Change-Id: I1fdfc314ede7ccfcfe3e169acaef309ba07c17c1
2022-12-01 18:53:08 +00:00
Aaron Hurst
0524d66abc
Update TreeDumper regression test with Summit AST output.
...
Change-Id: I92b456c124c50ceb20416d69b1d88d0b5405dd89
2022-12-01 18:53:08 +00:00
Aaron Hurst
ecad8786af
Fix test failure due to incorrect case-sensitive identifier comparison.
...
Change-Id: I232b8e7ad0ffc5f9ac8beab741e48d90b24063d4
2022-12-01 18:53:08 +00:00
Aaron Hurst
914f6a8d0b
Fix test failures related to Boolean cognitive complexity due to (unnecessarily) disabled code.
...
Change-Id: I45fab6872f5a69910452b6ac2429716b677bd93a
2022-12-01 18:53:08 +00:00
Aaron Hurst
ff9de702d5
Replicate previous behavior for type names:
...
* Case normalize primitive types (e.g. Integer)
* Use type-erased names for super classes and interfaces
* Include type arguments for all other uses
Add documentation.
Change-Id: I9edf979c58a5fcf6f251e93013be85fea22a8be1
2022-12-01 18:53:08 +00:00
Aaron Hurst
701fb53550
Comment position fixup
...
Change-Id: I06a3bc7afce01d2050c46aa2ca674a7a91fc4c5a
2022-12-01 18:53:07 +00:00
Aaron Hurst
581d4d6ac9
Comments!
...
* ASTFormalComments: represent and build.
* Mark comment containers
* Populate suppression map
This reuses the existing code to the extent possible.
Makes ApexDocTest pass.
Change-Id: I5843ffa9174f7f501aae551e5d493ee973c3dd45
2022-12-01 18:52:52 +00:00
Aaron Hurst
611d7880f7
Rename former ApexTreeBuilder.java to ApexCommentBuilder.java.
...
Change-Id: I662171da66517235ce30a701ed84b687edfdb3a3
2022-12-01 18:51:08 +00:00
Aaron Hurst
fb32ba3ab0
Translate EnumValue
node to ASTField
.
...
Change-Id: Iec7c8335b966b243a63243ad631193b82598808b
2022-12-01 18:51:05 +00:00
Aaron Hurst
157558c7c1
Add back ApexTreeBuilder.java.
...
Change-Id: I6fb29b07e3679f333cae37fe28dfd8b14c8d4a20
2022-12-01 18:50:09 +00:00
Aaron Hurst
4fbe0deb13
Upgrade Summit to 1.1.0 (snapshot).
...
Make updates related to new VariableDeclarationGroup.
Translate SOQL and SOSL expressions and bindings.
Change-Id: I18995800e292cabe9f61176fa7aefedfc9729def
2022-12-01 18:50:02 +00:00
Edward Klimoshenko
1f438e67ed
Fix b/243977405
...
- Don't build the `exceptionVariable` property of `CatchBlock` nodes.
Some rules (e.g. `LocalVariableNamingConventionsRule`) expect the
parent of every `ASTVariableDeclaration` to be an
`ASTVariableDeclarationStatements`.
- Fix `LocalVariableNamingConventionsRule` crash.
2022-12-01 18:48:22 +00:00
Edward Klimoshenko
da9e1ef23f
Update TODO
comments
...
Change-Id: I033160534044936ac2ec416428662024b63e8c5f
2022-12-01 18:48:09 +00:00
Edward Klimoshenko
c6ad8fbce6
Allow rules with version checks to properly run
2022-12-01 18:47:25 +00:00
Edward Klimoshenko
9e5d4d48a8
Fix b/243747010
...
Set `ASTMethod.getImage` to name of type for constructors
2022-12-01 18:47:25 +00:00
Edward Klimoshenko
90aec7a9e1
Fix b/243743042
...
Fix an unexpected `RuntimeException` from
`AbstractApexNodeBase.getBeginColumn` in instances where a `Node` had a
start column of `0`.
2022-12-01 18:47:25 +00:00
Tarush Singh
efd83665dc
Simple change in voilation check
2022-12-01 17:52:48 +05:30
Andreas Dangel
894a92d538
Merge pull request #4242 from aaronhurst-google:merge-6.52-into-experimental-apex-parser
...
Merge 6.52 into experimental-apex-parser #4242
2022-12-01 13:01:49 +01:00
Andreas Dangel
6403430cd2
Fix some PMD issues
2022-12-01 12:59:37 +01:00
Andreas Dangel
8e1cd67b81
Fix some checkstyle issues
2022-12-01 12:51:57 +01:00
Tarush Singh
bce0331fe7
check added for User and system mode in validateCRUDCheckPresent
2022-12-01 16:51:43 +05:30
Tarush Singh
73b95b2e92
check added for User and system mode in validateCRUDCheckPresent
2022-12-01 16:49:42 +05:30
Tarush Singh
1ce646a535
check added for User and system mode in validateCRUDCheckPresent
2022-12-01 16:17:11 +05:30
Tarush Singh
0253929cc5
user mode and System mode with test cases added
2022-11-29 17:05:33 +05:30
Aaron Hurst
dc5be45339
[maven-release-plugin] copy for tag pmd_releases/6.52.0
...
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE1TxcWKPhc9GK7fbpk0UN8t+aP6MFAmOB22cACgkQk0UN8t+a
P6PsYRAAg7OdEywefFFADJmdWdxVbuC69ULm7IKR6aiEtPIIkuv9TZZ+nFRomKKF
FHnTYQENq/rdgmd3Pb7Fddq+sfhrEt8b9wJh7WIeKPcZyYaQ5/kXlvEjvjMz4j4P
FAhDeRkycfR4C/WzG9ctJ9IBNK/yUcsuNCflrNbwi2MtbvtXtJpOSLAGgDaurra9
fp8iw1g8y4DWx+8TlKrkYBRDjGjqa9hGqP+fuMlsbEw1mPK4CYuruEeZKHZ8NnOA
GJJBO5RjjxdwBfWsnNqneZaDJsCrL7ZF7zRI76X0EdvrRuDC5p/kKNgQUZGgP1iX
QWP7UUuHlPjGWk9YvISl9P1bvJFs2RzGbP/gDf5dkW6vjOGS5f6aDSQcdz3WhE2o
4wGmnO+UZIncGdmSOMB5qnRouRQQaWot4+CmEQR7uhA6rDzHIfiyRhT88+rX10xv
5bD7bQoYtICTjTMwBxvGpyqHXXmlH1peq1nG0sZWpGctzRanQJGepmgilXNZRt6f
GqiXBigfZ6mmm0pzxL6QRmIGIL/r8N15r5qzRBIBiMTALtDDw7K5RVxu2yHARFWj
nbIo+XAl54A9AN8hhzs3WVIATPFQ2vJVdTlr0Cz14EPwkbseqbu7ioOKEkSa2SAC
0Qd8U5DX3Bd3PvX75Qpjgc2gGs+YhSgwA/Nsp6tytGn8/h1k0Is=
=AEpV
-----END PGP SIGNATURE-----
Merge tag 'pmd_releases/6.52.0' into merge-6.52-into-experimental-apex-parser
Change-Id: I81fd2d8fbb88f29ef3a0c03f3abb5cc44fb44835
2022-11-28 22:24:27 +00:00
Clément Fournier
98f515b92c
Merge branch '7.0.x' into port-properties
2022-11-26 18:12:38 +01:00
Andreas Dangel
1634bd0043
[maven-release-plugin] prepare for next development iteration
2022-11-26 10:24:58 +01:00
Andreas Dangel
e90bf0f11b
[maven-release-plugin] prepare release pmd_releases/6.52.0
2022-11-26 10:24:53 +01:00
Clément Fournier
cef4c30af6
Merge branch '7.0.x' into pmd7-language-lifecycle
2022-11-24 22:39:59 +01:00
Clément Fournier
d3ffc1d212
Merge branch '7.0.x' into pmd7-language-lifecycle
2022-11-24 20:22:58 +01:00
Clément Fournier
4b5575ea94
Merge remote-tracking branch 'origin/violation-decorators' into violation-decorators
2022-11-24 15:30:50 +01:00
Clément Fournier
f603e45de0
Merge branch '7.0.x' into violation-decorators
2022-11-24 15:15:34 +01:00
Clément Fournier
4b6a54258f
Merge branch '7.0.x' into violation-decorators
2022-11-23 21:56:14 +01:00
Clément Fournier
251fa45020
Merge branch '7.0.x' into pr/4028
2022-11-23 21:52:18 +01:00
Aaron Hurst
07c974cab7
Incorporate feedback from previous code review::
...
* Make ctor package private
* ASTExpressionStatement should wrap ExpressionStatement not Expression
Change-Id: Iab7db02ea5bcc55b9e21f9fa3193105abb15bc17
2022-11-18 19:13:07 +00:00
Aaron Hurst
395c83e4d2
Merge branch 'part-5' into experimental-apex-parser
...
Change-Id: Ib198889016e81e4c5b4490879e76d492d9edbf99
2022-11-18 16:35:17 +00:00
Aaron Hurst
c54488ed98
ASTAnnotation: case-normalize names for resolved annotations.
...
Change-Id: I3ffd845161d8c0604fa8aa8baac6996dcca4c93c
2022-11-18 16:34:30 +00:00
Aaron Hurst
aa3df84a8c
ASTField initial value expression is Optional.
...
Change-Id: I5f5d5d6bc822e6367828e75dbaa3c274af9934ec
2022-11-13 17:16:57 +00:00
Aaron Hurst
77720c28f2
Post-merge fixups.
...
Change-Id: Iec30525f2b7f2bf41432df4153b56339378ccbf7
2022-11-11 21:06:43 +00:00
Edward Klimoshenko
90c183e7de
Add documentation for getName
2022-11-11 20:30:42 +00:00
Edward Klimoshenko
130918e45c
Add documentation for VALID_ANNOTATION_NAMES
2022-11-11 20:30:42 +00:00
Edward Klimoshenko
9932571135
Refactor expressionToString
...
- Handle only `LiteralExpression`s; rename to `literalToString`
- Manually discard other `Expression`s at each client
2022-11-11 20:30:42 +00:00
Edward Klimoshenko
495a3da729
Refactor ASTModifierNode
...
- Use ImmutableMap
2022-11-11 20:30:42 +00:00
Edward Klimoshenko
1833d9e40a
Refactor ASTAnnotation
...
- Sort annotation names
- Make names lowercase
- Use set for names
2022-11-11 20:30:42 +00:00
Edward Klimoshenko
344efcb1dd
Implement CPD ApexTokenizer.tokenize
2022-11-11 20:30:42 +00:00
Edward Klimoshenko
c0b0809d1b
Build trigger variable expressions
2022-11-11 20:30:42 +00:00
Edward Klimoshenko
13b06388a0
Build trigger declarations
2022-11-11 20:30:42 +00:00
Edward Klimoshenko
1d19594a06
Build enum declarations
...
Change-Id: Idaf68b2641443c73aa9b39d3d801c189ecdf9638
2022-11-11 20:30:39 +00:00
Edward Klimoshenko
bb3690ec95
Implement ASTLiteralExpression.getName
...
Change-Id: If9e6874b0a2d906da161116ba71176049df2a86c
2022-11-11 20:29:51 +00:00
Edward Klimoshenko
46ac530167
Implement ApexQualifiedName.getOperationString
2022-11-11 20:28:23 +00:00
Edward Klimoshenko
bc89e527a5
Generate ASTField
nodes
2022-11-11 20:28:23 +00:00
Edward Klimoshenko
955a91e9ce
Implement ASTUserInterface.getSuperInterfaceName
...
Change-Id: Ibb474f3704246fce86f6e1dec6f505a817ca8082
2022-11-11 20:28:19 +00:00
Edward Klimoshenko
39db242880
Implement ASTModifierNode
methods
2022-11-11 20:27:14 +00:00
Edward Klimoshenko
38af298622
Build annotation modifiers
2022-11-11 20:27:14 +00:00
Edward Klimoshenko
6d61bd3455
Add utility function to print Expression
2022-11-11 20:27:14 +00:00
Edward Klimoshenko
c0bef71816
Build parameter declarations
2022-11-11 20:27:14 +00:00
Aaron Hurst
44ac383146
Merge branch 'part-4' into experimental-apex-parser
...
Change-Id: I5ccb1172fe6605938f7209cff22a6daa366c6dd0
2022-11-10 23:52:29 +00:00
Andreas Dangel
e033205657
Merge branch 'master' into experimental-apex-parser
2022-11-10 17:00:19 +01:00
Andreas Dangel
5a4bf05493
[maven-release-plugin] prepare for next development iteration
2022-10-29 09:34:25 +02:00
Andreas Dangel
66e834049f
[maven-release-plugin] prepare release pmd_releases/6.51.0
2022-10-29 09:34:19 +02:00
Andreas Dangel
d6b0068f7b
Merge branch 'master' into pmd/7.0.x
2022-10-28 11:26:12 +02:00
Aaron Hurst
e4a28b70fd
Post-merge fixup. Make new AST constructors package-private.
...
Change-Id: I9b40bb44474894dfa66ef3ee542a2602a9a084ea
2022-10-17 03:36:37 +00:00
Edward Klimoshenko
a57fd96982
Build continue
statements
2022-10-17 03:36:15 +00:00
Edward Klimoshenko
04732d86d6
Build break
statements
2022-10-17 03:36:15 +00:00
Edward Klimoshenko
3acd9aadfb
Build try
statements
2022-10-17 03:36:15 +00:00
Edward Klimoshenko
298b99815c
Build throw
statements
2022-10-17 03:36:15 +00:00
Edward Klimoshenko
91ac513015
Build runAs
statements
2022-10-17 03:36:14 +00:00
Edward Klimoshenko
d0395462e1
Build return
statements
2022-10-17 03:36:14 +00:00
Edward Klimoshenko
cf054a1427
Build switch
statements
2022-10-17 03:36:14 +00:00
Edward Klimoshenko
75690c383b
Build for
loops
...
Change-Id: If1bbe27701e190321f53f19be384be10d2885ec5
2022-10-17 03:36:13 +00:00
Edward Klimoshenko
de2bc8083a
Build while
loops
2022-10-17 03:35:47 +00:00
Edward Klimoshenko
6e5fe57a10
Build do-while loops
2022-10-17 03:35:47 +00:00
Edward Klimoshenko
3321997e08
Build for-each loops
...
Change-Id: Ica6c9ad3f0da89b4522dbae6f2cc5d80399ea72a
2022-10-17 03:35:47 +00:00
Edward Klimoshenko
f813961ec5
Build variable declarations
2022-10-17 03:35:47 +00:00
Edward Klimoshenko
bd8e47edd1
Build if
statements
...
Change-Id: I4db2d2dfd028ae820c73f9fcb5fff4fa5e6c3ece
2022-10-17 03:35:47 +00:00
Aaron Hurst
72bb311aba
Make AST node constructors package-private.
...
Change-Id: Iafdf7b08b0f8f456b981c797209735a1c27e0b33
2022-10-17 03:35:44 +00:00
Aaron Hurst
96d10a9d8d
Post-merge fixups.
...
Make AST node constructors package-private.
Cleanup imports.
2022-10-17 03:33:07 +00:00
Edward Klimoshenko
c9cd6e3597
Fix buildMapEntry
2022-10-17 03:23:19 +00:00
Edward Klimoshenko
543a1117cd
Build sized array initializers
2022-10-17 03:23:19 +00:00
Edward Klimoshenko
3b609c5450
Build map initializers
2022-10-17 03:23:18 +00:00
Edward Klimoshenko
34d540f952
Build values initializers
2022-10-17 03:23:18 +00:00
Edward Klimoshenko
989ea03748
Build constructor initializers
...
Change-Id: I6c4bc34a85e80302da8ef4043a65b7cbec426ee1
2022-10-17 03:23:18 +00:00
Aaron Hurst
f2d0aa4a82
Cleanup import statements.
...
Change-Id: I715bc3729d7c631993cfcfb6c6f503b959ce4340
2022-10-17 03:22:29 +00:00
Aaron Hurst
f7a6fc1442
Code review feedback:
...
* Removed Kotlin compiler version in submodule pom.xml
* Package-private AST node constructors
* Constructor method naming for getImage and getCanonicalName
Change-Id: I4b2cd2ca0437c480e5fc52cf3147be7a2336f6f7
2022-10-16 17:08:33 +00:00
Andreas Dangel
df2d1b806e
[apex] ApexUnitTestClassShouldHaveRunAsRule - remove unnecessary constructor
2022-10-14 16:57:47 +02:00