Commit Graph

8045 Commits

Author SHA1 Message Date
fbb9da24f2 [java] Update Tests for JEP 459 String Templates
TemplateFragment now has an attribute "content".
2024-02-15 11:16:24 +01:00
96bc9ef6c6 [java] Update LanguageLevelChecker#RegularLanguageFeature
- after 20-preview is gone
- Note: DECONSTRUCTION_PATTERNS_IN_ENHANCED_FOR_STATEMENT is completely
  gone. This was only available for 20-preview and has been removed
  with 21.
2024-02-15 10:30:55 +01:00
c4eccf49af [java] Remove old java 20 preview features
- Record patterns in enhanced for statements
- parenthesized patterns

These features have not been standardized.
2024-02-15 10:16:31 +01:00
2a53ebaa55 [java] Remove java language version 20-preview 2024-02-15 09:50:06 +01:00
73dbd56ec4 [java] Add new java language versions 22 and 22-preview 2024-02-15 09:50:01 +01:00
9e900a2c70 [java] Enable tests in JavaCpdLexerTest 2024-02-15 07:57:20 +01:00
5931461ca9 Merge pull request #4804 from adangel:issue-4309-xpath-cleanups
[core] XPath cleanups #4804
2024-02-09 16:23:58 +01:00
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
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
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
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
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
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
0c4b4f4dcd Merge pull request #4768 from adangel:java-ast-updates
[java] Updates to AST nodes #4768
2024-01-26 15:13:40 +01:00
304ff2ec25 [core] XPathHandler/XPathFunctionDefintion: Refactoring, javadoc 2024-01-25 14:41:20 +01:00
721661c3f9 [core] XPathHandler: Avoid direct dependency on saxon, Part 2
Define new interface FunctionCall, that replaces the
saxon interface ExtensionFunctionCall.
2024-01-25 12:28:25 +01:00
b8ecc890af [core] XPathHandler: Avoid direct dependency on saxon, Part 1 2024-01-25 10:56:01 +01:00
049f2c7c59 [core] XPathRule - remove version property (#4309) 2024-01-20 17:40:02 +01:00
7c29f16eac [core] Move XPathRule into subpackage lang.rule.xpath (#4309) 2024-01-19 12:52:51 +01:00
f13cd58c7f [core] Move classes into n.s.pmd.reporting
- Report
- RuleContext
- RuleViolation
- ViolationSuppressor
- ParametricRuleViolation

Fixes #3903
2024-01-18 20:27:34 +01:00
963a9a965c [java] Verify fix for BrokenNullCheck (#718)
Closes #718
2024-01-17 17:43:15 +01:00
faaec5ed6d [core] Actually move into correct package lang.rule 2024-01-13 20:57:56 +01:00
9e668c22fc [core] Move Rule/RuleSet related type into net.sourceforge.pmd.rule
Refs #3917
2024-01-12 18:14:04 +01:00
6d955d6b9a [core] Move Rule into package net.sourceforge.pmd.rule 2024-01-12 11:04:02 +01:00
b17fe92fb5 Merge branch 'master' into java-ast-updates 2024-01-12 10:41:41 +01:00
8bd78b4b8f Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/internal/PrettyPrintingUtil.java
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2024-01-12 10:30:49 +01:00
b06d00fb40 [java] SingularField: verify #174
Closes #174
2024-01-12 09:59:17 +01:00
6163f67b06 [core] Rename Tokenizer to CpdLexer
See #4065
2024-01-11 17:04:48 +01:00
55d91791c3 [core] Rename TokenMgrError to LexException
See #4065
2024-01-11 15:56:28 +01:00
bb75ff41c3 Fix old usages of old rulesets 2024-01-11 14:43:59 +01:00
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
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
ed0cff6da9 Merge branch 'master' into java-ast-updates 2024-01-11 10:28:21 +01:00
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
b65589175c [core] Add tests for TokenMgrError location 2024-01-05 14:48:10 +01:00
070cca8743 Merge pull request #4628 from adangel:support-jrt-fs
[java] Support loading classes from java runtime images #4628
2024-01-05 13:51:40 +01:00
3a3a8784f1 [java] Remove ASTClassDeclaration#isPackagePrivate() 2023-12-14 13:57:50 +01:00
97d141d577 [core][java] Expose Chars attributes in XPath
- taken from #4352 (avoid getImage())
- Exposes @LiteralText for ASTLiteral

Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2023-12-14 13:48:21 +01:00
73fcf6e38c [core][java] Integrate improvements from #4352 (avoid getImage())
- This improves ASTLiteral implementation
- Adds ASTLiteral#getLiteralText() - not yet exposed as XPath attribute

Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2023-12-14 12:10:00 +01:00
7a0f7316b7 [java] Avoid usage of deprecated methods
- firstChild() instead of getFirstChildOfType()
- descendants() instead of findDescendantsOfType()
- ancestors() instead of getFirstParentOfType()
2023-12-14 09:40:26 +01:00
0fb4593234 [java] Avoid usage of deprecated methods
- getName() instead of getMethodName() or getVariableName()
- firstChild() instead of getFirstChildOfType()
- getRoot() instead of getFirstParentOfType(ASTCompilationUnit.class)
- children() instead of findChildrenOfType()
- no more addRuleChainVisit()
- ancestors() instead of getNthParent()
- descendants() instead of findDescendantsOfType()
2023-12-13 18:20:28 +01:00
e283f11551 [java] Avoid usage of deprecated addViolation 2023-12-13 11:49:07 +01:00
21ec4b9235 [java] Update change log in Java.jjt 2023-12-13 10:51:47 +01:00
c579576b32 [java] Rename ASTClassOrInterfaceBody to ASTClassBody 2023-12-13 10:49:13 +01:00
ba0611534d [java] Rename ASTVariableDeclaratorId to ASTVariableId 2023-12-13 10:30:39 +01:00
8198218ad7 [java] Rename ASTMethodorConstructorDeclaration to ASTExecutableDeclaration
Also rename AbstractMethodOrConstructorDeclaration to AbstractExecutableDeclaration
2023-12-13 09:48:58 +01:00
8b4caed003 [java] Rename ASTAnyTypeDeclaration to ASTTypeDeclaration
Also rename AbstractAnyTypeDeclaration to AbstractTypeDeclaration
2023-12-13 08:54:34 +01:00
e79e8402c1 [java] Rename ASTClassOrInterfaceDeclaration to ASTClassDeclaration 2023-12-12 20:09:51 +01:00
b0b47ff3c6 Remove TODO, fix javadoc 2023-12-12 16:12:19 +01:00
698ca0d3ff [java] Rename ASTClassOrInterfaceType to ASTClassType 2023-12-12 16:01:34 +01:00