forked from phoedos/pmd
Merge branch 'master' into pmd/7.0.x
This commit is contained in:
@ -987,7 +987,8 @@
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/12729644?v=4",
|
||||
"profile": "https://github.com/Clint-Chester",
|
||||
"contributions": [
|
||||
"code", "bug"
|
||||
"code",
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -6427,8 +6428,18 @@
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "kevingnet",
|
||||
"name": "Kevin Guerra",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/5151740?v=4",
|
||||
"profile": "https://github.com/kevingnet",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
"contributorsSortAlphabetically": true
|
||||
"contributorsSortAlphabetically": true,
|
||||
"skipCi": true
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ repository: pmd/pmd
|
||||
|
||||
pmd:
|
||||
version: 7.0.0-SNAPSHOT
|
||||
previous_version: 6.38.0
|
||||
previous_version: 6.39.0
|
||||
date: ??-?????-2021
|
||||
release_type: major
|
||||
|
||||
|
@ -246,6 +246,10 @@ the breaking API changes will be performed in 7.0.0.
|
||||
an API is tagged as `@Deprecated` or not in the latest minor release. During the development of 7.0.0,
|
||||
we may decide to remove some APIs that were not tagged as deprecated, though we'll try to avoid it." %}
|
||||
|
||||
#### 6.39.0
|
||||
|
||||
No changes.
|
||||
|
||||
#### 6.38.0
|
||||
|
||||
No changes.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,22 +19,8 @@ This is a {{ site.pmd.release_type }} release.
|
||||
|
||||
### New and noteworthy
|
||||
|
||||
#### All Contributors
|
||||
|
||||
PMD follows the [All Contributors](https://allcontributors.org/) specification.
|
||||
Contributions of any kind welcome!
|
||||
|
||||
See [credits](https://pmd.github.io/latest/pmd_projectdocs_credits.html) for our complete contributors list.
|
||||
|
||||
### Fixed Issues
|
||||
|
||||
* core
|
||||
* [#3499](https://github.com/pmd/pmd/pull/3499): \[core] Fix XPath rulechain with combined node tests
|
||||
* java-errorprone
|
||||
* [#3493](https://github.com/pmd/pmd/pull/3493): \[java] AvoidAccessibilityAlteration: add tests and fix rule
|
||||
* plsql
|
||||
* [#3487](https://github.com/pmd/pmd/issues/3487): \[plsql] Parsing exception OPEN ref_cursor_name FOR statement
|
||||
|
||||
### API Changes
|
||||
|
||||
### External Contributions
|
||||
|
@ -5,6 +5,55 @@ permalink: pmd_release_notes_old.html
|
||||
|
||||
Previous versions of PMD can be downloaded here: https://github.com/pmd/pmd/releases
|
||||
|
||||
## 25-September-2021 - 6.39.0
|
||||
|
||||
The PMD team is pleased to announce PMD 6.39.0.
|
||||
|
||||
This is a minor release.
|
||||
|
||||
### Table Of Contents
|
||||
|
||||
* [New and noteworthy](#new-and-noteworthy)
|
||||
* [All Contributors](#all-contributors)
|
||||
* [Fixed Issues](#fixed-issues)
|
||||
* [API Changes](#api-changes)
|
||||
* [External Contributions](#external-contributions)
|
||||
* [Stats](#stats)
|
||||
|
||||
### New and noteworthy
|
||||
|
||||
#### All Contributors
|
||||
|
||||
PMD follows the [All Contributors](https://allcontributors.org/) specification.
|
||||
Contributions of any kind welcome!
|
||||
|
||||
See [credits](https://pmd.github.io/latest/pmd_projectdocs_credits.html) for our complete contributors list.
|
||||
|
||||
### Fixed Issues
|
||||
|
||||
* core
|
||||
* [#3499](https://github.com/pmd/pmd/pull/3499): \[core] Fix XPath rulechain with combined node tests
|
||||
* java-errorprone
|
||||
* [#3493](https://github.com/pmd/pmd/pull/3493): \[java] AvoidAccessibilityAlteration: add tests and fix rule
|
||||
* javascript
|
||||
* [#3516](https://github.com/pmd/pmd/pull/3516): \[javascript] NPE while creating rule violation when specifying explicit line numbers
|
||||
* plsql
|
||||
* [#3487](https://github.com/pmd/pmd/issues/3487): \[plsql] Parsing exception OPEN ref_cursor_name FOR statement
|
||||
* [#3515](https://github.com/pmd/pmd/issues/3515): \[plsql] Parsing exception SELECT...INTO on Associative Arrays Types
|
||||
|
||||
### API Changes
|
||||
|
||||
No changes.
|
||||
|
||||
### External Contributions
|
||||
|
||||
* [#3516](https://github.com/pmd/pmd/pull/3516): \[javascript] NPE while creating rule violation when specifying explicit line numbers - [Kevin Guerra](https://github.com/kevingnet)
|
||||
|
||||
### Stats
|
||||
* 37 commits
|
||||
* 10 closed tickets & PRs
|
||||
* Days since last release: 27
|
||||
|
||||
## 28-August-2021 - 6.38.0
|
||||
|
||||
The PMD team is pleased to announce PMD 6.38.0.
|
||||
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.ecmascript;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import net.sourceforge.pmd.Rule;
|
||||
import net.sourceforge.pmd.RuleContext;
|
||||
import net.sourceforge.pmd.RuleViolation;
|
||||
import net.sourceforge.pmd.lang.LanguageRegistry;
|
||||
import net.sourceforge.pmd.lang.LanguageVersion;
|
||||
import net.sourceforge.pmd.lang.LanguageVersionHandler;
|
||||
import net.sourceforge.pmd.lang.ecmascript.ast.ASTAstRoot;
|
||||
import net.sourceforge.pmd.lang.ecmascript.ast.JsParsingHelper;
|
||||
import net.sourceforge.pmd.lang.ecmascript.rule.AbstractEcmascriptRule;
|
||||
import net.sourceforge.pmd.lang.rule.RuleViolationFactory;
|
||||
|
||||
public class EcmasccriptLanguageModuleTest {
|
||||
private Rule rule = new AbstractEcmascriptRule() { };
|
||||
private ASTAstRoot node = JsParsingHelper.DEFAULT.parse("function a() {}");
|
||||
private LanguageVersion js = LanguageRegistry.getLanguage(EcmascriptLanguageModule.NAME).getDefaultVersion();
|
||||
private LanguageVersionHandler languageVersionHandler = js.getLanguageVersionHandler();
|
||||
private RuleViolationFactory ruleViolationFactory = languageVersionHandler.getRuleViolationFactory();
|
||||
|
||||
@Test
|
||||
public void canCreateRuleViolation() {
|
||||
RuleContext context = new RuleContext();
|
||||
ruleViolationFactory.addViolation(context, rule, node, "the message", new Object[0]);
|
||||
Assert.assertEquals(1, context.getReport().getViolations().size());
|
||||
RuleViolation ruleViolation = context.getReport().getViolations().get(0);
|
||||
Assert.assertEquals(1, ruleViolation.getBeginLine());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canCreateRuleViolationWithLineNumbers() {
|
||||
RuleContext context = new RuleContext();
|
||||
ruleViolationFactory.addViolation(context, rule, node, "the message", 5, 7, new Object[0]);
|
||||
Assert.assertEquals(1, context.getReport().getViolations().size());
|
||||
RuleViolation ruleViolation = context.getReport().getViolations().get(0);
|
||||
Assert.assertEquals(5, ruleViolation.getBeginLine());
|
||||
Assert.assertEquals(7, ruleViolation.getEndLine());
|
||||
}
|
||||
}
|
@ -2000,10 +2000,13 @@ ASTIntoClause IntoClause() :
|
||||
{ return jjtThis; }
|
||||
}
|
||||
|
||||
// This might also be a associative array dereference...
|
||||
// see https://github.com/pmd/pmd/issues/3515
|
||||
ASTVariableName VariableName() :
|
||||
{ ASTID id; StringBuilder name = new StringBuilder(); }
|
||||
{ ASTID id; ASTLiteral lit; StringBuilder name = new StringBuilder(); }
|
||||
{
|
||||
id = ID() { name.append(id.getImage()); }
|
||||
[ "(" lit = Literal() ")" { name.append('(').append(lit.getImage()).append(')'); } ]
|
||||
[ "." id = ID() { name.append('.').append(id.getImage()); } ]
|
||||
[ "." id = ID() { name.append('.').append(id.getImage()); } ]
|
||||
{
|
||||
|
@ -36,4 +36,9 @@ public class PlsqlTreeDumpTest extends BaseTreeDumpTest {
|
||||
public void parseOpenForStatement() {
|
||||
doTest("OpenForStatement");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parseSelectIntoAssociativeArrayType() {
|
||||
doTest("SelectIntoArray");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
--
|
||||
-- See https://github.com/pmd/pmd/issues/3515
|
||||
--
|
||||
|
||||
CREATE OR REPLACE PROCEDURE EXAMPLE_PROCEDURE IS
|
||||
--
|
||||
TYPE example_data_rt IS RECORD(
|
||||
field_one PLS_INTEGER,
|
||||
field_two PLS_INTEGER,
|
||||
field_three PLS_INTEGER);
|
||||
--
|
||||
TYPE example_data_aat IS TABLE OF example_data_rt INDEX BY BINARY_INTEGER;
|
||||
--
|
||||
l_example_data example_data_aat;
|
||||
--
|
||||
BEGIN
|
||||
--
|
||||
SELECT 1 field_value_one, 2 field_value_two, 3 field_value_three
|
||||
INTO l_example_data(1).field_one,l_example_data(1).field_two,l_example_data(1).field_three
|
||||
FROM DUAL;
|
||||
--
|
||||
END EXAMPLE_PROCEDURE;
|
@ -0,0 +1,103 @@
|
||||
+- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0, @Sourcecode = "--
|
||||
-- See https://github.com/pmd/pmd/issues/3515
|
||||
--
|
||||
|
||||
CREATE OR REPLACE PROCEDURE EXAMPLE_PROCEDURE IS
|
||||
--
|
||||
TYPE example_data_rt IS RECORD(
|
||||
field_one PLS_INTEGER,
|
||||
field_two PLS_INTEGER,
|
||||
field_three PLS_INTEGER);
|
||||
--
|
||||
TYPE example_data_aat IS TABLE OF example_data_rt INDEX BY BINARY_INTEGER;
|
||||
--
|
||||
l_example_data example_data_aat;
|
||||
--
|
||||
BEGIN
|
||||
--
|
||||
SELECT 1 field_value_one, 2 field_value_two, 3 field_value_three
|
||||
INTO l_example_data(1).field_one,l_example_data(1).field_two,l_example_data(1).field_three
|
||||
FROM DUAL;
|
||||
--
|
||||
END EXAMPLE_PROCEDURE;
|
||||
"]
|
||||
+- Global[@CanonicalImage = null]
|
||||
+- ProgramUnit[@CanonicalImage = null, @MethodName = "EXAMPLE_PROCEDURE", @Name = "EXAMPLE_PROCEDURE", @ObjectName = null]
|
||||
+- MethodDeclarator[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE", @ParameterCount = 1]
|
||||
| +- ObjectNameDeclaration[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"]
|
||||
| +- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"]
|
||||
+- DeclarativeSection[@CanonicalImage = null]
|
||||
| +- DeclarativeUnit[@CanonicalImage = null]
|
||||
| | +- SubTypeDefinition[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt"]
|
||||
| | +- QualifiedID[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt"]
|
||||
| | +- FieldDeclaration[@CanonicalImage = "FIELD_ONE", @Image = "field_one"]
|
||||
| | | +- ID[@CanonicalImage = "FIELD_ONE", @Image = "field_one"]
|
||||
| | | +- Datatype[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER", @TypeImage = "PLS_INTEGER"]
|
||||
| | | +- ScalarDataTypeName[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER"]
|
||||
| | +- FieldDeclaration[@CanonicalImage = "FIELD_TWO", @Image = "field_two"]
|
||||
| | | +- ID[@CanonicalImage = "FIELD_TWO", @Image = "field_two"]
|
||||
| | | +- Datatype[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER", @TypeImage = "PLS_INTEGER"]
|
||||
| | | +- ScalarDataTypeName[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER"]
|
||||
| | +- FieldDeclaration[@CanonicalImage = "FIELD_THREE", @Image = "field_three"]
|
||||
| | +- ID[@CanonicalImage = "FIELD_THREE", @Image = "field_three"]
|
||||
| | +- Datatype[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER", @TypeImage = "PLS_INTEGER"]
|
||||
| | +- ScalarDataTypeName[@CanonicalImage = "PLS_INTEGER", @Image = "PLS_INTEGER"]
|
||||
| +- DeclarativeUnit[@CanonicalImage = null]
|
||||
| | +- SubTypeDefinition[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat"]
|
||||
| | +- QualifiedID[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat"]
|
||||
| | +- Datatype[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt", @TypeImage = "example_data_rt"]
|
||||
| | | +- QualifiedName[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt"]
|
||||
| | | +- UnqualifiedID[@CanonicalImage = "EXAMPLE_DATA_RT", @Image = "example_data_rt"]
|
||||
| | +- Datatype[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER", @TypeImage = "BINARY_INTEGER"]
|
||||
| | +- ScalarDataTypeName[@CanonicalImage = "BINARY_INTEGER", @Image = "BINARY_INTEGER"]
|
||||
| +- DeclarativeUnit[@CanonicalImage = null]
|
||||
| +- VariableOrConstantDeclaration[@CanonicalImage = null]
|
||||
| +- VariableOrConstantDeclarator[@CanonicalImage = "L_EXAMPLE_DATA EXAMPLE_DATA_AAT", @Image = "l_example_data example_data_aat"]
|
||||
| +- VariableOrConstantDeclaratorId[@Array = false, @ArrayDepth = 0, @CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"]
|
||||
| | +- ID[@CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"]
|
||||
| +- Datatype[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat", @TypeImage = "example_data_aat"]
|
||||
| +- QualifiedName[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat"]
|
||||
| +- UnqualifiedID[@CanonicalImage = "EXAMPLE_DATA_AAT", @Image = "example_data_aat"]
|
||||
+- Statement[@CanonicalImage = null]
|
||||
| +- UnlabelledStatement[@CanonicalImage = null]
|
||||
| +- SelectIntoStatement[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false]
|
||||
| +- SelectList[@CanonicalImage = null]
|
||||
| | +- SqlExpression[@CanonicalImage = "1", @Image = "1"]
|
||||
| | | +- PrimaryPrefix[@CanonicalImage = "1", @Image = "1", @SelfModifier = false]
|
||||
| | | +- Literal[@CanonicalImage = "1", @Image = "1"]
|
||||
| | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"]
|
||||
| | +- ColumnAlias[@CanonicalImage = "FIELD_VALUE_ONE", @Image = "field_value_one"]
|
||||
| | | +- ID[@CanonicalImage = "FIELD_VALUE_ONE", @Image = "field_value_one"]
|
||||
| | +- SqlExpression[@CanonicalImage = "2", @Image = "2"]
|
||||
| | | +- PrimaryPrefix[@CanonicalImage = "2", @Image = "2", @SelfModifier = false]
|
||||
| | | +- Literal[@CanonicalImage = "2", @Image = "2"]
|
||||
| | | +- NumericLiteral[@CanonicalImage = "2", @Image = "2"]
|
||||
| | +- ColumnAlias[@CanonicalImage = "FIELD_VALUE_TWO", @Image = "field_value_two"]
|
||||
| | | +- ID[@CanonicalImage = "FIELD_VALUE_TWO", @Image = "field_value_two"]
|
||||
| | +- SqlExpression[@CanonicalImage = "3", @Image = "3"]
|
||||
| | | +- PrimaryPrefix[@CanonicalImage = "3", @Image = "3", @SelfModifier = false]
|
||||
| | | +- Literal[@CanonicalImage = "3", @Image = "3"]
|
||||
| | | +- NumericLiteral[@CanonicalImage = "3", @Image = "3"]
|
||||
| | +- ColumnAlias[@CanonicalImage = "FIELD_VALUE_THREE", @Image = "field_value_three"]
|
||||
| | +- ID[@CanonicalImage = "FIELD_VALUE_THREE", @Image = "field_value_three"]
|
||||
| +- IntoClause[@CanonicalImage = null]
|
||||
| | +- VariableName[@CanonicalImage = "L_EXAMPLE_DATA(1).FIELD_ONE", @Image = "l_example_data(1).field_one"]
|
||||
| | | +- ID[@CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"]
|
||||
| | | +- Literal[@CanonicalImage = "1", @Image = "1"]
|
||||
| | | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"]
|
||||
| | | +- ID[@CanonicalImage = "FIELD_ONE", @Image = "field_one"]
|
||||
| | +- VariableName[@CanonicalImage = "L_EXAMPLE_DATA(1).FIELD_TWO", @Image = "l_example_data(1).field_two"]
|
||||
| | | +- ID[@CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"]
|
||||
| | | +- Literal[@CanonicalImage = "1", @Image = "1"]
|
||||
| | | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"]
|
||||
| | | +- ID[@CanonicalImage = "FIELD_TWO", @Image = "field_two"]
|
||||
| | +- VariableName[@CanonicalImage = "L_EXAMPLE_DATA(1).FIELD_THREE", @Image = "l_example_data(1).field_three"]
|
||||
| | +- ID[@CanonicalImage = "L_EXAMPLE_DATA", @Image = "l_example_data"]
|
||||
| | +- Literal[@CanonicalImage = "1", @Image = "1"]
|
||||
| | | +- NumericLiteral[@CanonicalImage = "1", @Image = "1"]
|
||||
| | +- ID[@CanonicalImage = "FIELD_THREE", @Image = "field_three"]
|
||||
| +- FromClause[@CanonicalImage = null]
|
||||
| +- TableReference[@CanonicalImage = null]
|
||||
| +- TableName[@CanonicalImage = "DUAL", @Image = "DUAL"]
|
||||
| +- ID[@CanonicalImage = "DUAL", @Image = "DUAL"]
|
||||
+- ID[@CanonicalImage = "EXAMPLE_PROCEDURE", @Image = "EXAMPLE_PROCEDURE"]
|
Reference in New Issue
Block a user