Commit Graph
3270 Commits
Author SHA1 Message Date
Clément Fournier f84ca189b4 Update test of CloseResource 2021-01-16 16:36:26 +01:00
Clément Fournier f9295c2bcb Fix bug with extra array dims 2021-01-16 16:25:22 +01:00
Clément Fournier 20a2ab7416 Remove useless code
This made tests fail
2021-01-16 16:13:20 +01:00
Clément Fournier 292d526a73 Fix type resolver tests
The primary prefix now has the type of the receiver,
when it contains the name of a method call
2021-01-16 15:57:24 +01:00
Clément Fournier 28ebe30127 Fix AvoidInstantiatingObjectsInLoopsRule 2021-01-16 15:56:54 +01:00
Clément Fournier cbceca9861 Fix DoNotUseThreads tests 2021-01-16 00:41:41 +01:00
Clément Fournier 4e96ee6bb7 Fix type res of primary prefix for methods
Consider things accessible if we can't resolve this class.
In particular, local variables were inaccessible, which is absurd.
2021-01-15 23:56:37 +01:00
Clément Fournier 7d87e89f72 Tests for #2979 2021-01-15 23:56:55 +01:00
Clément Fournier 3233ca0127 Tests for #2976 2021-01-15 23:56:46 +01:00
Clément Fournier 1fa9d08d7d Test for #3004 2021-01-15 23:56:37 +01:00
Andreas Dangel 740d832dc1 Change from PR review #2983 2021-01-07 19:51:23 +01:00
Ozan Gulle 49fbb90cb1 Changed naming of the method 2020-12-21 21:37:22 +01:00
Ozan Gulle 2bbf56ec06 Added a new test case 2020-12-21 21:37:09 +01:00
Ozan Gulle 129790ddfc Fixed the order of imports 2020-12-16 22:44:33 +01:00
Ozan Gulle ae12a6db35 Put duplicated code in a separate method 2020-12-16 22:09:11 +01:00
Ozan Gulle d0fb81de1f LiteralsFirstInComparisonsRule also checks for constants 2020-12-16 21:49:38 +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 1a4ca95f6c Merge pull request #2635 from oowekyala:ruleset-factory-builder
[core] New RuleSet API and deprecations for PMD's entry point APIs #2635
2020-12-11 19:03:41 +01:00
Andreas Dangel 7f299c4f6c [java] CompareObjectsWithEquals: only allow this with equals (#2934) 2020-12-04 18:21:11 +01:00
Clément Fournier 4f36ac3bd2 Merge branch 'master' into pr/2934 2020-11-28 14:40:09 +01:00
Clément Fournier 7eb530f035 Merge branch 'master' into pr/2940 2020-11-28 14:25:28 +01:00
Clément Fournier 37c2c505f3 Merge branch 'master' into ruleset-factory-builder 2020-11-24 12:49:18 +01:00
Clément Fournier 9aaae814c4 Handle TNPE and LinkageE when loading type params 2020-11-23 14:40:32 +01:00
Clément Fournier a5bcdb328a Merge branch 'master' into issue-2911-class-leak 2020-11-23 14:37:17 +01:00
Andreas DangelandIgor Moreno 1783b1daa1 Update pmd-java/src/main/resources/category/java/bestpractices.xml
Co-authored-by: Igor Moreno <igormoreno@gmail.com>
2020-11-23 13:55:48 +01:00
Andreas Dangel e701f52d96 [java] Catch additional TypeNotPresentExceptions / LinkageErrors
These exceptions are indications of an incomplete auxclasspath
but should not fail PMD entirely.

Incomplete auxclasspath can still result in invalid violations,
either false positives or false negatives.
2020-11-21 16:38:26 +01:00
Andreas Dangel 02135513c9 [java] CompareObjectsWithEquals: Fix more false positives 2020-11-20 20:39:45 +01:00
Andreas Dangel cda99a1629 [java] CompareObjectsWithEquals - whitelist java.lang.class and this 2020-11-20 16:41:41 +01:00
Andreas Dangel 2c950641d2 [java] Avoid false positives with literals 2020-11-20 15:50:30 +01:00
Andreas Dangel a1297dfd09 [java] Consider comparison with null literal as valid 2020-11-20 12:20:25 +01:00
Igor Moreno ff77650801 Fix typo: "an accessor" not "a" 2020-11-19 22:59:17 +01:00
Andreas Dangel 1e6c79c19f [java] CompareObjectsWithEquals / UseEqualsToCompareStrings - Fix FN
Fixes false negatives in case fields are referenced with this.
Type resolution on PrimaryExpression works well enough to
simply check the type.
2020-11-19 21:08:15 +01:00
abhishek-kumar09 84e6c0997b Correct Annotation Array Initialiation indents from checkstyle #8083 2020-11-16 00:36:30 +05:30
Clément Fournier 51c0df8770 Remove cache entirely 2020-11-14 17:48:14 +01:00
Clément Fournier 3ccdb5597a Make overload without varargs 2020-11-14 17:15:42 +01:00
Clément Fournier 30124fef11 Don't cache enclosing class (pretty rare to hit it) 2020-11-14 16:54:11 +01:00
Clément Fournier 4ee7b7ae02 Load fewer class names 2020-11-14 16:44:27 +01:00
Clément Fournier 307eacd20a Fix errors 2020-11-14 15:37:04 +01:00
Clément Fournier 00d76b03ab Restrict caching to classes loaded by the bootstrap loader 2020-11-14 15:02:15 +01:00
Clément Fournier 4fe3874824 Simplify constructor of JavaTypeDefinitionSimple 2020-11-14 14:57:25 +01:00
Clément Fournier 93c5ef33cf Merge branch 'master' into ruleset-factory-builder 2020-11-13 17:12:27 +01:00
Clément Fournier dfb5c4e2d2 Merge branch 'finish-905' 2020-11-11 22:18:32 +01:00
Clément Fournier a5c42ddefc Add test case for #2595 2020-11-11 15:33:38 +01:00
Clément Fournier 56a5ee536b Deprecations for #905 2020-11-10 14:02:02 +01:00
Clément Fournier 08fca9367e Rename RuleSetParser to RuleSetLoader 2020-11-03 14:44:54 +01:00
Clément Fournier 873206e657 Replace usages, update reference files 2020-10-31 15:34:54 +01:00
Clément Fournier bc9557830a Deprecate ASTPackageDeclaration#getPackageNameImage 2020-10-31 15:18:46 +01:00
Clément Fournier 2b9e3057a7 Deprecate ASTTypeParameter#getParameterName 2020-10-31 15:18:36 +01:00
Andreas Dangel 9f701ee460 Merge branch 'pr-2870' into master
[lang-test] Upgrade Kotlin, Dokka and Kotest #2870
2020-10-28 16:53:53 +01:00