1992 Commits

Author SHA1 Message Date
Andreas Dangel
ffb92231fe
Merge branch 'master' into pr-4562 2024-03-14 20:13:52 +01:00
Andreas Dangel
576c83fa83
[apex] Bump apex-link from 2.3.5 to 2.3.7 2024-03-14 18:06:14 +01:00
Andreas Dangel
0fc4dceda7
[apex] Bump summit-ast from 2.1.1 to 2.2.0 2024-03-14 18:04:46 +01:00
Andreas Dangel
89f6ca6bd7
Merge branch 'master' into issue-4828-apex-null-coalescing 2024-03-14 18:02:33 +01:00
Andreas Dangel
ec0bfd1c4c
Fix more javadoc errors
These worked with Java 21, but not with Java 11.
2024-03-08 08:53:02 +01:00
Andreas Dangel
92fd84fc38
Remove duplicated dependency of guava 2024-03-07 11:47:06 +01:00
Andreas Dangel
dffc44ecde
Merge branch 'master' into cleanup-todos 2024-03-05 18:53:49 +01:00
Andreas Dangel
b64489a515
Merge branch 'master' into issue-4830-consolidate-packages 2024-03-04 19:21:16 +01:00
Andreas Dangel
cc3da7b21e
Fix kotlin compiler warnings 2024-03-01 16:55:01 +01:00
Andreas Dangel
55a0988e19
[apex] Remove AntlrVersionCheckSuppression
This is not needed anymore with the new Summit AST
which uses the updated apex-parser

Fixes #4845
2024-03-01 14:21:43 +01:00
Andreas Dangel
51be813cd7
[apex] Support Apex 60, Null Coalescing operator
Fixes #4828
2024-03-01 13:36:42 +01:00
Andreas Dangel
a96b6016af
[apex] Verify ApexDoc with annotated classes
Fixes #4774
2024-03-01 12:47:15 +01:00
Andreas Dangel
ab0d740d81
Cleanup some TODOs 2024-03-01 12:07:48 +01:00
Andreas Dangel
53323de951
[apex] MethodNamingConventions: Remove prop skipTestMethodUnderscores
This property was deprecated since PMD 6.15.0.
2024-02-26 19:25:56 +01:00
Andreas Dangel
414c119be1
[apex] Move metrics tests into internal package 2024-02-23 17:46:29 +01:00
Andreas Dangel
845154716c
[test] Consolidate packages, move PmdRuleTst, SimpleAggregatorTst 2024-02-23 17:46:29 +01:00
Andreas Dangel
3a7460de29
[lang-test] Move classes into n.s.p.lang.test 2024-02-23 17:46:23 +01:00
Andreas Dangel
7069e6146c
Simplify kotlin compiler configuration 2024-02-23 10:50:58 +01:00
Andreas Dangel
e6c9d71f7b
[apex] Fix compile errors after merge 2024-02-22 18:45:50 +01:00
Andreas Dangel
3a7b570df0
Merge branch 'master' into experimental-apex-parser 2024-02-22 18:38:17 +01:00
Andreas Dangel
9e71e36ab1
Merge pull request #4811 from adangel:issue-4349-cleanup-deprecations
Cleanup remaining experimental and deprecated API #4811
2024-02-22 17:08:51 +01:00
Andreas Dangel
59537fb15c
Merge branch 'master' into experimental-apex-parser 2024-02-13 20:12:39 +01:00
Andreas Dangel
a4280011a3
[apex] Remove now unneeded dependency to antlr 3 2024-02-13 19:09:36 +01:00
Andreas Dangel
f12beff7c9
[apex] Decimal LiteralExpression - add TODO
Refs https://github.com/google/summit-ast/pull/47
2024-02-13 18:46:24 +01:00
Andreas Dangel
204232c238
[apex] Remove ASTBridgeMethodCreator
Update release notes/migration guide
2024-02-13 18:43:09 +01:00
Andreas Dangel
f57a072e5c
[apex] Normalize bound vars in SOQL 2024-02-13 18:42:24 +01:00
Andreas Dangel
526d9684c5
[apex] Remove namespace implementations
Fixes TODO(b/243905954)
2024-02-12 20:17:53 +01:00
Andreas Dangel
e811b9ceb3
[apex] DefiningType for ASTApexFile 2024-02-12 20:17:53 +01:00
Andreas Dangel
0a557dfcf8
[apex] AbstractApexNode - calculateTextRegion for many nodes as union 2024-02-12 20:17:53 +01:00
Andreas Dangel
e8e19a294f
[apex] Fix RealLoc of ASTModifierNode and ASTField 2024-02-12 20:17:52 +01:00
Andreas Dangel
95d0cf4733
[apex] ApexXPathRuleTest - remove old test
This was testing a deprecated XPath attribute,
but that attribute was already removed.
2024-02-12 20:17:52 +01:00
Andreas Dangel
cf67ebf4a5
[apex] ApexLexerTest - reenable and finish
Fixes TODO(b/239648780)
2024-02-12 20:17:41 +01:00
Andreas Dangel
50514b3736
[apex] ApexParser - init logging 2024-02-12 17:37:55 +01:00
Andreas Dangel
f5979b5bfb
[apex] ASTSoqlExpression - provide simple canonical query 2024-02-11 16:35:12 +01:00
Andreas Dangel
19907a74d9
[apex] Finish ASTReferenceExpression
- removed method getContext() - always returned null
  Fixes TODO(b/243906211)
- Verify that getReferenceType() returns the correct values
  Fixes TODO(b/239648780)
2024-02-10 21:01:52 +01:00
Andreas Dangel
1b4acab7c4
Merge branch 'master' into issue-4349-cleanup-deprecations 2024-02-10 12:36:58 +01:00
Andreas Dangel
bc5be45566
Merge branch 'master' into issue-4348-internal-api 2024-02-09 21:31:05 +01:00
Andreas Dangel
5931461ca9
Merge pull request #4804 from adangel:issue-4309-xpath-cleanups
[core] XPath cleanups #4804
2024-02-09 16:23:58 +01:00
Andreas Dangel
6a328d6cd0
Merge pull request #4803 from adangel:issue-3903-reporting-package
[core] Consolidate n.s.pmd.reporting package #4803
2024-02-09 15:32:55 +01:00
Andreas Dangel
2a3128fb86
Merge pull request #4799 from adangel:issue-3917-rule-package
[core] Consolidate n.s.pmd.lang.rule package #4799
2024-02-09 14:39:03 +01:00
Andreas Dangel
ef165acebe
[apex] ApexNode - fix javadoc 2024-02-09 12:16:52 +01:00
Andreas Dangel
e0eb36b195
[apex] FieldDeclarationsShouldBeAtStartRule - remove STATIC_INITIALIZER_METHOD_NAME 2024-02-09 12:16:38 +01:00
Andreas Dangel
f6bf245914
[apex] AbstractApexNode - hide literalToString and caseNormalizedTypeIfPrimitive
These are helper methods to be used only inside the ast package.
2024-02-09 12:10:17 +01:00
Andreas Dangel
31a79ef671
[apex] Remove TestQueryValidators - was only needed for Jorje 2024-02-09 12:03:16 +01:00
Andreas Dangel
b9f2ca7432
[apex] ASTMethod - remove #isSynthetic
- keep CONSTRUCTOR_ID and STATIC_INIT_ID private
- update migration documentation
2024-02-09 12:02:35 +01:00
Andreas Dangel
bf008596bf
[apex] ASTLiteralExpression - add workaround for decimal 2024-02-09 11:11:28 +01:00
Andreas Dangel
5964add71f
[apex] ASTFieldDeclarationStatements - clarify #getTypeArguments
Also simplify ApexCRUDViolationRule

Fixes TODO(b/239648780)
2024-02-09 10:49:00 +01:00
Andreas Dangel
6c4f3efbc7
[apex] ASTBlockStatement - verify curlyBrace 2024-02-09 09:50:24 +01:00
Andreas Dangel
17848c484d
Merge branch 'master' into experimental-apex-parser 2024-02-09 09:29:16 +01:00
Andreas Dangel
0d40878b0a
Promote experimental APIs as stable
- HTML support and Kotlin support no more experimental
- The only left over experimental APIs are java preview features
2024-02-09 08:46:48 +01:00
Andreas Dangel
5599a8fd65
Merge branch 'master' into issue-4349-cleanup-deprecations 2024-02-08 18:23:41 +01:00
Andreas Dangel
3ec38df9b0
[core] Remove deprecated XPathVersions 2024-02-06 21:33:08 +01:00
Andreas Dangel
fa97cff7ff
Merge pull request #4797 from adangel:lexexception-cpdlexer
[core] Rename TokenMgrError to LexException, Tokenizer to CpdLexer #4797
2024-02-02 19:59:41 +01:00
Andreas Dangel
a78e17b7a6
Merge pull request #4796 from adangel:remove-deprecated-and-release-rulesets
Remove deprecated and release rulesets #4796
2024-02-02 19:57:04 +01:00
Andreas Dangel
a76ec3410c
Merge pull request #4795 from adangel:remove-ruleset-factory-compatibility
[core] Remove ruleset compatibility filter (RuleSetFactoryCompatibility) and CLI option --no-ruleset-compatibility #4795
2024-02-02 19:53:51 +01:00
Andreas Dangel
c8686a0dff
Merge pull request #4792 from adangel:undeprecate-node-getImage
[core] Undeprecate Node::getImage() in PMD 7 #4792
2024-02-02 19:49:26 +01:00
Andreas Dangel
8111d450c2
[core] Remove deprecated classes/methods
Node#getParentsOfType
Node#findChildrenOfType
Node#findDescendantsOfType
Node#getFirstChildOfType
Node#getFirstDescendantOfType
Node#hasDescendantOfType
2024-02-02 15:57:34 +01:00
Andreas Dangel
7494260ffc
[apex] Remove deprecated classes/methods 2024-02-02 12:34:50 +01:00
Andreas Dangel
c22448eae6
Removed references to removed rules 2024-02-01 17:35:40 +01:00
Andreas Dangel
69a58987a5
[apex] Remove deprecated rules 2024-02-01 16:27:47 +01:00
Andreas Dangel
fae522a002
[core] Unify javadoc for InternalApiBridge classes
Refs #4348
2024-02-01 12:09:12 +01:00
Andreas Dangel
7ec2bc4865
[apex] Cleanup InternalApi methods
Refs #4348
2024-01-30 20:17:59 +01:00
Andreas Dangel
3290815fff
Merge branch 'master' into experimental-apex-parser 2024-01-26 17:49:50 +01:00
Andreas Dangel
049f2c7c59
[core] XPathRule - remove version property (#4309) 2024-01-20 17:40:02 +01:00
Andreas Dangel
7c29f16eac
[core] Move XPathRule into subpackage lang.rule.xpath (#4309) 2024-01-19 12:52:51 +01:00
Andreas Dangel
f13cd58c7f
[core] Move classes into n.s.pmd.reporting
- Report
- RuleContext
- RuleViolation
- ViolationSuppressor
- ParametricRuleViolation

Fixes #3903
2024-01-18 20:27:34 +01:00
Andreas Dangel
faaec5ed6d
[core] Actually move into correct package lang.rule 2024-01-13 20:57:56 +01:00
Andreas Dangel
9e668c22fc
[core] Move Rule/RuleSet related type into net.sourceforge.pmd.rule
Refs #3917
2024-01-12 18:14:04 +01:00
Andreas Dangel
6d955d6b9a
[core] Move Rule into package net.sourceforge.pmd.rule 2024-01-12 11:04:02 +01:00
Andreas Dangel
6163f67b06
[core] Rename Tokenizer to CpdLexer
See #4065
2024-01-11 17:04:48 +01:00
Andreas Dangel
9977c0ffeb
Remove old rulesets
These were from PMD 5. In PMD 6, these rules
have been moved into categories.
2024-01-11 12:28:30 +01:00
Andreas Dangel
ba602d1978
[core] Remove ruleset compatibility filter (RuleSetFactoryCompatibility) and CLI option --no-ruleset-compatibility
Fixes #4314
Closes #4378
2024-01-11 12:05:10 +01:00
Andreas Dangel
60eca92180
[core] Undeprecate Node::getImage() in PMD 7
This should be done for 7.x again - see #4787
2024-01-11 09:47:10 +01:00
Andreas Dangel
4595ec11ab
Merge branch 'experimental-apex-parser' into issue-4722-apex-fixes 2024-01-05 15:44:36 +01:00
Andreas Dangel
f9541beb85
Merge branch 'master' into experimental-apex-parser 2024-01-05 15:43:48 +01:00
Andreas Dangel
13673d43fd
[apex] Use summit-ast 2.1.1 2024-01-05 15:43:26 +01:00
Andreas Dangel
4e02a21e3a
[apex] Fix deprecated API usage 2023-12-15 20:23:01 +01:00
Andreas Dangel
49e6777fff
[apex] Remove deprecated rule ref to ApexCSRF
This rule has been moved from security to errorprone
since PMD 6.21.0 already
2023-12-07 19:15:34 +01:00
Andreas Dangel
5d72bd8deb
Merge branch 'master' into experimental-apex-parser 2023-11-10 11:55:18 +01:00
Andreas Dangel
bd28fbea5e
Merge branch 'master' into issue-4722-apex-fixes 2023-11-09 11:56:45 +01:00
Andreas Dangel
195d56d8d0
[apex] Verify qualified names for method arguments with generics
Note: previously, there was no space between type params, now there is.

Refs #4722
2023-11-09 11:51:13 +01:00
Andreas Dangel
31a1b86769
[apex] Fix formal comment handling for Fields
Note: Apex Jorje variant didn't consider comments for fields at all.

Refs #4722
2023-11-09 10:42:46 +01:00
Andreas Dangel
e33fe924e9
[apex] Fix ApexDoc for interface methods
Interface methods are implicit public and abstract

Refs #4722
2023-11-09 09:38:21 +01:00
Andreas Dangel
83e6377752
[apex] Fix FieldNamingConventions reporting wrong lines
Using now FieldDeclarations instead of Fields for report location.

Refs #4722
2023-11-09 09:15:32 +01:00
Andreas Dangel
d586a3d23e
[apex] Fix FieldDeclarationsShouldBeAtStartRule reporting wrong lines
Using now FieldDeclarations instead of Fields for report location.

Refs #4722
2023-11-07 20:05:30 +01:00
Andreas Dangel
3428baec4f
[apex] AvoidDeeplyNestedIfStmts - add test
now the reported violations are correct: each if block is reported.
With Apex Jorje, the line numbers of the second if block were wrong and
two violations on the same line were
reported.
2023-11-07 19:52:44 +01:00
Andreas Dangel
cd6712598e
[apex] Fix EmptyStatementBlock false positive with empty catch
For empty catch blocks, there is the separate rule EmptyCatchBlock.
EmptyStatementBlock shouldn't report these.

Refs #4722
2023-11-07 19:33:04 +01:00
Andreas Dangel
4574cb251c
[apex] Fix AvoidNonExistentAnnotationsRule for enum values 2023-11-05 21:42:29 +01:00
Andreas Dangel
cf51fa2c45
[apex] Fix AntlrVersionCheckSuppression
This must not be called in multiple threads as we otherwise stop logging
to System.err.
2023-11-05 19:28:23 +01:00
Andreas Dangel
5f5c63bab9
[apex] OperationWithHighCostInLoop: add test for SObjectDescribeOptions 2023-10-28 12:25:27 +02:00
Andreas Dangel
8b4f677774
Merge branch 'master' into pr-4677 2023-10-28 12:10:35 +02:00
Andreas Dangel
c7cc050983
[apex] OperationWithHighCostInLoop - support System.Schema... as well
And improve test cases
2023-10-28 12:07:23 +02:00
Andreas Dangel
95609960ac
[apex] OperationWithHighCostInLoop - improve rule doc 2023-10-28 11:52:59 +02:00
Andreas Dangel
6d240b2a75
[apex] performance.xml - sort rules alphabetically 2023-10-28 11:24:56 +02:00
Juan Martín Sotuyo Dodero
8e3d60a772
Merge branch 'master' into remove-apexversion 2023-10-19 21:34:35 -03:00
Andreas Dangel
b811d3097e
Merge branch 'master' into update-experimental-apex-parser 2023-10-19 11:07:21 +02:00
Andreas Dangel
0c53b69e82
Merge pull request #4586 from adangel:ruleset-xml
Use explicit encoding in ruleset xml files #4586
2023-10-19 09:41:57 +02:00
Thomas Prouvot
f4c3fc02a8
Update pmd-apex/src/main/resources/category/apex/performance.xml
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2023-10-18 15:42:09 +02:00
Thomas Prouvot
f0f05c6e2c
Update pmd-apex/src/main/resources/category/apex/performance.xml
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2023-10-18 15:41:38 +02:00
Andreas Dangel
8528a8ed7d
Merge branch 'master' into experimental-apex-parser 2023-10-02 19:40:59 +02:00
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