233 Commits

Author SHA1 Message Date
Andreas Dangel
2a73c2b312
Refactor OverrideBothEqualsAndHashcode 2022-03-04 20:06:21 +01:00
Andreas Dangel
db627b4535
AbstractKotlinRule should use KotlinVisitor 2022-03-04 19:50:21 +01:00
Andreas Dangel
01d24b8ac9
Add new rule OverrideBothEqualsAndHashcode 2022-03-04 19:49:05 +01:00
Andreas Dangel
3969215635
Update ruleset, add ruleset factory test
Using pmd.website.baseurl parameter
2022-03-03 21:09:49 +01:00
Andreas Dangel
0a6e4abc75
Fix root-node-name 2022-03-03 20:58:46 +01:00
Andreas Dangel
c0150e4698
Remove unnecessary rulesets.properties 2022-03-03 20:46:58 +01:00
Andreas Dangel
4566ed4f16
Update Kotlin Grammar to 1.6-rfc+0.1
Keep the grammar as original as possible
2022-03-03 20:46:06 +01:00
Andreas Dangel
22bc2f0463
KotlinLexer doesn't need to be executable 2022-03-03 20:22:42 +01:00
Andreas Dangel
69fb502883
[maven-release-plugin] prepare for next development iteration 2022-02-26 10:01:08 +01:00
Andreas Dangel
dd0ee6190b
[maven-release-plugin] prepare release pmd_releases/6.43.0 2022-02-26 10:01:03 +01:00
Andreas Dangel
d826c3574e
Revert "set version to 7.0.0-kotlin-SNAPSHOT to avoid mixups in 7.0.0-SNAPSHOT in sonatype snapshots repo"
This reverts commit 051da73ce3f63277195e83c88fbe687d08b157d1.
2022-02-25 15:16:35 +01:00
Andreas Dangel
dc19597020
[maven-release-plugin] prepare for next development iteration 2022-01-29 09:53:38 +01:00
Andreas Dangel
391c32589f
[maven-release-plugin] prepare release pmd_releases/6.42.0 2022-01-29 09:53:32 +01:00
Peter Paul Bakker
051da73ce3 set version to 7.0.0-kotlin-SNAPSHOT to avoid mixups in 7.0.0-SNAPSHOT in sonatype snapshots repo 2022-01-20 15:37:41 +01:00
Andreas Dangel
3a97618d5d
[maven-release-plugin] prepare for next development iteration 2021-11-27 11:21:17 +01:00
Andreas Dangel
ac68de1f51
[maven-release-plugin] prepare release pmd_releases/6.41.0 2021-11-27 11:21:12 +01:00
Peter Paul Bakker
b4d7867eba add resources to the pmd-kotlin jar so rule definitions files can be found by pmd-sonar plugin 2021-11-25 15:20:29 +01:00
Andreas Dangel
f12710071f
[maven-release-plugin] prepare for next development iteration 2021-10-30 10:00:20 +02:00
Andreas Dangel
be09a31654
[maven-release-plugin] prepare release pmd_releases/6.40.0 2021-10-30 10:00:15 +02:00
Peter Paul Bakker
bf10da5444 moved libDirectory setting for kotlin to pmd-kotlin pom.xml 2021-10-15 19:40:16 +02:00
Peter Paul Bakker
faeffd4f17 fix checkstyle issues 2021-10-15 19:23:17 +02:00
Peter Paul Bakker
97eeac0daa added kotlin Simple parser test 2021-10-15 19:08:40 +02:00
Peter Paul Bakker
a2e9d2b652 added kotlin xpath function 'pmd-kotlin:hasChildren(3)' as test case for custom kotlin xpath functions 2021-10-15 18:51:08 +02:00
Peter Paul Bakker
4fbf4fb580 added FunctionNameTooShort test in bestpractices category for Kotlin, with unit test cases 2021-10-13 17:34:20 +02:00
Peter Paul Bakker
1a36a7cc55 upped antlr plugin version, fix AST errors by using separate UnicodeClasses.g4 file, added <libDirectory> to maven antlr plugin to make it work 2021-10-13 10:32:19 +02:00
Andreas Dangel
0399bbbfc8
[maven-release-plugin] prepare for next development iteration 2021-09-25 13:46:09 +02:00
Andreas Dangel
90b051bfff
[maven-release-plugin] prepare release pmd_releases/6.39.0 2021-09-25 13:46:04 +02:00
Clément Fournier
c2eb1e6bab
checkstyle issues 2021-09-15 18:25:04 +02:00
Clément Fournier
e945897278
Fix pmd warning 2021-09-15 17:36:47 +02:00
Clément Fournier
5d278c049b
Fix compilation issues 2021-09-15 16:58:38 +02:00
jborgers
de6ddbd624 Separate Kotlin.g4 for parser grammar and KotlinLexer.g4 for lexer grammar; and move PmdKotlinParser.java to the right place 2021-09-15 15:41:36 +02:00
jborgers
a82e7eff24 Handled all steps of "Adding PMD support for a new ANTLR grammar based language" except $. Generate your Parser did not succeed because combining lexer and parser grammars has issues. 2021-09-13 14:15:25 +02:00
jborgers
cde4efb27e Combine KotlinParser, KotlinLexer and UnicodeClasses and use Swift.g4 as example 2021-09-10 17:10:24 +02:00
jborgers
2780560b36 Add official Kotlin ANTLR grammar files, copy and rename some more from Swift 2021-09-08 18:37:00 +02:00
jborgers
1fda7a0782 Adding PMD support for a new ANTLR grammar based language - step 1-4 2021-09-07 16:17:58 +02:00
Andreas Dangel
65af1c0675
[maven-release-plugin] prepare for next development iteration 2021-08-28 17:27:18 +02:00
Andreas Dangel
7d11a02052
[maven-release-plugin] prepare release pmd_releases/6.38.0 2021-08-28 17:27:12 +02:00
Andreas Dangel
821f7a849b
[maven-release-plugin] prepare for next development iteration 2021-07-31 19:02:07 +02:00
Andreas Dangel
18df47ce6e
[maven-release-plugin] prepare release pmd_releases/6.37.0 2021-07-31 19:01:59 +02:00
Andreas Dangel
f68bf5ce05
[maven-release-plugin] prepare for next development iteration 2021-06-26 10:24:15 +02:00
Andreas Dangel
45d1605a03
[maven-release-plugin] prepare release pmd_releases/6.36.0 2021-06-26 10:24:07 +02:00
Andreas Dangel
9fdfecf731
[maven-release-plugin] prepare for next development iteration 2021-05-29 07:24:47 +02:00
Andreas Dangel
b49fb2014d
[maven-release-plugin] prepare release pmd_releases/6.35.0 2021-05-29 07:24:39 +02:00
Andreas Dangel
319900cd43 [maven-release-plugin] prepare for next development iteration 2021-04-24 16:41:17 +02:00
Andreas Dangel
bfeaa1b377 [maven-release-plugin] prepare release pmd_releases/6.34.0 2021-04-24 16:41:10 +02:00
Andreas Dangel
37e5525fd5 [maven-release-plugin] prepare for next development iteration 2021-03-27 16:25:18 +01:00
Andreas Dangel
dc1c9d0aed [maven-release-plugin] prepare release pmd_releases/6.33.0 2021-03-27 16:25:13 +01:00
Andreas Dangel
e0de01ebe9 [maven-release-plugin] prepare for next development iteration 2021-02-27 09:44:05 +01:00
Andreas Dangel
0848e230d0 [maven-release-plugin] prepare release pmd_releases/6.32.0 2021-02-27 09:43:58 +01:00
Andreas Dangel
2ea0328678 [maven-release-plugin] prepare for next development iteration 2021-01-30 18:04:17 +01:00
Andreas Dangel
7d6e6239c5 [maven-release-plugin] prepare release pmd_releases/6.31.0 2021-01-30 18:04:08 +01:00
Andreas Dangel
d284ea9634 [maven-release-plugin] prepare for next development iteration 2020-12-12 09:42:10 +01:00
Andreas Dangel
d2e4fb4ca3 [maven-release-plugin] prepare release pmd_releases/6.30.0 2020-12-12 09:42:02 +01:00
Andreas Dangel
4837c8dbc8 [maven-release-plugin] prepare for next development iteration 2020-10-24 10:17:24 +02:00
Andreas Dangel
81f12d3e5d [maven-release-plugin] prepare release pmd_releases/6.29.0 2020-10-24 10:17:15 +02:00
Andreas Dangel
aa245c6e1b [maven-release-plugin] prepare for next development iteration 2020-09-26 10:25:16 +02:00
Andreas Dangel
722f3ca997 [maven-release-plugin] prepare release pmd_releases/6.28.0 2020-09-26 10:25:05 +02:00
Clément Fournier
efcfb665ad Cleanups for antlr tokenizers 2020-09-17 22:37:10 +02:00
Andreas Dangel
47ab1f34a4 Delete old antlr4 package-infos 2020-09-13 11:41:26 +02:00
Andreas Dangel
4732164a45 Merge branch 'pmd/7.0.x' into pr-2753 2020-09-13 11:40:23 +02:00
Andreas Dangel
3caa6dd0ba Merge branch 'master' into pmd/7.0.x 2020-09-13 11:39:37 +02:00
Andreas Dangel
7a1e3caba0 Add deprecations for antlr lexers that will be moved with PMD 7
Refs pmd/pmd#2753
2020-09-13 11:28:07 +02:00
Andreas Dangel
c59af0aee6 [maven-release-plugin] prepare for next development iteration 2020-08-31 18:30:18 +02:00
Andreas Dangel
856950f0d2 [maven-release-plugin] prepare release pmd_releases/6.27.0 2020-08-31 18:30:09 +02:00
Clément Fournier
9ef8c151e2 Same for kotlin 2020-08-30 18:59:48 +02:00
Andreas Dangel
2b1d071930 Fix tests due to endColumn changes 2020-08-21 12:38:37 +02:00
Andreas Dangel
ab489832fe Merge branch 'master' into pmd/7.0.x 2020-08-21 11:51:54 +02:00
Andreas Dangel
d1c49baae1 Fix checkstyle
(note, this needs an updated build-tools)
2020-08-20 11:02:55 +02:00
Andreas Dangel
89140d86ce Merge branch 'master' into pr-2656 2020-08-20 09:47:16 +02:00
Clément Fournier
c554aceba6 Merge branch 'master' into 7.0.x 2020-08-03 23:06:21 +02:00
Andreas Dangel
acf58f1887 Check for license headers in kotlin source files 2020-07-31 20:26:27 +02:00
Andreas Dangel
49ab75aeb7 [maven-release-plugin] prepare for next development iteration 2020-07-25 13:45:36 +02:00
Andreas Dangel
a9632e2a06 [maven-release-plugin] prepare release pmd_releases/6.26.0 2020-07-25 13:45:27 +02:00
Maikel Steneker
6fb5ac59b9 Ensure CPD uses tab width of 1 for tabs consistently
The columns that are reported by CPD were inconsistent across languages
before. A language like Java (using a JavaCC-based tokenizer) would use
a width of 8 for tabs, whereas a language like C# (using an Antlr-based
tokenizer) would use 1 instead.

This includes unit tests for most languages to ensure a tab character is
counted as 1. The configuration for JavaCC has been adjusted to respect
this as well.
2020-07-20 10:42:21 +02:00
Andreas Dangel
dcaa8a1167 Merge branch 'master' into pmd/7.0.x 2020-07-17 16:13:02 +02:00
Andreas Dangel
94afdb117d Add test engines as surefire plugin dependencies
This removes junit-vintage-engine as a test dependency
as well as kotlintest-runner-junit5.
The engines are only needed during test execution, but should
not be available for test compilation.

For this to work, the latest surefire plugin is required.
2020-07-17 12:03:45 +02:00
Andreas Dangel
370c0b0b6d Remove unused dependency, explicitly declare used dependencies 2020-07-02 15:12:31 +02:00
Andreas Dangel
95d8e80c1b [maven-release-plugin] prepare for next development iteration 2020-06-27 11:31:27 +02:00
Andreas Dangel
a219b2e1be [maven-release-plugin] prepare release pmd_releases/6.25.0 2020-06-27 11:31:16 +02:00
Clément Fournier
5b7ed588ea Make CPD end column exclusive
This is to align it with PMD columns,
which in 7.0 are already exclusive.
2020-06-19 02:21:45 +02:00
Clément Fournier
c49d9e315f Merge branch 'master' into 7.0.x 2020-06-19 01:32:32 +02:00
Clément Fournier
50725a95fc Port ruby tests
TODO there's a bug
2020-06-13 22:08:58 +02:00
Clément Fournier
da764abb1e Convert kotlin tests 2020-06-13 22:04:33 +02:00
Andreas Dangel
c3219b91c5 Merge branch 'master' into pmd/7.0.x 2020-06-12 14:21:10 +02:00
Andreas Dangel
8defb2fde2 Add missing relativePath configuration in all pom modules 2020-06-07 12:36:58 +02:00
Andreas Dangel
ab04bdacdd [maven-release-plugin] prepare for next development iteration 2020-05-24 17:34:34 +02:00
Andreas Dangel
229cb2bdca [maven-release-plugin] prepare release pmd_releases/6.24.0 2020-05-24 17:34:25 +02:00
Andreas Dangel
4308c545e5 [maven-release-plugin] prepare for next development iteration 2020-04-24 10:53:12 +02:00
Andreas Dangel
921c65f5ab [maven-release-plugin] prepare release pmd_releases/6.23.0 2020-04-24 10:53:00 +02:00
Andreas Dangel
0710877d05 [core] Deprecate AntlrToken#getType() in favor of #getKind()
Refs #2371
2020-04-10 18:50:58 +02:00
Clément Fournier
2ea78db0dc Checkstyle 2020-03-22 00:56:10 +01:00
Clément Fournier
16f30c9ece Make Antlr token manager throw TokenMgrError directly 2020-03-22 00:48:16 +01:00
Andreas Dangel
4c020bfbf7 [maven-release-plugin] prepare for next development iteration 2020-03-12 15:15:18 +01:00
Andreas Dangel
eb93aaeca7 [maven-release-plugin] prepare release pmd_releases/6.22.0 2020-03-12 15:15:09 +01:00
Andreas Dangel
d994700617 [maven-release-plugin] prepare for next development iteration 2020-01-24 17:20:47 +01:00
Andreas Dangel
a28e9e22e5 [maven-release-plugin] prepare release pmd_releases/6.21.0 2020-01-24 17:20:38 +01:00
Andreas Dangel
00392cefc2 [maven-release-plugin] prepare for next development iteration 2019-11-29 19:46:14 +01:00
Andreas Dangel
78da370fb8 [maven-release-plugin] prepare release pmd_releases/6.20.0 2019-11-29 19:46:05 +01:00
Andreas Dangel
deec9c44b2 [maven-release-plugin] prepare for next development iteration 2019-10-31 18:36:51 +01:00
Andreas Dangel
2881b6f585 [maven-release-plugin] prepare release pmd_releases/6.19.0 2019-10-31 18:36:42 +01:00
Clément Fournier
b51c02f93b Reorganise antlr files
Antlr root nodes need to implement RootNode.

Also, I didn't like the fact that the swift
module didn't use the conventional package
structure (lang.swift.ast) but was rolling
its own convention (lang.swift.antlr4).

I moved base classes for the antlr implementations
into nspmd.lang.ast.impl.antlr4. The fact that a
module is implemented with antlr is an implementation
detail, and it doesn't deserve its own toplevel package
in nspmd.lang.
2019-09-25 03:49:36 +02:00
Andreas Dangel
e536ca1947 [maven-release-plugin] prepare for next development iteration 2019-09-15 10:14:14 +02:00
Andreas Dangel
3f42cca200 [maven-release-plugin] prepare release pmd_releases/6.18.0 2019-09-15 10:14:05 +02:00
Andreas Dangel
7a7971f64d [maven-release-plugin] prepare for next development iteration 2019-07-28 10:24:51 +02:00
Andreas Dangel
365e1c9e8b [maven-release-plugin] prepare release pmd_releases/6.17.0 2019-07-28 10:24:43 +02:00
Andreas Dangel
73a8e4cc69 [maven-release-plugin] prepare for next development iteration 2019-06-30 10:33:08 +02:00
Andreas Dangel
45facbd323 [maven-release-plugin] prepare release pmd_releases/6.16.0 2019-06-30 10:32:58 +02:00
Andreas Dangel
5ac687918a [maven-release-plugin] prepare for next development iteration 2019-05-26 11:02:26 +02:00
Andreas Dangel
ba2d795f59 [maven-release-plugin] prepare release pmd_releases/6.15.0 2019-05-26 11:02:18 +02:00
Andreas Dangel
ca9c859c0b [maven-release-plugin] prepare for next development iteration 2019-04-28 10:35:44 +02:00
Andreas Dangel
cd8b2e3217 [maven-release-plugin] prepare release pmd_releases/6.14.0 2019-04-28 10:35:36 +02:00
Andreas Dangel
5818abc0c7 [maven-release-plugin] prepare for next development iteration 2019-03-31 12:07:07 +02:00
Andreas Dangel
4ed549f0b2 [maven-release-plugin] prepare release pmd_releases/6.13.0 2019-03-31 12:06:56 +02:00
Andreas Dangel
4bb1d9327d [maven-release-plugin] prepare for next development iteration 2019-02-24 08:57:18 +01:00
Andreas Dangel
41e77bc34b [maven-release-plugin] prepare release pmd_releases/6.12.0 2019-02-24 08:57:10 +01:00
Clément Fournier
6d84530d52 Merge branch 'master' into 7.0.x 2019-02-18 19:32:55 +01:00
lsoncini
7ba565f9b4 Merge branch 'kotlin-tokenizer-refactor' of https://github.com/teamraptor/pmd into kotlin-tokenizer-refactor 2019-02-17 20:31:19 -03:00
lsoncini
55c2c00e7a merge fixes 2019-02-17 20:28:57 -03:00
Matias Fraga
22aaa70983 Add final modifier 2019-02-16 16:20:03 -03:00
lsoncini
72f2e425b2 KotlinTokenizer refactor 2019-02-16 15:49:03 -03:00
Andreas Dangel
63cd6d0f5c [maven-release-plugin] prepare for next development iteration 2019-01-27 13:25:00 +01:00
Andreas Dangel
ea2776f70c [maven-release-plugin] prepare release pmd_releases/6.11.0 2019-01-27 13:24:51 +01:00
Andreas Dangel
dcb8bb42a2 [maven-release-plugin] prepare for next development iteration 2018-12-09 10:42:20 +01:00
Andreas Dangel
27374d8592 [maven-release-plugin] prepare release pmd_releases/6.10.0 2018-12-09 10:42:09 +01:00
Andreas Dangel
75703733f7 Fix version of new pmd-kotlin module 2018-11-28 21:16:41 +01:00
Andreas Dangel
202a184366 Remove unnecessary PMD language module for kotlin 2018-11-26 12:16:04 +01:00
Maikel Steneker
166e17f483 Simplified Kotlin tokenizer. 2018-11-12 14:35:59 +01:00
Maikel Steneker
1dd9cfd17b Adjusted version of pmd-kotlin subproject. 2018-11-12 14:31:23 +01:00
Maikel Steneker
a7f3f71401 Adjusted Kotlin language module to specify version and correct extension. 2018-11-12 11:32:16 +01:00
Maikel Steneker
b83698a58e Added test cases for Kotlin support for CPD. 2018-11-12 11:31:49 +01:00
Maikel Steneker
e7fd1d408c Removed unnecessary import in order to conform to Checkstyle coding standard. 2018-11-07 15:15:57 +01:00
Dennie Reniers
dc5b18b512 Adjusted Kotlin tokenizer to skip over package and import statements.
This prevents CPD from finding duplications in package and import statements.
2018-11-07 15:00:15 +01:00
Maikel Steneker
ff55a230d5 Added Kotlin support to CPD.
The tokenizer uses the ANTLR4 grammar based on the one at https://github.com/shadrina/kotlin-grammar-antlr4 (via https://github.com/antlr/grammars-v4/).
2018-11-07 14:49:56 +01:00