15687 Commits

Author SHA1 Message Date
817c3d1127 CPD: Remove deprecations in Mark / TokenEntry
* Provide these values for more languages
2020-01-17 14:47:23 +01:00
25ceeb91bb Removed redundant code from constructor call. 2020-01-16 17:20:34 +01:00
cd0bdc8050 Merge branch 'xml_column_information' of https://github.com/tiobe/pmd into xml_column_information 2020-01-16 17:19:51 +01:00
87c1602ab0 Apply suggestions from code review
Co-Authored-By: Andreas Dangel <andreas.dangel@adangel.org>
2020-01-16 17:18:14 +01:00
e2ba92bdca Added CPD column information for Antlr-based languages.
This includes Dart, Go, Kotlin, Lua and Swift.
2020-01-15 15:47:33 +01:00
3b5777f3c6 Added CPD column information for JavaCC-based languages.
This includes C++, EcmaScript (JavaScript), Matlab, Modelica, Objective-C, PL/SQL and Python.
2020-01-15 15:44:16 +01:00
8ed19b5da6 Added CPD column information for Java. 2020-01-15 15:43:56 +01:00
96943852b5 Adjusted XML renderer to include more information about the location of each duplication.
This includes the end line of each token as well as the column positions for the begin and end of the duplication. Note that the latter two are optional and may not be reported for all languages.
2020-01-15 15:32:46 +01:00
f79941e174 Added column information to CPD internals.
Duplications are registered in CPD by storing a Mark. This Mark contains a TokenEntry for where the duplication starts, as well as a line count and the source code that is duplicated.

This change adds a beginColumn and endColumn field to each TokenEntry. These are optional fields that can be left empty. Storing these allows us to pinpoint the column position of each token.

In addition, an additional TokenEntry is added to the Mark to indicate where the duplication ends. This can then be used to determine the location of the entire duplication; it starts where the first token starts and ends where the last token ends.
2020-01-15 15:27:01 +01:00
99fdede0aa Merge branch 'issue-2212' 2020-01-12 23:28:33 +01:00
904fb14e8b Use interface instead of AbstractAnyTypeDeclaration 2020-01-12 23:27:24 +01:00
f7bd2d54b3 Add kotlin test sources to build-helper-mvn-plugin
Intellij doesn't pick up on the sources
correctly and classifies them as resources otherwise
2020-01-11 20:33:58 +01:00
bc92fa4590 [java] JavaRuleViolation reports wrong class name
Fixes #2212
2020-01-11 12:51:21 +01:00
271efff289 [plsql] Use token::getImage instead of token::toString in grammar
If we change token.toString to be more descriptive
(eg display kind), the parser breaks. This prepares
changes for 7.0
2020-01-10 18:13:17 +01:00
5f44a5fc54 [apex] Use base parser class for apex
Refs #2177, #1937
2020-01-10 17:13:19 +01:00
398b683565 Merge branch 'pr-2177'
[lang-test] Factorize parsing logic for tests
2020-01-10 14:07:29 +01:00
c53d9508e9 Small changes from code review
* rename BaseParserHelper
* Not using org.jetbrains.annotations.NotNull
2020-01-10 12:18:43 +01:00
4269fd1b73 Refactor tests for javascript, jsp, plsql, scala, visualforce, xml
using BaseParsingHelper

Revert "REVERT ME Remove some diff"

This reverts commit f72810088d2c7f3c29fbde185b25cfc72fc1fbcc.
2020-01-10 12:12:34 +01:00
63221805a3 Merge branch 'pr-2195'
[modelica] Normalize invalid node ranges
2020-01-06 18:42:14 +01:00
728632840a [doc] Update release notes, refs #2195 2020-01-06 18:41:41 +01:00
14bd07f260 Merge branch 'pr-2199'
[modelica] Fix Javadoc tags
2020-01-06 18:33:22 +01:00
d3a0c21506 [doc] Update release notes, refs #2199 2020-01-06 18:33:15 +01:00
9c7b0d9385 [modelica] Fix Javadoc tags 2020-01-06 17:46:58 +03:00
af537034a9 Use getters for tokens in javacc grammars 2020-01-06 15:01:18 +01:00
394de28a0d Set image 2020-01-05 19:32:09 +01:00
a0d0a22e7b Merge branch 'pr-2190'
[java] Deprecations for statements PR

Prerequisite for #2164 for PMD 7.0.0
2020-01-05 19:30:52 +01:00
6f61522971 Test 2020-01-05 19:22:17 +01:00
1d82918efa Merge branch 'pr-2184'
[plsql] Fix DDLCommands parsing
2020-01-05 19:20:29 +01:00
5c19e20294 Merge branch 'pr-2183'
[plsql] Fix StringLiteral token
2020-01-05 19:19:27 +01:00
f973ad6ef3 Merge branch 'pr-2185'
[core] Internalize API that exposes ResourceLoader
2020-01-05 19:18:18 +01:00
8e30425dfa [doc] Update release notes, fixes #2161 2020-01-05 19:18:10 +01:00
e9dbe0233f Use implicit zero-length token in modelica 2020-01-05 19:06:32 +01:00
4cf6291ecb Fix pmd 2020-01-05 18:20:26 +01:00
a51726f48f Merge branch 'pr-2194' 2020-01-04 04:39:40 -03:00
d614e7ab17 Update changelog, refs #2194 2020-01-04 04:38:59 -03:00
caaa5eba9a Fix issue with analysis of IPv6 mapper IPv4 2020-01-04 04:37:13 -03:00
a29d63e267 Merge branch 'pr-2193' 2020-01-04 04:34:00 -03:00
07de89f516 Update changelog, refs #2193 2020-01-04 04:33:40 -03:00
4f3db86a70 [modelica] Normalize invalid node ranges
Some files were parsed into ASTs with nodes having negative ranges.
For example:

package TestPackage
  package EmptyPackage
  end EmptyPackage;
end TestPackage;

has subtree:

  SimpleLongClassSpecifier "EmptyPackage"
    SimpleName "EmptyPackage"
    Composition
      ElementList <-- start = 3:3, end = 2:22
    SimpleName "EmptyPackage"
2020-01-03 14:29:38 +03:00
3b8d694be3 Fix odd logic in AvoidUsingHardCodedIPRule 2019-12-29 22:00:13 +03:00
9efe803685 Fix odd logic in test runner 2019-12-29 21:52:48 +03:00
f33291e372 Deprecate ASTYieldStatement implementing TypeNode 2019-12-26 18:53:22 +01:00
0a0bb6e4bb Rename getGuardExpressionNode -> getCondition 2019-12-26 18:47:28 +01:00
41baa353b0 Deprecate API of TryStatement that will be renamed 2019-12-26 18:40:24 +01:00
1b9b94a794 Update release notes 2019-12-26 14:33:44 +01:00
3f5ad7cfbe Deprecate rule factory 2019-12-26 14:30:08 +01:00
05870c98cc Deprecate RulesetFactory constructors 2019-12-24 14:39:20 +01:00
3712b17e77 Internalize API that exposes ResourceLoader 2019-12-24 14:19:24 +01:00
dcb6239725 Fix build under windows 2019-12-24 14:13:27 +01:00
1c7e8fb2ab Fix build under windows 2019-12-24 11:47:41 +01:00