Compare commits

...
Author SHA1 Message Date
Clément Fournier 988ee1c9da Update integration test
The plain text language of the designer is
not registered through LanguageRegistry anymore
since pmd-ui 6.21.0, so that regular PMD
cannot access it
2020-01-24 19:44:22 +01:00
Clément Fournier 18f124f6e5 Bump designer version to 6.21.0 2020-01-24 19:35:56 +01:00
Andreas Dangel 03b8f267e4 [ci] Fix release script
Now the correct target commitish value should be used
when creating a draft release
2020-01-24 18:49:35 +01:00
Andreas Dangel ce183f5abe Prepare next development version 2020-01-24 17:22:27 +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 8f802120a7 Prepare pmd release 6.21.0 2020-01-24 17:06:50 +01:00
Andreas Dangel 024fd7bd85 Merge branch 'pr-2244'
[core] Deprecate CharStream & generated classes
2020-01-24 16:31:38 +01:00
Andreas Dangel 5feca7fd93 Exclude generated AST*.java files from internalization 2020-01-24 16:19:24 +01:00
Andreas Dangel a35bb37989 Merge branch 'pr-2245'
[core] Fix Language::getVersions duplicating aliased versions
2020-01-24 15:56:31 +01:00
Andreas Dangel 35bb524803 [apex][java] *MetricsProvider are @InternalApi
Refs #2241
2020-01-24 15:56:04 +01:00
Clément Fournier d0a68448da Fix neg test case 2020-01-24 14:44:12 +01:00
Clément Fournier 153f9dac74 Fix tests 2020-01-23 13:11:28 +01:00
Clément Fournier f52373c839 checkstyle 2020-01-23 12:49:05 +01:00
Clément Fournier a5be8968cf Fix Language::getVersions duplicating aliased versions 2020-01-23 10:44:54 +01:00
Clément Fournier bed7baa35e Deprecate Velocity stuff 2020-01-22 17:25:09 +01:00
Clément Fournier 60e97d0ec8 Deprecate javacc generated code 2020-01-22 17:19:29 +01:00
Clément Fournier 2c670339d8 Deprecate CharStream and impls 2020-01-22 17:09:06 +01:00
Clément Fournier 11c2b201c1 Fix self references in javadoc 2020-01-20 21:14:48 +01:00
Andreas Dangel 73d06fb439 [doc] Update doc for ast-dump 2020-01-19 19:31:26 +01:00
Clément Fournier 31497715e7 Merge branch 'node-api' 2020-01-19 13:05:32 +01:00
Clément Fournier 27d7a6c02c Accomodate children iterable for specialization 2020-01-19 05:57:39 +01:00
Clément Fournier 6e6440df79 Checkstyle 2020-01-18 21:35:33 +01:00
Clément Fournier 7e6ef38c46 Fix tests 2020-01-17 20:15:11 +01:00
Clément Fournier e1c3ce1206 Merge branch 'tree-export-cli-props' 2020-01-17 20:11:51 +01:00
Clément Fournier 96182fe736 Improve tree export CLI
* Use defaults for format & language
* Allow typing source into stdin
* Add attribute for XML renderer to
ignore common attributes
2020-01-17 19:56:35 +01:00
Clément Fournier 7d7857b5e6 Make renderers configurable from CLI 2020-01-17 19:21:10 +01:00
Clément Fournier 436409e707 Merge branch 'issue-1984' 2020-01-17 18:32:16 +01:00
Clément Fournier 46e4d8bd59 Merge branch 'issue-2218' 2020-01-17 18:31:38 +01:00
Andreas Dangel fa85b4786d [core] Add Node#findDescendantsOfType with crossFindBoundaries that
returns a list like all other find-methods
2020-01-17 18:29:41 +01:00
Clément Fournier d68c072c87 Merge branch 'master' of github.com:pmd/pmd 2020-01-17 15:51:34 +01:00
Clément Fournier bf7732695b Fix comment on Node 2020-01-17 15:51:23 +01:00
Andreas Dangel 0e2b9cf5b4 [java][apex] Move *MetricsProvider into own classes into metrics packages
Make *Metrics.reset package private again
2020-01-17 15:41:54 +01:00
Andreas Dangel c3b7db042b Move DeprecatedAttribute annotation to internal package 2020-01-17 15:17:27 +01:00
Andreas Dangel 4450d826f7 Merge branch 'pr-2225'
[core] CPD: report endLine / column informations for found duplications
2020-01-17 14:59:02 +01:00
Andreas Dangel ca4ad73ea2 [doc] Update release notes, refs #2225 2020-01-17 14:47:55 +01:00
Andreas Dangel 817c3d1127 CPD: Remove deprecations in Mark / TokenEntry
* Provide these values for more languages
2020-01-17 14:47:23 +01:00
Andreas Dangel 1f2835f96e [core] Deprecated Node#isFindBoundary for XPath
Refs #2218
2020-01-17 14:05:10 +01:00
Andreas Dangel 0fab38bdbd Merge remote-tracking branch 'origin/master' 2020-01-17 12:18:12 +01:00
Andreas Dangel 1617aa5311 [apex] Update Apex Support to version 48 (Spring '20) 2020-01-17 12:10:11 +01:00
Clément Fournier b801cf6203 Fix pmd-xml 2020-01-17 11:57:24 +01:00
Clément Fournier d9ad819dab Replace usages of node methods everywhere 2020-01-17 11:57:19 +01:00
Andreas Dangel 6950d2d9d4 Merge branch 'pr-2232'
[apex] Make FormalComment extend ApexNode
2020-01-17 11:46:26 +01:00
Andreas Dangel e43438c498 [doc] Update release notes, fixes #2208 2020-01-17 11:46:18 +01:00
Andreas Dangel b71575fa36 [java] Cyclomatic complexity is misreported (lack of clearing metrics cache)
Fixes #1984
2020-01-17 11:35:32 +01:00
Clément Fournier b7a618c6dd Update release notes 2020-01-17 11:34:03 +01:00
Clément Fournier c75875f981 Add test 2020-01-17 11:29:28 +01:00
Clément Fournier eb7738c341 Make FormalComment extend ApexNode 2020-01-17 11:17:35 +01:00
Andreas Dangel 0d19482bb8 Merge branch 'pr-2216'
[core] Add xml tree renderer

Fixes #2215
2020-01-17 10:14:21 +01:00
Andreas Dangel d0d447fd5e [doc] Update release notes, add page xml_dump_ast 2020-01-17 10:14:11 +01:00
Andreas Dangel 6d7ded21ab [core] Add cli for ast-dump 2020-01-17 10:11:34 +01:00
Andreas Dangel aca1b77f39 [core] Fix TreeRenderersTest under windows (line ending) 2020-01-17 08:46:05 +01:00
Andreas Dangel f53993427c Merge branch 'pr-2172'
[core] Deprecate jjtree methods from the Node interface
2020-01-17 08:18:50 +01:00
Clément Fournier 6c58817d8d Checkstyle 2020-01-17 02:19:18 +01:00
Clément Fournier cb515f3991 Add small API to register & configure tree renderers 2020-01-17 02:11:01 +01:00
Clément Fournier 741bb0b218 Update usages 2020-01-16 22:29:41 +01:00
Clément Fournier 3062d59892 Merge branch 'master' of github.com:pmd/pmd 2020-01-16 22:28:52 +01:00
Clément Fournier d9719e850c Deprecate ASTCatchStatement::getBlock for #2202 2020-01-16 22:28:40 +01:00
Andreas Dangel 1b895c6a9b [doc] Link broken in pmd documentation for writing Xpath rules
Fixes #2214
2020-01-16 19:02:24 +01:00
Andreas Dangel c607292b42 [ci] Update openjdk to 11.0.6+10 2020-01-16 18:23:03 +01:00
Andreas Dangel 9c682e4a88 Merge branch 'pr-2200'
[java] InvalidLogMessageFormat: handle zero placeholders correctly
2020-01-16 18:08:26 +01:00
Andreas Dangel ddf1f2d9f5 Update maven and wrapper 2020-01-16 18:07:25 +01:00
Maikel Steneker 25ceeb91bb Removed redundant code from constructor call. 2020-01-16 17:20:34 +01:00
Maikel Steneker cd0bdc8050 Merge branch 'xml_column_information' of https://github.com/tiobe/pmd into xml_column_information 2020-01-16 17:19:51 +01:00
Maikel StenekerandAndreas Dangel 87c1602ab0 Apply suggestions from code review
Co-Authored-By: Andreas Dangel <andreas.dangel@adangel.org>
2020-01-16 17:18:14 +01:00
Maikel Steneker 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
Maikel Steneker 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
Maikel Steneker 8ed19b5da6 Added CPD column information for Java. 2020-01-15 15:43:56 +01:00
Maikel Steneker 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
Maikel Steneker 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
Clément Fournier 1c0f4aad8c Handle attribute exception 2020-01-15 08:24:03 +01:00
Clément Fournier af15334819 Fix platform specific test 2020-01-13 01:39:27 +01:00
Clément Fournier 22b3f6cd55 Revert changes to DummyNode
Fixes the tests
2020-01-12 23:39:50 +01:00
Clément Fournier 99fdede0aa Merge branch 'issue-2212' 2020-01-12 23:28:33 +01:00
Clément Fournier 904fb14e8b Use interface instead of AbstractAnyTypeDeclaration 2020-01-12 23:27:24 +01:00
Clément Fournier dacab0b2ae Add xml tree renderer 2020-01-12 23:19:48 +01:00
Clément Fournier 83c568a881 Fix compilation 2020-01-12 19:55:28 +01:00
Clément Fournier 8aa656d5ac Fix comment according to suggestion 2020-01-12 19:39:16 +01:00
Clément Fournier ddb5f44d3a Fix compilation 2020-01-12 18:21:35 +01:00
Clément Fournier 820edada4f Add 'children' iterable method to Node interface 2020-01-12 18:18:38 +01:00
Clément Fournier 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
Andreas Dangel bc92fa4590 [java] JavaRuleViolation reports wrong class name
Fixes #2212
2020-01-11 12:51:21 +01:00
Clément Fournier 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
Clément Fournier 5f44a5fc54 [apex] Use base parser class for apex
Refs #2177, #1937
2020-01-10 17:13:19 +01:00
Andreas Dangel 398b683565 Merge branch 'pr-2177'
[lang-test] Factorize parsing logic for tests
2020-01-10 14:07:29 +01:00
Andreas Dangel c53d9508e9 Small changes from code review
* rename BaseParserHelper
* Not using org.jetbrains.annotations.NotNull
2020-01-10 12:18:43 +01:00
Andreas Dangel 4269fd1b73 Refactor tests for javascript, jsp, plsql, scala, visualforce, xml
using BaseParsingHelper

Revert "REVERT ME Remove some diff"

This reverts commit f72810088d.
2020-01-10 12:12:34 +01:00
Clément Fournier 98b57f75ab Merge branch 'master' into deprecate-jjtree-methods 2020-01-06 18:50:43 +01:00
Andreas Dangel 63221805a3 Merge branch 'pr-2195'
[modelica] Normalize invalid node ranges
2020-01-06 18:42:14 +01:00
Andreas Dangel 728632840a [doc] Update release notes, refs #2195 2020-01-06 18:41:41 +01:00
Andreas Dangel 14bd07f260 Merge branch 'pr-2199'
[modelica] Fix Javadoc tags
2020-01-06 18:33:22 +01:00
Andreas Dangel d3a0c21506 [doc] Update release notes, refs #2199 2020-01-06 18:33:15 +01:00
Andreas Dangel 6bea1e618b [java] InvalidLogMessageFormat: handle zero placeholders correctly
Fixes #2196

Also refactors the implementation to not use a XPath query anymore.
2020-01-06 18:02:41 +01:00
Anatoly Trosinenko 9c7b0d9385 [modelica] Fix Javadoc tags 2020-01-06 17:46:58 +03:00
Clément Fournier af537034a9 Use getters for tokens in javacc grammars 2020-01-06 15:01:18 +01:00
Clément Fournier e335e069f8 Merge branch 'master' into deprecate-jjtree-methods 2020-01-05 23:17:25 +01:00
Clément Fournier 0ff87229ff Remove TokenBasedNode
I don't think we should expose tokens as an API
yet. They're an implementation detail, not used
much, and the AST should be able to reflect all
the information that can be found in the tokens.

The methods of AbstractNode can be pulled down
to AbstractJjtreeNode and made protected.
2020-01-05 23:13:04 +01:00
Clément Fournier 394de28a0d Set image 2020-01-05 19:32:09 +01:00
Andreas Dangel 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
Clément Fournier 6f61522971 Test 2020-01-05 19:22:17 +01:00
Andreas Dangel 1d82918efa Merge branch 'pr-2184'
[plsql] Fix DDLCommands parsing
2020-01-05 19:20:29 +01:00
Andreas Dangel 5c19e20294 Merge branch 'pr-2183'
[plsql] Fix StringLiteral token
2020-01-05 19:19:27 +01:00
Andreas Dangel f973ad6ef3 Merge branch 'pr-2185'
[core] Internalize API that exposes ResourceLoader
2020-01-05 19:18:18 +01:00
Andreas Dangel 8e30425dfa [doc] Update release notes, fixes #2161 2020-01-05 19:18:10 +01:00
Clément Fournier e9dbe0233f Use implicit zero-length token in modelica 2020-01-05 19:06:32 +01:00
Andreas Dangel 4cf6291ecb Fix pmd 2020-01-05 18:20:26 +01:00
Juan Martín Sotuyo Dodero a51726f48f Merge branch 'pr-2194' 2020-01-04 04:39:40 -03:00
Juan Martín Sotuyo Dodero d614e7ab17 Update changelog, refs #2194 2020-01-04 04:38:59 -03:00
Juan Martín Sotuyo Dodero caaa5eba9a Fix issue with analysis of IPv6 mapper IPv4 2020-01-04 04:37:13 -03:00
Juan Martín Sotuyo Dodero a29d63e267 Merge branch 'pr-2193' 2020-01-04 04:34:00 -03:00
Juan Martín Sotuyo Dodero 07de89f516 Update changelog, refs #2193 2020-01-04 04:33:40 -03:00
Anatoly Trosinenko 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
Egor18 3b8d694be3 Fix odd logic in AvoidUsingHardCodedIPRule 2019-12-29 22:00:13 +03:00
Egor18 9efe803685 Fix odd logic in test runner 2019-12-29 21:52:48 +03:00
Clément Fournier f33291e372 Deprecate ASTYieldStatement implementing TypeNode 2019-12-26 18:53:22 +01:00
Clément Fournier 0a0bb6e4bb Rename getGuardExpressionNode -> getCondition 2019-12-26 18:47:28 +01:00
Clément Fournier 41baa353b0 Deprecate API of TryStatement that will be renamed 2019-12-26 18:40:24 +01:00
Clément Fournier 1b9b94a794 Update release notes 2019-12-26 14:33:44 +01:00
Clément Fournier 3f5ad7cfbe Deprecate rule factory 2019-12-26 14:30:08 +01:00
Clément Fournier 05870c98cc Deprecate RulesetFactory constructors 2019-12-24 14:39:20 +01:00
Clément Fournier 3712b17e77 Internalize API that exposes ResourceLoader 2019-12-24 14:19:24 +01:00
Andreas Dangel dcb6239725 Fix build under windows 2019-12-24 14:13:27 +01:00
Andreas Dangel 1c7e8fb2ab Fix build under windows 2019-12-24 11:47:41 +01:00
Andreas Dangel 9a82ce1454 [doc] Update release notes, fixes #2009 2019-12-24 11:38:35 +01:00
Andreas Dangel e345e811be [plsql] Use ReadPastNextOccurrence rather than SkipPastNextToken
The token SQLPLUS_TERMINATOR is useless, since the token ";" is
matched before. So, we always skipped till the end of the file.

Improved the image of the skipped nodes, so that it can be of some
use.

Note: This will fix the problem #2009, but it doesn't parse
DDL Commands fully. It just skips past the next ";".
2019-12-24 11:37:41 +01:00
Andreas Dangel e230027f9a [plsql] Support COMMENT statement
Ref #2009
2019-12-24 11:17:59 +01:00
Piotr Szymanski ad02dcac5e [plsql] Add test case for multiple ddl statements
Refs #2009
2019-12-23 18:40:29 +01:00
Piotr Szymanski 04aa48e3f1 [plsql] Add additional test case for multi line string literals 2019-12-23 18:30:26 +01:00
Andreas Dangel 4599b6989a [plsql] Fix StringLiteral token
StringLiterals can use a custom quote delimiter that
marks the end of a string literal. This quote delimiter
is only effective together with the quote character.
A single quote character, that is not preceded by the
delimiter, should be allowed.

Additionally, the ASTStringLiteral node gives
now access to the plain string value of the
literal without the quoting.

Fixes #2008
2019-12-23 18:24:14 +01:00
Clément Fournier 9023d86945 Merge branch 'master' into deprecate-jjtree-methods 2019-12-23 12:41:08 +01:00
Andreas Dangel ea6de08094 Merge branch 'pr-2171'
[core] Preserve newlines in DocumentFile
2019-12-23 09:08:12 +01:00
Andreas Dangel e906033a87 Merge branch 'pr-2173'
[core] Add warnings for duplicated rule references in rulesets
2019-12-23 09:06:19 +01:00
Clément Fournier a7c5a1f0be Cleanup PMD.EOL in tests
Instead, normalize line endings in parse method.
This makes sure test code snippets are portable
and readable. For now they're platform-specific,
and assume that the resource files are saved with
the platform-specific line separator. This may not
be the case, as eg a git file may be checked out
with CRLF on a unix system.
2019-12-22 20:16:19 +01:00
Clément Fournier 80534a7e69 Fix line endings 2019-12-22 19:53:10 +01:00
Clément Fournier 5906564e23 Fix resource path 2019-12-20 19:01:10 +01:00
Clément Fournier f72810088d REVERT ME Remove some diff 2019-12-20 18:32:47 +01:00
Clément Fournier 8afe5ae7a8 Abstract away parser utils
Convert a few pieces of code

Share with modelica

Remove yet another dup

Fix tests

Doc

Share with plsql

Fix tests

Fix build

Cleanup

Minimize diff

Share with JSP module

Share with JS module

Share with XML module

Share with VisualForce module

Share with Scala module

Fix last tests
2019-12-20 18:30:17 +01:00
Andreas Dangel f67819e05a Merge branch 'pr-2069'
[java] CommentRequired: make property names consistent
2019-12-20 11:38:03 +01:00
Clément Fournier 320339240f [modelica] Small cleanups
* Move AbstractModelicaRule into the `rule` package
* Make the visitor interface mention only published types (ie not
AbstractModelicaNode)
* Other cleanups(eg make interfaces extend ModelicaNode)
2019-12-19 15:24:53 +01:00
Clément Fournier 87eaaef9fd Fix compil 2019-12-18 19:52:02 +01:00
Andreas Dangel 364c23cbe1 [core] Add warnings for duplicated rule references in rulesets
Fixes #2006
2019-12-18 12:48:31 +01:00
Andreas Dangel 3e01cb4431 Merge branch 'pr-2051'
[doc] Update the docs on adding a new language
2019-12-18 10:05:11 +01:00
Andreas Dangel 84c9cc87e1 [doc] Update release notes, refs #2051 2019-12-18 10:04:34 +01:00
Andreas Dangel 81de44cbd3 Merge branch 'pr-2169'
[modelica] Follow-up fixes for Modelica language module
2019-12-18 09:59:52 +01:00
Andreas Dangel 7e9c5c38d8 [doc] Update release notes, refs #2169 2019-12-18 09:59:45 +01:00
Andreas Dangel 0b926efaab Merge branch 'pr-2115'
[apex] ApexCSRF changes
2019-12-18 09:58:32 +01:00
Andreas Dangel 66e26a5168 [doc] Update release notes, refs #2115 2019-12-18 09:56:08 +01:00
Andreas Dangel 0ff3216b48 Merge branch 'pr-2150'
[java] Fix false negative in AvoidLiteralsInIfCondition
2019-12-18 09:50:19 +01:00
Clément Fournier da9ef04a64 Add contract for getChild/getParent 2019-12-17 18:09:24 +01:00
Clément Fournier 627e258458 Revert 2019-12-17 17:49:01 +01:00
Anatoly Trosinenko 6224bd3d77 [modelica] Follow-up fixes for Modelica language module 2019-12-17 19:43:32 +03:00
Clément Fournier 86b274c681 Make generic visitor superclass
Use raw supertype to avoid conflicts
2019-12-17 17:39:13 +01:00
Clément Fournier 2f37e1c256 Deprecate jjt* methods 2019-12-17 17:39:13 +01:00
Clément Fournier 1aabc53fa2 Deprecate childrenAccept in all modules 2019-12-17 17:39:13 +01:00
Clément Fournier 98df6bda1c Add TokenBasedNode, AbstractJjtreeNode 2019-12-17 17:39:13 +01:00
Clément Fournier cf843a845b Pull new methods up into Node 2019-12-17 17:39:13 +01:00
Clément Fournier a64ea6b416 Add some deprecations 2019-12-17 17:39:13 +01:00
Clément Fournier 16d83c2839 Deprecate too specific stuff from Node and AbstractNode 2019-12-17 17:39:13 +01:00
Clément Fournier baeda3cfe5 Remove the rest
See parent commit
2019-12-17 17:38:17 +01:00
Clément Fournier 305e5ef082 [modelica] Remove source-type attributes in tests xml
This is only needed to select a specific
language version. Tests are failing because
the newer schema has not yet been published.
2019-12-17 17:36:24 +01:00
Andreas Dangel f1d3b93ff6 [core] Preserve newlines in DocumentFile
Fixes #2170 [core] DocumentFile doesn't preserve newlines
2019-12-17 16:49:45 +01:00
Andreas Dangel 3ec8914922 [doc] Update release notes, refs #2069, fixes #1683 2019-12-17 15:48:37 +01:00
Andreas Dangel d8ed0cf45e [java] CommentRequired: Deprecated property "headerCommentRequirement" 2019-12-17 15:44:02 +01:00
snuyanzin 6cec74851a [java] CommentRequired: Make headerCommentRequirement ignored by default, make tests more targeted
Refs #1683
2019-12-17 12:31:17 +01:00
snuyanzin 88ff3f0628 [java] CommentRequired: Separate header comment from class comment and header top-level comment
Refs #1683
2019-12-17 12:30:05 +01:00
Andreas Dangel bc2f2d8f50 [modelica] Add integration smoke test 2019-12-17 12:25:09 +01:00
Andreas Dangel 7bb987fcf4 [modelica] Add rule test for ClassStartNameEqualsEndName 2019-12-17 12:22:54 +01:00
Andreas Dangel 909dd935d1 [test] Support scala in rule tests 2019-12-17 12:14:07 +01:00
Andreas Dangel b77aec218e [doc] Add modelica to cli_reference and ant 2019-12-17 11:37:42 +01:00
Andreas Dangel 816c58897a Merge branch 'pr-2041'
[modelica] Initial implementation for PMD
2019-12-17 11:21:29 +01:00
Andreas Dangel c27ed3aa9a Update release notes, refs #2041 2019-12-17 11:09:13 +01:00
Andreas Dangel 1480bfeaa4 Merge branch 'pr-2165'
[java] Deprecate JavaQualifiedName and a few other things
2019-12-17 10:45:34 +01:00
Andreas Dangel 9dbaa53f63 Release notes: fix jdoc references 2019-12-17 10:45:22 +01:00
Andreas Dangel a82c9e912b Update release notes with deprecated ASTAnyTypeDeclaration#getImage() 2019-12-17 10:29:31 +01:00
Andreas Dangel 3e491512ff Merge branch 'pr-2168'
[java] Fix false positive in UnnecessaryLocalBeforeReturn with method references
2019-12-17 10:13:53 +01:00
Clément Fournier 3f7d432681 Update release notes 2019-12-16 23:16:58 +01:00
Clément Fournier 6aadcb29a3 Fix UnnecessaryLocalBeforeReturn FP with method reference 2019-12-16 17:31:56 +01:00
Anatoly Trosinenko 20bf4ad759 [modelica] Initial implementation of Modelica support for PMD 2019-12-16 19:26:32 +03:00
Clément Fournier 50560e0aac Fix deprecated attribute usage 2019-12-16 16:23:27 +01:00
Andreas Dangel 78c8ea2749 [ci] Fix travis.yml warnings
* setting root os to linux
* using jobs instead of matrix
2019-12-16 14:41:58 +01:00
Andreas Dangel 70f0597887 [ci] Update release signing key
New key: PMD Release Signing Key <releases@pmd-code.org>
0xD0BF1D737C9A1C22
Valid till 2020-12-15
2019-12-16 14:41:11 +01:00
Andreas Dangel 0d9fe56ec3 Fixes from review #2115 2019-12-16 11:37:47 +01:00
Andreas Dangel 7b5e9703ec [java] AvoidLiteralsInIfCondition: add property ignoreExpressions
The property ignoreExpressions is set to true in order to keep
the rule backwards compatible.
2019-12-16 11:17:25 +01:00
Andreas Dangel 1cfd14ec7c [java] AvoidLiteralsInIfCondition: add additional check for expressions 2019-12-16 11:17:21 +01:00
Andreas Dangel c0d0fd3fbe [java] AvoidLiteralsInIfCondition: report Literal rather than IfCondition
If the IfCondition spans multiple lines, it easier to spot the
literal, if the violation is reported on the correct line where
the literal is located.
2019-12-16 11:17:21 +01:00
Andreas Dangel ed253183aa [java] AvoidLiteralsInIfCondition: false negative for expressions
Fixes #2140
2019-12-16 11:17:17 +01:00
Andreas Dangel 8b66e0a4da [core] Fix XPath node compareOrder
In Saxon, NodeInfo.compareOrder is used to determine, whether a
node is already contained in a union set or not. For different nodes
it must return a value != 0. It should consider the position of the
nodes in document order. The new implementation uses now the
position of the nodes (begin line, begin column) to determine the order.
It might fail, if the position of the nodes are not correct.
2019-12-16 11:16:38 +01:00
Clément Fournier 76d33ea3dd Fix checkstyle 2019-12-16 11:06:33 +01:00
Clément Fournier eddff1449e Deprecate TypeKind and related 2019-12-16 00:26:05 +01:00
Andreas Dangel da194bf427 Merge branch 'pr-2148'
[java] Fix false negative for StringInstantion with array access
2019-12-13 20:14:52 +01:00
Andreas Dangel 2b1e21bf11 Merge branch 'pr-2151'
[java] Fix false-positive in JUnitAssertionsShouldIncludeMessage
2019-12-13 20:10:50 +01:00
Juan Martín Sotuyo Dodero fdbf2e5aff Merge pull request #2146 from oowekyala/deprecate-rvf-impls
[core] Deprecate implementations of RuleViolation[Factory]
2019-12-09 00:05:55 -03:00
Clément Fournier 1f0caf5034 Merge branch 'master' into deprecate-rvf-impls 2019-12-09 01:09:27 +01:00
Juan Martín Sotuyo Dodero 3833d8c1b1 Merge pull request #2152 from oowekyala/deprecate-abstract-parser
[java] Deprecate abstract java parser, internalize some other APIs
2019-12-08 19:37:43 -03:00
Clément Fournier 4014ab1dc8 Update release notes 2019-12-08 14:20:23 +01:00
Clément Fournier c5b332d7fd Also deprecate JavaDataFlowHandler 2019-12-08 14:17:56 +01:00
Clément Fournier 5545927bd9 Do the same for Java language handlers 2019-12-08 14:17:19 +01:00
Clément Fournier 088f077407 Deprecate AbstractJavaParser
Internalize JavaLanguageParser
2019-12-08 14:15:59 +01:00
Andreas Dangel 71bf676225 Remove unnecessary CDATA in JUnitAssertionsShouldIncludeMessage.xml 2019-12-08 12:15:03 +01:00
Andreas Dangel 9502cae042 [java] JUnitAssertionsShouldIncludeMessage - False positive with assertEquals and JUnit5
Fixes #2149
2019-12-08 12:10:32 +01:00
Andreas Dangel ca299178df [ci] Use sha1 of release tag for target_commitish when creating gh release 2019-12-07 14:38:02 +01:00
Andreas Dangel b7d61fca94 [java] StringInstantiation: fix false negative with multi-dim arr access 2019-12-06 12:21:11 +01:00
Andreas Dangel 9616312de2 [java] Support type resolution for array access expressions 2019-12-06 12:21:06 +01:00
Andreas Dangel 3b6fcf4b7a [java] StringInstatiation: False negative with String-array access
Fixes #2141
2019-12-06 11:18:27 +01:00
Andreas Dangel b1fc3110de [java] StringInstatiation tests - remove unnecessary CDATA 2019-12-06 10:52:43 +01:00
Clément Fournier e37f791caa Release notes 2019-12-05 15:28:36 +01:00
Clément Fournier b1ba962ddf Deprecate RuleViolation impls 2019-12-05 15:26:03 +01:00
Clément Fournier eb6ceef085 Add comments and update release notes 2019-12-05 15:23:07 +01:00
Clément Fournier bb7478cd0a Deprecate RuleViolationFactory impls
Internal APIs
2019-12-05 15:18:35 +01:00
Andreas Dangel e87ab21b08 Prepare next development version 2019-11-29 20:05:59 +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 d3340c71eb Prepare pmd release 6.20.0 2019-11-29 19:35:32 +01:00
Andreas Dangel c5d79a0db4 Merge branch 'pr-2138'
[java] Preserve possible type of the target reference for method invocations
2019-11-29 18:41:20 +01:00
Andreas Dangel 19f507fc01 Merge branch 'pr-2137'
[apex] Provide access to underlying query of SoqlExpression
2019-11-29 18:39:38 +01:00
Andreas Dangel 15fc638241 Merge branch 'pr-2126'
[java] ImmutableField: False positive when variable is updated in conditional loop
2019-11-29 18:38:27 +01:00
Andreas Dangel 3a2791007e Fix checkstyle 2019-11-29 10:39:51 +01:00
Andreas Dangel a85638a0e0 [java] Preserve possible type of the target reference for method invocations
We already resolved the result type of a method invocation,
but in some cases, we also need the type of the target reference
for static method calls.

Reverts the previously introduced fix in UnusedImportsRule.

Fixes #2016
2019-11-29 10:27:19 +01:00
Andreas Dangel cdf11ed0fa [apex] Provide access to underlying query of SoqlExpression
Fixes #2136
2019-11-28 20:10:31 +01:00
Andreas Dangel 226fa8e061 [ci] Fix missing shell functions 2019-11-28 19:53:20 +01:00
Andreas Dangel f7778d06b5 [ci] Not setting up gpg under Windows
Importing the release signing key will start the gpg-agent.
This background task then prevents travis-ci from terminating
the build job under Windows.

Since gpg is not needed for building PMD under Windows, I simply
don't import the keys.
Alternatively, running "gpgconf --kill gpg-agent" should also
work.
2019-11-28 19:47:33 +01:00
Andreas Dangel 8a6f426fb7 Merge branch 'pr-2104'
[ci] Refactor release scripts
2019-11-24 10:49:29 +01:00
Andreas Dangel e106e7ac12 [java] ImmutableField: False positive when variable is updated in conditional loop
Fixes #2125
2019-11-24 10:20:21 +01:00
Andreas Dangel f013497b1c fix import 2019-11-22 15:10:55 +01:00
Andreas Dangel dd391ab78e [java] UnusedImports: False positive if wildcard is used and only static methods
Added workaround for wrong typeresolution
(method result vs. class of method)

Refs #2016
2019-11-22 15:04:17 +01:00
Andreas Dangel e485396b3a Merge branch 'pr-2121'
[java] Predicates treated like booleans
2019-11-21 20:23:06 +01:00
Andreas Dangel 9d584e009c [doc] Update release notes, refs #2121, fixes #1362 2019-11-21 20:20:35 +01:00
Andreas Dangel f5dc2fe80f [java] LinguisticNaming: Add test case for method returning predicate 2019-11-21 20:20:21 +01:00
Andreas Dangel c1674ddd7f Merge branch 'pr-2114'
[doc] Rule deprecation policy
2019-11-21 20:10:56 +01:00
Andreas Dangel 1790c1e84e Merge branch 'pr-2118'
[core] Add designer bindings interface
2019-11-21 20:10:00 +01:00
Andreas Dangel f8bf862d43 Merge branch 'pr-2113'
[java] UnnecessaryFullyQualifiedName false-positive for non-static
nested classes
2019-11-21 20:09:15 +01:00
Andreas Dangel 9cf0083bce Merge branch 'pr-2112'
[java] ImmutableField false positive with inner class
2019-11-21 20:06:46 +01:00
Andreas Dangel c25049a24b Merge branch 'pr-2111'
[java] False positive MissingStaticMethodInNonInstantiatableClass ...
when inheritors are instantiable
2019-11-21 20:05:20 +01:00
Andreas Dangel 5858048df2 Merge branch 'pr-2101'
[doc] Issue with http://pmdapplied.com/ linking to a gambling Web site
2019-11-21 20:03:49 +01:00
Andreas Dangel 967d3ae4e8 Merge branch 'pr-2100'
[core] Shortnames parameter does not work with Ant
2019-11-21 20:01:50 +01:00
Andreas Dangel b1b3b37095 Merge branch 'pr-2099'
[java] UnnecessaryFullyQualifiedName: regression / false positive
2019-11-21 20:00:49 +01:00
Ozan Gulle 533b32a992 Slight adjustments in the test cases 2019-11-19 21:13:58 +01:00
Ozan Gulle 6306809a8d Corrected naming 2019-11-19 20:50:34 +01:00
Ozan Gulle c41dc3f5ab Fixed the test and added a second one 2019-11-19 20:25:50 +01:00
Ozan Gulle ef476a6e9e isBoolean method also returns true for Predicates
Tests are commented out. They only work if the java version is increased to 8 on the pom.xml.
2019-11-18 22:40:44 +01:00
Andreas Dangel 596365cf75 [doc] Update sidebar
Adding rule deprecation policy
2019-11-18 20:19:13 +01:00
Andreas Dangel 05368bddab [doc] Move rule deprecation policy to devdocs 2019-11-18 20:19:00 +01:00
Andreas Dangel d02bccbcad Update dokka version to 0.10.0 2019-11-18 19:54:08 +01:00
Clément Fournier dd708a32c0 Add designer bindings interface 2019-11-17 14:46:38 +01:00
Andreas Dangel 5517662381 pmd-dist: fix warning about cross platform compatibility of output directory
[WARNING] The assembly descriptor contains a filesystem-root relative reference, which is not cross platform compatible /
2019-11-16 22:59:44 +01:00
Andreas Dangel e0e2010f6f javadoc: disable automatic detection of offline links for modules
This tries to determine the links to the other reactor projects,
e.g. from pmd-java to pmd-core via the url from project.url.
Project.url is currently https://pmd.github.io and the constructed
url will be https://pmd.github.io/apidocs which doesn't exist.
This means, the generated links to classes e.g. from core don't work
anyway.

Disabling this feature avoids error messages like
[ERROR] Error fetching link: /home/travis/build/pmd/pmd/pmd-apex-jorje/target/apidocs. Ignored it.
E.g. pmd-apex-jorje does not have own javadoc at all, since it is
just a library.

The linking between the different pmd modules needs to be revisited
with #1769.
2019-11-16 22:56:14 +01:00
Andreas Dangel 20bcda9f73 Upgrade maven-javadoc-plugin to 3.1.1
This fixes errors like

"[ERROR] Error fetching link: /home/travis/build/pmd/pmd/pmd-core/target/apidocs/package-list. Ignored it."

during the builds.
2019-11-16 21:41:12 +01:00
Andreas Dangel 7ec489ca5d [core] Fix unnecessary deprecation warning
When a custom ruleset references a built-in ruleset, that contains
rules as well as deprecated rule references, then there should be
no warnings about using deprecated rules. In fact, the deprecated
rules are not used. They would only be used, when explicitly referenced.
2019-11-16 20:02:55 +01:00
Andreas Dangel 3dda94ec2a [apex] Fix ApexCSRF false-negatives with initializers
(Static) initializers were not considered yet.
2019-11-15 21:22:02 +01:00
Andreas Dangel 64f44369be [apex] Move ApexCSRF rule from security to errorprone
Also move the Helper class into a internal package and
deprecated the old Helper class.

Refs #2064
2019-11-15 21:20:46 +01:00
Andreas Dangel f17758637f [doc] Rule deprecation policy 2019-11-15 14:48:57 +01:00
Andreas Dangel 461977b8f6 [java] UnnecessaryFullyQualifiedName false-positive for non-static nested classes
Fixes #2029
2019-11-15 13:06:31 +01:00
Andreas Dangel 9dbbfba420 [java] ImmutableField false positive with inner class
Fixes #2075
2019-11-15 10:17:59 +01:00
Andreas Dangel f93bea624c [java] False positive MissingStaticMethodInNonInstantiatableClass when inheritors are instantiable
Fixes #2102
2019-11-15 09:52:55 +01:00
Andreas Dangel 9923dd28de Merge branch 'pr-2106'
[java] Wrong name for inner classes
2019-11-15 08:51:53 +01:00
Andreas Dangel 6bf6e2240c [doc] Update release notes, refs #2106, fixes #2105 2019-11-15 08:51:43 +01:00
andi 60f11fcb7d fix reporting of innerclass classnames 2019-11-12 14:33:33 +01:00
Andreas Dangel 1d6aab0a56 [doc] Update release notes, fixes #2090 2019-11-11 19:41:16 +01:00
Andreas Dangel 79c61c982a [ci] Execute sonar and coveralls only for pushes
This avoids spinning up VMs for these jobs as they would not
execute any script anyways. Sonar and coveralls are only
updated for pushes.
2019-11-11 19:40:00 +01:00
Andreas Dangel 69008857d5 [ci] Refactor build-doc.sh
Split it into several functions, that are called from "main".
2019-11-11 19:34:58 +01:00
Andreas Dangel c7204a56ee Fix build under Windows 2019-11-10 21:13:43 +01:00
Andreas Dangel 226f78bf8a [ci] Refactor upload of documentation to sourceforge 2019-11-10 18:40:51 +01:00
Andreas Dangel 839968c95c [ci] Create regression-tester.sh 2019-11-10 18:40:51 +01:00
Andreas Dangel f85d11fe8e [ci] Refactor sourceforge requests into sourceforge-api.sh 2019-11-10 18:40:51 +01:00
Andreas Dangel fafb3e76b1 [ci] Create github-releases-api.sh 2019-11-10 18:40:47 +01:00
Andreas Dangel fd52b4b8ea [ci] Add stage build and publish
Publish is executed after all build jobs are finished.
2019-11-10 18:40:30 +01:00
Andreas Dangel bef59f1f1c [ci] Merge release.sh into build-{deploy,doc}.sh with manual github releases
A draft github release is created or the latest release is reused,
if it is a draft release.
Assets are uploaded, release notes are added.
The release is left in draft state.
2019-11-10 18:40:30 +01:00
Andreas Dangel 206ae6ef96 [java] UnnecessaryFullyQualifiedName: Fix false-neg with nested exceptions 2019-11-08 18:05:24 +01:00
Andreas Dangel bb8fbb8c1d [java] UnnecessaryFullyQualifiedName: Fix false-neg with nested classes 2019-11-08 15:12:15 +01:00
Andreas Dangel 4e8bc2b36a [doc] Issue with http://pmdapplied.com/ linking to a gambling Web site
Fixes #2002
2019-11-08 14:52:07 +01:00
Andreas Dangel 8257fc2e97 Merge branch 'pr-2091'
[core] Fix pmd warnings (IdenticalCatchCases)
2019-11-08 14:15:46 +01:00
Andreas Dangel 769408f25e [doc] Update release notes, closes #2091 2019-11-08 14:15:27 +01:00
gibarsin 6a084630ee fix branch build by fixing checkstyle errors 2019-11-08 14:14:02 +01:00
Andreas Dangel 2541e22c38 [core] Shortnames parameter does not work with Ant
Fixes #2062
2019-11-08 12:28:35 +01:00
Andreas Dangel f3c4ec9ad9 [java] UnnecessaryFullyQualifiedName: regression / false positive
Fixes #2098
2019-11-08 11:36:26 +01:00
Andreas Dangel a25dadc495 Merge branch 'pr-2088'
[java] Add more version shortcuts for older java
2019-11-08 10:55:35 +01:00
Andreas Dangel a93b6819b3 [doc] Update release notes, fixes #1861, refs #2088 2019-11-08 10:47:20 +01:00
Andreas Dangel 4c9816fc2e [doc] Update documentation about language versions 2019-11-08 10:40:33 +01:00
Andreas Dangel 33b5263035 [java] Support more language version aliases
javac understands for --source both "1.5" and "5" and also "1.9" and
"1.10". Tested with openjdk13.
javac understands for --release "7" and higher. javac 10 had
support for "6".
This means, not all variants work in all constellations, but PMD
should understand now the correct version regardless how it is
specified.
2019-11-08 10:19:15 +01:00
Henning Schmiedehausen 8285278174 mark change as experimental per code review comment 2019-11-08 09:10:49 +01:00
Henning Schmiedehausen b2a34c104d Add more version shortcuts for older java
Newer java compiler (java 9+) support the `--release` option to choose
for which version of the JRE to compile. This parameter only takes
simple values as documented by `javac --help`:

```
--release <release>
        Compile for a specific VM version. Supported targets: 6, 7, 8, 9, 10, 11
```

adding these versions to pmd allows the use of the same versions (6, 7
and 8) with PMD as with the compiler, thus removing the need to juggle
between single digit versions for the compiler and 1.<x> for PMD.
2019-11-08 09:10:49 +01:00
Juan Martín Sotuyo Dodero 534481f692 Merge pull request #2097 from adangel/issue-2096
[core] RuleSetFactory - recognize rule reference for same ruleset
2019-11-07 16:54:51 -10:00
Andreas Dangel 34b54f228f Upgrade jacoco and sonar-maven-plugin 2019-11-07 21:28:15 +01:00
Andreas Dangel 270839c3a2 [ci] Configure property sonar.organization
The "sonar.organization" property is not yet, but
will become mandatory.
Take the opportunity and change it to the new organisation "pmd"
now: https://sonarcloud.io/organizations/pmd
2019-11-07 20:26:47 +01:00
Andreas Dangel ee7f6d0494 [core] RuleSetFactory - recognize rule reference for same ruleset
There are two variants, how a renamed rule can be expressed in the
ruleset via a deprecated rule reference: referencing just the
new rule name or referencing the ruleset+new rule name. The latter
case was not covered yet, it was not detected, that the rule ref
references are rule in the same ruleset.

Fixes #2096
2019-11-04 20:43:38 +01:00
Juan Martín Sotuyo Dodero 3807cf48be Merge pull request #2093 from adangel/apex-logger
[apex] Really fix ApexLexer logging
2019-11-03 18:24:53 -08:00
Andreas Dangel c75e2bd000 [apex] Really fix ApexLexer logging
The fix introduced with #503 (fba00843bb)
was incomplete and didn't work:
* The logger uses the full class name insteand of simple name
* After we changed the log level of the logger, the logger
  could be garbage collected before ApexLexer retrieves it and
  thus the configuration could be lost
2019-11-02 09:47:16 +01:00
Andreas Dangel bfa2d1e872 [ci] Fix build on travis with new gpg version
See https://issues.apache.org/jira/browse/MGPG-59 for details.
2019-11-01 11:31:07 +01:00
Andreas Dangel b0a854619c Revert "[ci] Fix build on travis when gpg tries to sign"
This reverts commit bb0813547c.
2019-11-01 11:26:18 +01:00
Andreas Dangel bb0813547c [ci] Fix build on travis when gpg tries to sign
See https://unix.stackexchange.com/questions/257061/gentoo-linux-gpg-encrypts-properly-a-file-passed-through-parameter-but-throws-i/257065#257065
GPG_TTY needs to be set for gpg to work properly.
It seems that with the switch to travis/bionic, this env variable
is not set anymore automatically
2019-11-01 11:02:31 +01:00
Andreas Dangel d276b02407 [ci] Build with profile "generate-rule-docs" while preparing release
This should prevent us from releasing PMD with some
errors in release notes / rule docs.
2019-11-01 10:03:39 +01:00
Andreas Dangel 3dfe5ee7ba [core] Fix RuleSetFactoryTest which might be locale dependent
This might happen with JREs that provide localized log level
names. In German locale and openjdk from adoptopenjdk the
warning logs are prefix with "WARNUNG: " instead of "WARNING: ".

The change now makes sure, that the test is always run in English.
2019-11-01 09:37:39 +01:00
Andreas Dangel 702b4c1e4c Merge branch 'pr-2089'
[core] Minor unrelated improvements to code
2019-11-01 09:05:54 +01:00
Andreas Dangel 6c4ff288d3 [doc] Update release notes, refs #2089 2019-11-01 09:05:08 +01:00
Andreas Dangel 1649e5c9a8 Merge branch 'pr-2085'
[ci] Update to bionic on travis
2019-11-01 09:02:23 +01:00
Andreas Dangel 00424c63a9 dogfood: Upgrade to PMD 6.19.0 2019-11-01 08:52:24 +01:00
Andreas Dangel 8e745acf37 Prepare next development version 2019-10-31 19:24:21 +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
Andreas Dangel 433f8c06a2 Prepare pmd release 6.19.0 2019-10-31 18:27:57 +01:00
gibarsin b84dfe80b5 Minor unrelated improvements to code 2019-10-30 22:37:13 -07:00
Andreas Dangel 73e48edaaa Merge branch 'pr-2054'
[java] Rename rule InvalidSlf4jLoggingFormat to InvalidLogMessageFormat
2019-10-30 19:30:44 +01:00
Andreas Dangel 39e07f6fbc Merge branch 'pr-2084'
[core] Deprecate Parser#getSuppressMap
2019-10-30 19:25:59 +01:00
Andreas Dangel 79fa9d2137 Merge branch 'pr-2083'
[core] Enable type resolution by default for XPath rules
2019-10-29 19:42:58 +01:00
Andreas Dangel 6e92282e24 Merge branch 'pr-2086'
[core] Improve logging of deprecated/renamed rules and non-existing excluded rules
2019-10-29 19:40:17 +01:00
Clément Fournier 34455b3051 Merge branch 'pr-2066' 2019-10-29 16:38:42 +01:00
Andreas Dangel fc8f9b1c6e [doc] Clarify note about deprecated rules when referencing a complete ruleset 2019-10-28 21:46:39 +01:00
Andreas Dangel fda81bd7bc [core] Don't enable deprecated rules if whole ruleset is imported
This restores the previous behavior.
2019-10-28 21:44:46 +01:00
Andreas Dangel f9d7b0891b Merge branch 'pr-2027'
[doc,ci] Rework doc generation and release notes
2019-10-28 19:39:39 +01:00
Andreas Dangel 0a94dec8f0 Merge branch 'pr-2044'
[core] Wrong deprecation warnings for unused XPath attributes
2019-10-28 19:27:52 +01:00
Andreas Dangel 2d4b01dca2 Upgrade embedded pmd-designer to 6.19.0
Also fix integration test with the additional
language "text".
2019-10-27 19:02:03 +01:00
Andreas Dangel 078863e36e [core] Only log if a language doesn't provide categories.properties
The new pmd-designer 6.19.0 adds the language module "text" (PlainText).
It is used as a fallback, if no other language modules are on the
classpath.

With this change PMD only logs a warning
if the file categories.properties couldn't be found for a language
instead of throwing RuleSetNotFoundException.
2019-10-27 19:01:42 +01:00
Andreas Dangel 95bbf56aea Use released pmd-build-tools version 5 2019-10-27 12:05:13 +01:00
Andreas Dangel 7e19b97e15 [doc] Update release notes, fixes #1978, fixes #2082 2019-10-27 11:40:37 +01:00
Andreas Dangel b1adf5c97c [doc] Add note for referencing a complete category or ruleset 2019-10-27 11:28:13 +01:00
Andreas Dangel 3c32f229f6 [core] Don't fail hard anymore if excluded rule doesn't exist
Fixes #1978
2019-10-27 10:16:17 +01:00
Andreas Dangel 9019f15cab [core] Improve logging of deprecated rule usages
Refs #2082

Not all cases are solved yet. It works, if a rule has been renamed
within the same category. If a rule is moved between categories,
then we might get multiple deprecation warnings.

There is also one important change when referencing a complete ruleset:
Previously we skipped all rules, that were deprecated without
distinguishing between rule definitions and rule references.
Now we only skip deprecated rule references but we still use
deprecated rule definitions. This affects any user, that simply uses
a "bulk-import" of category rulesets, because now, they'll also
use deprecated rules and get a warning. They'd need to exclude these
rules explicitly (or import just the rules they want to use).
2019-10-27 09:58:43 +01:00
Andreas Dangel 0460c38aa9 [ci] Update to bionic on travis 2019-10-26 17:35:41 +02:00
Andreas Dangel d61d53092e [core] Deprecate Parser#getSuppressMap
Refs #2055
2019-10-26 17:27:11 +02:00
Andreas Dangel 92b8af8477 [core] Enable type resolution by default for XPath rules
Fixes #2048

All XPath rules will have now type resolution enabled by default.
While this change is in core, it actually only affects Java, since
this is the only language which has a type resolution facade
registered in its language handler.
2019-10-26 16:58:07 +02:00
Andreas Dangel 752e5f8ad5 [java] Deprecate AbstractJavaRule#getDeclaringType(Node)
Refs #2034
2019-10-26 12:17:43 +02:00
Andreas Dangel 7f31ad186b [ci] Prevent doc build from deploying the binary distribution
The documentation build should only deploy the pmd-doc*.zip
artefacts and not more.
2019-10-26 12:00:41 +02:00
Andreas Dangel 6e6adb9710 [ci] Generate the rule documentation also for pull requests
This will execute the DeadLinksChecker and RuleTagChecker
after the rule documentation has been generated.
2019-10-26 11:56:06 +02:00
Andreas Dangel dd87fcb968 gitignore docs/pages/pmd/rules 2019-10-26 11:52:20 +02:00
Andreas Dangel c134f23d7c Move all doc checks into the profile "generate-rule-docs" 2019-10-26 11:52:20 +02:00
Andreas Dangel 4ee8e65417 Upload release notes with the "docs" build.
The github release is first created as a draft, when we edit
the release notes, we publish it (draft=false), so that the
release notification mail contains the full release notes.
2019-10-26 11:52:20 +02:00
Andreas Dangel 7ae9247518 Generate rule docs only with maven profile "generate-rule-docs"
For travis build, PMD needs to be built now before jekyll can
generate the documentation.
In the main build, rule docs are not committed anymore.
2019-10-26 11:51:33 +02:00
Andreas Dangel 37aaa675db Remove the generated rule documentation from repository 2019-10-26 11:51:32 +02:00
Andreas Dangel f10b631d76 [ci] Only execute deployment provider under linux
Previously it had also been executed under the macosx build,
see https://travis-ci.org/pmd/pmd/jobs/585148459#L6700
2019-10-26 11:39:16 +02:00
Andreas Dangel f343932a4f [ci] Allow the windows job to fail for now
There seems to be some problem when the deploy phase is executed,
which happens only on pushes - for PRs the deploy is not executed
at all.
Although the deploy is skipped (since this is not a tagged build),
the windows job hangs after that.

Maybe we need to deploy to github releases manually, as we do
for the release notes already. That way, we wouldn't use the
deployment mechanism of travis.
2019-10-26 11:35:29 +02:00
Juan Martín Sotuyo Dodero c5145994ac Merge pull request #2077 from adangel/travis-windows
[ci] Add travis build on windows
2019-10-25 17:05:54 -03:00
Juan Martín Sotuyo Dodero d6f0192857 Merge branch 'master' into travis-windows 2019-10-25 17:05:45 -03:00
Andreas Dangel 6f4ccfb979 Add rule integration tests for all other supported languages 2019-10-25 19:50:48 +02:00
Andreas Dangel c7f143534a [doc] Update generated rule doc 2019-10-25 18:42:50 +02:00
Andreas Dangel c1f36d9d70 [java] Rename InvalidSlf4jMessageFormat to InvalidLogMessageFormat
Follow-up on #2012
2019-10-25 18:42:50 +02:00
Andreas Dangel 5c2bff403d Merge branch 'pr-2068' 2019-10-25 18:20:06 +02:00
Andreas Dangel c2b484bbc0 [doc] Update release notes, refs #2068 2019-10-25 18:18:16 +02:00
Andreas Dangel 2bc67ea719 [java] Add deprecation javadoc 2019-10-25 18:18:05 +02:00
Andreas Dangel 63395684c4 Merge branch 'pr-2076' 2019-10-25 15:01:58 +02:00
Andreas Dangel e8a4b5f77e [doc] Update release notes, refs #2076 2019-10-25 15:01:04 +02:00
Andreas Dangel ecc4e7558f [java] Use full name for CLASS_FAN_OUT metric for operations as well 2019-10-25 14:44:45 +02:00
Andreas Dangel 2b66fb76cb Merge branch 'master' into travis-windows 2019-10-25 14:27:17 +02:00
Andreas Dangel 72d31b2b30 [ci] Update to openjdk 11.0.5+10 2019-10-25 14:27:02 +02:00
Andreas Dangel 1209b162a9 [ci] Explicitly configure known_hosts for web.sourceforge.net 2019-10-24 20:29:16 +02:00
Juan Martín Sotuyo Dodero 9a2314ab5d Merge pull request #2079 from adangel/issue-1531-unusedprivatemethod
[java] UnusedPrivateMethod false-positive with method result
2019-10-23 19:46:48 -03:00
andi e2877ab95c use full name instead of abbreviation for classfanout & fix spelling 2019-10-22 20:22:20 +02:00
Chen Yang 48fab8cd64 Missing a ; 2019-10-22 21:24:13 +09:00
Chen Yang 80c293e82b Reuse the constructor 2019-10-22 21:13:02 +09:00
Andreas Dangel abc048ce41 [doc] Update generated rule documentation 2019-10-21 20:41:10 +02:00
Andreas Dangel 7bdb2a03d1 Merge branch 'pr-2078' 2019-10-21 20:32:26 +02:00
Andreas Dangel c7786d9438 [doc] Update release notes, fixes #1627, refs #2078 2019-10-21 20:32:03 +02:00
Andreas Dangel 50f748e191 [java] UnusedPrivateMethod false-positive with method result
Fixes #1531

In case we determined, that the method argument is a method call,
then we skip now completly trying to determine the correct argument
type. It was half-way fixed before for the first if condition, but
we still evaluated e.g. the allocation expression in

    print(new Integer(1).toString());

and wrongly assumed, the argument type would be an integer,
without taking into account the `toString()` method call.

The same happened with

    privateBooleanMethod(s, "true".equals(s));

where we took the 2nd argument as a literal and assumed
it is a "String", while the method call result actually
is a boolean.

With this change now, the false positive is fixed.

However, since we don't determine the argument type at all, the
method is matched solely on argument count. This will obviously
lead to wrong matches if method overloading is used.
2019-10-20 15:54:10 +02:00
Chen Yang 3abcbaa5a0 Move the resource loader to constructor 2019-10-20 11:26:52 +09:00
andi 7e48b4dcd3 fix documentation 2019-10-19 22:05:29 +02:00
Michael Clay b32c7ad6a8 [java] DoNotUseThreads should not warn on Runnable #1627 2019-10-19 20:55:49 +02:00
Andreas Dangel dde5d096d2 [doc] Update release notes, fixes #2071 2019-10-18 19:51:35 +02:00
Andreas Dangel ce05b1bbb6 [ci] Remove explicit ruby version, use the default 2019-10-18 19:48:14 +02:00
Andreas Dangel c3409c4aa7 [ci] Download openjdk from https://pmd-code.org/openjdk/
* Note: Download is only possible from travis
* Make openjdk version configurable in .travis.yml
* Skip download, if already downloaded
2019-10-18 19:47:18 +02:00
Andreas Dangel 23109d7b69 [ci] Add travis build on windows
* New parallel build for windows
* New before_install.sh script that prepares java, maven, ruby
2019-10-18 19:47:13 +02:00
Michael Clay 5739041b16 [java] DoNotUseThreads should not warn on Runnable on java8+ #1627 2019-10-18 17:43:33 +02:00
Andreas Dangel a1781422ca Merge branch 'pr-2073' 2019-10-17 21:05:43 +02:00
Andreas Dangel dde5cb530a [doc] Update release notes, refs #2073, fixes #2072 2019-10-17 21:05:14 +02:00
Andreas Dangel b76feef44e Merge branch 'pr-2070' 2019-10-17 20:34:00 +02:00
Andreas Dangel a91803f157 [doc] Update release notes, refs #2070, fixes #2067 2019-10-17 20:32:59 +02:00
andi 1515209a48 add classfanoutcomplexity metric 2019-10-17 13:05:36 +02:00
snuyanzin de632e6193 [PMD-2072] Add expected and actual line of numbers to message wording 2019-10-15 22:08:18 +02:00
Saladoc 66b52ee38f Fix typo in AbstractRendererTest class name 2019-10-15 20:21:19 +02:00
Saladoc 05b39e3419 Streamline renderer tests.
Remove platform-dependent contents from the file names to prevent tests
breaking on Windows systems.
2019-10-15 20:08:36 +02:00
Chen Yang 5c36ee1eba Rule loader should use the same resources loader to load the Rule sets 2019-10-15 11:44:05 +09:00
Andreas Dangel 52341d9d67 [java] Fix deprecated attributes in XPath rules 2019-10-14 19:50:52 +02:00
Andreas Dangel 507f543a73 Bump commons-compress from 1.18 to 1.19 in pmd-dist
This fixes CVE-2019-12402
2019-10-14 19:40:54 +02:00
Andreas Dangel e4e4c7ceae Merge branch 'pr-2060' 2019-10-14 19:36:45 +02:00
Clément Fournier ecf9be0c52 Finish release notes 2019-10-13 20:09:11 +02:00
Travis CI (pmd-bot) bf2bece085 Update documentation
TRAVIS_JOB_NUMBER=4328.1
TRAVIS_COMMIT_RANGE=e39a77812103...dff6f4d7ab98
2019-10-13 14:09:08 +00:00
Andreas Dangel 0ff97e5959 fix:[core] Wrong deprecation warnings for unused XPath attributes
* Improve integration tests in pmd-dist to detect
  warnings about deprecated attributes.
* Wrap the attribute value in a singleton list, to be able to distinguish
  between no value (null in the list) and value not determined yet
  (list is null).
* Add integration test for apex.
* Updated release notes

fixes #2020
2019-10-13 15:55:27 +02:00
Andreas Dangel dff6f4d7ab Merge branch 'pr-2065' 2019-10-13 15:44:59 +02:00
Andreas Dangel d45682faab [doc] Update release notes, refs #2065, fixes #1636 2019-10-13 15:44:45 +02:00
Carlos Macasaet a8dbc91b5e Make comment consistent with expected failures
Three of the problems were UR anomalies.

Addresses: #1636
2019-10-12 21:45:15 -07:00
Carlos Macasaet e41b8d992c Stop checking UR anomalies (Java)
This commit stops checking for UR anomalies in the
DataflowAnomalyAnalysis rule in Java. Note, I retained the UR anomaly
test, but changed the expected number of errors to zero.

Addresses: #1636
2019-10-12 19:01:30 -07:00
Anatoly Trosinenko 81512f2d53 [doc] Update docs on adding support for a new language 2019-10-12 11:24:56 +03:00
Clément Fournier ced97bb70b Fix compilation 2019-10-10 17:37:08 +02:00
Clément Fournier 2fd9d39825 Fix charset 2019-10-10 17:33:09 +02:00
Clément FournierandJuan Martín Sotuyo Dodero 9c77d027a3 Apply suggestions from code review
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-10-10 17:27:03 +02:00
Clément Fournier 1c799a3507 Update release notes 2019-10-09 22:57:46 +02:00
Clément Fournier 6abbfb5920 Fix source incompatible change
(had added throws IOException)
2019-10-09 22:52:49 +02:00
Clément Fournier a9d14ac441 Deprecate other helpers 2019-10-09 22:48:41 +02:00
Clément Fournier c289ed49c5 Deprecate ant stuff 2019-10-09 22:40:41 +02:00
Clément Fournier 7911d733d4 Deprecate various utility classes 2019-10-09 22:38:52 +02:00
Clément Fournier ee41f610da Deprecate Filters
Will be replace with Predicate
2019-10-09 22:30:18 +02:00
Clément Fournier e39a778121 Fix #2058 2019-10-09 22:12:59 +02:00
Andreas Dangel cfb4fbec0f Merge branch 'pr-2026' 2019-10-07 18:50:34 +02:00
Juan Martín Sotuyo Dodero bb7db78108 Update changelog, refs #2025 2019-10-06 17:40:16 -03:00
Juan Martín Sotuyo Dodero b22808a65b Fix NPE in ImportWrapper.equals 2019-10-06 17:39:11 -03:00
Juan Martín Sotuyo Dodero a61835fe1e [java] Fix regexp to properly parse references 2019-10-06 17:38:50 -03:00
Juan Martín Sotuyo Dodero 92f393f32c [java] Add failing tests for #2025 2019-10-06 17:38:50 -03:00
Andreas Dangel 5c21dd7933 Merge branch 'pr-1955' 2019-10-05 18:49:23 +02:00
Andreas Dangel 5156e8922e Merge branch 'pr-2010' 2019-10-05 18:28:48 +02:00
Andreas Dangel 06add3a5a7 [doc] Update release notes, refs #2010 2019-10-05 18:27:56 +02:00
Clément Fournier 7f936e3c38 Fix CLI switches documented with a default value
Switches take no argument
2019-10-05 17:47:31 +02:00
Andreas Dangel 9c8cab088e Merge remote-tracking branch 'origin/master' 2019-10-05 15:06:24 +02:00
Andreas Dangel 18557a72c1 [doc] Update generated documentation 2019-10-05 15:05:00 +02:00
Travis CI (pmd-bot) 407cebcba9 Update documentation
TRAVIS_JOB_NUMBER=4279.1
TRAVIS_COMMIT_RANGE=63e2454ed25f...04e5619fa884
2019-10-05 13:00:12 +00:00
Andreas Dangel f4d590a3b2 Merge branch 'pr-2012' 2019-10-05 14:55:25 +02:00
Andreas Dangel 3093e0bf02 [doc] Update release notes, refs #2012, fixes #336 2019-10-05 14:53:43 +02:00
Andreas Dangel 744fea7366 [doc] Update rule descriptions for supported logging frameworks 2019-10-05 14:53:24 +02:00
Andreas Dangel 0d9419ef3e Remove unnecessary CDATA for test descriptions 2019-10-05 14:50:50 +02:00
Clément Fournier 04e5619fa8 Deprecations for #2034
Also, replace deprecated method usages
2019-10-05 13:55:18 +02:00
Clément Fournier 63e2454ed2 Deprecate Parser#canParse
Refs #2035
2019-10-05 13:16:01 +02:00
Andreas Dangel 3e59c40850 Merge branch 'pr-2032' 2019-10-04 20:31:12 +02:00
Andreas Dangel 4b8de80c01 [doc] Update release notes, refs #2032, fixes #2014 2019-10-04 20:30:20 +02:00
Andreas Dangel 2628b169b2 [core] Add @Experimental for CPD#add(SourceCode) 2019-10-04 20:27:57 +02:00
Andreas Dangel 459b430916 [doc] Update gems, fix rubyzip security alert
Upgrades rubyzip to 2.0.0, which fixes CVE-2019-16892
2019-10-03 19:42:58 +02:00
Andreas Dangel b1083555e5 doc:fix jdoc links in release notes 2019-10-03 19:13:40 +02:00
Andreas Dangel 1dc75e6694 Merge branch 'pr-2037' 2019-10-03 19:12:28 +02:00
Andreas Dangel e7bb587b2b doc:Update release notes, refs #2037, fixes #2036, add deprecations 2019-10-03 19:11:26 +02:00
Andreas Dangel 6ace28fdca Merge branch 'pr-2047' 2019-10-03 18:48:49 +02:00
Andreas Dangel 98bd5cb57f doc:Update release notes, refs #2047, fixes #1912 2019-10-03 18:48:38 +02:00
Clément Fournier df4ed60971 Use Pattern everywhere instead of String 2019-10-01 17:42:55 +02:00
Clément Fournier acbb57da72 Deprecate LanguageRegistry methods
Refs #2035
2019-10-01 16:35:04 +02:00
Clément Fournier 69a1fb7c31 Merge pull request #2045 from adangel/issue-2040
fix:[ci] Danger is failing builds
2019-10-01 11:35:42 +02:00
Juan Martín Sotuyo Dodero 9fe501d1a0 Merge pull request #2043 from adangel/fix-2042
[java] PMD crashes with ClassFormatError: Absent Code attribute
2019-09-30 00:37:22 -03:00
Andreas Dangel 6c4b6b1649 fix:[ci] Danger is failing builds
Add Gemfile.lock to pin down the current versions

fixes #2040
2019-09-29 21:24:34 +02:00
Andreas Dangel 83a8a58f04 Revert "[ci] Danger is failing builds"
This reverts commit 8299e7d231.
2019-09-29 21:22:06 +02:00
Andreas Dangel 8299e7d231 [ci] Danger is failing builds
Temporarily pin down faraday to <0.16.0.
Refs #2040
2019-09-28 20:16:27 +02:00
Andreas Dangel 8e28fb35dc fix: [java] PMD crashes with ClassFormatError: Absent Code attribute...
Retrieving the enclosing class might result in a LinkageError or
ClassFormatError.
For now this error is just logged as a warning and ignored.

fixes #2042
2019-09-28 19:54:56 +02:00
Clément Fournier bda77805d3 Deprecate DCD
Refs #2038
2019-09-28 12:40:38 +02:00
andi ea6174ebed Fix computation of metrics with annotations 2019-09-28 12:32:31 +02:00
Clément Fournier 7c475d64a1 Document 2019-09-27 19:19:16 +02:00
Clément Fournier f5b02ef2b0 Log wrong include/exclude patterns 2019-09-27 18:58:07 +02:00
Nathan Braun 9e2105dcb3 [pmd-core] Allow adding SourceCode directly into CPD #2014. 2019-09-26 12:49:13 -07:00
Juan Martín Sotuyo Dodero b7f0e8d26e Merge pull request #2031 from oowekyala/deprecate-canSuppressWarnings
[java,apex] Deprecate CanSuppressWarnings
2019-09-25 18:00:25 -03:00
Clément Fournier 54b7679329 Same for apex 2019-09-25 01:11:46 +02:00
Clément Fournier bcb7774795 [pmd-java] Deprecate CanSuppressWarnings following #1927 2019-09-25 01:08:19 +02:00
Andreas Dangel a7e767e6f1 Merge branch 'pr-2024' 2019-09-20 08:28:04 +02:00
markhall1982 ab434f3747 changes in response to feedback
Remove wrapping HashMap
Add log4j2 to test descriptions
2019-09-19 21:04:01 +01:00
Juan Martín Sotuyo Dodero 9ee73f5399 Update changelog, refs #2017 2019-09-19 16:14:06 -03:00
Juan Martín Sotuyo Dodero 494a5bc3f8 Fix #2017 2019-09-19 16:12:08 -03:00
Juan Martín Sotuyo Dodero 8d5cb1968d Add failing test for UnnecessaryFullyQualifiedName
- Tests for #2017
2019-09-19 16:11:35 -03:00
Juan Martín Sotuyo Dodero 691f01d254 Merge pull request #2021 from oowekyala/scala-cleanups
[scala] Fix scala text bounds
2019-09-17 17:53:49 -03:00
Andreas Dangel 07ea0b0f79 [core] DataSource is now closable, add default impl as abstract class 2019-09-17 19:58:19 +02:00
Clément Fournier 4b4e6a247d Remove useless test 2019-09-17 19:30:31 +02:00
Clément Fournier e09ea8ce1a Setting line numbers is unsupported 2019-09-17 19:20:27 +02:00
Clément Fournier 734fc53aba Fix java tests not executing 2019-09-17 19:16:45 +02:00
Clément Fournier 591cfc0a51 Remove old test 2019-09-17 04:33:39 +02:00
Clément Fournier 95d6ea3f37 Fix scala text bounds 2019-09-17 04:21:05 +02:00
Clément Fournier ed428dd852 Cleanup scala tree builder 2019-09-17 03:30:30 +02:00
Andreas Dangel 8d08016a94 Update PMD to 6.18.0, remove unnecessary suppressions 2019-09-16 20:42:01 +02:00
Andreas Dangel 395e3453cb dogfood: Upgrade to PMD 6.17.0 and fix CloseResource issues 2019-09-16 20:03:12 +02:00
Clément Fournier e4ce2faf78 Fix spurious warning about deprecated attributes
Because we were evaluating all attributes eagerly,
deprecated attributes were reported even without
being used. Possibly, performance also took a hit.
2019-09-16 13:23:11 +02:00
Andreas Dangel b0e458d813 Prepare next development version 2019-09-15 10:15:20 +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 be90279d83 Prepare pmd release 6.18.0 2019-09-15 10:04:40 +02:00
Andreas Dangel 4672ccf2e3 Update generated rule documentation 2019-09-15 09:57:04 +02:00
Andreas Dangel 8f3abf9349 Merge branch 'pr-2015' 2019-09-15 09:47:04 +02:00
Andreas Dangel 6d8f7c12df Update release notes, refs #2015, #fixes #1227 2019-09-15 09:46:20 +02:00
Andreas Dangel eeb147e594 formatting 2019-09-15 09:46:07 +02:00
Amish Shah 73006a420e Update doc for unused formal parameter 2019-09-14 14:17:06 -05:00
Andreas Dangel e0b0e6330d [core] XPath 1.0: filter out list attributes
While XPath 2.0 queries support now list attributes as
sequences, XPath 1.0 won't. It would only be supported as
single string which makes the two xpath versions completely
incompatible. In order to make it easier for the transitioning
from xpath 1.0 to xpath 2.0, list attribute will only be
supported for xpath 2.0.

See also https://github.com/pmd/pmd/pull/1959#discussion_r322027876
2019-09-14 18:20:03 +02:00
Andreas Dangel 9eaffbd3e6 Update generated rule documentation 2019-09-14 17:24:26 +02:00
Andreas Dangel 8821434604 Merge branch 'pr-1943' 2019-09-14 17:11:34 +02:00
Andreas Dangel 5f30951a8b Update release notes, refs #1943, fixes #1942 2019-09-14 17:09:00 +02:00
Andreas Dangel 4d6b3215d5 Add new rule DebugsShouldUseLoggingLevel to quickstart 2019-09-14 17:08:37 +02:00
Clément Fournier 8ac3a10020 Bump kotlin test version 2019-09-14 15:04:38 +02:00
Clément Fournier 9ae5342eb5 Normalise line terminators in tests
Comparison was failing because the test file was checked
out with CRLF and the expected result is written with LF.

Maybe we should normalise consistently across tests. Using
PMD.EOL in tests is just code obfuscation.
2019-09-14 02:06:39 +02:00
Clément Fournier c7b83fc0bc Merge branch 'adangel-java13' 2019-09-14 01:08:20 +02:00
Andreas Dangel dd294d3813 Consider lower-case, use parameter strictMode 2019-09-13 15:57:14 +02:00
Andreas Dangel c8fdd5f0c0 Merge branch 'pr-2013' 2019-09-13 15:22:51 +02:00
Robert Sösemann 5f1b2781e6 Update news.md 2019-09-12 20:58:09 +02:00
Andreas Dangel 76bf20a0c7 Analyze only src/main/java and not src anymore, since mixing
java12 preview and java13 preview is now not possible anymore

see
src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java12
src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java13
2019-09-12 20:35:36 +02:00
Andreas Dangel eba98b3898 Fixes from review, refs #1973 2019-09-12 20:22:45 +02:00
Clément Fournier f9f7062a65 Mark typeres implementation as internal API 2019-09-12 18:43:22 +02:00
markhall82 96449c2ae5 Ensure pom formatting remains same as master 2019-09-11 20:45:42 +01:00
markhall82 16f7f9385b Correct previous error in doc re: placeholders
Revert IntelliJ added tags from pom.xml
2019-09-11 20:43:37 +01:00
markhall82 a660f2cfcb Fix for issue #336, introduce log4j 2 support as it can use the same rules as slf4j.
Note, one of the rules remains InvalidSlf4jMessageFormatRule, to make the rule more generic it would require a documentation change on sourceforge site.
2019-09-11 20:36:34 +01:00
Andreas Dangel a2df7e2d29 Merge branch 'master' into java13 2019-09-11 20:41:00 +02:00
Andreas Dangel 970c86f557 [java] Introduce language version 12-preview and 13-preview 2019-09-11 20:36:29 +02:00
Gregor Riegler f5c8be8f52 [java] LawOfDemeter to support inner builder pattern 2019-09-10 21:55:03 +02:00
Clément Fournier 36d63429b4 Merge branch 'cleanup-scala' 2019-09-08 22:47:49 +02:00
Clément Fournier 35aef685fa Fix typo in release notes 2019-09-08 22:46:55 +02:00
Clément Fournier 68cd5549b9 Cleanup some pmd-scala methods
* Remove ScalaNode#childrenAccept: this only makes stack traces longer.
Besides, the node doesn't know how to accumulate values, so it's useless.
* Specialize return type of some methods of the interface.
2019-09-08 22:44:39 +02:00
Juan Martín Sotuyo Dodero 36cd3d5a84 Merge pull request #1959 from adangel/apex-supertype
[apex] Expose supertype name of UserClass
2019-09-08 17:29:48 -03:00
Andreas Dangel e29401b45e Fixes from PR #1959 Review 2019-09-08 21:35:14 +02:00
Clément Fournier 22e5538e14 Fix test files 2019-09-08 18:53:32 +02:00
Renato Oliveira 9b00cb3ceb Change expression to the one suggested by @rsoesemann. 2019-09-08 12:41:15 -03:00
Renato Oliveira 75d3e565f0 Update comment and "since" version 2019-09-08 12:37:42 -03:00
Clément Fournier be7d439134 Checkstyle 2019-09-08 16:10:45 +02:00
Clément Fournier 0b52f6427a Add regression test for MissingOverride
Refs #2007
2019-09-08 16:07:05 +02:00
Andreas Dangel a24e85488e Merge branch 'pr-1986' 2019-09-08 15:39:49 +02:00
Andreas Dangel 00f0cc3e3d Update release notes, refs #1986, fixes #1933, fixes #1936 2019-09-08 15:38:36 +02:00
Andreas Dangel 26600e68c7 Merge branch 'pr-1977' 2019-09-08 15:24:35 +02:00
Andreas Dangel 47d2b9b57b Update release notes, refs #1977, fixes #1953 2019-09-08 15:22:19 +02:00
Andreas Dangel 20d34103ce [plsql] Add basic support for with clause 2019-09-08 15:20:00 +02:00
Andreas Dangel dea41f1b6f Merge branch 'pr-1976' 2019-09-08 12:03:54 +02:00
Andreas Dangel 4d9070cf16 Update release notes, refs #1976 2019-09-08 12:03:24 +02:00
Andreas Dangel 854cd4c700 Merge branch 'pr-1975' 2019-09-08 12:00:19 +02:00
Andreas Dangel 6e878e95bb Update release notes, refs #1975, fixes #1946 2019-09-08 11:59:27 +02:00
Andreas Dangel aee182b0b8 Merge branch 'pr-1974' 2019-09-08 11:47:49 +02:00
Andreas Dangel 8124a0498b Update release notes, refs #1974
Fixes #1935
Fixes #1948
Fixes #1950
2019-09-08 11:46:44 +02:00
Andreas Dangel 2388f75891 Merge branch 'pr-1972' 2019-09-08 11:21:05 +02:00
Andreas Dangel 949a03acde Update release notes, fixes #1947, refs #1972 2019-09-08 11:20:03 +02:00
Andreas Dangel f283a663a3 [plsql] New node ForUpdateClause 2019-09-08 11:16:46 +02:00
Andreas Dangel de21a9008f [plsql] Remove extra tokens, remove reserved words as identifiers 2019-09-08 11:12:51 +02:00
Andreas Dangel e2a28b4d43 [apex] Expose InterfaceNames and TriggerUsages as Lists 2019-09-07 20:28:21 +02:00
Andreas Dangel 4d285c0ac9 [core] Add support for List attributes for XPath 2.0 2019-09-07 20:26:52 +02:00
Andreas Dangel 5ba724d221 Fix reference to StatisticalRule 2019-09-07 17:11:10 +02:00
Andreas Dangel a818557b6b Merge branch 'pr-1965' 2019-09-07 16:55:35 +02:00
Andreas Dangel 539b7a1672 [doc] Add scala rule index placeholder 2019-09-07 16:43:48 +02:00
Andreas Dangel c3f376478e whitespaces 2019-09-07 16:40:57 +02:00
Andreas Dangel 55e3b64f5d Fix unit tests 2019-09-07 16:35:52 +02:00
Andreas Dangel e225821272 Merge branch 'master' into pr-1965 2019-09-07 16:21:11 +02:00
Andreas Dangel 6eeb5fcef5 Update release notes, refs #1965 2019-09-07 16:19:47 +02:00
Andreas Dangel 1e33b634e0 [doc] Add scala as supported language 2019-09-07 16:19:24 +02:00
Andreas Dangel c8d6e7f00b Update license info
Since we don't rely anymore on org.sonar.plugins.scala
we can remove the LGPL-3 reference.
2019-09-07 16:09:33 +02:00
Andreas Dangel 24d030cc69 [scala] Move AST nodes to n.s.p.lang.scala.ast
* Also make ScalaTreeBuilder and AbstractScalaNode
  package private
2019-09-07 16:03:55 +02:00
Andreas Dangel 20c7d7f421 [test] fix language version tests to check registered rulesets
Now categories.properties are tested. rulesets.properties
is only tested, if it exists.
2019-09-07 15:50:17 +02:00
Andreas Dangel 4bb116125e [scala] Small improvements
* The system property to select the language version for
  the tokenizer used by CPD is called now
  "net.sourceforge.pmd.scala.version"
* The node ASTSource is marked as RootNode
* Removed (deprecated) DumpFacade solution
* Removed old rulesets.properties
2019-09-07 15:16:43 +02:00
Andreas Dangel ada5bdc072 [scala] Remove checkstyle exceptions 2019-09-07 15:10:02 +02:00
Andreas Dangel 298b436fb8 Merge branch 'master' into apex-supertype 2019-09-07 11:09:06 +02:00
Andreas Dangel 41304c3031 [apex] Introduce own PMD enum for TriggerUsage 2019-09-07 11:04:15 +02:00
Andreas Dangel dbb711b0f5 [apex] Fix ASTUserInterfaceTest examples 2019-09-07 10:50:09 +02:00
Andreas Dangel 13cf82362e Update release notes, clarify java12 preview language support
Support for java12 extended break statement will be removed
with next PMD version.
To do so, simply revert 09a1837.
2019-09-07 10:17:33 +02:00
Andreas Dangel 09a183702c Revert "[java] Remove java12 break-with-expression support"
This reverts commit 2ba1422747.
2019-09-07 10:13:02 +02:00
Clément Fournier f449cc72e3 Deprecate Report::hasMetrics and Report::metrics 2019-09-06 17:37:09 +02:00
Andreas Dangel 580549a07e Merge branch 'master' into java13 2019-09-06 15:23:51 +02:00
Andreas Dangel f3e4a77105 [java] Adjust grammar for text blocks
Refs #1973
2019-09-06 15:21:08 +02:00
Juan Martín Sotuyo Dodero bb0379ef4f Merge pull request #1982 from adangel/issue-1923
[core] Use real file name in ruleContext during analysis
2019-09-05 20:04:21 -03:00
Juan Martín Sotuyo Dodero 5458958749 Merge pull request #2000 from adangel/analysis-result
[core] analysis cache: Use always different checksum
2019-09-05 19:43:49 -03:00
Juan Martín Sotuyo Dodero 46ea77427c Merge pull request #1958 from adangel/issue-1952
[java] Compare ignored annotations by fully qualified names only
2019-09-04 00:58:55 -03:00
Andreas Dangel 5db5c62bb2 [core] analysis cache: Use always different checksum
If the checksum couldn't be determined, then we use now
System.currentTimeMillis. This should result in a different
checksum everytime the same file is analyzed, so that it
appears dirty. In that case, the cached results won't be used.
2019-09-03 20:21:23 +02:00
Andreas Dangel d905c8d7ed Fix release notes jdoc tag 2019-09-03 20:17:48 +02:00
Andreas Dangel 1d6148f06b Fix release notes jdoc links 2019-09-03 20:12:00 +02:00
Andreas Dangel ddd07e517a Merge branch 'master' into issue-1923 2019-09-03 19:43:27 +02:00
Andreas Dangel 3771320c47 Move logic to new ShortFilenameUtil 2019-09-03 19:42:21 +02:00
Andreas Dangel 6602d9e697 Fixes from PR review 2019-09-03 19:33:55 +02:00
Andreas DangelandJuan Martín Sotuyo Dodero 338cf1e1b7 Update pmd-core/src/main/java/net/sourceforge/pmd/renderers/AbstractRenderer.java
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-09-03 19:21:56 +02:00
Andreas DangelandJuan Martín Sotuyo Dodero 11e8c33e44 Update pmd-core/src/main/java/net/sourceforge/pmd/renderers/AbstractRenderer.java
Co-Authored-By: Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
2019-09-03 19:20:11 +02:00
Juan Martín Sotuyo Dodero 282f29f781 Add more missing imports 2019-09-02 17:51:33 -03:00
Juan Martín Sotuyo Dodero e72a92d2fb Merge branch 'master' into issue-1952 2019-09-02 17:46:20 -03:00
Juan Martín Sotuyo Dodero de13f7a0ae Add missing imports to fix tests 2019-09-02 17:40:33 -03:00
Juan Martín Sotuyo Dodero 3a7f747c05 Improve TypeHelper.isA to better handle edge cases 2019-09-02 17:40:03 -03:00
Juan Martín Sotuyo Dodero 42197f68b2 Merge pull request #1996 from pmd/dependabot/bundler/docs/nokogiri-1.10.4
Bump nokogiri from 1.8.5 to 1.10.4 in /docs
2019-09-02 16:27:20 -03:00
Juan Martín Sotuyo Dodero 89443f5373 Merge branch 'pr-1994' 2019-09-02 14:44:51 -03:00
Juan Martín Sotuyo Dodero e93ec2bcc2 Update changelog, refs #1994 2019-09-02 14:44:35 -03:00
dependabot[bot] 1192ca5051 Bump nokogiri from 1.8.5 to 1.10.4 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.8.5 to 1.10.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.8.5...v1.10.4)

Signed-off-by: dependabot[bot] <support@github.com>
2019-09-02 17:41:26 +00:00
Clément Fournier 3755d5d7d4 Tag n.s.pmd.cache as internal API,
update release notes
2019-08-29 22:18:01 +02:00
Clément Fournier 6cd8ae38ff Merge branch 'Monits-issue-1990' 2019-08-29 22:09:48 +02:00
Juan Martín Sotuyo Dodero 29921f03e5 Fix breaking tests 2019-08-29 12:53:22 -03:00
Amish Shah 230af90386 [core] Resolve pmd-report failure when java folder in filepath - refs 1465 2019-08-29 08:00:07 -05:00
Juan Martín Sotuyo Dodero bf2ad56799 Update changelog, refs #1990 2019-08-27 11:03:37 -03:00
Juan Martín Sotuyo Dodero b85d71f632 [core] Resolve cached rule instances by more than class name
- Fixes #1990
2019-08-27 11:02:27 -03:00
Chris Smith 6dbab9ba35 Fix for PMD finding that this class doesn't have the right override method. 2019-08-23 16:39:57 -04:00
Chris Smith d0cf7fb56d Genericized the Scala Visitor's input and output types, correctly placed node accept methods, handle bad code tokenization problems. Added more rules to check for bad source tokenization, and rules can visit particular nodes correctly 2019-08-22 12:24:37 -04:00
Piotr Szymanski 5a444276f8 simplified lookahead for blocks and proc/func 2019-08-20 21:22:42 +02:00
Chris Smith 7e7b36d35c Added ASTNodes for all Scala AST Nodes to do direct translation. 2019-08-20 13:59:43 -04:00
Chris Smith 39b51aac47 code review fixes:
re-enable javadocs
ScalaTokenizer keeps nodes in scala for performance gain
Change AST{name}Node designation to {name}
2019-08-19 12:27:44 -04:00
Travis CI (pmd-bot) 056b0f73a8 Update documentation
TRAVIS_JOB_NUMBER=4118.1
TRAVIS_COMMIT_RANGE=febf512e9c77...780edaa5f5af
2019-08-18 04:55:24 +00:00
Juan Martín Sotuyo Dodero 780edaa5f5 Merge branch 'pr-1970' 2019-08-18 01:37:02 -03:00
Juan Martín Sotuyo Dodero f5b9f6be23 Update changelog, refs #1970 2019-08-18 01:36:19 -03:00
Juan Martín Sotuyo Dodero febf512e9c Merge branch 'pr-1968' 2019-08-18 01:28:07 -03:00
Andreas Dangel 882d5c67d2 Merge branch 'pr-1983' 2019-08-17 16:42:57 +02:00
Andreas Dangel 5dd890c1bb Update release notes, refs #1983 2019-08-17 16:42:21 +02:00
Andreas Dangel 29ea6834a5 Merge branch 'pr-1971' 2019-08-17 16:30:28 +02:00
Andreas Dangel c8034b7d30 Update release notes, fixes #1862, refs #1971 2019-08-17 16:30:10 +02:00
Juan Martín Sotuyo Dodero 8e9b992338 Improve assertion 2019-08-16 14:22:23 -03:00
Andreas Dangel bdd0f2c525 [core] Use real file name in ruleContext during analysis
* This is needed to fix #1923
* RuleContext, RuleViolations all use the real name
* The shortname is only applied by the renderers now
  at the end of the processing
* Error logging and reporting also uses the real, full name
  of the file being analysed
2019-08-16 11:22:48 +02:00
Juan Martín Sotuyo Dodero 660c018511 Fix failing test 2019-08-15 14:34:05 -03:00
Juan Martín Sotuyo Dodero 032acbd65d Add failing test for non-existing entries in classpath 2019-08-15 14:33:35 -03:00
Piotr Szymanski 9adc3079b6 fixed formatting 2019-08-14 14:30:10 +02:00
Piotr Szymanski dbe3840db1 fix for skipping sql starting with WITH 2019-08-14 14:28:13 +02:00
Piotr Szymanski a953433f5c lookahead in MultiplicativeExpression 2019-08-14 13:45:02 +02:00
Piotr Szymanski 8c669f5a47 formated plsql code 2019-08-14 12:28:32 +02:00
Piotr Szymanski 28b67091f0 fix for trim function with record type variable 2019-08-14 11:51:12 +02:00
Piotr Szymanski 182ba549ba fixes for referencing record type variables 2019-08-14 10:53:56 +02:00
Anton Kot 9796dc1431 docs_and_kotlin_version_rollback 2019-08-14 09:52:13 +02:00
Andreas Dangel 604ef548c9 Update release notes, fixes #1930 2019-08-13 20:48:06 +02:00
Andreas Dangel 2ba1422747 [java] Remove java12 break-with-expression support
This preview language feature has been replaced with
the yield statement in java 13.
2019-08-13 20:48:06 +02:00
Andreas Dangel ac4a0daff9 [java] Add Java 13 support
Fix type resolution of switch with yields
2019-08-13 20:48:01 +02:00
Andreas Dangel b110186ed7 [java] Add Java 13 support
* Add text block literal
2019-08-13 20:00:40 +02:00
Andreas Dangel 969972214c [java] Add Java 13 support
* Java 13 is the new default
* New yield statement
2019-08-13 18:42:40 +02:00
Piotr Szymanski f9ec14c309 issue-1947 added ForUpdateClause 2019-08-13 18:33:14 +02:00
Piotr Szymanski 363ceadeaa issue-1947 added ForUpdateClause 2019-08-13 18:15:26 +02:00
Anton Kot e581bba71e review_changes 2019-08-13 17:48:25 +02:00
Andreas Dangel 4ef5079f74 Fix unit tests when building with java13
Java13 has fixed https://bugs.openjdk.java.net/browse/JDK-8206132
which means, that setExpandEntityReferences==false is now honored
and works. The entities are no longer expanded.
2019-08-13 17:40:51 +02:00
Anton Kot ce4b2c6041 Issue_1862_No_Message_Digest_class_field 2019-08-12 13:02:26 +02:00
Tobias Weimer f8bb126c6c [java] DoubleBraceInitialization:
* Updated documentation to make the example compile (there is no varargs version of addAll(..))
2019-08-11 11:16:33 +02:00
Andreas Dangel fac5604d63 Merge branch 'pr-1956' 2019-08-10 22:21:22 +02:00
Andreas Dangel fc9a3cd5a0 Update release notes - add rule designer documentation 2019-08-10 22:21:06 +02:00
Andreas Dangel 331a9f941d (doc) Improve css for displaying details/summary tag 2019-08-10 22:14:27 +02:00
Andreas Dangel e3db6241f6 [apex] Sort trigger usages 2019-08-10 21:49:01 +02:00
Andreas Dangel efe8f9349d Merge branch 'master' into apex-supertype 2019-08-10 21:15:28 +02:00
Andreas Dangel 281ef3441b [apex] Expose more info on UserClass, UserInterface, UserTrigger
* Renamed ASTUserClass::getSuperTypeName to getSuperClassName
* Expose ASTUserClass::getInterfaceNames - comma separated
* Expose ASTUserInterface::getSuperInterfaceName
* Expose ASTUserTrigger::getTargetName and getUsages
2019-08-10 20:43:38 +02:00
Andreas Dangel 7f7213b8e7 [java] CloseResource: Fix NPE if type of method parameter is not known 2019-08-10 19:04:08 +02:00
Andreas Dangel 27164804f1 [java] CloseResource: fix false-negative when byte array is passed in 2019-08-10 18:11:28 +02:00
Andreas Dangel c87af46d3f Update release notes
* Reference fixed issues in test cases for CloseResources
* Fixes #1922
* Fixes #1966
* Fixes #1967
2019-08-10 12:25:42 +02:00
Andreas Dangel cb63f5f8c4 [java] CloseResource: add test case for #1076
The problem is not reproducible.
2019-08-10 12:03:17 +02:00
Andreas Dangel 377275edae [java] CloseResource: possible false positive with Streams
By default `java.util.stream.Stream` is now ignored.
Fixes #1922
2019-08-10 12:03:09 +02:00
Andreas Dangel e0535f4bce [java] CloseResource: add additional test case 2019-08-10 12:03:09 +02:00
Andreas Dangel ef8ed08ee0 [java] CloseResource: fix false positive with assignments before try 2019-08-10 12:03:09 +02:00
Andreas Dangel 619172560b [java] CloseResource: consider method parameters in general 2019-08-10 12:03:09 +02:00
Andreas Dangel 5b63d787c7 [java] CloseResource: ignore variables that are initialized from parameters
If a closable local variable is initialized from a method/constructor
parameter, then it is ignored. In that case, the resource is not created
in this method, but somewhere else. Therefore the resources should
be closed there.
2019-08-10 12:03:03 +02:00
Andreas Dangel 4a2943510c Fix excludes when creating src dist zip
The biggest part was the "vendor/**" stuff from ruby.
This is created during the build and should not be
part of the source distribution.

Also added a test to assert that some sensitive data
from .travis/ doesn't accidentally leak.
2019-08-09 21:46:03 +02:00
Chris Smith 9f923b5b6b Minor changes to work better with the PMD Designer 2019-08-09 10:54:09 -04:00
Chris Smith 0f7d5f1ec0 Added Scala AST Parser 2019-08-08 18:45:26 -04:00
Andreas Dangel 1a5486dc30 Merge branch 'pr-1954' 2019-08-04 11:22:56 +02:00
Andreas Dangel bf18d5dc87 (doc) apex bestpractices: Create a clickable link 2019-08-04 11:15:35 +02:00
Andreas Dangel 190dee7c59 [apex] Expose supertype name of UserClass
Fixes #1901
2019-08-04 11:07:58 +02:00
Andreas Dangel 1b7d0f8576 Update release notes, fixes #1951 2019-08-04 10:40:46 +02:00
Andreas Dangel f9d8898f7a [java] Fix FP for UnnecessaryFQNRule with sub packages 2019-08-04 10:39:56 +02:00
Andreas Dangel 8fdea448e4 [java] Compare ignored annotations by fully qualified names only
Fixes #1952
2019-08-03 12:31:28 +02:00
Clément Fournier 46a8d87fb7 Try to fix confused image reference
Build of #1956 is failing but just on macosx...
See https://travis-ci.org/pmd/pmd/jobs/566211322

Idk what's the problem, maybe it's because '(?!)' looks
like a negative lookahead
2019-08-01 01:37:32 +02:00
Clément Fournier 959c98c906 Fix dead link detection for image links 2019-08-01 01:00:25 +02:00
Clément Fournier 79b2de8549 Put designer wiki doc on the website
Fix absolute links

Add css for details tag

Add installation doc
2019-07-31 19:01:11 +02:00
Clément Fournier 225430953b Checkstyle 2019-07-30 19:43:49 +02:00
Andreas Dangel 091ce3d40e [java] Deprecate ASTImportDeclaration#getImportedNameNode() as well
Refs #1888
2019-07-30 19:30:19 +02:00
Clément Fournier 493e0014b0 Also fix a false negative 2019-07-30 16:47:21 +02:00
Clément Fournier fd3eac3c9d Fix #1951 - false positive for UnnecessaryFQCN 2019-07-30 16:28:16 +02:00
Andreas Dangel d935db0a6d Cleanup developers list in pom.xml. The contributors can easily be
retrieved at https://github.com/pmd/pmd/graphs/contributors
2019-07-29 19:50:26 +02:00
Andreas Dangel 295759456d [java] Deprecate ASTImportDeclaration#getPackage(), refs #1888 2019-07-28 18:35:12 +02:00
Andreas Dangel a651514e56 Prepare next development version 2019-07-28 10:28:43 +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 a8d277a02a Prepare pmd release 6.17.0 2019-07-28 10:15:10 +02:00
Renato Oliveira 6a3f4162bc Fixes strings on the tests' messages. 2019-07-27 12:32:52 -03:00
Renato Oliveira 2650b38db9 Removes "DebugsShouldSpecifyLoggingLevelRule" Java files and replaces it with an XPath rule and its test. 2019-07-27 12:28:39 -03:00
Andreas Dangel 01c8a27122 [doc] Update generated rule documentation 2019-07-27 10:39:39 +02:00
Andreas Dangel aa55a0108c [java] CloseResource: ignore java.io.CharArrayWriter by default
Refs #1928
2019-07-27 10:27:18 +02:00
Andreas Dangel 49d2a58556 Update pmd-designer to 6.17.0 2019-07-27 09:44:22 +02:00
Renato Oliveira 698013fc0c Add automatically generated docs for Apex. 2019-07-26 00:26:22 -03:00
Renato Oliveira bc468b4f21 Fixes style by adding newlines and converting tabs to spaces. 2019-07-26 00:25:59 -03:00
Renato Oliveira 47583eea24 Fixes wrong rule name in best practices xml rule descriptor. 2019-07-25 23:38:02 -03:00
Renato Oliveira 6e67528a7c Add rule file and test case. 2019-07-25 23:14:53 -03:00
Renato Oliveira 75f20ba7f5 Fixes the name of the rule in the best practices category file. 2019-07-25 23:14:12 -03:00
Renato Oliveira 58582dd306 Add the "system.debug should use logging level" rule. 2019-07-25 21:59:01 -03:00
Travis CI (pmd-bot) b416df404d Update documentation
TRAVIS_JOB_NUMBER=4001.1
TRAVIS_COMMIT_RANGE=f269b3dc3f57...f1fb425313f1
2019-07-25 01:00:55 +00:00
Clément Fournier f1fb425313 Improve UseLocaleWithCaseConversions doc based on #1929 2019-07-25 02:42:33 +02:00
Travis CI (pmd-bot) f269b3dc3f Update documentation
TRAVIS_JOB_NUMBER=3997.1
TRAVIS_COMMIT_RANGE=26e74b880e96...ca71d2fae4b3
2019-07-23 18:51:13 +00:00
Andreas Dangel ca71d2fae4 Merge branch 'pr-1925' 2019-07-23 20:23:27 +02:00
Andreas Dangel be67ad97b0 Merge branch 'pr-1916' 2019-07-23 20:22:30 +02:00
Andreas Dangel 189861656c Update release notes, fixes #1832, refs #1916 2019-07-23 20:21:20 +02:00
Andreas Dangel f7c16d4abc [java] MissingStaticMethodInNonInstantiatableClass
* Migrate to XPath 2.0
* Add property "annotations"
2019-07-23 20:19:47 +02:00
Clément Fournier 26e74b880e Merge branch 'issue-1910' 2019-07-23 15:40:52 +02:00
Andreas Dangel 64abea7f42 Merge branch 'pr-1905' 2019-07-22 20:05:53 +02:00
Andreas Dangel 342f8482f5 Update release notes, fixes #1749, refs #1905 2019-07-22 20:05:12 +02:00
Andreas Dangel f9bb5b85a2 [java] DataflowAnomalyAnalysis - add test case for #1749 2019-07-22 19:34:02 +02:00
YoonhoChoi96 56b1bfbd97 Remove wasted lists and Simplify 2019-07-22 14:22:26 +09:00
YoonhoChoi96 83f4682063 fix typo 2019-07-22 12:57:21 +09:00
YoonhoChoi96 1dca17fd1b Verifying line numbers and the messages in Test Cases 2019-07-22 12:46:24 +09:00
Andreas Dangel 6f05882c95 [doc] Update generated rule documentation 2019-07-21 19:27:19 +02:00
Andreas Dangel 86be2463e9 Merge branch 'pr-1928' 2019-07-21 19:15:44 +02:00
Andreas Dangel 2278613cfd Update release notes, fixes #1921 2019-07-21 19:15:26 +02:00
Clément Fournier 7c77945164 #1921 - exclude ByteArrayInputStream from CloseResource 2019-07-21 16:38:35 +02:00
Andreas Dangel 169d08a898 Update release notes, fixes #1902 2019-07-20 17:49:35 +02:00
Andreas Dangel 50d211eae4 [plsql] Introduce new node OuterJoinExpression 2019-07-20 17:32:31 +02:00
Andreas Dangel 1ef5079b29 [java] ATFD calculation problem
* Fixes #1910
* Method call chains are now considered
2019-07-20 11:35:27 +02:00
Andreas Dangel ddb60b0163 [ci] Upgrade to AdoptOpenJDK 11.0.4 B11 2019-07-20 10:30:30 +02:00
Andreas Dangel fdb31686f0 Fixes #1902 [pslql] ParseException when parsing (+) 2019-07-19 12:21:04 +02:00
Andreas Dangel 14f5a2fe1c [doc] Update generated rule documentation 2019-07-19 11:23:53 +02:00
Andreas Dangel b19b7474fe Merge branch 'pr-1924' 2019-07-19 11:17:38 +02:00
Andreas Dangel 16149a2991 Merge branch 'pr-1917' 2019-07-19 11:16:10 +02:00
Andreas Dangel 3623c02c55 [doc] fix typo 2019-07-19 11:07:46 +02:00
Andreas Dangel d3a3c5529f Update release notes, fixes #1913, refs #1917 2019-07-19 11:07:46 +02:00
Andreas Dangel efd0eafff0 Make the new constants "NO_ERRORS_STATUS" private to avoid increasing
the API footprint
2019-07-19 11:07:40 +02:00
Andreas Dangel 94f98d3db3 Merge branch 'pr-1915' 2019-07-19 10:58:17 +02:00
Juan Martín Sotuyo Dodero c39a342b92 Update changelog, refs #1903 2019-07-18 19:36:21 -03:00
Juan Martín Sotuyo Dodero cb62b7e472 Fix false positive on UnsynchronizedStaticFormatterRule 2019-07-18 19:35:09 -03:00
Juan Martín Sotuyo Dodero ca34d4fa1c Add failing test case for #1903 2019-07-18 19:34:51 -03:00
Juan Martín Sotuyo Dodero 266d6bb453 Fix issues running unit tests from Eclipse 2019-07-18 19:29:13 -03:00
Renato Oliveira 052d38200e Change return code to zero for CPD when the help command is requested through the CLI. 2019-07-18 16:24:42 -03:00
YoonhoChoi96 33f3129562 Modify expected problems and exclude for-each case 2019-07-18 10:54:16 +09:00
YoonhoChoi96 82ea3ed51b Simplify nested loop 2019-07-17 19:49:08 +09:00
YoonhoChoi96 24cb0aa976 add test cases for reduce False Positive 2019-07-17 19:26:22 +09:00
YoonhoChoi96 d080e3cb48 add test cases for reduce False Positive 2019-07-17 19:02:54 +09:00
Renato Oliveira 383baaffd3 Should expect the return code to equal zero. 2019-07-16 18:14:18 -03:00
Anton Kot cebb5848c4 Merge remote-tracking branch 'upstream/master' 2019-07-16 17:21:36 +02:00
Renato Oliveira 5150b316e4 Add 'no error' return option, and assign it to the cli when the help command is invoked. 2019-07-15 19:21:02 -03:00
Andreas Dangel 267cee9caf [doc] Fix broken links 2019-07-14 18:15:15 +02:00
AnthonyKot a9c68a55b3 issue-1833 2019-07-13 21:57:58 +02:00
Andreas Dangel 93b4628387 [doc] Update generated rule doc 2019-07-13 19:53:59 +02:00
Andreas Dangel 77ccea5c0d Merge branch 'pr-1869' 2019-07-13 19:42:55 +02:00
Andreas Dangel 70c66c2952 Update release notes, fixes #1666, refs #1869 2019-07-13 19:41:53 +02:00
Andreas Dangel 084c78a5ea [xml] Improve example for MistypedCDATASection 2019-07-13 19:39:41 +02:00
Andreas Dangel 614484143a [doc] Add Lua support 2019-07-13 18:43:01 +02:00
Andreas Dangel 8e3adc6ba1 Merge branch 'pr-1892' 2019-07-13 18:29:32 +02:00
Andreas Dangel 4d7f7d3f73 Update release notes, refs #1892 2019-07-13 18:28:15 +02:00
Andreas Dangel 490ad67aa0 [doc] fix unnecessary blank lines 2019-07-12 16:03:15 +02:00
Andreas Dangel 6c9ecfa7c1 [doc] Escape code examples for liquid with {%raw%}
Fixes #1898
2019-07-12 10:57:10 +02:00
Andreas Dangel 2f3a51ce2f Merge branch 'pr-1908' 2019-07-12 09:57:05 +02:00
Andreas Dangel cb69769644 Update release notes, refs #1908, fixes #1909 2019-07-12 09:56:41 +02:00
crunsk e853ea98c7 Update ruleset filename from deprecated basic.xml to quickstart.xml
Frontpage (https://pmd.github.io/) uses ruleset quickstart.xml but https://pmd.github.io/pmd-6.16.0/pmd_userdocs_installation.html#sample-usage uses deprecated ruleset basic.xml 
(page https://pmd.github.io/pmd-6.16.0/pmd_rules_java.html shows status of both rulesets)
2019-07-08 20:29:26 +03:00
Juan Martín Sotuyo Dodero 53fbbb5a2d Merge pull request #1907 from adangel/issue-1896
[doc] Error in changelog 6.16.0 due to not properly closed rule tag
2019-07-06 19:10:59 -03:00
Juan Martín Sotuyo Dodero 7fd0b81a3a Revert "Fix bug with maven incremental compil"
This reverts commit a755c83eef.
2019-07-06 18:58:38 -03:00
Andreas Dangel 8216c3517f [doc] Error in changelog 6.16.0 due to not properly closed rule tag
Fixes #1896
2019-07-06 15:53:46 +02:00
Andreas Dangel 96fa52d8c1 Merge branch 'issue-1906' 2019-07-06 12:02:05 +02:00
Andreas Dangel 1f18888380 Update release notes, fixes #1906 2019-07-06 12:01:40 +02:00
Andreas Dangel b691cec6a4 [doc] Improve DeadLinksChecker
A leading slash is a problem now. Links need to be relative.
2019-07-06 12:00:33 +02:00
Andreas Dangel 6cb0701498 [doc] Fix broken internal links
* Links to pages need to be relative...
* Fixes #1906
2019-07-06 11:15:30 +02:00
YoonhoChoi96 cf16484ec6 Modifiying for reduce Fasle Positive in DFA Analysis Rule 2019-07-05 10:04:37 +09:00
Andreas Dangel e8f62f8d58 Fix release notes for 6.16.0
Refs #1896
2019-07-01 19:07:45 +02:00
Travis CI (pmd-bot) 85186f46aa Update documentation
TRAVIS_JOB_NUMBER=3945.1
TRAVIS_COMMIT_RANGE=f6c43c63b616...1a690ed1e838
2019-07-01 16:53:51 +00:00
Clément Fournier 1a690ed1e8 Fix DoubleBraceInitialization example 2019-07-01 18:33:48 +02:00
Andreas Dangel f6c43c63b6 Prepare next development version 2019-06-30 11:04:30 +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 743671ff23 Prepare pmd release 6.16.0 2019-06-30 10:23:07 +02:00
Andreas Dangel 17faa9ead4 Update pmd-designer to 6.16.0 2019-06-30 09:39:28 +02:00
Andreas Dangel cbd8856007 (doc) Update generated rule documentation 2019-06-30 09:38:58 +02:00
Andreas Dangel 92184ba56f Merge branch 'pr-1539' 2019-06-30 09:28:16 +02:00
Andreas Dangel 210a3dc8f9 Merge branch 'pr-1894' 2019-06-30 09:25:45 +02:00
Andreas Dangel bb2afbfb27 Merge branch 'pr-1482' 2019-06-30 09:23:28 +02:00
Andreas Dangel 45e2248fa7 (doc) Add PMD article 2019-06-29 21:50:39 +02:00
Andreas Dangel df4da7e78f Merge branch 'pr-1893' 2019-06-29 21:38:18 +02:00
Andreas DangelandClément Fournier 634e3592c7 Update docs/pages/release_notes.md
Co-Authored-By: Clément Fournier <clement.fournier76@gmail.com>
2019-06-29 21:35:01 +02:00
Andreas Dangel 1e2d94ebf9 Use released build-tools version 3 2019-06-29 15:56:34 +02:00
Andreas Dangel da69dc777a [java] CloseResource: fix another FP 2019-06-29 15:29:03 +02:00
Andreas Dangel 3928242f56 (doc) Fix release notes 2019-06-29 15:05:05 +02:00
Andreas Dangel c2a45c64ca [java] CloseResource: verify first argument for chained streams 2019-06-29 15:01:24 +02:00
Andreas Dangel 74f36bf18e [java] Deprecate AvoidFinalLocalVariable
Fixes #1612, Refs #1482
2019-06-29 14:34:36 +02:00
Karl-Philipp Richter d10d522d1f Explain the existence of AvoidFinalLocalVariable in it's description 2019-06-29 14:20:36 +02:00
Andreas Dangel 40849dda65 [java] CloseResource: consider chained streams
This assumes that the underlaying stream is always the
first argument in the constructor call.
2019-06-29 14:13:42 +02:00
Andreas Dangel 5825f6190f Merge branch 'master' into close-resource-io 2019-06-29 12:30:18 +02:00
Andreas Dangel 18006de84c [java] CloseResource: Update release notes and rule documentation 2019-06-29 12:29:40 +02:00
Andreas Dangel ae046bb516 [java] CloseResource: verify old behaviour can be restored 2019-06-29 12:19:24 +02:00
Andreas Dangel 62a2c12585 [java] CloseResource: consider javax.jms.Connection as before
Adding back the default types java.sql.Connection etc. so that
we also match javax.jms.Connection in case no type information
is available as before.

Also fix the reported type when method calls are involved.
2019-06-29 12:15:19 +02:00
Andreas Dangel f6cc999f2c [java] CloseResource: Use simple class name in message
Report simple class name to retain same message as before.
This helps in comparing the reports.
2019-06-29 11:22:03 +02:00
Andreas Dangel 314bb71336 Fix reporting of nested classes inside interfaces/enums 2019-06-29 11:13:51 +02:00
Andreas Dangel 26967d627e Update release notes, fixes #1880 2019-06-29 10:36:46 +02:00
Andreas Dangel 7db495f7aa [java] CommentDefaultAccessModifier: add new property "checkTopLevelTypes"
Fixes #1880
2019-06-29 10:30:45 +02:00
Andreas Dangel c6ac31f41d Update release notes, fixes #1879 2019-06-29 09:51:37 +02:00
Andreas Dangel 9b095e113d [plsql] Fix JoinClause preceded by subquery
Fixes #1879
2019-06-29 09:50:45 +02:00
Andreas Dangel 76d9d83894 Merge branch 'pr-1886' 2019-06-28 22:07:50 +02:00
Andreas Dangel fd0b603260 Update release notes, refs #1886 2019-06-28 22:07:09 +02:00
Andreas Dangel 26832f5d2a Merge branch 'pr-1885' 2019-06-28 22:00:02 +02:00
Andreas Dangel f6f4512a92 Update release notes, refs #1885 2019-06-28 21:59:34 +02:00
Andreas Dangel f05cde6f24 [plsql] Fix lookahead for CaseExpression 2019-06-28 21:56:16 +02:00
Hugo Araya Nash 5570e65baf [plsql] Correct case expression 2019-06-28 21:56:16 +02:00
Andreas Dangel 43dde7f8bb Merge branch 'pr-1876' 2019-06-28 21:44:39 +02:00
Andreas Dangel 3589b6b739 Update release notes, refs #1876 2019-06-28 21:43:47 +02:00
Andreas Dangel 3e5b3d66aa [plsql] Fix PrimaryPrefix: parse literals first 2019-06-28 21:42:09 +02:00
Andreas Dangel 8c750d57f6 (doc) Update generated rule documentation 2019-06-28 21:20:32 +02:00
Andreas Dangel 793f7808be (doc) Fix typo 2019-06-28 21:13:51 +02:00
Andreas Dangel c66fb768ef Merge branch 'pr-1889' 2019-06-28 21:10:55 +02:00
Andreas Dangel 939a1dfb78 Update release notes, fixes #1854 2019-06-28 21:10:39 +02:00
Andreas Dangel d7b0a21f99 Merge branch 'pr-1887' 2019-06-28 20:59:39 +02:00
Andreas Dangel 79ae09638f Update release notes, fixes #1853 2019-06-28 20:58:56 +02:00
Andreas Dangel 6b852e4e98 Merge branch 'pr-1883' 2019-06-28 20:48:03 +02:00
Andreas Dangel 930309bb61 Update release notes, fixes #1873, refs #1883 2019-06-28 20:46:12 +02:00
Andreas Dangel 598c9b79ad [plsql] Simplify condition / compound condition 2019-06-28 20:42:38 +02:00
Andreas Dangel b97a1f29dd [plsql] Keep the grammar compatible 2019-06-28 20:31:25 +02:00
Maikel Steneker cd66277c19 Added Lua support to CPD.
The tokenizer uses an ANTLR4 grammar based on the one at https://github.com/antlr/grammars-v4/tree/master/lua.
2019-06-28 16:51:45 +02:00
Andreas Dangel d631c153a8 Merge branch 'pr-1891' 2019-06-27 20:30:05 +02:00
Andreas Dangel 7c90c42fe5 Update release notes, fixes #1664 2019-06-27 20:28:40 +02:00
Andreas Dangel ef011c526d [apex] False positive ApexSharingViolationsRule, unsupported Apex feature
Fixes #1664
2019-06-27 20:22:05 +02:00
Andreas Dangel e7427a3db0 Merge branch 'pr-1884' 2019-06-27 19:51:03 +02:00
Andreas Dangel 558fea1c05 Update release notes, fixes #1878, refs #1884 2019-06-27 19:50:44 +02:00
Andreas Dangel a84869153d [plsql] Fixes #1878 2019-06-27 19:49:01 +02:00
Andreas Dangel b1ba1bbbfe [plsql] Add more JoinClause test cases 2019-06-27 19:21:57 +02:00
Clément Fournier 9cf19214ff Move to bestpractices 2019-06-26 22:18:45 +02:00
Clément Fournier 45331699ab Add to quickstart ruleset 2019-06-26 19:59:16 +02:00
Clément Fournier 8fc0e9c875 Add test cases 2019-06-26 19:53:18 +02:00
Clément Fournier 8e988fd7fd Add DoubleBraceInitialization to design.xml 2019-06-26 19:40:11 +02:00
Hugo Araya Nash c3591dcc1a [plsql] Suport table alias for Insert Clause 2019-06-24 20:02:01 +02:00
Hugo Araya Nash bcb33fd5ea [plsql] fix #1878 Simplified solution 2019-06-24 19:53:48 +02:00
Hugo Araya Nash ac285e50a5 [plsql] fix #1878 Support explicit INNER word for INNER JOIN 2019-06-24 19:53:48 +02:00
Hugo Araya Nash 4b7e2c97d5 [plsql] fix #1873 Expression list not working 2019-06-24 19:49:50 +02:00
Hugo Araya Nash 82cda02eb1 [plsql] Add date/time literal support for Expressions 2019-06-24 19:45:47 +02:00
Andreas Dangel cd2bbdb46e Merge branch 'pr-1874' 2019-06-24 19:26:56 +02:00
Andreas Dangel 5694e0414a Update release notes, refs #1874 2019-06-24 19:26:34 +02:00
Clément Fournier 6b3ccdf069 Add a test case 2019-06-24 12:11:12 +02:00
Robert Sösemann 54b2267a34 Update news.md 2019-06-23 21:18:42 +02:00
Robert Sösemann 903f0c9241 Added Apex PMD related content 2019-06-23 21:16:21 +02:00
Andreas Dangel 86ce57ca3c [java] CloseResource: support try-with-resources 2019-06-22 19:01:24 +02:00
Andreas Dangel 1e03ae5c06 [java] CloseResource - add allowedResourceTypes property for exceptions
By default, ByteArrayOutputStream and StringWriter are excluded from
the rule.
2019-06-22 12:24:43 +02:00
Andreas Dangel eab41508da [java] CloseResource: Use java.lang.AutoCloseable by default 2019-06-22 10:25:27 +02:00
Andreas Dangel 2da9708d20 [java] The rule CloseResource should deal with IO stream as default
Fixes #1000
2019-06-22 10:25:26 +02:00
Hugo Araya Nash 2271ae2d51 [plsql] Add parenthesis equation support to Update 2019-06-19 08:52:42 -04:00
Travis CI (pmd-bot) 4ae973ed1b Update documentation
TRAVIS_JOB_NUMBER=3857.1
TRAVIS_COMMIT_RANGE=5c38c08e4df5...ecfcfaf8aeab
2019-06-17 01:01:32 +00:00
Juan Martín Sotuyo Dodero ecfcfaf8ae Merge branch 'pr-1851' 2019-06-16 21:44:11 -03:00
Juan Martín Sotuyo Dodero 5c38c08e4d Merge pull request #1871 from adangel/improve-ant-doc
(doc) Improve documentation for ant task
2019-06-16 21:36:08 -03:00
Andreas Dangel 44c3603253 (doc) Improve documentation for ant task
* Add installation section
* Update supported sourceLanguages and improve description
  when this is needed
* Add full build.xml example with auxclasspath configuration

refs #1861, refs #1870
2019-06-15 20:50:14 +02:00
Andreas Dangel 573fee621e Use latest build-tools 2019-06-15 18:58:47 +02:00
artem.krosheninnikov 75d40e741d fixed output typo 2019-06-14 23:51:41 +03:00
artem.krosheninnikov 4f58cc695c fix #1666 wrong cdata rule description and examples 2019-06-14 18:03:51 +03:00
Andreas Dangel e17ad14944 Merge branch 'pr-1866' 2019-06-14 15:05:47 +02:00
Andreas Dangel e0afb87641 (doc) violationSuppressXPath with matches 2019-06-14 15:05:38 +02:00
Andreas Dangel 81447e8c5f Merge branch 'pr-1847' 2019-06-14 14:23:36 +02:00
Andreas Dangel ef90a7c64e Update release notes, fixes #1845, refs #1847 2019-06-14 14:22:58 +02:00
Andreas Dangel 2267413e8a Merge branch 'pr-1865' 2019-06-14 14:13:05 +02:00
Andreas Dangel 6d67e47379 Update release notes, refs #1865 2019-06-14 14:12:34 +02:00
Andreas Dangel 7748e34c1b Merge branch 'pr-1864' 2019-06-14 14:02:27 +02:00
Andreas Dangel 034ceeb151 Update release notes, refs #1864 2019-06-14 14:01:51 +02:00
Andreas Dangel 194db1963c [plsql] Simplify grammar, #1864 2019-06-14 13:59:18 +02:00
Andreas Dangel 8dae514168 [plsql] Fix object table substitution clause for CREATE TABLE 2019-06-14 13:59:09 +02:00
artem.krosheninnikov fadaf07015 review fixes 2019-06-14 13:02:15 +03:00
Andreas Dangel 18e09a20bb Merge branch 'pr-1863' 2019-06-14 11:57:10 +02:00
Andreas Dangel 876ee6910d Update release notes, refs #1863 2019-06-14 11:57:01 +02:00
Andreas Dangel 3998e0c4a7 [plsql] Fixes from review #1863 2019-06-14 11:51:55 +02:00
artem.krosheninnikov 3e280cd9d0 Merge branch 'master' into 1845-fix-methodreturnsinternalarray-regression 2019-06-14 12:33:41 +03:00
artem.krosheninnikov 5f40ab11cf enum with array instead of copy, inner enums with error and no error 2019-06-14 01:47:17 +03:00
artem.krosheninnikov c5a77fbc35 add inner interface, inner and top-level annotations 2019-06-13 01:04:50 +03:00
Clément Fournier d9a441c7d6 Clarify violationSuppressXPath docs 2019-06-12 18:48:27 +02:00
Hugo Araya Nash a300a65ed2 [plsql] Add Support for Extract Expression 2019-06-11 20:16:45 -04:00
Hugo Araya Nash 5b6f483f95 [plsql] Add support for Subquery Views 2019-06-11 17:25:12 -04:00
Hugo Araya Nash 473cdba9df [plsql] Add Table InlineConstraint fix 2019-06-11 15:36:17 -04:00
Hugo Araya Nash 7276848857 [plsql] Add Table InlineConstraint 2019-06-11 14:33:09 -04:00
Andreas Dangel 89bb73fc99 (doc) Update generated rule documentation 2019-06-08 17:30:54 +02:00
Andreas Dangel 427b5003a3 Merge branch 'pr-1829' 2019-06-08 17:22:18 +02:00
Andreas Dangel c4ab85a43e Merge branch 'pr-1844' 2019-06-08 17:11:40 +02:00
Andreas Dangel 142a706d5e Merge branch 'pr-1792' 2019-06-08 17:10:23 +02:00
Andreas Dangel ca6f1d1a75 Merge branch 'pr-1808' 2019-06-08 17:09:04 +02:00
Clément Fournier 348a9972e6 Fix #1853 false positive in NonStaticInitializer 2019-06-02 09:26:13 +02:00
Andreas Dangel 2bcb8dcfdc Merge branch 'pr-1849' 2019-06-01 19:41:20 +02:00
Andreas Dangel df53fddef9 Update release notes, fixes #1848 2019-06-01 19:41:14 +02:00
Andreas Dangel fca4064fed Merge branch 'pr-1846' 2019-06-01 19:27:45 +02:00
Andreas Dangel fe420562a1 More deprecations of node setters and constructors 2019-06-01 19:16:37 +02:00
Andreas Dangel 2d60e2b822 Remove more unnecessary comments from javacc 2019-06-01 19:15:50 +02:00
Andreas Dangel ad1e7d2022 Update release notes, refs #1829, fixes #1814, fixes #1815 2019-06-01 11:06:37 +02:00
Andreas Dangel b76fefb974 Merge branch 'master' into pr-1829 2019-06-01 11:02:18 +02:00
Andreas Dangel 0c219e2a59 [java] UnsynchronizedStatic(Date)Formatter - new property allowMethodLevelSynchronization
This new property is added to allow backwards compatibility, since
the rule now allows by default only synchronized blocks.
2019-06-01 10:53:40 +02:00
Andreas Dangel f1f20b97f2 [java] UnsynchronizedStatic(Date)Formatter - test cases, documentation
* Fixes #1814
* Fixes #1815
2019-06-01 10:31:20 +02:00
Andreas Dangel 8492c32273 UseUtilityClass - fix false-negatives with inner classes 2019-06-01 10:04:33 +02:00
Andreas Dangel a115daefe0 Update release notes, fixes #1094 2019-05-31 20:38:57 +02:00
Andreas Dangel 3227f7e605 [java] UseUtilityClass should be LombokAware
Fixes #1094
2019-05-31 20:36:45 +02:00
Andreas Dangel 9758f3afb0 Move lombok annotations to UnusedPrivateFieldRule and SingularFieldRule
Add additional test cases for ImmutableField and BeanMembersShouldSerialize
2019-05-31 19:49:19 +02:00
Andreas Dangel 6e1be2294c Update release notes, fixes #1703, refs #1792 2019-05-31 19:34:03 +02:00
Andreas Dangel 1f7cc9b74c Merge branch 'master' into pr-1792 2019-05-31 19:28:40 +02:00
Andreas Dangel a5780c6372 Fix lombok annotation lombok.experimental.Delegate 2019-05-31 19:28:30 +02:00
Andreas Dangel 34853337a0 Add test cases of #1703 for SingularField and UnusedPrivateField
Co-Authored: jakivey32
2019-05-31 19:28:06 +02:00
Andreas Dangel 8610dd5a89 Update release notes, fixes #1850, refs #1808 2019-05-31 18:33:57 +02:00
Andreas Dangel ed58751cc7 Merge branch 'master' into pr-1808 2019-05-31 18:32:06 +02:00
artem.krosheninnikov 7f619ebe14 fix checkstyle violation 2019-05-31 16:37:58 +03:00
Andreas Dangel c651e92ca5 Fix plsql grammar 2019-05-30 22:18:41 +02:00
Andreas Dangel a7eacbb561 Add unit test for INSERT INTO with records 2019-05-30 22:07:14 +02:00
Andreas Dangel 01fe61906f Add test for TRIM expression without trim_character 2019-05-30 22:07:11 +02:00
Andreas Dangel 9e453de89c Add test cases for implicit cursor attributes BULK_ROWCOUNT and BULK_EXCEPTIONS 2019-05-30 22:07:08 +02:00
Andreas Dangel 10b39e4266 Add test case for INSERT INTO with RETURNING 2019-05-30 22:07:02 +02:00
Clément Fournier 94afed80df Fix ambiguity with switch 2019-05-30 15:48:55 +02:00
Clément Fournier 0df9870ec4 Add regression test for modifiers mixed with annotations 2019-05-30 15:11:17 +02:00
Clément Fournier 39921f40b4 Add to grammar changelog 2019-05-30 15:06:50 +02:00
Clément Fournier 396bdeea90 Fix package privateism 2019-05-30 14:59:25 +02:00
artem.krosheninnikov 06b84079b9 #1845 Regression in MethodReturnsInternalArray not handling enums 2019-05-30 15:54:05 +03:00
Clément Fournier 10158751d2 Fix local class modifiers being forgotten 2019-05-30 14:53:16 +02:00
Clément Fournier ff579dfd53 Fix repeated annotation 2019-05-29 10:15:15 +02:00
Clément Fournier 2a73ee7d97 Update release notes 2019-05-28 21:57:46 +02:00
Clément Fournier fb8744d8a8 Remove duplicate annotations 2019-05-28 21:57:46 +02:00
Clément Fournier ccbf12a267 Add visit comment 2019-05-28 21:57:44 +02:00
Clément Fournier 97db569ccd Remove jjtree comments 2019-05-28 21:57:07 +02:00
Clément Fournier 31f15b7622 Deprecate setters 2019-05-28 21:16:41 +02:00
Clément Fournier 76e638c83f Deprecate base node classes 2019-05-28 21:09:21 +02:00
Clément Fournier 3e66d232d7 Deprecate AST constructors 2019-05-28 21:05:46 +02:00
Andreas Dangel 8a57f3fdca [plsql] Parentheses stopped working
Fixes #1828
2019-05-27 20:28:04 +02:00
Andreas Dangel c28c34e2f8 Dogfooding - use PMD 6.15.0 2019-05-26 11:38:42 +02:00
Andreas Dangel f5f4c59bfa Prepare next development version 2019-05-26 11:04:15 +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 cbe0c33c96 Prepare pmd release 6.15.0 2019-05-26 10:50:39 +02:00
Travis CI (pmd-bot) 54ad46d15c Update documentation
TRAVIS_JOB_NUMBER=3793.1
TRAVIS_COMMIT_RANGE=02a232bbc6d8...145753eab730
2019-05-26 08:43:11 +00:00
Andreas Dangel 145753eab7 Improve deprecation notice for LoggerIsNotStaticFinal 2019-05-26 10:21:23 +02:00
Travis CI (pmd-bot) 02a232bbc6 Update documentation
TRAVIS_JOB_NUMBER=3791.1
TRAVIS_COMMIT_RANGE=fb8a422d7358...6d9356cb057d
2019-05-25 23:13:07 +00:00
Clément Fournier 6d9356cb05 Merge branch 'bedla-logger-class-names' for PR #1762 2019-05-26 00:56:18 +02:00
Clément Fournier fb8a422d73 Merge branch for pr #1647 2019-05-26 00:46:33 +02:00
Andreas Dangel e4caaf706f Merge branch 'pr-1838' 2019-05-25 19:19:23 +02:00
Andreas Dangel 443b53c3b1 Update release notes, refs #1838 2019-05-25 19:18:48 +02:00
Andreas Dangel a1a13b6234 [dart] Add multi-line string example 2019-05-25 19:18:09 +02:00
Andreas Dangel 44079146c8 (doc) update generated rule docs 2019-05-25 18:59:43 +02:00
Andreas Dangel b9ac84ef33 Fix unit test for QuickstartRuleset
check the logger directly instead of System.err.
2019-05-25 18:49:05 +02:00
Andreas Dangel 07c90ee34c [apex] Replace deprecated rule VariableNamingConventions in quickstart ruleset
Also fix the unit test to check the logger directly instead of
System.err.

Refs #1817
2019-05-25 18:48:54 +02:00
Andreas Dangel 1f01557ca9 Merge branch 'pr-1843' 2019-05-25 18:11:42 +02:00
Andreas Dangel ef2f1ed3e6 Update release notes, fixes #1842 2019-05-25 18:11:23 +02:00
Andreas Dangel e99005a031 (doc) update generated rule doc 2019-05-25 18:01:25 +02:00
Andreas Dangel 8563ed8c35 Merge branch 'pr-1798' 2019-05-25 17:52:27 +02:00
Andreas Dangel 25cd37bdb6 Update release notes, fixes #1793, refs #1798 2019-05-25 17:50:52 +02:00
Andreas Dangelandoowekyala 19dc5a4f82 Simplify XPath expression for UseShortArrayInitializer
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2019-05-25 17:22:44 +02:00
Andreas Dangel d482083df9 Merge branch 'master' into pr-1762 2019-05-25 17:14:41 +02:00
Andreas Dangel 6761cac785 Update release notes, refs #1762 2019-05-25 17:13:20 +02:00
Andreas Dangel 677a252c1c Improve XPath expression for ProperLogger
The properties loggerName and staticLoggerName are actually different
properties used in different contexts.
The property requireStaticFinalLogger is not needed - this behaviour
of the rule was already there and is not new.
2019-05-25 13:49:49 +02:00
Andreas Dangel e415e68d34 Improve test cases for ProperLogger 2019-05-25 13:46:24 +02:00
Andreas Dangel e1577e1f14 Revert whitespace changes and generated doc changes 2019-05-25 11:12:11 +02:00
Andreas Dangel d1044287c3 Add additional test case to cover "var" 2019-05-25 10:43:17 +02:00
Clément Fournier ae8ba5128b Fix annotated module declaration 2019-05-25 07:27:59 +02:00
Andreas Dangel 65f897e56d Update release notes, fixes #1495, refs #1647 2019-05-24 20:25:35 +02:00
Andreas Dangel 6c4a0dc13c Merge branch 'master' into pr-1647 2019-05-24 20:18:15 +02:00
Andreas Dangel 3be46b8b27 Rename the rule to UseShortArrayInitializer 2019-05-24 20:17:58 +02:00
Andreas Dangel 9e717a3734 Use XPath to implement the rule 2019-05-24 20:14:47 +02:00
Andreas Dangel 12cf9009bf Add more test cases 2019-05-24 20:13:54 +02:00
Andreas Dangel fa91d47f7b (doc) Update generated rule documentation 2019-05-24 19:37:24 +02:00
Andreas Dangel 912d358c05 Merge branch 'pr-1837' 2019-05-24 19:36:52 +02:00
Andreas Dangel bd3dfb9d7d Update release notes, refs #1837 2019-05-24 19:36:09 +02:00
Andreas Dangel 0076ada3ab Merge branch 'pr-1840' 2019-05-24 19:25:02 +02:00
Andreas Dangel 37ecbc1dad Update release notes, fixes #1684, refs #1840 2019-05-24 19:24:54 +02:00
Marcel Härle 68f2e556a2 [java] Whitelist serialPersistentFields 2019-05-22 08:38:05 +02:00
Maikel Steneker 806b130e4a Improved Dart tokenizer to handle strings correctly.
This is based on the grammar at https://github.com/chalin/dart-spec-and-grammar/blob/master/doc/grammar-AUTOGENERATED-DO-NOT-EDIT.txt.

The string handling is now much closer to this grammar, resulting in more files being tokenized correctly.
2019-05-21 14:43:34 +02:00
Maikel Steneker bcf0de6880 Various unit tests for strings that are currently not handled correctly by the Dart tokenizer. 2019-05-21 14:43:16 +02:00
Michael Hausegger 3b646edd71 Small minor performance improvements 2019-05-20 17:08:50 +02:00
Clément Fournier f72e38034b Merge branch 'deprecated-dump-facade'
From PR #1806, refs #1801
2019-05-18 16:43:00 +02:00
Clément Fournier 23e162b932 Merge branch 'master' into deprecated-dump-facade 2019-05-18 16:42:25 +02:00
Travis CI (pmd-bot) bf51f15834 Update documentation
TRAVIS_JOB_NUMBER=3757.1
TRAVIS_COMMIT_RANGE=8d21fd52b345...7defd6b501d7
2019-05-17 14:51:36 +00:00
Andreas Dangel 7defd6b501 Fix internal ruleset 6150.xml 2019-05-17 16:29:21 +02:00
Andreas Dangel 7f1ce750e9 Merge branch 'pr-1817' 2019-05-17 16:21:53 +02:00
Andreas Dangel eae662ac94 Update release notes, fixes #1321, refs #1817 2019-05-17 16:21:09 +02:00
Andreas Dangel 2c2131f59e Merge branch 'pr-1816' 2019-05-17 15:59:15 +02:00
Andreas Dangel 7de0df16eb Update release notes, fixes #1783, refs #1816 2019-05-17 15:58:37 +02:00
Andreas Dangel bce37244f7 First assign the comments and then add the comments to the nodes
in a second pass.
2019-05-17 15:22:27 +02:00
Andreas Dangel 8d21fd52b3 Merge branch 'pr-1820' 2019-05-16 18:54:21 +02:00
Andreas Dangel abb8d70515 Update release notes, fixes #1784, refs #1820 2019-05-16 18:54:12 +02:00
Jeff Hube 609750332a Deprecate VariableNamingConventionsRule 2019-05-14 11:33:34 -04:00
Jeff Hube 6e937ed1a9 Remove Regex suffix from new rule names 2019-05-14 11:23:59 -04:00
Jeff Hube 1053d31fd7 Use all caps for constant fields 2019-05-13 17:01:44 -04:00
Jeff Hube ff7abcf224 Get names without reflection 2019-05-13 13:44:38 -04:00
Jeff Hube 63c71366bd Compile regexes once 2019-05-13 13:17:09 -04:00
Jeff Hube a0bffae1a1 Make AbstractRegexNamingConventionsRule package private 2019-05-13 13:08:25 -04:00
Maikel Steneker 0708f69627 Merge branch 'master' into cpp_raw_string_literals 2019-05-13 14:37:16 +02:00
Maikel Steneker 95673a0bfc Added support for character prefixes + various other improvements. 2019-05-13 14:31:33 +02:00
Maikel Steneker 5f24c07a83 Rewrote unit tests for C++ raw string literals. 2019-05-13 14:31:10 +02:00
Andreas Dangel 7d276f81ee Merge branch 'pr-1819' 2019-05-12 19:27:02 +02:00
Andreas Dangel 615ebb6fe3 Update release notes, refs #1819 2019-05-12 19:25:23 +02:00
Andreas Dangel 44ca6d307e Improve unit test 2019-05-12 19:25:08 +02:00
Andreas Dangel 465b303f3c Merge branch 'pr-1822' 2019-05-12 16:19:29 +02:00
Andreas Dangel 7b871ddaf9 Merge branch 'pr-1821' 2019-05-12 16:16:05 +02:00
Andreas Dangel 1f02f5ff7f Update release notes, refs #1821 2019-05-12 16:13:57 +02:00
Andreas Dangel 93050a2c7f Improve unit test 2019-05-12 16:06:23 +02:00
Andreas Dangel bacc7b2a66 Update release notes, refs #1822 2019-05-12 15:58:35 +02:00
Andreas Dangel 25e502f312 Merge branch 'pr-1813' 2019-05-12 15:52:34 +02:00
Andreas Dangel 5a5eee16ca Update release notes, fixes #1830, refs #1813 2019-05-12 15:51:38 +02:00
Venkatachalam, Srinivasan eaaf7e48dd checkstyle violation fix 2019-05-12 12:36:13 +05:30
Venkatachalam, Srinivasan 76af31dcab [java] UnsynchronizedStaticFormatter documentation and implementation wrong #1814 - Fixed 2019-05-12 12:23:50 +05:30
Andreas Dangel a16e5daf3a Merge branch 'pr-1807' 2019-05-11 12:01:15 +02:00
Andreas Dangel 15d499ba33 Update release notes, refs #1807 2019-05-11 12:00:07 +02:00
Jeff Hube c96d879a5a Move constants to AbstractRegexNamingConventionsRule 2019-05-10 16:27:31 -04:00
Jeff Hube 4bcdfba353 Class defaults should be pascal case 2019-05-10 16:10:34 -04:00
Jeff Hube 48617ee51c Add enumConstantPattern to FieldRegexNamingConventionsRule 2019-05-10 16:07:23 -04:00
Jeff Hube 6cf64949d1 Ignore autogenerated enum methods 2019-05-10 14:00:41 -04:00
Jeff Hube 000e32b2ee Fix NPE on custom exceptions 2019-05-10 12:16:30 -04:00
Maikel Steneker a3b09910fd Added support for double-quoted string to Matlab tokenizer. 2019-05-10 17:16:47 +02:00
Maikel Steneker 1c1c2d87f7 Added unit test for double-quoted string in Matlab. 2019-05-10 17:16:17 +02:00
Maikel Steneker 4ec25840bb Added support for question mark (?) token in Matlab tokenizer. 2019-05-10 16:28:08 +02:00
Maikel Steneker f76ac0aa89 Added unit test for question mark (?) token in Matlab tokenizer. 2019-05-10 16:27:37 +02:00
Maikel Steneker ecda36fa70 Adjusted Matlab tokenizer to correctly identify block comments. 2019-05-10 16:11:46 +02:00
Maikel Steneker 224c3931e4 Added unit tests for block comments. 2019-05-10 16:10:03 +02:00
Maikel Steneker d73a5505c2 Added support for C++ raw string literals. 2019-05-10 15:46:07 +02:00
Maikel Steneker 6bb83a71dd Added support for various C++ string prefixes.
These were already tokenized without errors, but the prefixes were considered to be a separate token.
2019-05-10 15:45:32 +02:00
Maikel Steneker b4821131ea Added unit tests for C++ raw literals.
There was already an existing unit test for issue #1559. This unit test broke with this change, because the code it's attempting to tokenize is now valid. This test was slightly modified to still give an error, and a new test was added to verify that the code is now correctly tokenized, even in a more difficult situation.
2019-05-10 15:45:08 +02:00
Maikel Steneker af41fc4230 Added support for C++14 digit separators. 2019-05-10 14:33:22 +02:00
Maikel Steneker 6d828833c0 Added unit test for C++14 digit separators. 2019-05-10 14:32:36 +02:00
Jeff Hube c5b0c8c17a Add configurable naming convention rules 2019-05-09 15:04:46 -04:00
Jeff Hube 8ae6563fff Fix ApexDoc handling with inner classes 2019-05-08 14:50:51 -04:00
Maikel Steneker 735b5305ac Fixed Matlab parsing issue. 2019-05-08 12:05:23 +02:00
Maikel Steneker 1a6a19aaaa Added test case for failing Matlab file. 2019-05-08 12:04:57 +02:00
BBG bf70954698 [ci] create a corresponding travis remote branch locally 2019-05-05 14:59:25 +08:00
Ivo Smid ccf99a4dc3 ProperLogger - make class-name configurable and requirement of static-final logger (deprecate LoggerIsNotStaticFinal) 2019-05-04 19:33:36 +02:00
Andreas Dangel 601a6be306 Merge branch 'pr-1802' 2019-05-03 12:28:50 +02:00
Andreas Dangel cd6be28f9b Update release notes, refs #1802, fixes #1810 2019-05-03 12:27:47 +02:00
Andreas Dangel eb37bc12c4 Updates release notes, fixes #1809, refs #1803 2019-05-03 11:55:28 +02:00
Andreas Dangel becc6ff2f5 Release notes: Fix PR ordering 2019-05-03 11:51:08 +02:00
Andreas Dangel b030999472 Merge branch 'pr-1805' 2019-05-03 11:50:36 +02:00
Hugo Araya Nash 506b0aa8f7 [plsql] Add ROWTYPE identifier support for INSERT 2019-05-02 23:34:48 -04:00
Hugo Araya Nash b43032f5b9 [plsql] Fix TrimExpression syntax 2019-05-02 23:33:33 -04:00
Hugo Araya Nash 85f222eaa7 [plsql] Add RETURNING support for INSERT 2019-05-02 23:32:17 -04:00
Hugo Araya Nash 518db3927b [plsql] Add support for BULK_ROWCOUNT, BULK_EXCEPTIONS 2019-05-02 23:31:23 -04:00
Andreas Dangel 9a7136edb8 Merge branch 'pr-1799' 2019-05-02 17:00:54 +02:00
Andreas Dangel a390a19486 Update release notes, refs #1799, fixes #1738 2019-05-02 17:00:15 +02:00
Clément Fournier 6f4123afcc Annotated overriding #getDumpFacade as Deprecated 2019-05-02 16:22:04 +02:00
Venkatachalam, Srinivasan f9530d1a04 Test cases added for #1738 fix 2019-05-02 19:05:08 +05:30
Venkatachalam, Srinivasan 6a707d5643 Merge branch 'master' of https://github.com/pmd/pmd 2019-05-02 19:03:26 +05:30
BBG 2057fc3919 [ci] fix missing local branch issues 2019-05-02 00:01:23 +08:00
Andreas Dangel 1c9a73426c deprecate: DumpFacade will be removed in PMD 7
Refs #1801
2019-05-01 11:38:35 +02:00
Juan Martín Sotuyo Dodero 92499ed3a0 Bump PMD version on self 2019-04-30 23:24:15 -03:00
Juan Martín Sotuyo Dodero 62e7f72dd7 Update changelog, refs #1804 2019-04-30 14:56:01 -03:00
Juan Martín Sotuyo Dodero 9545eada2f Fix NPE in UnnecessaryLocalBeforeReturnRule
- Fixes #1804
2019-04-30 14:53:55 -03:00
Juan Martín Sotuyo Dodero 3a42d14ff2 Merge branch 'pr-1803' 2019-04-30 10:40:33 -03:00
Juan Martín Sotuyo Dodero 97354a64d5 Update changelog, refs #1803 2019-04-30 10:40:02 -03:00
Maikel Steneker 1ebfb7df87 Extended Dart grammar to take escape sequences into account. 2019-04-30 14:01:07 +02:00
Maikel Steneker 6f442b15ca Added Dart tokenizer test cases for escaped backslashes (\\) and other characters (\n, \$). 2019-04-30 13:58:12 +02:00
Bram Stappers cad32d9b83 18984: [PMD] Added support for Python 2 backticks (`). 2019-04-29 14:04:34 +02:00
Maikel Steneker a5b12a4e83 Added test case for Python backticks. 2019-04-29 14:01:03 +02:00
Boris Petrov 58b3aaa0da [java] Make CommentDefaultAccessModifier work for top-level classes, enums and annotations 2019-04-28 20:27:02 +03:00
Venkatachalam, Srinivasan e07eb076a2 Merge branch 'master' of https://github.com/pmd/pmd 2019-04-28 15:12:52 +05:30
Venkatachalam, Srinivasan 779848aa3f MethodReturnsInternalArray does not work in inner classes #1738 - Fixed 2019-04-28 15:02:18 +05:30
Andreas Dangel 15af96155f Prepare next development version 2019-04-28 10:37:00 +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 d216af550c Prepare pmd release 6.14.0 2019-04-28 10:27:54 +02:00
Juan Martín Sotuyo Dodero a953909dc6 Merge branch 'pr-1795' 2019-04-27 22:40:47 -03:00
Andreas Dangel de699fbedc Update PMD Designer to 6.14.0 2019-04-27 18:43:26 +02:00
Andreas Dangel 84c8e51913 Support openjdk11 for macosx as well 2019-04-27 17:39:50 +02:00
Andreas Dangel cf4658fd3d Support openjdk11 for macosx as well 2019-04-27 17:20:05 +02:00
Andreas Dangel 32d0fd34a8 Support openjdk11 for macosx as well 2019-04-27 16:54:28 +02:00
Andreas Dangel c9ec3ae63c Use openjdk 11.0.3 2019-04-27 16:22:21 +02:00
Juan Martín Sotuyo Dodero 0ebf4fd9e8 Merge pull request #1797 from adangel/issue-1515
[core] Module pmd-lang-test is missing javadoc artifact
2019-04-27 10:07:53 -03:00
Andreas Dangel 01e372d887 [core] Module pmd-lang-test is missing javadoc artifact
Fixes #1515
2019-04-26 20:41:50 +02:00
Andreas Dangel d199c1cf53 Merge branch 'pr-1791' 2019-04-26 18:59:36 +02:00
Andreas Dangel 95a0c1b46a Update release notes, refs #1791 2019-04-26 18:57:44 +02:00
Andreas Dangel 67ac7f5176 [core] Ruleset Compatibility fails with excluding rules
Fixes #1794
2019-04-26 14:39:56 +02:00
jakivey32 8758bc2643 Add lombok.experimental to AbstractLombokAwareRule 2019-04-25 02:55:49 -05:00
Maikel Steneker 26a64be1d2 Dart grammar now supports string containing escaped quotes. 2019-04-24 15:52:22 +02:00
Maikel Steneker 1e2e591ac4 Added unit test for string containing escaped quotes. 2019-04-24 15:43:53 +02:00
Juan Martín Sotuyo Dodero 64e66b9d30 Merge branch 'pr-1789' 2019-04-22 13:33:42 -03:00
Juan Martín Sotuyo Dodero 594ba4da23 Update changelog, refs #1789 2019-04-22 13:33:24 -03:00
Andreas Schmid 8c7f19bdfe Use current classloader instead of Thread's classloader
This fixes #1788 by using the current's classloader instead of the
current Thread's ones. This is required if executing CPD in a separate
worker.
Also adjusts the release notes.
2019-04-22 16:26:06 +02:00
Andreas Dangel 829e9d4a9b Upgrade maven-pmd-plugin to 3.12.0 2019-04-22 11:24:42 +02:00
Andreas Dangel f52b866798 Don't use String.resolveConstantDesc in unit tests
to avoid random test failures with java12
2019-04-22 11:23:22 +02:00
Andreas Dangel 4bb55e4193 Merge branch 'pr-1767' 2019-04-19 18:58:28 +02:00
Andreas Dangel 84daa1df4f [java] Add unit test for JavaTypeDefinitionSimple 2019-04-19 18:57:12 +02:00
Andreas Dangel 002f3fd671 Merge branch 'pr-1779' 2019-04-19 18:15:11 +02:00
Andreas Dangel 4ffc42a91b Merge branch 'pr-1778' 2019-04-19 18:14:20 +02:00
Andreas Dangel 88c7aac7a1 Merge branch 'pr-1768' 2019-04-19 18:12:40 +02:00
Travis CI (pmd-bot) 42f40ddd0e Update documentation
TRAVIS_JOB_NUMBER=3667.1
TRAVIS_COMMIT_RANGE=b55676e4d095...c4fafeeb62ce
2019-04-18 18:32:24 +00:00
Andreas Dangel c4fafeeb62 [ci] Use jdk12 for building 2019-04-18 20:13:40 +02:00
Andreas Dangel b55676e4d0 Add test case for NoPackage and Annotation
Update release notes, fixes #1782, refs #1771
2019-04-18 19:55:56 +02:00
Andreas Dangel 7542306e05 Fix header in release notes 2019-04-18 19:43:16 +02:00
Juan Martín Sotuyo Dodero f2892ad004 Merge branch 'pr-1781' 2019-04-17 11:33:38 -03:00
Juan Martín Sotuyo Dodero d7ac5ef5c4 Update changelog, refs #1781 2019-04-17 11:32:09 -03:00
Maikel Steneker fd13a4bf21 Improved test cases for AssignmentToNonFinalStatic by including the expected line numbers for violations in the test cases. 2019-04-17 16:00:38 +02:00
Maikel Steneker d4ca21bfd3 AssignmentToNonFinalStatic now reports multiple violations in case there are multiple unsafe assignments on the same variable. 2019-04-17 15:20:15 +02:00
Maikel Steneker 4a8c23472c Added test case for multiple violations of AssignmentToNonFinalStatic on the same variable.
Rationale: whenever this rule produces a violation, all of the unsafe assignments need to be corrected. It's annoying to fix one of these, rerun PMD and then realize there's another unsafe assignment left. Therefore, all of these violations should be reported at once.
2019-04-17 15:19:56 +02:00
Maikel Steneker cd465918b5 Changed location for AssignmentToNonFinalStatic violations from field declaration at to assignment in constructor.
This makes it easier to identify the code that needs to be adjusted in order to resolve the violation.
2019-04-17 15:05:20 +02:00
Juan Martín Sotuyo Dodero 54dc9ce3cf Merge branch 'pr-1776' 2019-04-16 17:01:03 -03:00
Juan Martín Sotuyo Dodero a4a7aa48b4 Update changelog, refs #1776 2019-04-16 17:00:38 -03:00
Juan Martín Sotuyo Dodero 17b7837dcc Bring back the TODO 2019-04-16 16:59:40 -03:00
Juan Martín Sotuyo Dodero 407b2d1efe Update changelog, refs #1190 2019-04-16 16:55:05 -03:00
Juan Martín Sotuyo Dodero cb1b5c16bf [java] Have symbol table recognize concise resources
- Concise resources are valid usages.
 - Fixes #1190
2019-04-16 16:51:15 -03:00
Juan Martín Sotuyo Dodero 7c6d8be1d2 Delay searching statements 2019-04-16 14:09:30 -03:00
Juan Martín Sotuyo Dodero f004ff0634 Update changelog, refs #1775 2019-04-16 14:07:37 -03:00
Juan Martín Sotuyo Dodero 28c3752088 [java] Fix FN in UnnecessaryLocalBeforeReturn
- Fixes #1775
2019-04-16 14:04:46 -03:00
Juan Martín Sotuyo Dodero c321de75af Merge pull request #1773 from oowekyala/xpath-declare-fn-on-saxon
[core] Declare fn namespace on Saxon
2019-04-15 17:30:54 -03:00
Фомин Андрей Николаевич f121b102a4 [java] Show more detailed message when can't resolve field type 2019-04-15 16:17:45 +07:00
Travis CI (pmd-bot) ee2d03a733 Update documentation
TRAVIS_JOB_NUMBER=3653.1
TRAVIS_COMMIT_RANGE=94545b6049c1...893119515677
2019-04-13 18:27:25 +00:00
Clément Fournier 8931195156 Merge branch 'pr-1771' 2019-04-13 19:56:48 +02:00
Travis CI (pmd-bot) 94545b6049 Update documentation
TRAVIS_JOB_NUMBER=3650.1
TRAVIS_COMMIT_RANGE=0dd0ce1b065e...d6f24afa30d0
2019-04-13 17:43:22 +00:00
Clément Fournier 3815066710 Add tests 2019-04-13 19:39:28 +02:00
Clément Fournier ceac6fb5d3 Declare fn prefix in XPath queries
The namespace is standard and contains the XPath functions
specified by the spec. Making it available on saxon improves
the compatibility between Jaxen and Saxon queries
2019-04-13 19:28:55 +02:00
Clément Fournier d6f24afa30 Merge branch 'pr-1770' 2019-04-13 19:26:43 +02:00
Juan Martín Sotuyo Dodero eb7903d963 [java] Fix NoPackage rule
- Also make it's search much more precise, making it 10X faster
2019-04-12 17:27:45 -03:00
Juan Martín Sotuyo Dodero 5ad7ca97bc [java] Add failing enum case for NoPackage 2019-04-12 17:27:27 -03:00
Juan Martín Sotuyo Dodero 44573d8bbe [java] JUnitTestContainsTooManyAsserts uses XPath 2
- We are already using `pmd-java:typeIs`, so it's the correct thing to
do.
 - Plus, this way it's 6X faster
2019-04-12 16:57:03 -03:00
Juan Martín Sotuyo Dodero 0dd0ce1b06 [apex] Add test case for #702 2019-04-12 16:10:53 -03:00
Juan Martín Sotuyo Dodero 72a2b7baab Update changelog, refs #1532 2019-04-12 14:46:48 -03:00
Juan Martín Sotuyo Dodero 23185f9e6d [java] Fix NPE in type resolution
- Fixes #1532
2019-04-12 14:45:53 -03:00
Juan Martín Sotuyo Dodero bb1ede5598 Update changelog, refs #1691 2019-04-12 14:29:44 -03:00
Juan Martín Sotuyo Dodero 12afff4f5b [java] Fix race conditions in JavaTypeDefinitionSimple
- The data is now a fixed-size array instead of a fixed-size arraylist,
this removes the need to manually add null elements all over.
 - This in turn avoids the resizing / runtime exceptions under
multithreaded accesses.
 - Take the change to fix the way `isGeneric` is resolved to be
consistent over time and correct.
 - Fixes #1691
2019-04-12 14:29:26 -03:00
Juan Martín Sotuyo Dodero 595c440465 Add Dart to CPD supported languages 2019-04-10 16:25:16 -03:00
Juan Martín Sotuyo Dodero 2b14d1de54 Merge branch 'pr-1761' 2019-04-10 16:24:08 -03:00
Juan Martín Sotuyo Dodero 0328d5464f Revamp CPD userdocs 2019-04-10 16:23:13 -03:00
Juan Martín Sotuyo Dodero 0db8697994 Remove XSL / XML from CPD support 2019-04-10 16:22:38 -03:00
Juan Martín Sotuyo Dodero 8f7ce8bfe7 VM is not supported in CPD, but it's on PMD… 2019-04-10 16:21:19 -03:00
Juan Martín Sotuyo Dodero ee227019aa Update changelog, refs #1761 2019-04-10 16:17:25 -03:00
Juan Martín Sotuyo Dodero 4316ecaa5c Add XML/XSL to CPD supported languages 2019-04-10 12:43:52 -03:00
Juan Martín Sotuyo Dodero 3884d4cfbc Add JSP to CPD supported languages 2019-04-10 12:42:04 -03:00
Juan Martín Sotuyo Dodero 62c4425321 Add visualforce to supported languages 2019-04-10 12:41:02 -03:00
Juan Martín Sotuyo Dodero 9d550a1224 Add go to supported languages, sort alphabetically 2019-04-10 12:40:20 -03:00
Juan Martín Sotuyo Dodero b27d1de001 Add kotlin to supported languages 2019-04-10 12:37:25 -03:00
Maikel Steneker 7b78ac75d0 Minor formatting changes. 2019-04-05 17:22:31 +02:00
Maikel Steneker 1e31e792f9 Adjusted pmd-dist unit test to include Dart in the list of supported languages. 2019-04-05 17:22:04 +02:00
Maikel Steneker 1a16d1a52d Adjusted Dart tokenizer to skip over uninteresting changes. 2019-04-05 17:05:26 +02:00
Maikel Steneker 745ebc461c Added test cases for Dart support for CPD. 2019-04-05 17:04:49 +02:00
Maikel Steneker 8db2026735 Added Dart support to CPD.
The tokenizer uses an ANTLR4 grammar based on the one at https://github.com/antlr/grammars-v4/tree/master/dart2.
2019-04-05 17:04:00 +02:00
Andreas Dangel 3bf43b3f8e [doc] Update doc 2019-04-05 14:53:53 +02:00
Andreas Dangel 1bedc28295 Merge branch 'pr-1752' 2019-04-05 14:45:18 +02:00
Andreas Dangel aa10258ebe Update release notes, fixes #1760, refs #1752 2019-04-05 14:45:03 +02:00
Andreas Dangel 96a14ede0a Simplify test xml
CDATA is not necessary for test case descriptions
2019-04-05 14:44:45 +02:00
Andreas Dangel b34d5687cb Merge branch 'pr-1754' 2019-04-05 14:11:21 +02:00
Andreas Dangel 2e8056dc28 Fix checkstyle 2019-04-05 14:10:57 +02:00
Björn Kautler f3c0d39f66 Fix UseObjectForClearerAPI rule that treated String and String[] the same 2019-04-03 12:00:40 +02:00
Björn Kautler 06625b23f9 Fix UseObjectForClearerAPI rule that checked non-public methods 2019-04-03 10:14:59 +02:00
Juan Martín Sotuyo Dodero 3aea3cfe29 Update changelog, refs #1751 2019-04-03 01:02:54 -03:00
Juan Martín Sotuyo Dodero f268377c4d [go] Fix grammar around escape characters
- Fixes #1751
2019-04-03 01:01:33 -03:00
Andreas Dangel 58677de21d Merge branch 'pr-1746' 2019-04-02 16:58:48 +02:00
Andreas Dangel 52623a7ecd Update release notes, fixes #1720, refs #1746 2019-04-02 16:57:49 +02:00
Itai Gilo 044473aa02 Update rule to prevent UnusedImport when using JavaDoc see with array type 2019-04-01 20:55:11 +03:00
Andreas Dangel f3f2210afb Merge branch 'pr-1744' 2019-04-01 19:35:22 +02:00
Andreas Dangel 7e50041690 Update release notes, fixes #1729, refs #1744 2019-04-01 19:35:10 +02:00
Andreas Dangel 96baf3b940 Merge branch 'pr-1745' 2019-04-01 19:31:07 +02:00
Andreas Dangel 11bc328c90 Update release notes, refs #1745 2019-04-01 19:31:00 +02:00
Andreas Dangel 9558f32a08 [doc] fix release type example 2019-04-01 19:22:44 +02:00
Itai Gilo ae535ce594 Update rule to prevent UnusedImport when using JavaDoc with array type 2019-04-01 11:06:47 +03:00
0xflotus 0e953edc75 Update incremental_analysis.md 2019-03-31 23:20:06 +02:00
0xflotus 854f4409ff Update cpd.md 2019-03-31 23:18:52 +02:00
0xflotus 63626bdf56 Update configuring_rules.md 2019-03-31 23:17:31 +02:00
0xflotus b215b861da Update credits.md 2019-03-31 23:15:22 +02:00
0xflotus 58de4c351c Update pmdtester.md 2019-03-31 23:09:50 +02:00
Juan Martín Sotuyo Dodero 8468c4e2bc [java] Report class name for package-private only classes
- Fixes #1729
2019-03-31 15:02:10 -03:00
Andreas Dangel a8823c4afd Update pmd to 6.13.0 2019-03-31 13:41:33 +02:00
Andreas Dangel 238fcf73aa Prepare next development version 2019-03-31 12:13:11 +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 272e1ec2ff Prepare pmd release 6.13.0 2019-03-31 11:58:55 +02:00
Andreas Dangel 3cd101a5a5 Fix do-release.sh 2019-03-31 11:55:16 +02:00
Andreas Dangel dcb9bd007d [apex] Update quickstart ruleset 2019-03-31 11:15:24 +02:00
Andreas Dangel c76fba68ab Merge branch 'pr-1725' 2019-03-31 11:00:57 +02:00
Andreas Dangel ec68c2979c [java] avoid most lookaheads for SwitchStatements 2019-03-31 10:33:02 +02:00
Andreas Dangel f8652fbf9a [java] Add SwitchLabeledRule interface, remove SwitchBlockGroup 2019-03-31 00:21:34 +01:00
Andreas Dangel 087e0a62c8 Merge branch 'master' into pr-1725 2019-03-30 19:28:11 +01:00
Andreas Dangel bb071d68e2 [ci] Update release signing key 2019-03-30 18:56:59 +01:00
Andreas Dangel 916d55107c [ci] Sign also snapshot builds to test the release signing key 2019-03-30 18:49:51 +01:00
Andreas Dangel 87f6951f15 Update generated rule documentation 2019-03-30 18:11:29 +01:00
Andreas Dangel 8bbf5a3727 Merge branch 'pr-1743' 2019-03-30 18:02:45 +01:00
Andreas Dangel 6f6160f355 Merge branch 'pr-1742' 2019-03-30 18:01:50 +01:00
Andreas Dangel d613b08ce1 Merge branch 'pr-1726' 2019-03-30 18:01:09 +01:00
Andreas Dangel 7125f9fe76 Merge branch 'pr-1730' 2019-03-30 18:00:38 +01:00
Andreas Dangel f46870c5ec [plsql] use isKeyword 2019-03-30 17:52:10 +01:00
Andreas Dangel 0e2f868fc4 Merge branch 'pr-1740' 2019-03-30 17:49:45 +01:00
Andreas Dangel 2e08fdd548 Merge branch 'pr-1685' 2019-03-30 17:48:22 +01:00
Andreas Dangel b608a676b5 Merge branch 'pr-1727' 2019-03-30 17:46:33 +01:00
Andreas Dangel e1912ced18 Merge branch 'pr-1728' 2019-03-30 17:38:40 +01:00
Andreas Dangel 039333c9b8 Update release process: quickstart rulesets should be updated as well 2019-03-30 17:35:40 +01:00
Andreas Dangel 43d415d8f9 Use released build-tools version 2 2019-03-30 17:35:00 +01:00
Andreas Dangel 8692b95576 Update release notes, mention call for logo again 2019-03-30 17:34:44 +01:00
Andreas Dangel ae4b56e70f [java] UseUnderscoresInNumericLiterals - check the length before
and after decimal point separately
2019-03-29 19:57:48 +01:00
Andreas Dangel 878db5617f [java] AvoidDuplicateLiterals warning about deprecated separator property when not used
Fixes #1570
2019-03-29 19:35:57 +01:00
Andreas Dangel 921ee050bd Add additional test case 2019-03-29 18:22:47 +01:00
Andreas Dangel a0876f71f5 [java] UseUnderscoresInNumericLiterals false positive on floating point numbers
Fixes #1527
2019-03-29 18:16:45 +01:00
Andreas Dangel 2b092456fd [plsql] Update grammar changelog 2019-03-29 17:54:12 +01:00
Andreas Dangel 9bb2492ba5 [plsql] Fix choice conflicts - AS is a reserved word 2019-03-29 17:46:52 +01:00
Andreas Dangel a0cb67308d [plsql] Add support for XMLElement 2019-03-29 15:14:00 +01:00
Andreas Dangel 1f58482f54 Update release notes, fixes #1510 2019-03-29 14:32:40 +01:00
Andreas Dangel 527ae5d785 [plsql] Support XMLFOREST 2019-03-29 14:32:10 +01:00
Andreas Dangel 4367841578 [plsql] Support XMLCAST, XMLQUERY, CAST 2019-03-29 14:32:10 +01:00
Andreas Dangel 44c6d0ed3b [plsql] Add support for XMLEXISTS 2019-03-29 14:32:10 +01:00
Andreas Dangel 2a39eab39c [plsql] Add Support for XMLTABLE
Refs #1510
2019-03-29 14:32:10 +01:00
Andreas Dangel e8f8e1ac7a Update release notes, document apex attributes 2019-03-29 14:03:32 +01:00
Andreas Dangel 91d0ebf462 [apex] Expose parameter names of NewKeyValueObjectExpression 2019-03-28 21:05:11 +01:00
Andreas Dangel 680b164e10 [apex] Refactor rules to use new nodes attributes
Also unifying getType() on ASTField, ASTProperty, ASTVariableDeclaration,
ASTParameter
Adding remaining types in ASTLiteralExpression
2019-03-28 20:15:06 +01:00
Andreas Dangel 1d01435820 [plsql] % not supported in "TestSearch%notfound"
Fixes #1733
2019-03-28 17:21:51 +01:00
Andreas Dangel ca6ad5fd22 [pslql] ParseException when parsing ELSIF
Fixes #1731
2019-03-28 16:51:08 +01:00
Travis CI (pmd-bot) f6549d6c0b Update documentation
TRAVIS_JOB_NUMBER=3572.1
TRAVIS_COMMIT_RANGE=895ee7bc9f94...d5186afc527d
2019-03-26 17:44:50 +00:00
Andreas Dangel d5186afc52 Merge branch 'pr-1737' 2019-03-26 18:22:03 +01:00
Andreas Dangel 3a22449b86 Update release notes, fixes #1674, refs #1737 2019-03-26 18:21:52 +01:00
Itai Gilo e7f7422f50 Update the right file 2019-03-25 21:32:35 +02:00
Itai Gilo 6df4100ca8 Revert changes to auto-generated file 2019-03-25 21:31:08 +02:00
Travis CI (pmd-bot) 895ee7bc9f Update documentation
TRAVIS_JOB_NUMBER=3569.1
TRAVIS_COMMIT_RANGE=3a866ddb9fc6...17ab453db976
2019-03-25 19:29:53 +00:00
Andreas Dangel 17ab453db9 Merge branch 'pr-1694' 2019-03-25 20:07:15 +01:00
Andreas Dangel 53d123703b Update release notes, refs #1694 2019-03-25 20:04:19 +01:00
Andreas Dangel 2958f83517 Simplify the rules even more 2019-03-25 19:56:47 +01:00
Andreas Dangel db3b211d8f Undo changes to rulesets/apex/ruleset.xml 2019-03-25 19:50:32 +01:00
Itai Gilo b4ce59abcd Add escaping to documentation of CommentDefaultAccessModifier 2019-03-25 20:26:32 +02:00
sudhansu d1a9630ee2 review feedback 2019-03-24 21:01:24 -07:00
sudhansu 72cbd2b63b merge conflicts 2019-03-23 16:25:40 -07:00
sudhansu a0eabd34b0 merge conflicts 2019-03-23 16:16:32 -07:00
sudhansu 7e44f025e4 removed spaces 2019-03-23 15:23:49 -07:00
sudhansu 99f9cc6054 Modified is test annotation rule and renamed ApexAssertionsShouldIncludeMessage rule 2019-03-23 15:23:49 -07:00
Andreas Dangel 8b1b67ae9e [apex] Refactor rules to use new nodes attributes
This moves the dependency to jorje into the AST nodes
and keeps the rules only dependent on PMD.
2019-03-23 19:02:43 +01:00
Andreas Dangel acb3027166 [apex] Expose more information on the nodes
Annotation.isResolved, AnnotationParameter.getName
Modifiers on various nodes (UserClass, Field, Method, ...)
Method.isConstructor, Method.getReturnType
2019-03-23 18:49:21 +01:00
Andreas Dangel 35e1e6cd8b Update release notes, fixes #1734, fixes #1735 2019-03-22 16:33:16 +01:00
Andreas Dangel b2860c6b72 Rename test classes 2019-03-20 17:48:23 +01:00
Andreas Dangel 0c98fbffc1 [plsql] Add test for TO_TIMESTAMPWithoutDateFormat and fix the rule 2019-03-20 17:40:02 +01:00
Andreas Dangel 0a90468e0b [plsql] Add test for TO_DATEWithoutDateFormat and fix the rule 2019-03-20 17:37:46 +01:00
Andreas Dangel 5ff9555870 [plsql] Add test for TO_DATE_TO_CHAR and fix the rule 2019-03-20 17:34:19 +01:00
Travis CI (pmd-bot) 3a866ddb9f Update documentation
TRAVIS_JOB_NUMBER=3562.1
TRAVIS_COMMIT_RANGE=1876a068e6ba...1337dce1fba8
2019-03-19 16:34:34 +00:00
Andreas Dangel 1337dce1fb Add escaping to the test, add extended test in pmd-core for
AbstractRuleViolationFactory
2019-03-19 17:12:03 +01:00
guo fei e7a0198b4b AbstractRuleViolationFactory.cleanup() skip MessageFormat when args is empty 2019-03-19 17:09:39 +01:00
Andreas Dangel a0d109fd2b Merge branch 'pr-1714' 2019-03-19 16:30:26 +01:00
Andreas Dangel 6c6cb3ecf3 Merge branch 'pr-1707' 2019-03-19 16:23:32 +01:00
Andreas Dangel 14ad94340c [plsql] Add test for TooManyMethods and fix the rule 2019-03-18 20:06:44 +01:00
Andreas Dangel ba31b0ce9f [plsql] Add test for TomKytesDespair 2019-03-18 19:27:14 +01:00
Andreas Dangel b51fa59cf6 Update release notes, fixes #1716 2019-03-18 19:06:30 +01:00
Andreas Dangel d12daa8d47 [plsql] New rule LineLength 2019-03-18 19:06:30 +01:00
Andreas Dangel 430bd23a83 [plsql] AvoidTabCharacter: Add property "eachLine" 2019-03-18 19:06:30 +01:00
Andreas Dangel d1414bccb8 [plsql] Add new sample rule AvoidTabCharacter 2019-03-18 19:06:30 +01:00
Andreas Dangel 9f80002250 [plsql] provide access to source code for querying via regex, e.g.
Tab Damage:
//Input[matches(@Sourcecode, '\t')]

Refs #1716
2019-03-18 19:06:09 +01:00
Andreas Dangel 1876a068e6 Upgrade checkstyle to 8.18 2019-03-18 18:56:13 +01:00
Andreas Dangel 1060e843b1 Merge branch 'pr-1697' 2019-03-18 17:06:04 +01:00
Andreas Dangel bba32d0a67 Update release notes, refs #1697 2019-03-18 17:04:02 +01:00
Andreas Dangel 4ec78b1970 [doc] Correct indentation so that the ordered list works,
use callouts for the tips (instead of quotes)
2019-03-18 17:02:20 +01:00
Andreas Dangel 65b2990ad1 Fix break statement 2019-03-17 10:22:11 +01:00
Andreas Dangel e103ef4869 [java] Rename SwitchLabeledRule -> SwitchBlockGroup
The plan is with PMD, that also the switch block statements
are grouped together with the switch label, like the switch rules
2019-03-17 10:22:06 +01:00
Andreas Dangel 1479840f6f [apex] Expose more information on the nodes
Like variable names, type names, apex version
2019-03-16 19:29:15 +01:00
Andreas Dangel 220467ca18 [java] Update quickstart ruleset - UnsynchronizedStaticDateFormatter is deprecated
Add unit tests
Add missing rules
2019-03-16 12:55:03 +01:00
Andreas Dangel 3061a6d8c5 Update release notes, fixes #1537 2019-03-16 11:56:07 +01:00
Andreas Dangel e36e01c093 [doc] Mention PMD_JAVA_OPTS 2019-03-16 11:55:38 +01:00
Andreas Dangel d7aa1b1742 Support Expression in break statements 2019-03-16 11:55:38 +01:00
Andreas Dangel 6658dc3383 Support type resolution for SwitchExpressions 2019-03-16 11:55:38 +01:00
Andreas Dangel 607b4d1e6c [java] ASTLiteral should only try to parse the value, if it makes sense
This avoids number format exceptions when trying to parse a String as
a double.
2019-03-16 11:55:38 +01:00
Andreas Dangel ca0975b68f Add additional tests
* Parse problem with switch fallthrough
* Verify type of switch expression
2019-03-16 11:55:38 +01:00
Clément Fournier 2793c3e029 Remove arbitrary lookahead 2019-03-16 11:55:38 +01:00
Clément Fournier f5bc7031f5 Add structure tests 2019-03-16 11:55:38 +01:00
Andreas Dangel 335d138424 Introduce env variable PMD_JAVA_OPTS
That way, additional java options can be set for executing PMD
2019-03-16 11:55:38 +01:00
Andreas Dangel 2db0ab21cf [java] Update asm to 7.1 2019-03-16 11:55:38 +01:00
Andreas Dangel 65cac51445 [java] Add Java12 support 2019-03-16 11:55:38 +01:00
Andreas Dangel 8949019da6 [java] Add Java12 support 2019-03-16 11:55:38 +01:00
Juan Martín Sotuyo Dodero e1f067ab52 Merge branch 'pr-1724' 2019-03-15 13:15:00 -03:00
Juan Martín Sotuyo Dodero 6cade31996 Update changelog, refs #1724 2019-03-15 13:14:44 -03:00
Felix W. Dekker 6bb8f095a2 Correct property override example
Fixes #1721.
2019-03-15 16:31:49 +01:00
Matías Fraga 83990cf007 Update review changes 2019-03-12 22:34:35 -03:00
Andreas Dangel 946748f429 Merge branch 'pr-1715' 2019-03-12 22:06:20 +01:00
Andreas Dangel 7a69eb1e25 Merge branch 'pr-1717' 2019-03-12 22:05:29 +01:00
Andreas Dangel 96a022156a Update release notes, fixes #1701, refs #1717 2019-03-12 22:05:00 +01:00
Rishabh Jain e590f29da8 issue-1701 fix bug to suppress false positive in useTryWithResources when close method have multiple arguments 2019-03-11 22:11:24 -04:00
Clément Fournier 6680d020ae Add copyright notices on pmd-lang-test 2019-03-11 22:30:49 +01:00
Andreas Dangel fe0b7fd450 Merge branch 'pr-1541' 2019-03-11 16:22:28 +01:00
Travis CI (pmd-bot) 98c2b7e47a Update documentation
TRAVIS_JOB_NUMBER=3544.1
TRAVIS_COMMIT_RANGE=19fa1ca6b38b...59c4a07a94e8
2019-03-11 15:21:56 +00:00
Andreas Dangel 59c4a07a94 Fix release notes headings 2019-03-11 16:00:23 +01:00
Andreas Dangel 267dd873a8 Merge branch 'pr-1709' 2019-03-11 15:59:16 +01:00
Andreas Dangel c60c58dc4d Update release notes, refs #1709 2019-03-11 15:59:06 +01:00
Andreas Dangel 19fa1ca6b3 Merge branch 'pr-1708' 2019-03-11 15:36:56 +01:00
Andreas Dangel d42aa3915e Add property "pmd-designer.version", update release procedure
For now, we'll reference the latest pmd-designer release manually,
that is atm 6.12.0.
This means, if a new pmd-designer should be shipped with a PMD release,
the designer will need to be released first.
2019-03-11 15:32:18 +01:00
Andreas Dangel 002ecb7783 Fix test dependencies with junit5/kotlin/junit4 combination
When using kotlin test, which brings in the JUnit5 platform,
additionally the junit-vintage-engine needs to be added to
the test classpath, so that surefire will execute all tests
(junit5/kotlin test + junit4 tests).
2019-03-10 19:32:20 +01:00
Clément Fournier c71646475d Fix tests 2019-03-10 17:21:28 +01:00
Clément Fournier a755c83eef Fix bug with maven incremental compil 2019-03-10 17:03:20 +01:00
Clément Fournier 054b4003fd Filter out deprecated properties
Also:
* Suppress space padding for xml default values
* Fetch default value from the rule
2019-03-10 16:45:43 +01:00
David Burström b77225bcc1 Merge branch 'master' of https://github.com/pmd/pmd into master-while-loop-with-literal-boolean 2019-03-10 10:39:56 +01:00
David Burström 7075dd249b Add closing brackets to example 2019-03-10 10:38:05 +01:00
David Burström 146119af5c Migrate XPath rule to 2.0 2019-03-10 10:37:32 +01:00
David Burström ff11ff6d0c Use Markdown syntax for better description formatting 2019-03-10 10:37:07 +01:00
David Burström 18296125a3 Rename test class so that it can be picked up by Surefire 2019-03-10 10:36:31 +01:00
Travis CI (pmd-bot) e5ca9d71bf Update documentation
TRAVIS_JOB_NUMBER=3536.1
TRAVIS_COMMIT_RANGE=460d324491b1...15381f237396
2019-03-09 17:21:40 +00:00
Andreas Dangel 15381f2373 [java] Use XPath 2.0 for DetachedTestCase rule
Refs #1706
2019-03-09 17:58:49 +01:00
Andreas Dangel b126bf94d2 [doc] Generate property override examples in rule doc
Refs #1712
2019-03-09 16:21:11 +01:00
Andreas Dangel 460d324491 release notes: mention rulesets/apex/ruleset.xml is deprecated now 2019-03-09 15:31:12 +01:00
Travis CI (pmd-bot) 795cb248da Update documentation
TRAVIS_JOB_NUMBER=3531.1
TRAVIS_COMMIT_RANGE=1ce1d4bdbcf6...92bb0b2d3870
2019-03-09 11:36:11 +00:00
Andreas Dangel 92bb0b2d38 Update release notes, mention quickstart ruleset for apex
Refs #1711
2019-03-09 12:19:01 +01:00
Andreas Dangel 1ce1d4bdbc [apex] Followup on Introduce quickstart ruleset #1711
* Restructure old default ruleset, so that it appears as
  "deprecated: This ruleset is for backwards compatibility".
  This is automatically done,
  if it contains only rule references to single rules, and each one
  of them is deprecated.

* Rename quickstart ruleset
2019-03-09 12:12:39 +01:00
Travis CI (pmd-bot) 833a413c51 Update documentation
TRAVIS_JOB_NUMBER=3528.1
TRAVIS_COMMIT_RANGE=d17668e38d39...363ca25707d5
2019-03-08 21:27:43 +00:00
Robert Sösemann 363ca25707 Merge pull request #1711 from rsoesemann/harmonize-rulesets
[apex] Introduce quickstart ruleset
2019-03-08 22:09:52 +01:00
Andreas Dangel d17668e38d [ci] Use travis wait for executing pmdtester
This is a workaround for pmd/pmd-regression-tester#60
We might also have now new rules which makes the whole PMD
execution take longer.
2019-03-08 15:29:46 +01:00
Robert Sösemann ad9ebc7ba3 Harmonize ruleset names with Java 2019-03-06 22:30:38 +01:00
Robert Sösemann b0398e1288 Revert "Harmonize ruleset names with Java"
This reverts commit 347d2d42
2019-03-06 22:27:17 +01:00
Robert Sösemann 347d2d42cb Harmonize ruleset names with Java 2019-03-06 22:25:04 +01:00
Travis CI (pmd-bot) 23163183cd Update documentation
TRAVIS_JOB_NUMBER=3524.1
TRAVIS_COMMIT_RANGE=a38be4b1af4c...54466bd4d94f
2019-03-06 21:15:58 +00:00
Robert Sösemann 54466bd4d9 Fix #1648 ([apex,vf] Remove CodeClimate dependency) 2019-03-06 21:59:32 +01:00
Travis CI (pmd-bot) a38be4b1af Update documentation
TRAVIS_JOB_NUMBER=3521.1
TRAVIS_COMMIT_RANGE=204856f8c82a...1723acde4aa6
2019-03-06 19:40:56 +00:00
Andreas Dangel 1723acde4a java-design: reorder rules in category xml 2019-03-06 20:20:02 +01:00
Andreas Dangel dc8fd8b078 release notes: don't mention #1692, since that's a feature 2019-03-06 20:19:59 +01:00
Andreas Dangel fccc9e8ed4 Merge branch 'pr-1706' 2019-03-06 20:19:44 +01:00
Travis CI (pmd-bot) 204856f8c8 Update documentation
TRAVIS_JOB_NUMBER=3519.1
TRAVIS_COMMIT_RANGE=5d86217871f0...4d357d5624b0
2019-03-06 19:11:54 +00:00
Andreas Dangel d0929dbafc Update release notes, refs #1706 2019-03-06 20:04:00 +01:00
Andreas Dangel 4d357d5624 release notes: Add category of new rule 2019-03-06 19:56:24 +01:00
Andreas Dangel dec3b06eb0 Merge branch 'pr-1704' 2019-03-06 19:46:05 +01:00
Andreas Dangel eba69e3bb9 Update release notes, fixes #1692, refs #1704 2019-03-06 19:45:56 +01:00
David Burström 3c32cbb629 [java] Detect while loops wih literal booleans conditions 2019-03-03 21:55:36 +01:00
Bhanu 50158b48c8 renamed rule 2019-03-03 12:45:48 -06:00
Bhanu 6f93e5aec6 updated rule description and message to be more descriptive of the rule. 2019-03-03 12:02:34 -06:00
Bhanu 95dca6be80 updated test cases file 2019-03-03 10:42:09 -06:00
Bhanu 67d509fa75 removed java lang imports 2019-03-03 10:42:09 -06:00
Bhanu fac3c6b0a4 added new test case constructor declaring checked exceptions 2019-03-03 10:42:09 -06:00
Bhanu e8a328e733 turned the rule into xpath rule 2019-03-03 10:05:04 -06:00
Clément Fournier 3a78b2151b Leave a readme behind 2019-03-03 12:04:55 +01:00
Clément Fournier b6d9b2cdb3 Update issue template, release notes 2019-03-03 12:00:57 +01:00
Clément Fournier d58b4e7dcf Update CONTRIBUTING, README 2019-03-03 11:54:41 +01:00
Andreas Dangel 6b50437df3 Upgrade surefire and junit test engine
Also fix test in pmd-apex
2019-03-03 11:52:08 +01:00
Bhanu 651a0e29df updated release version for SignatureDeclareThrowsRuntimeException 2019-03-02 22:59:29 -06:00
sudhansu 833ab3f221 review feedback implemented on new apex rules 2019-03-02 20:31:41 -08:00
Bhanu 114795118f added test cases file for SignatureDeclareThrowsRuntimeException 2019-03-02 21:37:40 -06:00
Bhanu 0a3718aceb renamed isRuntimeException method 2019-03-02 21:36:43 -06:00
David Burström 6fe423cbf3 Add imports, add more annotations, fix misc review comments 2019-03-02 20:15:51 +01:00
Andreas Dangel 5d86217871 dogfood: update pmd and build-tools 2019-03-02 19:11:10 +01:00
David Burström d675526658 [java] Add DetachedTestCase rule 2019-03-01 14:35:12 +01:00
Bhanu 31a8156b4f Added signature declare throws runtime exception 2019-02-28 19:52:30 -06:00
Clément Fournier cc44bac3c3 Remove pmd-ui module 2019-02-27 16:20:00 +01:00
Andreas Dangel 9e8fc3f4a2 [ci] Release Notes are not generated and uploaded automatically
Fixes #1695

We need to call ruby via bundler to have all the installed gems available.
2019-02-25 20:12:45 +01:00
Andreas Dangel 65e59a4e52 Fix release notes for 6.12.0 2019-02-25 20:02:52 +01:00
Matias Fraga c322b9d0c1 Add steps and non-antlr doc 2019-02-25 14:53:11 -03:00
Matias Fraga f5b315db4d Add CPD documentation 2019-02-24 17:18:56 -03:00
Andreas Dangel 63c5cce4b7 Prepare next development version 2019-02-24 08:59:27 +01: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
Andreas Dangel 27b67a7163 Prepare pmd release 6.12.0 2019-02-24 08:49:08 +01:00
sudhansu de8f5b372a apex rules for test method and assert statements 2019-02-23 21:38:31 -08:00
Clément Fournier 8d7b885d83 Fix wrong developer mode condition 2019-02-23 21:33:16 +01:00
Juan Martín Sotuyo Dodero cd7ca8055f Merge pull request #1597 from teamraptor/enhance-node
[core] Add final modifiers into AbstractNode
2019-02-23 17:32:26 -03:00
Andreas Dangel ba06ec9405 Merge branch 'pr-1693' 2019-02-23 19:30:17 +01:00
Andreas Dangel f5a395f505 Update release notes, refs #1693 2019-02-23 19:15:35 +01:00
Clément Fournier 44573f225a Refresh XPath results on changes to properties 2019-02-23 12:03:44 +01:00
Clément Fournier 6616927445 Add button to add property 2019-02-23 11:49:53 +01:00
Clément Fournier 1df26d4dd3 Fix eclipse compiler import 2019-02-23 11:01:07 +01:00
Clément Fournier 7839d1fbb7 Checkstyle 2019-02-22 16:22:03 +01:00
Clément Fournier 255c052138 Output reflection warning on system.out 2019-02-22 16:08:30 +01:00
Clément Fournier 6e330b0848 Add constructors for scenebuilder 2019-02-22 16:06:12 +01:00
Andreas Dangel c26cbe1a27 Merge branch 'pr-1686' 2019-02-22 09:34:10 +01:00
Andreas Dangel 33db8265a1 [doc] Add missing escaping in roadmap.md 2019-02-22 09:33:00 +01:00
Andreas Dangel 80beb64d52 [doc] release notes: fixes #1671, refs #1686 2019-02-22 09:32:11 +01:00
Clément Fournier 7f7090f009 Improve initialization output 2019-02-22 00:56:24 +01:00
Clément Fournier 50f99743a7 Change error display for editor 2019-02-21 14:58:25 +01:00
Clément Fournier 99e8924198 Fix parent highlighting 2019-02-21 14:24:31 +01:00
Clément Fournier fc48f93e92 Handle XPath errors gracefully 2019-02-21 14:08:38 +01:00
Clément Fournier 00fbcdfc9f Shorten code 2019-02-21 13:02:26 +01:00
Clément Fournier c113f98311 Handle missing VM arg on JRE 9+ 2019-02-21 12:55:47 +01:00
Clément Fournier f7a6d95658 Clarify NodeSelectionSource 2019-02-21 12:32:16 +01:00
Clément Fournier e329aa39d4 use FXMLLoader to inject designer root 2019-02-21 12:17:59 +01:00
Himanshu Pandey a597a7f456 Replace junk characters with ">" 2019-02-20 15:51:24 -08:00
Andreas Dangel 22edffbb21 [ui] Minor fixes
* Eclipse compiler needs apparently an additional import for HighlightLayerCodeArea.LayerId
* LICENSE file location no absolute
* Unselect xpath result if another node is selected
2019-02-20 20:25:04 +01:00
Andreas Dangel 95c145898d Merge branch 'pr-1630' 2019-02-20 19:27:51 +01:00
Clément Fournier 9530653561 Merge branch 'master' into designer-event-refactor 2019-02-20 15:41:26 +01:00
Clément Fournier 60bf26d375 Update release notes
Closes #1679
2019-02-20 13:41:02 +01:00
Clément Fournier f6b909d844 Fix designer default version 2019-02-20 13:38:26 +01:00
Clément Fournier 754309a926 Layer tests into containers 2019-02-19 19:23:57 +01:00
Clément Fournier 9d1cb2105f Merge branch 'master' into externalize-ast-matching-dsl 2019-02-19 18:57:40 +01:00
Andreas Dangel c4ce925997 Update release notes, refs #1663 2019-02-18 19:46:06 +01:00
Clément Fournier 74339cae54 Merge branch 'master' into designer-event-refactor 2019-02-18 10:12:15 +01:00
Juan Martín Sotuyo Dodero c6375185c2 Merge branch 'pr-1621' 2019-02-18 00:49:49 -03:00
Juan Martín Sotuyo Dodero 08df72dfbd Merge branch 'pr-1657' 2019-02-18 00:45:48 -03:00
Juan Martín Sotuyo Dodero 43c055121d Merge branch 'pr-1655' 2019-02-17 23:34:34 -03:00
Juan Martín Sotuyo Dodero 52c4d6ed37 Update changelog, refs #1655 2019-02-17 23:34:15 -03: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
lsoncini 9b12f1e3d0 Merge branch 'master' of https://github.com/pmd/pmd into kotlin-tokenizer-refactor 2019-02-17 19:26:26 -03:00
Juan Martín Sotuyo Dodero 91e3f699f5 Merge branch 'pr-1654' 2019-02-17 18:52:23 -03:00
Juan Martín Sotuyo Dodero 4a0bb348b6 Update docs, reflect changes to CPD suppression 2019-02-17 18:52:05 -03:00
Juan Martín Sotuyo Dodero 4199064c2c Update changelog, refs #1654 2019-02-17 18:50:32 -03:00
Tomi De Lucca 60aa1b5c2b Moved base token filter to internal package 2019-02-17 18:36:55 -03:00
Tomi De Lucca 321f4b0f33 Merge branch 'master' of github.com:pmd/pmd into feature/token-filter 2019-02-17 17:45:48 -03:00
Tomi De Lucca decb969491 Antlr token manager now is responsible of filtering non default tokens 2019-02-17 17:36:15 -03:00
Juan Martín Sotuyo Dodero b74527cb8e Merge branch 'pr-1598' 2019-02-17 16:33:33 -03:00
Juan Martín Sotuyo Dodero 2cf10b9759 Internalize the AntrlTokenizer 2019-02-17 16:31:56 -03:00
Travis CI (pmd-bot) dd175ff4e5 Update documentation
TRAVIS_JOB_NUMBER=3448.1
TRAVIS_COMMIT_RANGE=4835b29f88f0...9f4341e70e02
2019-02-17 17:58:25 +00:00
Juan Martín Sotuyo Dodero 9f4341e70e [core] Add release sourceset 2019-02-17 14:43:32 -03:00
Juan Martín Sotuyo Dodero 4835b29f88 Merge branch 'pr-1538' 2019-02-17 14:37:52 -03:00
Juan Martín Sotuyo Dodero 4938fa8272 The rule will be part of 6.12.0 2019-02-17 14:33:41 -03:00
Clément Fournier ff37222caf Use Assertions in testGroup 2019-02-17 14:35:21 +01:00
Andreas Dangel f3771d2401 Update release notes, fixes #1656 2019-02-16 22:23:06 +01:00
Andreas Dangel c32daec699 [plsql] Avoiding tokens for "FIRST" and "REPLACE" 2019-02-16 20:28:05 +01:00
Andreas Dangel 7333ed4595 [plsql] New reserved words are: COLUMNS, INDEXES, OVERLAPS
Separated reserved words tokens from keyword tokens
2019-02-16 20:28:00 +01:00
Andreas Dangel c94e87e1b0 [plsql] Add operator for ComparisonCondition 2019-02-16 20:27:53 +01:00
Andreas Dangel fcd6006b56 [plsql] Support TRIM function 2019-02-16 20:27:45 +01:00
Andreas Dangel e7e1262b00 [plsql] Fix function calls in order by clause 2019-02-16 20:27:29 +01:00
Andreas Dangel c7f104a357 [plsql] SELECT is a reserved word 2019-02-16 20:27:22 +01:00
Andreas Dangel 808c03f532 [plsql] Add SimpleExpressionNode, allow expressions with REGEXP_LIKE 2019-02-16 20:25:50 +01:00
Matias Fraga 22aaa70983 Add final modifier 2019-02-16 16:20:03 -03:00
Andreas Dangel 984928ad52 [plsql] Add more code samples 2019-02-16 20:13:48 +01:00
Andreas Dangel d81e708db0 [plsql] Improved UPDATE statement 2019-02-16 20:13:39 +01:00
Andreas Dangel 80f3f07166 [plsql] Allow subqueries in SELECT columns 2019-02-16 20:13:27 +01:00
Andreas Dangel e8ed43d7e2 [plsql] Fix parsing of union in SELECT INTO statements
Also allow "normal" SELECT statement (without INTO).
2019-02-16 20:13:18 +01:00
Andreas Dangel f43e261243 [plsql] Support more than simple names for order by and select into. 2019-02-16 20:13:00 +01:00
Andreas Dangel 4814ece9ac [plsql] Support ListaggOverflowClause for LISTAGG function 2019-02-16 20:12:38 +01:00
Andreas Dangel 892b53dc6f [plsql] Support WithinClause for LISTAGG function (and similar) 2019-02-16 20:09:54 +01:00
Andreas Dangel d56bdc1c84 [plsql] Support AnalyticClause 2019-02-16 20:09:48 +01:00
Andreas Dangel 18afdad101 Merge remote-tracking branch 'adangel/issue-1590' into plsql-parser-fixes2 2019-02-16 20:07:03 +01:00
Andreas Dangel ee3dd2db7a Merge remote-tracking branch 'adangel/issue-1589' into plsql-parser-fixes2 2019-02-16 20:02:09 +01:00
Andreas Dangel 0a26a3bb17 Merge remote-tracking branch 'adangel/issue-1587' into plsql-parser-fixes2 2019-02-16 20:00:39 +01:00
lsoncini 72f2e425b2 KotlinTokenizer refactor 2019-02-16 15:49:03 -03:00
Tomi De Lucca 3cff4f3d22 Minor fixes 2019-02-16 01:19:05 -03:00
Tomi De Lucca 017f50df3e Merge branch 'master' of github.com:pmd/pmd into feature/token-filter 2019-02-16 00:25:10 -03:00
Tomi De Lucca f049a36e5c Refactored token filter 2019-02-16 00:24:16 -03:00
Andreas Dangel 833119e00c [plsql] Fix test cases
* table is a reserved word and cannot be used as an identifier
* correctly name test class for TableCollectionExpressionTest
2019-02-10 10:41:58 +01:00
Andreas Dangel b32e5b0910 [plsql] Support REGEXP_LIKE condition 2019-02-10 10:30:23 +01:00
Andreas Dangel 2e07139f8d [plsql] Add multiset condition in where clause 2019-02-10 10:30:23 +01:00
Andreas Dangel 06eb3e24eb [plsql] Parse Exception with EXISTS
Fixes #1587
2019-02-10 10:30:23 +01:00
Andreas Dangel fcdded6d5d [plsql] ParseException with subqueries in WHERE clause
Fixes #1589
2019-02-10 10:27:42 +01:00
Andreas Dangel c03910fb99 Update release notes, refs #1590 2019-02-10 10:25:13 +01:00
Andreas Dangel adfc8511e6 [plsql] FunctionCall is now used again for user defined functions 2019-02-10 10:24:40 +01:00
Andreas Dangel fcba29a3b7 [plsql] ParseException when using hierarchical query clause
Fixes #1590

* Moves function calls down to primary expression so that functions
  can be used in a select expression
* Restrict FunctionCall to built-in functions. User defined functions
  are parsed as primary expressions.
* Parse function name of built-in function as general ID.
* The Tokens _DEFAULT, ELSE and EXCEPTION are reserved words and not
  available for identifiers.
2019-02-10 10:24:40 +01:00
Andreas Dangel 544238244b [java] Rename UseDiamondOperator -> UseDiamondOperatorTest 2019-02-10 09:42:41 +01:00
Juan Martín Sotuyo Dodero e57d365da9 Merge branch 'pr-1646' 2019-02-09 13:13:09 -03:00
Juan Martín Sotuyo Dodero f012dca515 Update changelog, refs #1646 2019-02-09 13:12:47 -03:00
Juan Martín Sotuyo Dodero 189c5990f4 Split test cases for granularity 2019-02-09 13:11:16 -03:00
Shubham 74d45a90f0 New test case added 2019-02-09 16:31:09 +05:30
IDoCodingStuffs cba6ea376f Revert autoformatting whitespaces 2019-02-08 21:21:52 -05:00
IDoCodingStuffs 834283b34f Removed .isArray check, replaced with placeholder 2019-02-08 21:09:48 -05:00
IDoCodingStuffs 97d8faa2ef Modified regex logic to account for multiple initializers 2019-02-08 20:57:31 -05:00
IDoCodingStuffs adabe19ec4 Rename test class 2019-02-08 20:55:40 -05:00
IDoCodingStuffs 67f755ad3a Additional test case for multiple initializers 2019-02-08 20:37:17 -05:00
Shubham 5bb24d96cf XPATH for UseDiamondOperator Rule Updated 2019-02-08 17:26:35 +05:30
IDoCodingStuffs 0e2bbfc860 Added check for null node image to avoid regex checking null str 2019-02-07 18:56:16 -05:00
IDoCodingStuffs 83f6b49cc0 Further style fixes 2019-02-07 17:57:22 -05:00
IDoCodingStuffs 6f957a58b9 Regex logic change to avoid style violations outside variable assignments 2019-02-07 16:37:01 -05:00
IDoCodingStuffs c3047700f4 Indent fix to address build failure 2019-02-07 16:09:18 -05:00
IDoCodingStuffs 33ab74c8d2 Fix style violation causing build failure 2019-02-07 15:35:23 -05:00
IDoCodingStuffs d4829281f2 Version no fix, revert auto-formatting 2019-02-07 15:15:22 -05:00
IDoCodingStuffs f751c3b640 Added test cases 2019-02-07 13:27:56 -05:00
IDoCodingStuffs 0a0209e70b Renamed rule class, added rule to codestyle.xml 2019-02-07 13:08:48 -05:00
IDoCodingStuffs f26e374248 Added stub unit test 2019-02-07 12:59:30 -05:00
IDoCodingStuffs 6a81a63dd8 Initial stub implementation for basic example mentioned in issue 2019-02-07 12:45:21 -05:00
Shubham 50f64f5fb1 Update UseDiamondOperator.xml 2019-02-07 10:46:06 +05:30
Shubham 1d321d9a0a Removed var from getting checked by UseDiamondOperatorRule
Also includes Minor Correction in one test case.
2019-02-06 16:51:46 +05:30
Juan Martín Sotuyo Dodero cfe07822be Merge branch 'pr-1644' 2019-02-05 23:33:41 -03:00
Juan Martín Sotuyo Dodero be73856c7c Update changelog, refs #1644 2019-02-05 23:32:52 -03:00
Juan Martín Sotuyo Dodero a558133822 Merge branch 'pr-1645' 2019-02-05 22:53:10 -03:00
Juan Martín Sotuyo Dodero 3f436ddbbd Update changelog, refs #1645 2019-02-05 22:52:54 -03:00
Juan Martín Sotuyo Dodero 2165fb056c Remove TryStatement from parent blocks
- We should treat appends over the try edge as consecutive, it's only
   catch / finally that maye break the linear execution flow
2019-02-05 22:50:11 -03:00
Juan Martín Sotuyo Dodero 58b52a4fd8 Add more test cases 2019-02-05 22:49:53 -03:00
Shubham 709f9ed4ea Catch and Finally Statements added 2019-02-05 12:58:39 +05:30
tomdaly 7dd44ec414 Fix PR comments 2019-02-04 19:16:08 +00:00
tomdaly 37f5031769 Merge branch 'master' of git://github.com/pmd/pmd into enhancement-1573 2019-02-04 10:51:41 +00:00
Shubham 86c72a87b4 Try Statement added to list of block parents
ASTTryStatement added to BLOCK_PARENTS.
2019-02-04 15:29:23 +05:30
Clément Fournier 28725841ab Make channel not static 2019-02-04 07:22:19 +01:00
Clément Fournier e2ed8447e6 Simplify and abstract selection logic with messenger pattern 2019-02-04 07:04:09 +01:00
tomdaly 295c945978 Add property to allow apex test methods to contain underscores
Add a 'skipTestMethodUnderscore' boolean property that allows an
annotated Apex test method (@isTest or testMethod) to contain underscores
Fixes issue #1573
2019-02-03 19:11:40 +00:00
Clément Fournier 1daa3382ae Simplify event log popup flow 2019-02-03 17:53:36 +01:00
Juan Martín Sotuyo Dodero db2348baec Merge branch 'pr-1637' 2019-02-02 13:58:39 -03:00
Juan Martín Sotuyo Dodero f1c0afddab Update changelog, refs #1637 2019-02-02 13:58:00 -03:00
Juan Martín Sotuyo Dodero 422f44cf1a Add todo for follow up improvements 2019-02-02 13:56:29 -03:00
Shubham 1e1d6aafae code review changes 2019-02-02 20:38:23 +05:30
Juan Martín Sotuyo Dodero d5b3da2c11 Merge branch 'pr-1640' 2019-02-01 19:26:41 -03:00
Juan Martín Sotuyo Dodero 6d17dc2e45 Update changelog, refs #1640 2019-02-01 19:25:35 -03:00
Phokham Nonava f0830eb973 Update instead of override classHasLombokAnnotation flag
Fixes issues where inner classes would override this flag.
2019-02-01 22:59:04 +01:00
Shubham 23ce8435e4 all compile time constants are avoided by AccessorMethodGenerationRule 2019-02-01 19:36:51 +05:30
Shubham 7a5ed78a73 constants initialized by literals avoided by AccessorMethodGenerationRule
Compile time constants with literals only expression avoiding AccessorMethodGenerationRule.
2019-01-31 15:40:22 +05:30
Travis CI (pmd-bot) bd7c6c3a17 Update documentation
TRAVIS_JOB_NUMBER=3387.1
TRAVIS_COMMIT_RANGE=0ae9ed045b8e...e2a4b744fd54
2019-01-30 15:45:01 +00:00
Juan Martín Sotuyo Dodero e2a4b744fd Merge branch 'pr-1634' 2019-01-30 12:27:17 -03:00
Juan Martín Sotuyo Dodero db3d1c8362 Update changelog, refs #1634 2019-01-30 12:26:17 -03:00
Juan Martín Sotuyo Dodero 0ae9ed045b Merge branch 'pr-1635' 2019-01-30 12:16:09 -03:00
Juan Martín Sotuyo Dodero 0703b041a8 Update changelog, refs #1635 2019-01-30 12:15:53 -03:00
Shubham 0547897934 Reviewed code updated 2019-01-30 19:43:09 +05:30
Shubham cb0c70f1ac Review changes implemented 2019-01-30 18:58:47 +05:30
Shubham d1c75ccff4 Unused Formatter need not be checked for synchronization. 2019-01-30 14:57:39 +05:30
Shubham 149f85a7e4 #1633 [java] UnsynchronizedStaticFormatter reports commons lang FastDateFormat
Thread safe formatter org.apache.commons.lang3.time.FastDateFormat can not avoid UnsynchronizedStaticFormatterRule.
2019-01-30 14:02:17 +05:30
Shubham 9532552eaa BeanMembersShouldSerializeRule aware of lombok accessors
Extended AbstractLombokAwareRule to make BeanMembersShouldSerializeRule aware of lombok annotations. Checking if class or any of the variables have lombok annotations and avoid BeanMembersShouldSerializeRule on these variables.
2019-01-30 11:09:44 +05:30
Clément Fournier 455860a9a9 Checkstyle 2019-01-29 19:03:07 +01:00
Clément Fournier 16267426d4 Fetch the type of TypeNode reflectively 2019-01-29 19:01:24 +01:00
Clément Fournier f9aa6679c5 Extract license popup 2019-01-29 18:50:15 +01:00
Clément Fournier bb2999378f Extract node edition code area 2019-01-29 18:38:35 +01:00
Clément Fournier 4829404a67 Bind editor style layers to properties 2019-01-29 18:13:49 +01:00
Travis CI (pmd-bot) dab1fb24c6 Update documentation
TRAVIS_JOB_NUMBER=3376.1
TRAVIS_COMMIT_RANGE=add4a78b57a2...8a7913a30d93
2019-01-29 03:22:02 +00:00
Juan Martín Sotuyo Dodero 8a7913a30d Merge branch 'pr-1628' 2019-01-29 00:04:40 -03:00
Juan Martín Sotuyo Dodero 754a812ad2 Update changelog, refs #1628 2019-01-29 00:03:44 -03:00
Juan Martín Sotuyo Dodero add4a78b57 Merge branch 'pr-1625' 2019-01-29 00:00:11 -03:00
Juan Martín Sotuyo Dodero 212fd100aa Update changelog, refs #1625 2019-01-28 23:59:30 -03:00
Juan Martín Sotuyo Dodero 081ee17349 Simplify test 2019-01-28 23:59:19 -03:00
Juan Martín Sotuyo Dodero b15a5087e0 Merge branch 'pr-1623' 2019-01-28 23:46:23 -03:00
Juan Martín Sotuyo Dodero c76c9734e0 Update changelog, refs #1623 2019-01-28 23:46:03 -03:00
Clément Fournier b83d06028e Fix name occurrences 2019-01-29 02:44:01 +01:00
Clément Fournier e47f942c80 Checkstyle 2019-01-29 01:15:09 +01:00
Clément Fournier e377a17265 add a nice runlater 2019-01-29 01:08:15 +01:00
Clément Fournier 2c357fe941 REVERT ME Remove crumbbar to prep for PR 2019-01-28 23:47:32 +01:00
Clément Fournier 75da199b06 Hunt down some redundant events 2019-01-28 23:42:36 +01:00
Clément Fournier 3dc99bc160 Document and organise code 2019-01-28 22:51:41 +01:00
Clément Fournier 8759db46c4 Fix duplicate events 2019-01-28 21:29:14 +01:00
Clément Fournier 0b52a94c99 Improve event logging 2019-01-28 20:17:35 +01:00
Shubham 6f2cd5fe29 Test cases added
Updated testcases.
2019-01-28 23:02:59 +05:30
Clément Fournier c11d3abe80 Treat node selection as events 2019-01-28 17:06:33 +01:00
Shubham 746dc4e602 Code review changes
All overridden methods are ignored now.
2019-01-28 20:51:06 +05:30
Shubham 1b9e63b4f4 #1543 [java] LinguisticNaming should ignore overriden methods
Overriden methods are ignored from LinguisticNamingRule.
2019-01-28 16:50:51 +05:30
Shubham 189bb46ea1 UnusedImports false positive for method parameter type in @see Javadoc
Updated SEE_PATTERN regex pattern.
2019-01-28 14:39:08 +05:30
Tomi De Lucca 16fe20af0e Restored imports order 2019-01-28 01:34:17 -03:00
Tomi De Lucca 8a46cea437 Added AntlrTokenFilter 2019-01-28 01:26:10 -03:00
Clément Fournier 613eb9601c Cleanup 2019-01-28 00:01:26 +01:00
Andreas Dangel dd66f9c5a2 [ci] fix path to travis_wait, more usages of travis_wait 2019-01-27 19:39:31 +01:00
Andreas Dangel b0eb46379e [ci] Fail the build if uploading the baseline fails 2019-01-27 18:31:21 +01:00
Andreas Dangel 017b6c3275 [ci] use travis_wait while uploading to sourceforge 2019-01-27 18:30:57 +01:00
Clément Fournier 5c2b8e0afe Fix merge 2019-01-27 16:59:37 +01:00
Bobby Wertman ea022f0e68 [java] Fix lombok.AllArgsConstructor support 2019-01-27 10:55:45 -05:00
Clément Fournier a8eae0bd9b Merge branch 'master' into designer-breadcrumbbar 2019-01-27 16:51:58 +01:00
Andreas Dangel 72900e25f6 Prepare next development version 2019-01-27 14:08:22 +01: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 8a7cc8c910 Prepare pmd release 6.11.0 2019-01-27 13:16:20 +01:00
Andreas Dangel 5f0d4d04fb Fix release notes 2019-01-27 13:14:50 +01:00
Andreas Dangel ea2fb21924 Merge branch 'pr-1450' 2019-01-27 11:51:29 +01:00
Andreas Dangel 59f032dbbd Update release notes, mention plsql 2019-01-27 11:40:39 +01:00
Andreas Dangel df169f7027 [plsql] Fix build: table is a reserved word so can't be used as a table name 2019-01-27 11:34:01 +01:00
Juan Martín Sotuyo Dodero 76f6ceab79 Merge pull request #1594 from adangel/issue-1526
[plsql] ParseException when using TableCollectionExpression
2019-01-26 19:31:44 -03:00
Juan Martín Sotuyo Dodero 21d683743c Merge pull request #1616 from adangel/issue-1588
[plsql] Parse Exception with function calls in WHERE clause
2019-01-26 19:26:24 -03:00
Juan Martín Sotuyo Dodero d68b579d79 Fix typo in release notes 2019-01-26 16:22:24 -03:00
Andreas Dangel 2912486b21 Merge branch 'pr-1591' 2019-01-26 19:45:14 +01:00
Andreas Dangel 89c8f47b2b Move JavaCCTokenizer to internal package 2019-01-26 19:19:46 +01:00
Andreas Dangel 8609aa314f Merge branch 'pr-1558' 2019-01-26 18:45:06 +01:00
Andreas Dangel 6c4317547d Update versions 2019-01-26 18:41:59 +01:00
Clément Fournierandadangel 2465e5395c Update pmd-java/src/main/resources/category/java/bestpractices.xml
Co-Authored-By: adangel <andreas.dangel@adangel.org>
2019-01-26 13:02:40 +01:00
Andreas Dangel f499927486 Merge remote-tracking branch 'origin/master' into use-try-with-resources 2019-01-26 12:27:00 +01:00
Andreas Dangel ac1ea34c4c [java] UseTryWithResources: fix false positive with no autocloseable 2019-01-26 12:16:19 +01:00
Andreas Dangel 99d63cd261 [java] UseTryWithResources: Fix false negative 2019-01-26 11:59:04 +01:00
Andreas Dangel 57d6ff9e30 Merge remote-tracking branch 'origin/master' into issue-1559 2019-01-26 11:28:36 +01:00
Andreas Dangel 08b7dd49dd [core] Add a generic JavaCCTokenizer for CPD 2019-01-26 11:24:32 +01:00
Andreas Dangel 8a208b7027 [doc] fix regex, union needs to be enclosed in extra parentheses 2019-01-25 20:56:59 +01:00
Andreas Dangel 17fe6694ba [core] Failed build on Windows with source zip archive
Fixes #1462
2019-01-25 18:41:46 +01:00
Andreas Dangel 79767a0191 Update release notes 2019-01-25 18:16:53 +01:00
Andreas Dangel bac9d03cea Merge branch 'pr-1571' 2019-01-25 18:09:37 +01:00
Andreas Dangel d61cccade5 [apex] Expose operator of BinaryExpression, add test for boolean expression op 2019-01-25 18:09:19 +01:00
Andreas Dangel d43e65761b [core] Undo changes to AttributeAxisIterator / Attribute, so that
we only can iterate on the node's attribute
2019-01-25 18:08:29 +01:00
Clément Fournier 50f67945bb Fix names 2019-01-24 01:15:46 +01:00
Clément Fournier 3de2d87abf Merge commit '33513f49d' into designer-breadcrumbbar 2019-01-24 00:34:26 +01:00
Clément Fournier e4ea6d7f71 Improve resilience to unknown language version 2019-01-24 00:25:58 +01:00
Clément Fournier 70ab933d2c Fix tooltip 2019-01-24 00:09:31 +01:00
Clément Fournier ec4ff88fd5 Merge branch 'master' into designer-breadcrumbbar 2019-01-24 00:04:44 +01:00
Andreas Dangel 2def07b542 Fixes from PR review 2019-01-23 21:31:34 +01:00
Andreas Dangel 46ddd7d1f6 [plsql] ParseException when using TableCollectionExpression
Fixes #1526

Also adding InsertStatement
2019-01-23 21:31:34 +01:00
Andreas Dangel b173d11508 [plsql] Parse Exception with function calls in WHERE clause
Fixes #1588
2019-01-23 20:56:44 +01:00
Clément Fournier ead4a78c3b unused imports 2019-01-23 19:13:09 +01:00
Clément Fournier f17b5f4722 Merge branch 'xpath-apex-attributes' of github.com:oowekyala/pmd into xpath-apex-attributes 2019-01-23 18:41:16 +01:00
Clément Fournier 032fae401e Remove unnecessary override 2019-01-23 18:41:11 +01:00
Clément Fournier 22107beac4 Merge branch 'master' into xpath-apex-attributes 2019-01-23 18:37:33 +01:00
Clément Fournier 7c1c5d54e7 Expose jorje attributes manually 2019-01-23 18:35:11 +01:00
Andreas Dangel ecd60e8e3e Danger: Update PmdTester execution to report also configuration errors
Refs pmd/pmd-regression-tester#57
2019-01-20 20:18:45 +01:00
Juan Martín Sotuyo Dodero dbe2442a2a Merge pull request #1596 from adangel/issue-1586
[plsql] Parse Exception when functions are used with LIKE
2019-01-20 12:08:33 -02:00
Andreas Dangel a79d4aeb4f Fix asserts 2019-01-20 11:47:59 +01:00
Andreas Dangel 872f4e90e2 [plsql] Parse Exception when functions are used with LIKE
Fixes #1586
2019-01-20 11:01:17 +01:00
Andreas Dangel 4665509c44 Merge branch 'pr-1554' 2019-01-20 10:30:29 +01:00
Andreas Dangel 1b75d6c49c Update release notes, refs #1554, fixes #1583 2019-01-20 10:29:43 +01:00
Andreas Dangel b4d545b0c1 Multiple columns are not possible with ROW update 2019-01-20 10:28:14 +01:00
Andreas Dangel b745f331b8 CPD: Fix error handling for lexical errors
* TokenMgrError must not be caught by the tokenizer. This is handled
  by CPD itself
* The token managers need to know the filename for proper error messages
2019-01-20 10:18:56 +01:00
Andreas Dangel a8e1364072 [cpp] CPD: Lexical error in file (no file name provided)
Fixes #1559
2019-01-20 10:18:52 +01:00
Juan Martín Sotuyo Dodero 1326fe5aca Merge pull request #1585 from oowekyala/designer-hide-event-log
[ui] Convert event log into a popup
2019-01-20 03:20:00 -02:00
Matias Fraga bbef52feb2 Add final modifiers 2019-01-19 14:44:08 -03:00
Andreas Dangel d8647b77aa Merge branch 'pr-1584' 2019-01-19 18:08:46 +01:00
Andreas Dangel add3957b71 Update release notes, refs #1584, fixes #1196 2019-01-19 18:07:46 +01:00
Bruno Ferreira 214dc7f8c7 Starts using the PathFileComparator from apache commons instead of custom comparator.
Moves the sort to the private method that scans directories and starts listing files instead of paths, avoiding the creation of new File instances on our own.
2019-01-19 12:34:47 +00:00
Andreas Dangel 26ff9e3c3e [apex] Fix unit test 2019-01-18 18:09:24 +01:00
Juan Martín Sotuyo Dodero 94a928eddb Merge branch 'pr-1562' 2019-01-18 12:28:38 -02:00
Juan Martín Sotuyo Dodero 45477e8b37 [apex] Bump language version 2019-01-18 12:28:19 -02:00
Andreas Dangel 5be2027654 [core] CPD: Add unit test for file order relevance
Refs #1196
2019-01-18 12:19:43 +01:00
Andreas Dangel f61fb1491d Update release notes, fixes #1546 2019-01-18 09:47:12 +01:00
Andreas Dangel 200cd2c210 [apex] Update jorje to 2019-01-18-a041d7 2019-01-18 09:46:29 +01:00
Andreas Dangel a52ffc6eb8 [apex] Improve create-local-repo script
* Update version in pom.xml
* remove old binaries
* stage the changes with git
2019-01-18 09:45:11 +01:00
Andreas Dangel 857a33561b [apex] Improve script to update jorje 2019-01-17 21:43:53 +01:00
Andreas Dangel 57ece42cb9 [apex] Fix method name for constructors 2019-01-17 21:43:39 +01:00
Clément Fournier f25568a183 Remove unused constructor 2019-01-17 10:49:19 +01:00
Clément Fournier 5a2202319f Highlight name declarations when selecting from treeview 2019-01-16 14:27:44 +01:00
Clément Fournier 37e2bb54a3 Use ToolbarTitledPane 2019-01-16 13:11:59 +01:00
Clément Fournier 4e3832b5cb Fix pmd warnings 2019-01-16 12:43:04 +01:00
Clément Fournier b2d496f4fe Checkstyle 2019-01-16 12:40:49 +01:00
Clément Fournier 845cb14a1f Highlight name occurences of methods 2019-01-16 12:27:49 +01:00
Clément Fournier d0fbf4a313 Explanations 2019-01-16 12:02:29 +01:00
Clément Fournier fe717c3af5 Improve syntax highlight style on focused cells 2019-01-16 11:54:16 +01:00
Clément Fournier ac4c3d49fa Simplify stylesheets 2019-01-16 11:18:42 +01:00
Clément Fournier 9e27bf2e6b Convert XPath titledPanes to ToolBarTitledPanes 2019-01-16 10:47:24 +01:00
Clément Fournier fab97b7c37 Fix css 2019-01-16 01:10:17 +01:00
Clément Fournier 57b9ede7f1 Fix wild NPE 2019-01-15 18:02:03 +01:00
Clément Fournier 0fc83d2535 Merge branch 'master' into designer-hide-redundant-attributes 2019-01-15 17:40:42 +01:00
Clément Fournier b6d75f78ed Wrap message text 2019-01-15 14:26:56 +01:00
Clément Fournier 58bfc288de Fix ImmutableField 2019-01-15 11:46:27 +01:00
Clément Fournier 6f242496f7 Sort in descending order 2019-01-15 11:37:10 +01:00
Clément Fournier 5cabc61a7d Resize dialog 2019-01-15 11:03:10 +01:00
Clément Fournier a5f131cc4c Fix caching logic 2019-01-15 10:56:19 +01:00
Clément Fournier efec05fd76 Move auxclasspath in view menu, record new exceptions 2019-01-15 10:27:43 +01:00
Clément Fournier 8b30cee921 Merge branch 'master' into designer-hide-event-log 2019-01-15 08:11:51 +01:00
Bruno Ferreira 34abe877e2 Sorts the listed files by path in order to avoid unconsistencies since the listing on directories provided by tha java api does not guarantee always the same order. Therefore, sorting the files by path (ignoring the case), we can guarantee that the files will be iterated always by the same order, avoiding returning different clones for the same files in different cpd executions. 2019-01-14 23:26:48 +00:00
Juan Martín Sotuyo Dodero 954758b371 Merge pull request #1582 from oowekyala/designer-exception-noise
[ui] Reduce event log noise in designer
2019-01-14 19:20:27 -03:00
Juan Martín Sotuyo Dodero 8b4ad01777 Merge pull request #1580 from oowekyala/designer-fix-jar-exploration
[ui] Fix package exploration in jars
2019-01-14 19:18:35 -03:00
Clément Fournier 0a16b5f349 Merge branch 'master' into designer-exception-noise 2019-01-14 22:09:36 +01:00
Clément Fournier f96e4ff33e Merge branch 'master' into designer-hide-event-log 2019-01-14 22:04:59 +01:00
Clément Fournier c676a4c22e Replace with toggle button 2019-01-14 22:01:51 +01:00
Juan Martín Sotuyo Dodero a32399a397 Merge pull request #1576 from oowekyala/designer-clear-toolbar
[ui] Clear designer toolbar
2019-01-14 17:31:12 -03:00
Andreas Dangel dc44b2bb46 Merge branch 'pr-1553' 2019-01-14 19:27:49 +01:00
Andreas Dangel b5e2221e15 Update release notes, refs #1553 2019-01-14 19:27:24 +01:00
Andreas Dangel 59e8805bdd Merge branch 'pr-1552' 2019-01-14 19:25:45 +01:00
Andreas Dangel 0dde1e7935 Update release notes, refs #1552 2019-01-14 19:24:50 +01:00
Andreas Dangel b521126130 Merge branch 'pr-1550' 2019-01-14 18:50:17 +01:00
Clément Fournier f4fb8ec1c1 Merge branch 'designer-clear-toolbar' into designer-hide-redundant-attributes 2019-01-14 18:22:07 +01:00
Clément Fournier cc68dde87a Fix header height in node info panel 2019-01-14 18:16:19 +01:00
Clément Fournier 016166975b Estimate constant padding 2019-01-14 18:08:37 +01:00
Clément Fournier 22f1ad5f5e Shorten code 2019-01-14 16:48:47 +01:00
Clément Fournier f26901edc4 Merge branch 'master' into designer-exception-noise 2019-01-14 16:37:55 +01:00
Juan Martín Sotuyo Dodero 38309af4f7 Merge pull request #1581 from oowekyala/update-build-tools
[core] Update build-tools to 1.4.0
2019-01-14 12:09:34 -03:00
Clément Fournier f035eaaa54 Prop build-tools to 1.4.0 2019-01-14 12:41:08 +01:00
Clément Fournier ab5b20f014 Also fix tab/enter completion not working on JRE > 1.8 2019-01-14 11:51:08 +01:00
Clément Fournier 21d0956b4c Add todo 2019-01-14 09:38:46 +01:00
Clément Fournier e86a0ac82c Fix package exploration in jars 2019-01-14 09:03:52 +01:00
Clément Fournier a7bfd4971c Move crumb bar to editor.fxml 2019-01-14 03:20:05 +01:00
Clément Fournier 8c4353300e Fix checkstyle violations 2019-01-14 00:25:46 +01:00
Clément Fournier a0b2fe5a27 Merge branch 'designer-clear-toolbar' into designer-breadcrumbbar 2019-01-14 00:24:00 +01:00
Clément Fournier 03ce9a3e48 Fix checkstyle violations 2019-01-14 00:23:37 +01:00
Clément Fournier e46b0d4521 Fix syntax highlight 2019-01-14 00:12:30 +01:00
Clément Fournier 69435d511a Fix ellipses in menus 2019-01-13 22:06:39 +01:00
Clément Fournier 0edceb5675 Merge branch 'designer-clear-toolbar' into designer-breadcrumbbar 2019-01-13 21:49:10 +01:00
Clément Fournier 72b0cb1450 Comment 2019-01-13 21:45:07 +01:00
Clément Fournier 099453e08e Fix XPath expression not persisted 2019-01-13 20:49:10 +01:00
Clément Fournier 8626b5afd4 Add config to create multi-release jar 2019-01-13 19:43:12 +01:00
Clément Fournier 4556a3825a Merge branch 'designer-clear-toolbar' into designer-breadcrumbbar 2019-01-13 10:34:29 +01:00
Clément Fournier 9b9bfc7fae Merge branch 'master' into designer-breadcrumbbar 2019-01-13 10:33:37 +01:00
Clément Fournier 41521a69ad Fix icon decentering bug, increase icon size a tad 2019-01-13 05:28:07 +01:00
Travis CI (pmd-bot) 3db4763857 Update documentation
TRAVIS_JOB_NUMBER=3294.1
TRAVIS_COMMIT_RANGE=0424a45a4b03...f21851808992
2019-01-13 03:58:15 +00:00
Clément Fournier 755c049184 Spacing 2019-01-13 04:57:07 +01:00
Clément Fournier 59731240cd Merge branch 'master' into designer-clear-toolbar 2019-01-13 04:56:44 +01:00
Juan Martín Sotuyo Dodero f218518089 Merge pull request #1535 from adangel/unsynchronizedstaticformatter
[java] New rule: UnsynchronizedStaticFormatter
2019-01-13 00:44:41 -03:00
Juan Martín Sotuyo Dodero 0424a45a4b Merge pull request #1577 from oowekyala/designer-better-autocomplete
[ui] Improve XPath autocompletion
2019-01-12 23:34:36 -03:00
Clément Fournier 72397a53c8 Use Files.walkFileTree 2019-01-13 02:40:14 +01:00
Clément Fournier 92d6c6740b Don't hardcode xpath versions 2019-01-13 02:05:35 +01:00
Clément Fournier c0e7d6b61b Update to fa5, change export icon 2019-01-13 01:48:08 +01:00
Clément Fournier 49a7ed6f56 Fix PR comments 2019-01-13 01:06:21 +01:00
Juan Martín Sotuyo Doderoandoowekyala bd3d94c4d1 Apply suggestions from code review
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2019-01-13 00:50:49 +01:00
Clément Fournier e0006ea7be Allow TAB completion 2019-01-13 00:40:18 +01:00
Juan Martín Sotuyo Dodero 7eaa80cf62 Merge pull request #1579 from adangel/issue-1578
[java] Private field is detected as public inside nested classes in interfaces
2019-01-12 20:19:55 -03:00
Clément Fournier 61b0e54c50 PMD warning 2019-01-12 21:18:22 +01:00
Clément Fournier 5dc2308215 PMD warnings 2019-01-12 21:15:45 +01:00
Clément Fournier 28812374b8 Consider candidate length in ranking 2019-01-12 20:57:08 +01:00
Clément Fournier 355b34d947 Handle when popup not shown 2019-01-12 20:18:40 +01:00
Clément Fournier 7435f3391b Renamings 2019-01-12 20:13:08 +01:00
Clément Fournier 4ba83b8b9e Focus first result on typing 2019-01-12 20:01:23 +01:00
Andreas Dangel 5f34190851 [java] Private field is detected as public inside nested classes in interfaces
Fixes #1578
2019-01-11 17:14:47 +01:00
Clément Fournier 33513f49d2 Extract the treeview into its own control 2019-01-11 16:00:00 +01:00
Clément Fournier 9111e257c4 Change icon 2019-01-11 15:30:29 +01:00
Clément Fournier f17aeba2f9 Move export XPath to rule button 2019-01-11 15:23:44 +01:00
Clément Fournier 3b13e603d3 Remove tab completion 2019-01-11 13:20:04 +01:00
Clément Fournier 9c2dc4488b Move into other file 2019-01-11 13:17:36 +01:00
Clément Fournier 50dacd1867 Fix the fix 2019-01-11 11:44:09 +01:00
Clément Fournier e0ef66ef20 Fix index bug 2019-01-11 11:13:30 +01:00
Clément Fournier 5a10081daa PMD warnings + doc 2019-01-11 11:05:14 +01:00
Clément Fournier 125355df09 Hide event log in View menu 2019-01-11 10:43:22 +01:00
Clément Fournier ee0473c93c Style 2019-01-11 08:31:53 +01:00
Clément Fournier 0fa17fffdb Remove toggle to hide the bottom pane 2019-01-11 08:24:53 +01:00
Clément Fournier c906cdf3d7 Hide focusNodeInTreeView inside setFocusNode 2019-01-11 08:24:29 +01:00
Clément Fournier 890cb853f7 Also look for axes eg self:: 2019-01-11 08:13:24 +01:00
Clément Fournier a7c79d2683 Break ties with second pass 2019-01-11 08:02:17 +01:00
Clément Fournier 0e442da8f8 Improve autocompletion 2019-01-11 05:32:37 +01:00
Clément Fournier 144a9377a7 Fix Scope tab focus loss 2019-01-11 02:54:53 +01:00
Clément Fournier df88d16e93 Replace old toolbars with shining titled panes 2019-01-11 02:11:03 +01:00
Clément Fournier dd061f2855 Filter out some attributes 2019-01-11 02:05:08 +01:00
Clément Fournier 51df303c33 Print number of hidden nodes 2019-01-11 01:31:41 +01:00
Clément Fournier 93dfc6ce7f Estimate number of breadcrumbs to layout 2019-01-11 00:47:10 +01:00
Clément Fournier 6bea387f4f Style 2019-01-11 00:01:25 +01:00
Clément Fournier db5cc7c1c3 Add breadcrumbbar 2019-01-10 23:07:18 +01:00
Juan Martín Sotuyo Dodero c8c5708b70 Merge branch 'master' into unsynchronizedstaticformatter 2019-01-10 17:27:55 -03:00
Clément Fournier 651fb24713 Fix PMD warnings 2019-01-10 21:04:52 +01:00
Andreas Dangel 38cff531c4 Add missing constructor call 2019-01-10 20:59:39 +01:00
Clément Fournier 75d8081876 Cleanup 2019-01-10 19:57:44 +01:00
Clément Fournier 3988941cc3 Add ToolbarTitledPane 2019-01-10 19:45:37 +01:00
Clément Fournier 265d9aea68 Fix height 2019-01-10 18:55:36 +01:00
Clément Fournier 5601a78b4c Also remove the language version choicebox 2019-01-10 18:34:46 +01:00
Clément Fournier dec18daf73 Add menu items and wire it in 2019-01-10 04:56:30 +01:00
Clément Fournier 56bc7be73a Add button on title pane bar 2019-01-10 04:35:01 +01:00
Clément Fournier ec86186fff Remove choicebox from center toolbar 2019-01-10 00:21:14 +01:00
Clément Fournier 9e6481b275 Introduce AbstractController 2019-01-10 00:12:45 +01:00
Juan Martín Sotuyo Dodero 9b2759e55a [doc] Improve deadlink detection
- Do a HEAD request instead of a GET
 - Some minor code simplifications
2019-01-09 20:00:38 -03:00
Clément Fournier be12946bdd Make the XPath version local to the rule builder 2019-01-09 21:58:51 +01:00
Clément Fournier ba8f318ef9 Fix designer imports 2019-01-09 20:04:27 +01:00
Clément Fournier bfcc829189 Update release notes, refs #1571 2019-01-09 18:32:24 +01:00
Clément Fournier d823a5db4a Update ASTBooleanExpression.java 2019-01-09 18:26:11 +01:00
Clément Fournier 2d0081a73a Add tests 2019-01-09 18:15:54 +01:00
Clément Fournier 9673d51fbf Add the attributes of the underlying node to Apex xpath nodes 2019-01-09 17:50:03 +01:00
Travis CI (pmd-bot) efdd9049e3 Update documentation
TRAVIS_JOB_NUMBER=3262.1
TRAVIS_COMMIT_RANGE=8558cdc5b199...4354baacafaa
2019-01-09 00:01:31 +00:00
Juan Martín Sotuyo Dodero 4354baacaf Merge branch 'pr-1551' 2019-01-08 20:43:28 -03:00
Juan Martín Sotuyo Dodero a58f46686a Update changelog, refs #1551 2019-01-08 20:42:18 -03:00
Juan Martín Sotuyo Dodero 8558cdc5b1 Merge pull request #1561 from adangel/doc-deprecated-rules
[doc] Add note which rules replace the deprecated rule.
2019-01-08 20:37:52 -03:00
Clément Fournier a0109aeef9 Merge branch 'pr-1523' 2019-01-07 22:23:42 +01:00
Clément Fournier 0547e056fe Cleanups 2019-01-07 22:20:59 +01:00
Clément Fournier 2973453946 Fix http response cache, refs #1545 2019-01-07 21:42:02 +01:00
Andreas Dangel 6c9cfbc4a1 [apex] Update jorje parser lib 2019-01-07 21:41:01 +01:00
Andreas Dangel 11d949436e [doc] Add note which rules replace the deprecated rule. 2019-01-07 21:02:12 +01:00
Clément Fournier e66f3888a5 Remove other dead links 2019-01-07 14:16:59 +01:00
Clément Fournier 92b03cd58a Merge branch 'pr-1545' 2019-01-07 14:12:30 +01:00
Clément Fournier aed60a87f6 Update release-notes, refs #1545 2019-01-07 14:11:16 +01:00
Clément Fournier 5a20ec37d0 Remove dead links 2019-01-07 14:10:14 +01:00
Clément Fournier f922bcac0e Finish Future approach 2019-01-07 13:51:05 +01:00
Clément Fournier efe5d44adf Checkstyle 2019-01-07 02:50:49 +01:00
Juan Martín Sotuyo Dodero b31951242f Merge pull request #1557 from oowekyala/fix-default-abstract-interface-methods
[java] Fix default methods should not be abstract
2019-01-06 18:47:37 -03:00
Clément Fournier fe96101055 Handle null provider 2019-01-06 17:25:48 +01:00
Clément Fournier 66f60e2350 Update release notes, fixes 1496 2019-01-06 03:40:10 +01:00
Clément Fournier 29272cc3c9 Plug into the designer 2019-01-06 03:37:09 +01:00
Clément Fournier 0fec3640a3 Implement for Apex 2019-01-06 03:17:00 +01:00
Clément Fournier 5f2a5bb678 Implement for Java 2019-01-06 03:08:45 +01:00
Clément Fournier b5d50068bd Add LanguageMetricsProvider 2019-01-06 02:32:28 +01:00
Clément Fournier ab958b2824 Update release notes, refs #1557 2019-01-05 23:18:08 +01:00
Clément Fournier dc7e023644 Default methods are not abstract 2019-01-05 22:57:58 +01:00
Tashdid Khan f6c62ef71d updates should allow for multiple statements 2019-01-02 22:29:04 -05:00
Will Herrmann 3120f6a0f4 Upgrading System Rules from 1.8.0 to 1.19.0 2019-01-02 15:32:37 -06:00
Will Herrmann 8d874e39fe Upgrading Google Gson from 2.5 to 2.8.5 2019-01-02 15:18:43 -06:00
Robbie Martinus a26aaac415 Moved logger message pattern to a field
Fixes gh-1549
2019-01-03 05:58:59 +11:00
Robbie Martinus d35e7398ba Moved logger to a field
Fixes gh-1549
2019-01-02 21:14:37 +11:00
Robbie Martinus 98b23d5420 InvalidSlf4jMessageFormatRule should not throw NPE for enums
Fixes gh-1549
2019-01-02 18:27:51 +11:00
Kristian Scheibe d100762361 fixed some external links 2019-01-01 19:57:06 +01:00
Kristian Scheibe 8c54d73f8e add a maven property to check certain external links
check links to the GitHub master branch using the local existing files
2019-01-01 19:55:36 +01:00
Clément Fournier ad078fad59 Deprecate StatisticalRule 2018-12-30 16:34:57 +01:00
Travis CI (pmd-bot) 45c8f50930 Update documentation
TRAVIS_JOB_NUMBER=3231.1
TRAVIS_COMMIT_RANGE=43098c1cf0aa...0cb627a67b6c
2018-12-27 09:54:04 +00:00
Andreas Dangel 0cb627a67b Adjust priority of new rule UseDiamondOperator 2018-12-27 10:39:24 +01:00
Andreas Dangel a81403c842 Merge branch 'pr-1534' 2018-12-27 10:30:24 +01:00
Andreas Dangel db25def6b0 Update release notes, refs #1534, fixes #1517 2018-12-27 10:29:28 +01:00
Kristian Scheibe 16c404f0ed fixed documentation links 2018-12-26 13:42:36 +01:00
Kristian Scheibe ca8f43baef process to check for local dead links, fails the build of pmd-doc if dead links are found 2018-12-26 13:42:34 +01:00
hemanshu070 e00b0b83fa This commit is regarding the addition of the example tag to codestyle.xml and addition of the licence in the test class "UseDiamondOperator.java" 2018-12-24 18:50:17 +05:30
hemanshu070 5b6ac1b2fb This commit is regarding the addition of the since and the externalInfo URL and update the message to be more descriptive. 2018-12-23 20:04:43 +05:30
Travis CI (pmd-bot) 43098c1cf0 Update documentation
TRAVIS_JOB_NUMBER=3225.1
TRAVIS_COMMIT_RANGE=dfd5b7b8865d...4cc34459c1ee
2018-12-22 22:58:28 +00:00
Andreas Dangel 4cc34459c1 Fix comment 2018-12-22 23:41:25 +01:00
Andreas Dangel 1f07baeb81 Merge branch 'pr-1542' 2018-12-22 23:38:31 +01:00
Andreas Dangel 3d6217c589 Update release notes, refs #1542 2018-12-22 23:37:32 +01:00
Andreas Dangel 61a82c369d Merge branch 'pr-1530' 2018-12-22 23:27:18 +01:00
Andreas Dangel 8fa33b5adf Update release notes, refs #1530, fixes #1518 2018-12-22 23:26:07 +01:00
Andreas Dangel 2021dfe247 Fix externalInfoUrl for ForLoopVariableCount 2018-12-22 23:14:31 +01:00
Andreas Dangel b210618f79 Merge branch 'pr-1520' 2018-12-22 23:09:45 +01:00
Andreas Dangel 5dc07b319d Update release notes, refs #1520, fixes #1519 2018-12-22 23:08:23 +01:00
Andreas Dangel f35fab2774 Move new rule ForLoopVariableCount to bestpractices 2018-12-22 23:03:18 +01:00
Juan Martín Sotuyo Dodero f9926c9305 Include the documentation category
- it's not empty!
2018-12-22 15:01:23 -03:00
Clément Fournier 4697cfded6 Externalise node matching DSL to oowekyala/kt-tree-utils 2018-12-22 11:55:00 +01:00
Andreas Dangel 8364d97e92 [java] New Rule: UseTryWithResources
Fixes #1405
2018-12-21 11:26:05 +01:00
Andreas Dangel dfd5b7b886 [doc] Fix links to making rulesets 2018-12-20 18:53:47 +01:00
Andreas Dangel befc59ef21 Update release notes, fixes #1533 2018-12-20 18:47:55 +01:00
hemanshu070 8810e58a31 This is the change regarding the usediamondoperator #1517 2018-12-20 23:13:52 +05:30
Andreas Dangel df64fd4d72 [java] New Rule UnsynchronizedStaticFormatterRule
This rule replaces UnsynchronizedStaticDateFormatterRule
2018-12-20 18:27:45 +01:00
Andreas Dangel 38be3d09a4 [java] UnsynchronizedStaticDateFormatterRule
* Use typeresolution
* Use rule chain
2018-12-20 18:09:56 +01:00
Kristian Scheibe cbebef552a AvoidReassigningLoopVariables: fixes and additional test cases for: FN when changing the condition/expression of a flow control statement, FP when accessing arrays using the loop variable or if the loop variable is an array being accessed 2018-12-20 14:31:39 +01:00
Kristian Scheibe c25f40829e AvoidReassigningLoopVariables: code-review, updated documentation, added simple control flow analysis to detect unconditional increments in for-loops 2018-12-20 09:25:42 +01:00
Andreas Dangel 7cde3ffef9 Merge branch 'pr-1529' 2018-12-20 09:22:57 +01:00
Kristian Scheibe 36feb85476 AvoidReassigningLoopVariables: fixed NPE when checking fields 2018-12-18 00:30:17 +01:00
Kristian Scheibe 83f30e6d4f AvoidReassigningLoopVariables: initial implementation 2018-12-17 22:58:59 +01:00
Clément Fournier 9afe4e61dc Style 2018-12-17 17:59:22 +01:00
Clément Fournier 76610a6eff Rename some methods 2018-12-17 17:25:16 +01:00
Clément Fournier 57a3d37d91 Use a single color fadeout 2018-12-17 17:00:23 +01:00
Clément Fournier 5f33a63dc5 Merge branch 'master' into designer-tree-parentage 2018-12-17 16:10:31 +01:00
Clément Fournier e079d0c2e9 Merge branch 'pr-1525' 2018-12-17 16:08:39 +01:00
Clément Fournier e56d97aac3 Merge branch 'pr-1524' 2018-12-17 16:05:54 +01:00
Clément Fournier daebaa2796 Merge branch 'pr-1522' 2018-12-17 15:43:27 +01:00
Andreas Dangel 69878f3562 [plsql] Parse Exception with IS NOT NULL
Fixes #1511
2018-12-13 17:25:48 +01:00
Andreas Dangel 351d04568f [plsql] Parse Exception with OUTER/INNER Joins
Fixes #1509
2018-12-13 17:03:13 +01:00
Andreas Dangel 43a96d92f0 [plsql] Parse Exception when using '||' operator in where clause
Fixes #1507
2018-12-13 15:47:42 +01:00
Travis CI (pmd-bot) c47694b98f Update documentation
TRAVIS_JOB_NUMBER=3197.1
TRAVIS_COMMIT_RANGE=5639222e9572...992526671be2
2018-12-13 08:25:23 +00:00
Andreas Dangel 992526671b Merge branch 'pr-1514' 2018-12-13 09:01:41 +01:00
Andreas Dangel 1834ac5ec3 Remove unnecessary CDATA sections 2018-12-13 09:00:12 +01:00
Andreas Dangel 875785c435 Add additional test cases 2018-12-13 08:58:27 +01:00
Andreas Dangel 61888729e3 Update release notes, refs #1514, fixes #1513 2018-12-13 08:54:41 +01:00
Andreas Dangel 5639222e95 Merge branch 'pr-1503' 2018-12-13 08:38:09 +01:00
Andreas Dangel 89f23f73b3 Update release notes, refs #1503, fixes #1035 2018-12-13 08:36:37 +01:00
Rishabh Deep Singh bb0cb91348 Added Test 2018-12-12 21:02:43 +05:30
Andreas Dangel c9d9b74d1a Merge branch 'pr-1521' 2018-12-12 09:57:33 +01:00
Andreas Dangel 02c17117c7 Update release notes, refs #1521 2018-12-12 09:56:48 +01:00
Andreas Dangel 7a8ef70e95 [plsql] Parse Exception when using SELECT COUNT(*)
Fixes #1508
2018-12-12 09:44:35 +01:00
Travis CI (pmd-bot) 2bb8571a29 Update documentation
TRAVIS_JOB_NUMBER=3191.1
TRAVIS_COMMIT_RANGE=5589540e9f13...9daa078694e1
2018-12-11 07:39:14 +00:00
Andreas Dangel 9daa078694 Merge branch 'pr-1516' 2018-12-11 08:18:48 +01:00
Andreas Dangel 029923a5d3 Update release notes, refs #1516, fixes #658 2018-12-11 08:18:39 +01:00
Kristian Scheibe b015cfc7d0 ForLoopVariableCount: new rule to check the number of control variables in a for loop 2018-12-10 22:31:09 +01:00
Kristian Scheibe 7b56a43865 removed unnecessary parameter declaration in codestyle.xml 2018-12-10 21:05:28 +01:00
Mark Pritchard e357da1723 Upgrade to ASM7
Remove ASM7_EXPERIMENTAL flag since ASM7 has been released.
2018-12-11 05:52:16 +11:00
Kristian Scheibe 8e8a5cb7e5 OneDeclarationPerLine: Don't report multiple variables in a for statement. 2018-12-09 22:41:34 +01:00
Rishabh Deep Singh 35cb3dda17 Removed CDATA and added test case 2018-12-10 00:06:13 +05:30
Andreas Dangel 5589540e9f Add workaround for #1515 2018-12-09 11:49:12 +01:00
Andreas Dangel 84b007f2cc [doc] Fix version in next major development 2018-12-09 11:18:34 +01:00
Andreas Dangel 09c0e298f4 Use travis_wait from https://github.com/m3t/travis_wait
since it's not available in deploy phase on travis
2018-12-09 11:01:26 +01:00
Andreas Dangel c9ec16cac1 Prepare next development version 2018-12-09 10:43:29 +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 c1e5cf7a73 Prepare pmd release 6.10.0 2018-12-09 10:33:50 +01:00
Andreas Dangel 42b0d8dd9a Add missing rouge dependency for release notes generation 2018-12-09 10:33:23 +01:00
Kristian Scheibe c15ece60e2 LocalVariableCouldBeFinal: Added property to allow ignoring variables declared in a for-each statement. 2018-12-08 20:56:45 +01:00
Andreas Dangel 3188321e5c Use build-tools 1.3.0 2018-12-08 20:41:23 +01:00
Travis CI (pmd-bot) 98c5de8949 Update documentation
TRAVIS_JOB_NUMBER=3177.1
TRAVIS_COMMIT_RANGE=c9bdcf6ef6e9...16c7017aa923
2018-12-08 19:37:25 +00:00
Andreas Dangel 16c7017aa9 Merge branch 'pr-1491' 2018-12-08 20:14:44 +01:00
Andreas Dangel b7bff3502c Merge branch 'pr-1489' 2018-12-08 20:13:23 +01:00
Kristian Scheibe e6ddfb9af3 LocalVariableCouldBeFinal: Added property to allow ignoring variables declared in a for-each statement. 2018-12-08 16:16:25 +01:00
Travis CI (pmd-bot) c9bdcf6ef6 Update documentation
TRAVIS_JOB_NUMBER=3174.1
TRAVIS_COMMIT_RANGE=de992e6cad8e...2e0333978a1b
2018-12-08 10:17:45 +00:00
Andreas Dangel 2e0333978a Fix property description 2018-12-08 11:02:46 +01:00
Andreas Dangel 011694ca5a Merge branch 'pr-1505' 2018-12-08 10:50:32 +01:00
Andreas Dangel c1bf6eed53 Make AvoidUsingHardCodedIPRule.CHECK_ADDRESS_TYPES_DESCRIPTOR public again 2018-12-08 10:49:16 +01:00
Andreas Dangel de992e6cad Merge branch 'pr-1506' 2018-12-07 19:59:29 +01:00
Andreas Dangel 46a331ead8 Merge branch 'pr-1504' 2018-12-07 19:42:59 +01:00
Andreas Dangel c77345a886 Update release notes, fixes #1512, refs #1504 2018-12-07 19:40:34 +01:00
Clément Fournier b3fdf2f03b Update release notes 2018-12-06 16:37:16 +01:00
Clément Fournier 60f791f7b2 Update release notes 2018-12-06 16:35:53 +01:00
Clément Fournier 3f82a1d71d Fix javadoc warnings 2018-12-06 16:33:57 +01:00
Clément Fournier fa28c4ebc8 Convert some usages 2018-12-06 16:29:45 +01:00
Clément Fournier 9ea706d9ad Deprecate EnumeratedMultiProperty 2018-12-06 15:56:30 +01:00
Clément Fournier 1d60cc2553 Add doc, tests, deprecate 2018-12-06 15:53:38 +01:00
Clément Fournier 4962bc2831 Remove usages of EnumeratedProperty 2018-12-06 15:21:00 +01:00
Clément Fournier 3cbba391da Add deprecation notices 2018-12-06 15:09:18 +01:00
Clément Fournier c745ae1503 Add long properties 2018-12-06 15:02:09 +01:00
Clément Fournier a41f26f103 Add deprecation notices 2018-12-06 14:53:47 +01:00
Clément Fournier f26d8ef11f Add charProperty to PropertyFactory 2018-12-06 14:48:03 +01:00
Travis CI (pmd-bot) 159095292c Update documentation
TRAVIS_JOB_NUMBER=3167.1
TRAVIS_COMMIT_RANGE=0799482f85e1...f41df324804f
2018-12-05 19:42:29 +00:00
Andreas Dangel f41df32480 Merge branch 'pr-1502' 2018-12-05 20:25:39 +01:00
Andreas Dangel 39215e1478 Merge branch 'pr-1501' 2018-12-05 19:55:05 +01:00
Kristian Scheibe 8f1791c5af Fix InvalidSlf4jMessageFormatRule fails with a NPE if a logger call with a variable as parameter is not inside a method or constructor.
Added test-cases for (static) initializer block and lambda expression block, which also can contain local variable declarations.
2018-12-05 09:48:34 +01:00
Clément Fournier af0019c0dc Fix some line lengths 2018-12-05 00:41:30 +01:00
Clément Fournier 5135c481fa Remove booleanProperty overload 2018-12-05 00:36:28 +01:00
Clément Fournier 9cb7ac635f Remove wrong comment 2018-12-05 00:28:43 +01:00
Clément Fournier a6e71f34e7 Fix line length 2018-12-04 23:44:27 +01:00
Andreas Dangel 0799482f85 Update release notes, refs #1457 2018-12-04 21:59:44 +01:00
Andreas Dangel 4ceebea940 Update release notes, refs #1439 2018-12-04 21:56:18 +01:00
Rishabh Deep Singh 83f8f1b410 Issue pmd#1035: ReturnFromFinallyBlock false-positives. 2018-12-05 00:26:18 +05:30
Clément Fournier 5c0978e5a5 Cleanup FieldDeclarationsShouldBeAtStartOfClass 2018-12-04 18:21:33 +01:00
kris-scheibe 6d1012a673 Merge pull request #1 from pmd/master
update fork
2018-12-04 15:05:40 +01:00
Clément Fournier 904d76a068 Style 2018-12-04 14:00:39 +01:00
Clément Fournier a550543dd0 Update release notes 2018-12-04 13:56:52 +01:00
Clément Fournier c99b01bd46 Deprecate BooleanProperty 2018-12-04 13:52:46 +01:00
Clément Fournier 81c9d39bd8 Remove most usages of BooleanProperty 2018-12-04 13:49:35 +01:00
Clément Fournier a19873b55b Deprecate BooleanMultiProperty 2018-12-04 13:16:11 +01:00
Clément Fournier f6e667208e Merge branch 'pr-1492' 2018-12-04 12:46:59 +01:00
Clément Fournier 3b988866a3 Merge branch 'pr-1493' 2018-12-04 12:29:27 +01:00
Clément Fournier 3a47c93597 Update release notes 2018-12-04 11:40:13 +01:00
Clément Fournier 097901ea41 brushup 2018-12-04 11:31:59 +01:00
Clément Fournier 37dfa19687 Migrate usages of StringMultiProperty 2018-12-04 10:54:31 +01:00
Clément Fournier e6a42f310c Update usages of StringProperty
Most of the time they can't be changed right now
2018-12-04 10:25:45 +01:00
Clément Fournier ab80d6bffa Rollback bc of too much work 2018-12-04 10:11:25 +01:00
Clément Fournier 452ea020a8 Remove some usages, rework properties of AvoidDuplicateLiterals 2018-12-04 09:45:32 +01:00
Clément Fournier 34ca3f67ca Deprecate StringMultiProperty 2018-12-04 08:34:36 +01:00
Clément Fournier 96e3a6349a Deprecate StringProperty 2018-12-04 08:32:42 +01:00
Andreas Dangel c93e2378c4 Merge branch 'pr-1498' 2018-12-03 19:14:47 +01:00
Clément Fournier 0c73036c7b Update release notes 2018-12-03 13:50:17 +01:00
Clément Fournier d60bd663a7 Tag VisitorStarter as internal API 2018-12-03 13:28:00 +01:00
Clément Fournier 45d94aeab6 Tag Dataflow handlers as internal API 2018-12-03 13:25:49 +01:00
Clément Fournier ad8e9ec26b Same on LanguageVersionHandler 2018-12-03 13:23:36 +01:00
Clément Fournier 17954f13e9 Same on RuleSets 2018-12-03 13:17:58 +01:00
Clément Fournier 3abdee93b8 Same on RuleSet 2018-12-03 13:16:27 +01:00
Clément Fournier a2250a00de Deprecate things on Rule 2018-12-03 13:14:44 +01:00
Travis CI (pmd-bot) 178c9a8199 Update documentation
TRAVIS_JOB_NUMBER=3149.1
TRAVIS_COMMIT_RANGE=727bab242bf2...84c3c1f251fc
2018-12-02 10:04:55 +00:00
Andreas Dangel 84c3c1f251 Merge branch 'pr-1494' 2018-12-02 10:43:00 +01:00
Andreas Dangel c6dae245af Update release notes, fixes #1151, refs #1494 2018-12-02 10:42:51 +01:00
Andreas Dangel 727bab242b [xml] Remove exclusion of MissingOverride from pmd-xml dogfood 2018-12-02 10:39:29 +01:00
Andreas Dangel d7f5b0b536 Remove clean configuration from (very) old site generation 2018-12-02 10:30:36 +01:00
Andreas Dangel d53851f409 Move checkstyle configuration into plugin management 2018-12-02 10:25:13 +01:00
Robbie Martinus f030e666de 1151: Rephrase ImmutableField documentation in design.xml 2018-12-02 11:50:48 +11:00
Andreas Dangel 1cf1dfc96b [plsql] ParseException for IF/CASE statement with >=, <=, !=
Fixes #1454
2018-12-01 21:50:07 +01:00
Andreas Dangel 8f268c81e6 [java] JUnitTestsShouldIncludeAssertRule should support this.exception as well as just exception
Fixes #647
2018-12-01 19:11:12 +01:00
Andreas Dangel 96e685585d Merge branch 'pr-1457' into issue-647 2018-12-01 18:47:28 +01:00
Andreas Dangel 2a6a7b2971 Update description of AvoidFileStream.
Mentions changed exception handling.
2018-12-01 13:52:26 +01:00
Andreas Dangel ff6ee61ced More fixes for AvoidFileStream 2018-12-01 12:29:25 +01:00
Andreas Dangel 366c144170 Fix unit tests, checkstyle 2018-12-01 11:40:27 +01:00
Andreas Dangel 8e1e58e9a1 Merge branch 'pr-1439' into avoidfilestream 2018-12-01 11:28:30 +01:00
Andreas Dangel 66315c6e30 Add more tests in PropertyDescriptorTest
Refs #1487
2018-12-01 10:48:02 +01:00
Travis CI (pmd-bot) 6608eed1b8 Update documentation
TRAVIS_JOB_NUMBER=3140.1
TRAVIS_COMMIT_RANGE=cebb43c4df55...eee5b52ba3e3
2018-11-30 19:40:26 +00:00
Andreas Dangel eee5b52ba3 Merge branch 'pr-1487' 2018-11-30 20:18:16 +01:00
Andreas Dangel 3473808720 Add a minimal test for RegexProperty 2018-11-30 20:16:54 +01:00
Travis CI (pmd-bot) cebb43c4df Update documentation
TRAVIS_JOB_NUMBER=3138.1
TRAVIS_COMMIT_RANGE=c415fd4779c0...29479cbe9d4c
2018-11-30 15:49:52 +00:00
Andreas Dangel 29479cbe9d Merge branch 'pr-1486' 2018-11-30 16:29:07 +01:00
Andreas Dangel 5d622bd986 Add some basic tests for Properties 2018-11-30 16:28:51 +01:00
Andreas Dangel 4ba1eaa47a Delete old NonRuleWithAllPropertyTypes and PropertyAccessorTest 2018-11-30 16:10:18 +01:00
Andreas Dangel 1a2fec2d27 [core] Analysis cache fails with wildcard classpath entries
Fixes #1477
2018-11-29 20:12:07 +01:00
Clément Fournier 73cf3774b4 Remove usages of RegexProperty 2018-11-29 17:16:39 +01:00
Clément Fournier 2c92053350 Fix self type issue 2018-11-29 17:16:39 +01:00
Clément Fournier f25be99185 Add regex property builder 2018-11-29 17:16:39 +01:00
Clément Fournier c415fd4779 Merge branch 'pr-1481' 2018-11-29 15:59:09 +01:00
Clément Fournier 41d52818b1 Add a ref to NumericPropertyConstraints 2018-11-29 02:04:56 +01:00
Clément Fournier f54f3360f6 Update release notes 2018-11-29 01:58:06 +01:00
Clément Fournier 3b6604dfc3 Update FloatMultiProperty 2018-11-29 01:52:38 +01:00
Clément Fournier 4a7e6a6c53 Deprecate DoubleMultiProperty 2018-11-29 01:51:37 +01:00
Clément Fournier 3268d223e9 Deprecate DoubleProperty 2018-11-29 01:45:43 +01:00
Clément Fournier 387061ed8c Deprecate IntegerMultiProperty 2018-11-29 01:25:37 +01:00
Travis CI (pmd-bot) 5cc746bad3 Update documentation
TRAVIS_JOB_NUMBER=3130.1
TRAVIS_COMMIT_RANGE=f2876e9cf6c5...278bc2ab1b4b
2018-11-28 20:15:03 +00:00
Andreas Dangel 278bc2ab1b Merge branch 'pr-1485' 2018-11-28 20:52:25 +01:00
Andreas Dangel 7153e3b4ab Release notes, fix typo 2018-11-28 20:52:17 +01:00
Andreas Dangel f2876e9cf6 Merge branch 'pr-1437' 2018-11-28 20:10:31 +01:00
Andreas Dangel fff449c6fe Release notes formatting 2018-11-28 20:09:43 +01:00
Clément Fournier 5c58e12dbf Fix tests 2018-11-28 03:19:41 +01:00
Clément Fournier 01d6223715 Merge branch 'pr-1472' 2018-11-28 00:29:52 +01:00
Clément Fournier 47c66d4da4 CHECKSTYLE 2018-11-27 21:54:17 +01:00
Clément Fournier 040853345d Rename methods on ASTIfStatement 2018-11-27 17:48:19 +01:00
Clément Fournier 187f0dc0be Fix #1483 2018-11-27 17:45:47 +01:00
Clément Fournier 52c20ee07c Update release notes 2018-11-27 17:35:21 +01:00
Clément Fournier 806dd7bc9a Merge branch 'master' into deprecate-visitor-decorators 2018-11-27 17:30:18 +01:00
Clément Fournier 43f1ed1a08 Remove doc 2018-11-27 17:20:00 +01:00
Clément Fournier 8c4daf436c Tag other visitors as InternalApi 2018-11-27 17:19:40 +01:00
Clément Fournier 576a8623fc Move new visitors to internal package 2018-11-27 17:18:00 +01:00
Clément Fournier c185b8bf37 Rework release notes 2018-11-27 02:40:35 +01:00
Clément Fournier 1136d46b0a Document 2018-11-27 00:48:55 +01:00
Clément Fournier 71713026ce Deprecate integer property 2018-11-26 23:32:50 +01:00
Travis CI (pmd-bot) 1db950bec6 Update documentation
TRAVIS_JOB_NUMBER=3114.1
TRAVIS_COMMIT_RANGE=baf5c316d31d...68cd02967206
2018-11-26 19:39:18 +00:00
Andreas Dangel 68cd029672 Add default delimiter for multi/list properties 2018-11-26 20:21:17 +01:00
Travis CI (pmd-bot) baf5c316d3 Update documentation
TRAVIS_JOB_NUMBER=3112.1
TRAVIS_COMMIT_RANGE=54c9f2e2a453...dedc68424ff3
2018-11-26 19:14:36 +00:00
Andreas Dangel dedc68424f Fix build - apparently the eclipse compiler needs some generic support
Fix inRange property constraint
2018-11-26 19:51:26 +01:00
Andreas Dangel d17e85b0bb Merge branch 'pr-1470' 2018-11-26 19:21:59 +01:00
Andreas Dangel 54c9f2e2a4 Merge branch 'pr-1469' 2018-11-26 19:11:26 +01:00
Andreas Dangel 1675603286 Update release notes, refs #1469 2018-11-26 19:11:14 +01:00
Andreas Dangel 9fbcc5e178 [doc] add more default namespaces for jdoc 2018-11-26 14:08:07 +01:00
Andreas Dangel 10e27ca3c0 Deprecate PMD LanguageModule for languages, that only support CPD 2018-11-26 13:55:35 +01:00
Andreas Dangel 32002664f7 Merge branch 'pr-1441' 2018-11-26 12:28:18 +01:00
Andreas Dangel 1cd90c66ec Update release notes, refs #1441 2018-11-26 12:27:46 +01:00
Andreas Dangel 202a184366 Remove unnecessary PMD language module for kotlin 2018-11-26 12:16:04 +01:00
Clément Fournier 0ae688fb75 Merge branch 'pr-1475' 2018-11-25 22:38:53 +01:00
Clément Fournier b2d9b4ee57 Merge branch 'new-properties-framework' of github.com:oowekyala/pmd into new-properties-framework 2018-11-25 22:37:16 +01:00
Clément Fournier bf8cb13cce Remove ui order 2018-11-25 22:37:05 +01:00
Clément Fournier 1344b99f43 Use Comparable for generic constraint 2018-11-25 22:34:51 +01:00
Travis CI (pmd-bot) b87df2203c Update documentation
TRAVIS_JOB_NUMBER=3106.1
TRAVIS_COMMIT_RANGE=e3ef72cc0654...e735ee0f8426
2018-11-25 15:22:15 +00:00
Andreas Dangel e735ee0f84 Dogfood - IdenticalCatchBranches, AvoidFileStream 2018-11-25 16:00:47 +01:00
Andreas Dangel e3ef72cc06 [ci] Do not use "sudo=false" for travis anymore
See the following blog posts
* https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures
* https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
* https://changelog.travis-ci.com/linux-builds-run-on-vms-by-default-77106
2018-11-25 15:09:15 +01:00
Andreas Dangel 1f76eb062c Also checkout /sitemap.xml during release
Fixes #1328
2018-11-25 14:37:54 +01:00
Andreas Dangelandoowekyala ce83a87549 Fix outdated versions
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2018-11-23 20:46:41 +01:00
Andreas Dangelandoowekyala 76e57ea2c7 Fix wrong issue link
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2018-11-23 20:25:04 +01:00
Andreas Dangel 56fecb5f6f Merge branch 'pr-1463' 2018-11-22 20:32:45 +01:00
Andreas Dangel 280f53d0b5 [doc] update gems 2018-11-22 20:21:25 +01:00
Andreas Dangel 008963f6ca [doc] Add cheat sheet for custom liquid tags 2018-11-22 20:21:12 +01:00
Andreas Dangel d86de4531f Merge branch 'pr-1453' 2018-11-21 22:00:43 +01:00
Andreas Dangel 9b1b1351d5 Update release notes, refs #1453, fixes #1440 2018-11-21 21:56:39 +01:00
Andreas Dangel 8daa8a6e59 Fix more missing diamond operator cases 2018-11-21 20:53:09 +01:00
Andreas Dangel ced1dd778b Merge branch 'pr-1447' 2018-11-21 20:13:47 +01:00
Andreas Dangel bc29973c3b Update release notes, refs #1447 2018-11-21 20:11:47 +01:00
Travis CI (pmd-bot) 21d2bc5a93 Update documentation
TRAVIS_JOB_NUMBER=3098.1
TRAVIS_COMMIT_RANGE=447b7c5bceda...956ee2ff5613
2018-11-21 17:46:58 +00:00
Andreas Dangel 956ee2ff56 Merge branch 'pr-1436' 2018-11-21 18:27:19 +01:00
Clément Fournier 1647391507 Delegate to non-deprecated method 2018-11-20 17:23:08 +01:00
Andreas Dangel 3ac8d962ed Update release notes, fixes #1468 2018-11-18 13:13:14 +01:00
Andreas Dangel 8444063600 Regenerated documentation 2018-11-18 13:11:14 +01:00
Andreas Dangel 77a30311a0 Fix quote detection 2018-11-18 13:09:27 +01:00
Andreas Dangel 888164ca23 Add a warning at the beginning of the generated files. 2018-11-18 13:05:27 +01:00
Andreas Dangel 75cbffaab4 Refactor EscapeUtils, use StringEscapeUtils for escaping html 2018-11-18 12:47:19 +01:00
Andreas Dangel 9cdfe6ff96 Move escape methods into own utility, add unit tests 2018-11-18 12:17:13 +01:00
Andreas Dangel 0feb3977ac [core] XMLRenderer: ProcessingErrors from exceptions without a message missing
Fixes #1471

This also improves the message of the processing error by including
the exception name.
2018-11-16 22:18:57 +01:00
Clément Fournier f0dbb3640f Remove constraints on StatisticalRule descriptors
They make no sense as they are shared by all StatisticalRules, and provoke configuration
errors on normal inputs since uncorrectly configured properties now cause the rule not to
be run
2018-11-16 21:19:24 +01:00
Andreas Dangel 447b7c5bce [doc] Update location of eclipse-code-formatter.xml
Refs pmd/build-tools#11
2018-11-16 20:02:14 +01:00
Andreas Dangel 47617ea0c4 Update build-tools, update checkstyle 2018-11-16 20:02:14 +01:00
Clément Fournier 2229905257 Fix build 2018-11-16 17:46:39 +01:00
Clément Fournier d662094d4c checkstyle 2018-11-16 13:05:56 +01:00
Clément Fournier 0fd8f91bb4 Add some more tests 2018-11-16 12:44:57 +01:00
Clément Fournier d0401eb17c Test 2018-11-16 12:20:35 +01:00
Clément Fournier f3e618b867 Add configuration error if property has wrong value 2018-11-16 03:05:22 +01:00
Clément Fournier c3af76b8ad Remove the uiOrder from the new builder 2018-11-16 02:58:04 +01:00
Clément Fournier c4deebb889 Cleanup 2018-11-16 02:49:27 +01:00
Clément Fournier e7dc9531f9 Merge branch 'master' into new-properties-framework 2018-11-16 02:29:33 +01:00
Clément Fournier 65bd8638fe Merge branch 'pr-1420' 2018-11-16 02:22:37 +01:00
Alberto Fernandez ae3adf7c48 checkstyle 2018-11-16 00:28:21 +01:00
Alberto Fernandez e0da7b83b6 Configurable max loops in DAAPathFinder 2018-11-16 00:19:10 +01:00
Andreas Dangel 2977891dc7 Ugly fix for #1468 2018-11-15 21:54:14 +01:00
Andreas Dangel 75b1579285 [doc] Extend test case with more XSS problems 2018-11-15 21:54:11 +01:00
Andreas Dangel 00a8e1b648 Merge branch 'pr-1434' 2018-11-15 17:36:58 +01:00
Travis CI (pmd-bot) 97869dea68 Update documentation
TRAVIS_JOB_NUMBER=3086.1
TRAVIS_COMMIT_RANGE=fda3aa16a368...b8069dd0c39e
2018-11-15 16:25:04 +00:00
Clément Fournier b8069dd0c3 Merge branch 'pr-1467'
[java] Fix broken link in CyclomaticComplexity
2018-11-15 17:08:16 +01:00
Clément Fournier 3720cb7a02 Update design.xml 2018-11-15 17:05:47 +01:00
Andreas Dangel 5f2d9b3178 Merge remote-tracking branch 'origin/master' into pr-1434 2018-11-15 16:50:40 +01:00
Andreas Dangel 085ef717e7 Avoid NPE if class is not found
The class org.assertj.core.api.AbstractSoftAssertions might not be
on the auxclasspath, which would cause this NPE.
2018-11-15 16:42:00 +01:00
Travis CI (pmd-bot) fda3aa16a3 Update documentation
TRAVIS_JOB_NUMBER=3081.1
TRAVIS_COMMIT_RANGE=79c1dbe55213...0023e5b0d330
2018-11-15 15:06:23 +00:00
Juan Martín Sotuyo Dodero 0023e5b0d3 Merge branch 'pr-1464' 2018-11-15 11:51:44 -03:00
Juan Martín Sotuyo Dodero 51a2869131 Update changelog, refs #1464 2018-11-15 11:51:29 -03:00
Maxime Robert e42564c019 Fix XSS on documentation web page
Ironically, the corresponding documentation page (https://pmd.github.io/latest/pmd_rules_jsp_security.html#nounsanitizedjspexpression) is subject to XSS!
2018-11-15 12:46:54 +01:00
Clément Fournier d68d856043 Improve diagnostic 2018-11-15 01:59:49 +01:00
Clément Fournier a5419f5d3f Add check for existence 2018-11-14 23:15:47 +01:00
Clément Fournier 5fb0cf576b Releasable 2018-11-14 22:30:00 +01:00
Clément Fournier eb2ed3320b Merge branch 'master' into drop-isDefinedExternally 2018-11-14 21:31:24 +01:00
Clément Fournier 79c1dbe552 Update release notes, refs #1461 2018-11-14 20:56:28 +01:00
Clément Fournier a7f7802ceb Use namespaces:: 2018-11-14 20:27:52 +01:00
Andreas Dangel 246c2adbe3 Update release notes, refs #1434, fixes #1435 2018-11-14 20:10:34 +01:00
Andreas Dangel 42f5b8dd0d [java] JUnitTestsShouldIncludeAssert: Add negative test case for SoftAssertions 2018-11-14 20:07:53 +01:00
Andreas Dangel f23e962595 [java] TypeResolution / SymbolFacade for var inferred types
The returned type of the variable name declaration is now also
the inferred type.

Note: getTypeImage() still returns null, since there is no TypeNode
and therefore no image for "var" variable declarations.
2018-11-14 19:46:13 +01:00
Andreas Dangel 3d7cd19640 Revert "Resolve type for ASTLiteral"
This reverts commit 698935d2b4.
2018-11-14 18:46:20 +01:00
Clément Fournier 07635370bc Use @{handles} 2018-11-14 00:50:46 +01:00
Clément Fournier f610839cea Add << path navigation 2018-11-13 17:46:48 +01:00
Clément Fournier d85e16732a Implement options and method references 2018-11-13 16:41:05 +01:00
Juan Martín Sotuyo Dodero 7f3d6e6e89 [java] Fix concurrency error
- Resolves #1460
2018-11-13 11:56:12 -03:00
Clément Fournier da9a8f3be5 Add jdoc_old 2018-11-13 14:15:21 +01:00
Clément Fournier 2b8cff49f1 add jdoc and jdoc_package liquid tags 2018-11-13 14:00:44 +01:00
orimarko c68bfafa46 Update Test to check this not creating failure 2018-11-13 08:05:40 +02:00
Clément Fournier 5e64dd4473 Update release notes 2018-11-13 00:57:02 +01:00
Clément Fournier 877ed5e90c Merge branch 'master' into new-properties-framework 2018-11-12 23:47:25 +01:00
Clément Fournier 21f015048b Checkstyle 2018-11-12 23:45:13 +01:00
Andreas Dangel 1d652fc81c Merge branch 'pr-1423' 2018-11-12 20:15:05 +01:00
Andreas Dangel 4c1a0145f5 Update release docu 2018-11-12 20:14:54 +01:00
Andreas Dangel 0e90269b95 Update release notes, fixes #1284 2018-11-12 20:08:46 +01:00
Clément Fournier 175d0c13bf Update PropertyDescriptor.java 2018-11-12 19:58:01 +01:00
Andreas Dangel a4f8cbb3ec Merge branch 'pr-1419' 2018-11-12 19:53:41 +01:00
Andreas Dangel a472a79d6b Formatting 2018-11-12 19:53:34 +01:00
Clément Fournier fa034ee390 Merge branch 'drop-isDefinedExternally' of github.com:oowekyala/pmd into drop-isDefinedExternally 2018-11-12 19:28:01 +01:00
Clément Fournier f5d6765503 Deprecate uiOrder and Comparable 2018-11-12 19:27:42 +01:00
Juan Martín Sotuyo Doderoandoowekyala c33db52f9e Update docs/pages/release_notes.md
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2018-11-12 19:11:21 +01:00
Juan Martín Sotuyo Doderoandoowekyala 7f6debe524 Update docs/pages/release_notes.md
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2018-11-12 19:11:18 +01:00
Juan Martín Sotuyo Doderoandoowekyala d662bd5129 Update docs/pages/release_notes.md
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2018-11-12 19:11:14 +01:00
Juan Martín Sotuyo Doderoandoowekyala 130994db5d Update docs/pages/release_notes.md
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2018-11-12 19:11:10 +01:00
Juan Martín Sotuyo Doderoandoowekyala 3c6278bbb8 Update docs/pages/release_notes.md
Co-Authored-By: oowekyala <clement.fournier76@gmail.com>
2018-11-12 19:08:53 +01:00
ledoyen cc8181edc9 Make AssertJ soft assertions count as assertions 2018-11-12 15:26:30 +01:00
ledoyen a5483b36e4 Recognize direct inferred type in VariableNameDeclaration 2018-11-12 15:26:29 +01:00
ledoyen 698935d2b4 Resolve type for ASTLiteral 2018-11-12 15:26:28 +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
orimarko 83712f134a Fix Test
Fix Test add `import org.junit.*;`
2018-11-12 14:06:12 +02:00
Rohit Kumar 874b528da8 Adding test cases and fixing review comments 2018-11-12 17:35:29 +05:30
Maikel Steneker de4a2b3cfe Merge remote-tracking branch 'pmd/master' into kotlin 2018-11-12 12:56:53 +01:00
Clément Fournier a463312646 Update README.md 2018-11-12 12:56:14 +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
Juan Martín Sotuyo Dodero 331e29e034 Merge pull request #1448 from adangel/docs-test-framework
[docs] Update "Testing your rules"
2018-11-11 19:51:40 -03:00
Juan Martín Sotuyo Dodero 2fecd9e1ef Merge pull request #1449 from adangel/pmd-ui-optional-deps
[ui] make the language dependencies optional
2018-11-11 19:50:51 -03:00
Rohit Kumar 6fb8b6b1b6 Adding the fix for #1440 2018-11-12 01:56:35 +05:30
Travis CI (pmd-bot) 1cfc477e48 Update documentation
TRAVIS_JOB_NUMBER=3044.1
TRAVIS_COMMIT_RANGE=2aae4b0272e0...b0518c902fd0
2018-11-11 13:25:37 +00:00
Clément Fournier b0518c902f Format UseUnderscoresInNumericLiterals xpath 2018-11-11 14:12:45 +01:00
orimarko bf1542f272 Update JUnitTestsShouldIncludeAssert.xml 2018-11-11 15:12:04 +02:00
orimarko 19f8752a43 Add Test for issue #647
Add test to verify fix for issue #647:
JUnitTestsShouldIncludeAssertRule should support `this.exception` as well as just `exception`
2018-11-11 15:07:50 +02:00
Andreas Dangel 2aae4b0272 Update release notes, use rule tag 2018-11-10 20:37:14 +01:00
Andreas Dangel 99e0e6f284 Rework pmd-dist so that it is usable for custom PMD distributions
* the scripts are now in resources and included in pmd-dist jar artifact
* the baseDirectory can be overridden using a property
* the assembly descriptors are also in the pmd-dist jar artifact
2018-11-10 20:27:35 +01:00
Andreas Dangel 1aa1d1f2a5 [ui] make the language dependencies optional
* This makes it easier to create a customized and tailored
  PMD distribution.
* Also sort the languages alphabetically
2018-11-10 19:20:02 +01:00
Andreas Dangel 2e3866fbd4 [doc] Update gems 2018-11-10 18:00:30 +01:00
Andreas Dangel 3f92b9d44d [doc] Mention PmdRuleTst class in "Testing your rules" 2018-11-10 18:00:11 +01:00
Juan Martín Sotuyo Dodero 06d72bdea8 Merge branch 'pr-1384' 2018-11-10 13:39:08 -03:00
Juan Martín Sotuyo Dodero 85c82c3c6d Update release notes, refs #1384 2018-11-10 13:38:37 -03:00
Juan Martín Sotuyo Dodero 9c179234ac Add new rules to release sourceset 2018-11-10 13:32:33 -03:00
Unknown acff745aae Infer type in generic instance creation.
Infer type in generic instance creation.
2018-11-10 08:10:00 -03:00
rajeshggwp 750381c65a minor regex change 2018-11-10 16:04:29 +05:30
rajeshggwp 9b6b1a4d15 minor changes 2018-11-09 10:49:30 +05:30
rajeshggwp fd145e30b2 added acceptable length property 2018-11-08 22:52:54 +05:30
rajeshggwp c330cfba13 Revert "added acceptable length property"
This reverts commit 2ccfe15a14.
2018-11-08 21:43:48 +05:30
rajeshggwp 2ccfe15a14 added acceptable length property 2018-11-08 20:20:16 +05:30
rajeshggwp 415b07c385 Merge branch 'master' of https://github.com/pmd/pmd 2018-11-08 18:21:20 +05:30
rajeshggwp 411ca67b7e Rule name and release version changed 2018-11-07 22:08:14 +05:30
rajeshggwp 4fadb1ab10 [old] added support for different bases, exponent, serialVersionUID. 2018-11-07 22:00:11 +05:30
Maikel Steneker eb23b3ce38 Adjusted pmd-dist unit test to include Kotlin in the list of supported languages. 2018-11-07 15:21:29 +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
Clément Fournier e0f8fa0541 Prevent parsing to send too much noise to exception log
The exceptions were reduced, but if we ended up on a parsable state,
the last exception recorded was still output
2018-11-07 13:41:09 +01:00
Clément Fournier 7e5af86fd4 Fix Ncss not counting lambda contents 2018-11-06 15:31:36 +01:00
Clément Fournier 026006260f Find out reason for violation changes with Cyclo
This is actually a bug fix.
Documented it on a test in CycloTest.xml
2018-11-06 15:02:32 +01:00
= 5ec39e935a Avoid FileInputStream and FileOutputStream. 2018-11-06 08:37:44 -03:00
Clément Fournier 15cf453306 Fix pmd 2018-11-06 09:40:08 +01:00
Clément Fournier f371524b63 Migrate other usages 2018-11-06 09:36:24 +01:00
Clément Fournier 9779422e3e Fix UseVarargs 2018-11-06 09:33:37 +01:00
Clément Fournier f19a2e7fde Style 2018-11-06 09:32:01 +01:00
Clément Fournier 0633014ae0 Update release notes 2018-11-06 09:11:24 +01:00
Clément Fournier 17ffacf02d Merge branch 'master' into deprecate-visitor-decorators 2018-11-06 09:00:42 +01:00
Clément Fournier f9556ed5b9 Remove some API
It's not a good idea to publish too much new api before 7.0.0
2018-11-06 08:55:41 +01:00
Clément Fournier 402614c777 Update release notes 2018-11-06 08:47:06 +01:00
Clément Fournier 010bdc2c4a Deprecate Dimensionable & some methods from Field & LocalVar decls 2018-11-06 08:40:15 +01:00
Andreas Dangel 0c1afc426d Merge branch 'pr-1428' 2018-11-05 22:20:34 +01:00
Andreas Dangel 9d9dc131de Update release notes, refs #1428 2018-11-05 22:19:53 +01:00
Travis CI (pmd-bot) 4180fe1c6d Update documentation
TRAVIS_JOB_NUMBER=3007.1
TRAVIS_COMMIT_RANGE=39d340f431c1...1d9a412d59d5
2018-11-05 03:12:04 +00:00
Juan Martín Sotuyo Dodero 1d9a412d59 Merge branch 'pr-1427' 2018-11-05 00:00:35 -03:00
Juan Martín Sotuyo Dodero 81e19a15ef Update changelog, refs #1427 2018-11-05 00:00:20 -03:00
Clément Fournier a08c370da7 Generalize list property builders 2018-11-05 01:30:18 +01:00
Clément Fournier 356dfbfb4f Simplify builder hierarchy 2018-11-05 00:35:16 +01:00
Clément Fournier c4bf373255 WIP 2018-11-05 00:33:47 +01:00
Clément Fournier 993d80d2df Fix compilation 2018-11-05 00:33:22 +01:00
Clément Fournier de176384f7 Try to integrate in current framework 2018-11-05 00:33:22 +01:00
Clément Fournier b9a15b405a Move towards java7 compat 2018-11-05 00:33:22 +01:00
Clément Fournier 972a991cb0 WIP 2018-11-05 00:33:22 +01:00
Clément Fournier 8823ef5356 More deprecations on PropertyDescriptor, relates to #1432 2018-11-05 00:32:18 +01:00
Clément Fournier 39d340f431 Update release notes, refs #1430 2018-11-04 14:48:35 +01:00
Dem Pilafian ddf1347782 Who really knows regex? 2018-11-03 20:07:34 -07:00
Will Herrmann 08950c9fbe Upgrading JCommander from 1.48 to 1.72 2018-11-02 16:04:21 -05:00
Clément Fournier e1b5717675 Fix #1372 2018-11-02 09:09:13 +01:00
Clément Fournier 2071913001 Add some tests 2018-11-02 08:37:13 +01:00
Clément Fournier 2eea1a4513 Simplify 2018-11-02 08:20:17 +01:00
Clément Fournier 9c76e861ff Add doc to forupdate 2018-11-02 08:14:08 +01:00
Clément Fournier 4c5499e06e Add InternalApi annotation 2018-11-02 08:14:08 +01:00
Clément Fournier 03dda84ca1 Deprecate Ncss visitors 2018-11-02 08:14:08 +01:00
Clément Fournier c3d2cb5b1a Rewrite cyclo visitor, add doc to some ast nodes 2018-11-02 08:14:08 +01:00
Clément Fournier 679eaeb4e5 Deprecate Initializer and functions 2018-11-02 08:11:26 +01:00
Travis CI (pmd-bot) 117e9a4277 Update documentation
TRAVIS_JOB_NUMBER=2991.1
TRAVIS_COMMIT_RANGE=544c81927435...f6dd18204463
2018-11-01 22:48:31 +00:00
Andreas Dangel f6dd182044 Merge branch 'pr-1424' 2018-11-01 23:16:52 +01:00
Andreas Dangel f50ea15af1 Update release notes, refs #1424, fixes #1341 2018-11-01 23:16:40 +01:00
VishvaThejeshwar 0112bd9a3d #1341 change and tests 2018-11-01 19:30:17 +05:30
Clément Fournier a033b27e2e Add pmd 7.0.0 dev page to docs 2018-11-01 01:53:04 +01:00
Clément Fournier 5c398b825e Add comments, update release notes 2018-10-30 09:18:58 +01:00
Clément Fournier d5d51469c4 Deprecate some other stuff 2018-10-30 08:50:14 +01:00
Clément Fournier d4b0d79cea Revert 2018-10-30 08:34:06 +01:00
Clément Fournier 8563c802c4 update release notes 2018-10-30 00:17:00 +01:00
Clément Fournier 994c8462d0 Deprecate preferredRowCount 2018-10-30 00:12:00 +01:00
Clément Fournier 9d954fff0a Deprecate isDefinedExternally 2018-10-30 00:01:01 +01:00
Clément Fournier c3113894cf Tweak RulesetWriter to recognize himself externally defined descriptors 2018-10-29 23:53:56 +01:00
Andreas Dangel 544c819274 [test] Kotlin DSL to ease test writing
* Merge branch 'pr-1395'
* Fixes #1318
* Update release notes
* Update version for new module
2018-10-29 19:23:06 +01:00
Clément Fournier 6e3ee3c857 Tag XPath implementation as private API 2018-10-29 01:11:33 +01:00
Andreas Dangel 6595588111 fix scm/tag 2018-10-28 20:09:09 +01:00
Andreas Dangel e31919fcf4 Upgrade pmd 2018-10-28 19:11:37 +01:00
Andreas Dangel 18fd24c580 [ci] release script
* Exit immediately if a command exits with a non-zero status
* Fix RELEASE_RULESET
2018-10-28 19:10:36 +01:00
Andreas Dangel 84d1519839 Prepare next development version 2018-10-28 16:50:47 +01:00
Andreas Dangel 3c50db2439 [maven-release-plugin] prepare for next development iteration 2018-10-28 16:49:09 +01:00
Andreas Dangel 7e4e859c5f [maven-release-plugin] prepare release pmd_releases/6.9.0 2018-10-28 16:48:57 +01:00
Andreas Dangel 14f9e8dffe Prepare pmd release 6.9.0 2018-10-28 16:42:12 +01:00
Travis CI (pmd-bot) 4371615bde Update documentation
TRAVIS_JOB_NUMBER=2973.1
TRAVIS_COMMIT_RANGE=74e3a015e4fa...658eb138643b
2018-10-28 14:13:12 +00:00
Andreas Dangel 658eb13864 Merge branch 'pr-1381' 2018-10-28 14:54:46 +01:00
Travis CI (pmd-bot) 74e3a015e4 Update documentation
TRAVIS_JOB_NUMBER=2971.1
TRAVIS_COMMIT_RANGE=673a846b29c8...77d392c30d18
2018-10-28 11:51:53 +00:00
Andreas Dangel 77d392c30d Followup on #1399 2018-10-28 09:25:21 +01:00
Juan Martín Sotuyo Dodero 673a846b29 Merge branch 'pr-1408' 2018-10-27 22:21:21 -03:00
Juan Martín Sotuyo Dodero 6aa6c31bd8 Remove duplicate line from changelog 2018-10-27 22:01:21 -03:00
Clément Fournier 6ef7ec8174 Followup on #1399 2018-10-28 00:03:05 +02:00
Clément Fournier db979ecaaf Merge branch 'master' into pr-1409 2018-10-27 23:45:46 +02:00
Clément Fournier a822deabc4 Merge branch 'master' into pr-1410 2018-10-27 23:39:02 +02:00
Clément Fournier 04fb6af4f4 Merge branch 'pr-1361' 2018-10-27 23:35:17 +02:00
Clément Fournier f3e0841ea2 Update release notes, refs #1349 2018-10-27 23:34:53 +02:00
Clément Fournier c5f958df25 Merge branch 'master' into pr-1361 2018-10-27 23:32:45 +02:00
Clément Fournier 8772a01a7e Rewrite doc 2018-10-27 23:31:24 +02:00
Andreas Dangel 2f5cba1b5b Merge remote-tracking branch 'origin/master' 2018-10-27 23:04:44 +02:00
Clément Fournier b62b216b29 Merge branch 'pr-1399' 2018-10-27 22:55:10 +02:00
Andreas Dangel c4e7117f5e [java] CommentDefaultAccessModifierRule
* refactor
* extend documentation
2018-10-27 22:53:44 +02:00
Andreas Dangel 741f204739 Merge branch 'pr-1400' 2018-10-27 22:41:15 +02:00
Andreas Dangel faa9fe9fe7 Update release notes, fixes #1343, refs #1400 2018-10-27 22:40:43 +02:00
Andreas Dangel ada6d83a83 [java] CommentDefaultAccessModifier: add test case for ignoredAnnotations 2018-10-27 22:36:52 +02:00
Andreas Dangel 2dd0033520 Fix checkstyle 2018-10-27 22:12:41 +02:00
Clément Fournier 39f87ca5f3 Update schema location in rulesets 2018-10-27 21:02:16 +02:00
Jan Brümmer ae97d9f112 Issue-1343: Remove unnecessary method call. 2018-10-27 15:18:23 +02:00
Andreas Dangel 063c906c7d Merge branch 'pr-1411' 2018-10-26 19:40:35 +02:00
Andreas Dangel 2c05bfe42e Update release notes, refs #1411, fixes #649 2018-10-26 19:39:57 +02:00
Andreas Dangel 60bab8f04c [doc] Update doc for new CLI option -ignorelist 2018-10-26 19:33:09 +02:00
Andreas Dangel db5115a9b0 [core] Add unit test for ignorelist CLI option 2018-10-26 19:24:26 +02:00
Andreas Dangel de0fd962ca Merge branch 'pr-1414' 2018-10-26 18:40:42 +02:00
Andreas Dangel 58f32d0e9a Update release notes, fixes #1412, refs #1414 2018-10-26 18:39:42 +02:00
Andreas Dangel 1d48c49c81 Merge branch 'pr-1401' 2018-10-26 18:29:06 +02:00
Andreas Dangel 0d63925684 Update release notes, refs #1401 2018-10-26 18:28:36 +02:00
Johan Hammar ca8101c923 Fix broken link. Fixes #1412 2018-10-26 09:30:40 +02:00
Will Herrmann 3cd41d799c Changing printStackTrace() into throwing a RuntimeException 2018-10-25 16:47:40 -05:00
Will Herrmann 0d9080abfd Extracting ternary statement into private method 2018-10-25 16:46:06 -05:00
Will Herrmann 38640cdc04 Changing to log an error, rather than printStackTrace() 2018-10-25 16:38:26 -05:00
Andreas Dangel c35c2a0347 Merge branch 'pr-1406' 2018-10-25 20:02:43 +02:00
Andreas Dangel 8c7d4a4cb7 Update release notes, refs #1406, fixes #1402 2018-10-25 20:02:27 +02:00
Andreas Dangel a5a189b2f3 [jsp] JspTokenManager has a problem about jsp scriptlet
Refs #1402

Add unit test
2018-10-25 20:02:22 +02:00
Jon Moroney ffca2bcfe4 Add cli reference to ignore list 2018-10-25 10:28:22 -07:00
Andreas Dangel 666dc36343 [java] UnusedImports false positive for static import with package-private method usage
Fixes #1209
2018-10-24 19:46:58 +02:00
Andreas Dangel b8111a5c13 [java] UnusedImports false positive with static ondemand import with method call
Fixes #1404
2018-10-24 19:26:36 +02:00
Andreas Dangel 1489b2543c Merge branch 'master' into issue-1396 2018-10-24 09:36:13 +02:00
Andreas Dangel 3f52ad7ef2 Update release notes, fixes #1396 2018-10-24 09:00:46 +02:00
Andreas Dangel 9af7ea18b5 Directly delegate to visit(AbstractApexNodeBase)
Deprecate visit(ApexNode<?>)
2018-10-24 08:59:08 +02:00
Andreas Dangel 471c96cee9 Use visit(AbstractApexNodeBase)
This will visit all node types, including ASTFormalComment.
No need to explicitly implement visit(ASTFormalComment) in
AbstractNcssCountRule and ExcessiveNodeCountRule
2018-10-24 08:45:13 +02:00
Andreas Dangel c97ae833d8 Merge branch 'jeffhube-cce' into issue-1396 2018-10-24 08:40:18 +02:00
Clément Fournier c2c763b8a5 Minor designer improvements
* Hack to allow numeric properties to be defined and tested
* Update java syntax highlighting to allow for underscores in numbers
2018-10-24 00:55:22 +02:00
Jon Moroney 0fc6a1f02b Add whitespace... 2018-10-23 10:51:59 -07:00
Jon Moroney b96a9f9b7d Add get function 2018-10-23 10:42:35 -07:00
Jon Moroney 3359820438 Add ignore file path functionality 2018-10-23 10:33:27 -07:00
justprv 7cf231bd01 #1402 ignore quoted jsp end tag 2018-10-23 12:58:25 +04:00
Andreas Dangel 2848cfc7c9 Merge branch 'pr-1403' 2018-10-23 08:49:12 +02:00
Andreas Dangel ae4bd3a8fc Use normal space 2018-10-23 08:49:01 +02:00
Andreas Dangel 6b23a6d5d1 Update release notes, refs #1403, fixes #1394 2018-10-23 08:48:23 +02:00
Clément Fournier dec7f21841 Deprecate rule classes of deprecated rules 2018-10-22 22:50:22 +02:00
Clément Fournier e4db5df532 Update doc 2018-10-22 19:40:05 +02:00
Clément Fournier 583c56bd69 Fix logging when creating cache file 2018-10-22 19:22:19 +02:00
Andreas Dangel d3880ed349 Update commons-compress to 1.18 2018-10-22 08:39:06 +02:00
Will Herrmann 377baf7caf Replacing IOUtils.closeQuietly(foo) with try-with-resources statements 2018-10-19 14:23:51 -05:00
Jan Brümmer 74378ae0d9 Issue-1343: Add method from super class 2018-10-19 15:32:00 +02:00
Andreas Dangel 81f8b9f7c4 [apex] ClassCastException caused by Javadoc
* Add test cases for the affected rules
* refs #1396
2018-10-19 15:11:03 +02:00
Jan Brümmer 73b3a0e6da Fix Issue-1343: CommentDefaultAccesModifierRule now extends AbstractIgnoredAnnotationRule 2018-10-19 13:15:27 +02:00
Andreas Dangel ff5e2136c6 [doc] Use https://pmd.sourceforge.io/ruleset_2_0_0.xsd as schema location
Refs #1249
2018-10-18 08:43:00 +02:00
Jeff Hube 91a1b5ffd6 Fix ASTFormalComment ClassCastException 2018-10-17 14:16:04 -04:00
Andreas Dangel 7edaf78e4a [java] Improve UnnecessaryModifier explanation
Merge branch 'pr-1380'
2018-10-17 20:05:18 +02:00
Andreas Dangel d558f528b9 Merge branch 'pr-1392' 2018-10-17 19:46:12 +02:00
Andreas Dangel 547d11bdd4 Merge branch 'pr-1389' 2018-10-17 19:34:39 +02:00
Andreas Dangel 48edc269f2 Merge branch 'pr-1398' 2018-10-17 19:25:54 +02:00
Andreas Dangel 5693feb887 Update release notes, refs #1398 2018-10-17 19:25:42 +02:00
Will Herrmann 466639fac0 Upgrading SLF4J from 1.7.12 to 1.7.25 2018-10-17 10:42:00 -05:00
Andreas Dangel 5e641cdf76 Merge branch 'pr-1388' 2018-10-17 08:52:38 +02:00
Andreas Dangel dc6b4e90a9 Merge branch 'pr-1382' 2018-10-17 08:46:47 +02:00
Andreas Dangel 7699fc0e98 Update release notes, refs #1382 2018-10-17 08:45:06 +02:00
Will Herrmann ead382b686 Replacing IOUtils.toString() with readAsString() 2018-10-16 16:34:23 -05:00
Will Herrmann 285c4c9390 Replacing IOUtils.toInputStream() with StringReader 2018-10-16 16:34:01 -05:00
Juan Martín Sotuyo Dodero 53a60ee924 Simplify rule 2018-10-15 23:18:17 -03:00
Andreas Dangel 5faeef8de7 Merge branch 'pr-1391' 2018-10-15 17:26:46 +02:00
Andreas Dangel 5cc2c5bbf8 Merge branch 'pr-1387' 2018-10-15 17:00:46 +02:00
Clément Fournier 3dc9edaa7b Port group tests 2018-10-15 16:51:42 +02:00
Andreas Dangel dc3ccc990b Merge branch 'master' into plsql-codeformat 2018-10-15 16:24:01 +02:00
Juan Martín Sotuyo Dodero b0b74ff610 Fix the rulechain usage
- Thanks to https://github.com/pmd/build-tools/pull/10
2018-10-15 05:32:03 -03:00
Juan Martín Sotuyo Dodero 5b736feefd Don't depend on realpath being installed 2018-10-15 04:54:18 -03:00
Juan Martín Sotuyo Dodero cef9a352e4 Update changelog, refs #1199 2018-10-15 04:34:35 -03:00
Juan Martín Sotuyo Dodero 51a743515e Fix #1199 2018-10-15 04:33:23 -03:00
Juan Martín Sotuyo Dodero 39b4bfdcd2 Add failing test scenario for #1199 2018-10-15 04:32:54 -03:00
Juan Martín Sotuyo Dodero 1cbae7f1e9 Update changelog, refs #1272 2018-10-15 04:15:08 -03:00
Juan Martín Sotuyo Dodero b75ca07e8e Allow symlinking the run script 2018-10-15 04:14:21 -03:00
Juan Martín Sotuyo Dodero a0be9712dd Merge pull request #1364 from adangel/plsql-select-cursorforloop2
[plsql] Fully parse select statement inside cursor for loops
2018-10-15 03:56:24 -03:00
Juan Martín Sotuyo Dodero 65b33897b2 Update changelog, refs #1369 2018-10-15 03:53:08 -03:00
Juan Martín Sotuyo Dodero 54830cd579 Fix #1369 2018-10-15 03:52:08 -03:00
Juan Martín Sotuyo Dodero 5ce73a5ce0 Add failing test case 2018-10-15 03:52:00 -03:00
Juan Martín Sotuyo Dodero 1e42887498 Update changelog 2018-10-15 03:46:53 -03:00
Juan Martín Sotuyo Dodero c20bdd15a0 Use the current classloader
- Fixes #1377
2018-10-15 03:45:30 -03:00
Juan Martín Sotuyo Dodero 190e49efb9 Fix version test 2018-10-15 02:09:33 -03:00
Juan Martín Sotuyo Dodero c6e63bbc38 Merge branch 'pr-1386' 2018-10-15 01:50:55 -03:00
Juan Martín Sotuyo Dodero 6b28fb17db IUpdate changelog, refs #1386 2018-10-15 01:50:23 -03:00
Juan Martín Sotuyo Dodero e1f162dbaa Minor improvements 2018-10-15 01:47:26 -03:00
Juan Martín Sotuyo Dodero f4d928709f Merge branch 'pr-1338' 2018-10-15 01:43:43 -03:00
Juan Martín Sotuyo Dodero 94f9ba36c8 Update changelog, refs #1338 2018-10-15 01:43:27 -03:00
Matias Fraga f8158c3b9f Fix packages 2018-10-14 22:21:02 -03:00
Tomi De Lucca 921e004256 Merge branch 'master' of github.com:pmd/pmd into generic-token-extended 2018-10-14 20:08:39 -03:00
Tomi De Lucca 7d65081841 PR Review 2018-10-14 19:02:15 -03:00
Matias Fraga 56809ca824 Add CPD support for antlr based grammar on Golang 2018-10-14 19:00:12 -03:00
rajeshggwp d1a41ffd35 #1232 added xpath version property and more test cases 2018-10-15 01:46:47 +05:30
rajeshggwp 6cdb4a1002 #1232 changes required after merging with master 2018-10-14 23:41:41 +05:30
rajeshggwp 09d12a35e7 Merge remote-tracking branch 'upstream/master' 2018-10-14 23:33:43 +05:30
Juan Martín Sotuyo Dodero 03983d8481 Merge branch 'pr-1383' 2018-10-14 14:13:28 -03:00
Juan Martín Sotuyo Dodero 4619fe0a54 Update changelog, refs #1383 2018-10-14 14:13:12 -03:00
Clément Fournier cce3fa5815 Merge branch 'pr-1282' 2018-10-14 18:25:01 +02:00
Felix Lampe e8ac08c387 Improved message for GuardLogStatement rule (Issue #1202). 2018-10-14 17:03:02 +02:00
rajeshggwp 8f1a44063d minor changes and more test cases 2018-10-14 12:17:17 +05:30
rajeshggwp 3abb833980 added new rule - NumericLiteralCovention 2018-10-13 22:02:51 +05:30
Andreas Dangel 31e6864d39 Merge branch 'pr-1378' 2018-10-13 10:22:18 +02:00
Andreas Dangel 240da0e099 Update release notes, refs #1378 2018-10-13 10:21:46 +02:00
Will Herrmann cba4e87acd Replacing deprecated IO methods with ones that specify a charset
Standardizing with StandardCharsets.UTF_8, given that it was used in
several places of code already, and it provides compile-time checking
(as opposed to "UTF-8")
2018-10-12 17:25:08 -05:00
Andreas Dangel 80af8f6bf3 Update release notes, mention new rule 2018-10-12 14:19:50 +02:00
Andreas Dangel a7bb7c67bf [plsql] CodeFormat Rule
* Add property for indentation
* Add proper rule description and example
2018-10-12 14:08:49 +02:00
Andreas Dangel 3497a076bc [plsql] CodeFormat Rule
Add complete Coding Style example
2018-10-12 13:46:53 +02:00
Andreas Dangel 3e309ba1e1 [plsql] CodeFormat Rule
Add check for procedure calls without named parameters
2018-10-12 13:44:47 +02:00
Andreas Dangel 8e879bddba [plsql] CodeFormat Rule
Add check for function calls with named parameters
2018-10-12 13:33:24 +02:00
Clément Fournier b073960dc0 Followup on #1366 2018-10-12 11:43:19 +02:00
Andreas Dangel 09dbabff2b [plsql] CodeFormat Rule
Add check for variables
2018-10-11 17:00:25 +02:00
Will Herrmann df60fa3c86 Upgrading Apache Commons Lang 3 from 3.7 to 3.8.1 2018-10-10 17:36:31 -05:00
Andreas Dangel c005141847 [plsql] CodeFormat Rule
Add checks for parameters
2018-10-10 17:31:42 +02:00
Andreas Dangel fdbc448a5b [plsql] CodeFormat Rule
Add checks for Join clauses
Add checks for UNION
2018-10-10 17:10:31 +02:00
Juan Martín Sotuyo Dodero 013ced3d7c Merge branch 'pr-1376' 2018-10-09 23:57:16 -03:00
Juan Martín Sotuyo Dodero 1ed47d7321 Update changelog, refs #1376 2018-10-09 23:56:59 -03:00
Juan Martín Sotuyo Dodero 4398004953 Merge branch 'pr-1374' 2018-10-09 22:00:38 -03:00
Juan Martín Sotuyo Dodero 25d4f8cb7a Update changelog, refs #1374 2018-10-09 21:59:43 -03:00
Juan Martín Sotuyo Dodero 7a54afaa89 Remove duplicated test case 2018-10-09 21:57:18 -03:00
Andreas Dangel 84def12794 [plsql] CodeFormat Rule
Basic checks for SQL Queries alignment
2018-10-09 17:18:15 +02:00
Will Herrmann e8bfe097fb Upgrading Apache Commons IO from 2.4 to 2.6 2018-10-08 16:32:49 -05:00
Will Winder 5b324578f3 Add test cases. 2018-10-08 15:29:42 -04:00
Juan Martín Sotuyo Dodero 14a375a510 Merge pull request #1370 from adangel/issue-1330
[java] PMD crashes with java.lang.ClassFormatError: Absent Code
2018-10-08 15:42:30 -03:00
Andreas Dangel 1ba03c11b8 Merge branch 'pr-1375' 2018-10-08 20:12:31 +02:00
Andreas Dangel 17bc5a8085 Update release notes, refs #1375 2018-10-08 20:12:04 +02:00
Andreas Dangel 1dd5caaf4f Update PULL_REQUEST_TEMPLATE
Using now `./mvnw clean verify` for all the checks.
2018-10-08 19:55:53 +02:00
Will Winder 2acd68ddef Add missing null check. 2018-10-08 09:33:25 -04:00
Will Winder b49f5d9e1a Simplify check for 'Test' annotation in JUnitTestsShouldIncludeAssertRule. Issue #1365 2018-10-08 09:25:48 -04:00
Andreas Dangel e58ad9ef84 [ci] Install bundles into vendor/bundle, fix bundle config when calling pmdtester 2018-10-07 10:57:39 +02:00
Andreas Dangel a8683e18a8 [ci] call pmdtester via bundler
Since we are in a different directory than we were when installing
the gems, we need to setup bundle path before.
2018-10-06 20:23:03 +02:00
Andreas Dangel 17b651190e [java] PMD crashes with java.lang.ClassFormatError: Absent Code
attribute in method that is not native or abstract in class file
javax/xml/ws/Service

Fixes #1330
2018-10-06 11:17:45 +02:00
Andreas Dangel fd19cdcb01 [apex] Convert rule test ApexDoc 2018-10-05 20:43:03 +02:00
Andreas Dangel 1f7c827323 Merge branch 'master' into unit-test-split 2018-10-05 20:39:22 +02:00
Andreas Dangel 6d00e74142 Use new base class PmdRuleTst for rule tests 2018-10-05 20:33:38 +02:00
Andreas Dangel a28657d8dd [test] Add a PMD specific PmdRuleTst base class for PMD's own tests.
Restore SimpleAggregatorTst to be general again.
2018-10-05 19:47:40 +02:00
Juan Martín Sotuyo Dodero c48ed19397 Merge branch 'pr-1368' 2018-10-05 09:42:42 -03:00
Juan Martín Sotuyo Dodero 39a1f87303 Update changelog, refs #1368 2018-10-05 09:42:28 -03:00
Maikel Steneker c7b93f49c8 Updated outdated note in the building documentation. 2018-10-05 11:33:07 +02:00
Andreas Dangel 580e07cb20 Merge branch 'pr-1366' 2018-10-04 19:03:41 +02:00
Andreas Dangel d6d03ca868 Update release notes, refs #1366, fixes #1356 2018-10-04 19:03:15 +02:00
Vishva007 33f58b3282 bar spell 2018-10-04 00:28:10 +05:30
Vishva007 eb95804ea8 Static Modifier on Interface pmd #1356 2018-10-04 00:03:38 +05:30
Andreas Dangel 04ba93bf0b [docs] Add simple script to build site locally
Also add more excludes for jekyll
2018-10-03 11:42:35 +02:00
Andreas Dangel 50b2368335 release-script: create correct release notes post for pmd.github.io
The yaml frontmatter was missing.
2018-10-03 11:30:24 +02:00
Andreas Dangel 6339cd42d4 [doc] Update ruby dependencies
Fixes potential security vulnerability in jekyll 3.7.3 -> 3.7.4
2018-10-03 10:35:11 +02:00
Andreas Dangel b61d196f80 Dogfood - use PMD 6.8.0 2018-10-01 20:19:41 +02:00
Andreas Dangel 4df81222ff Add more logging during release 2018-09-30 11:26:26 +02:00
Andreas Dangel 7f876f5d60 Generate release notes after docs/_config.yml has been updated 2018-09-30 11:05:18 +02:00
Andreas Dangel 3ed9d95aa0 Fix old release notes 2018-09-30 11:04:46 +02:00
Andreas Dangel 97fd30418e Prepare next development version 2018-09-30 10:47:07 +02:00
Andreas Dangel d8586382f6 [maven-release-plugin] prepare for next development iteration 2018-09-30 10:10:21 +02:00
Andreas Dangel 161d9cd6d6 [maven-release-plugin] prepare release pmd_releases/6.8.0 2018-09-30 10:10:12 +02:00
Andreas Dangel a55b93dd21 Prepare pmd release 6.8.0 2018-09-30 10:03:50 +02:00
Travis CI (pmd-bot) 5accf41cc4 Update documentation
TRAVIS_JOB_NUMBER=2873.1
TRAVIS_COMMIT_RANGE=c62e4beec30d...42b494189d15
2018-09-30 07:30:45 +00:00
Andreas Dangel 42b494189d Update integration test to use a sample-ruleset and run once with
the quickstart ruleset.
2018-09-30 09:08:43 +02:00
Andreas Dangel db95f016d2 Update release notes, add PLSQL section 2018-09-30 08:53:12 +02:00
Andreas Dangel dafbb5853f Merge branch 'pr-1260' 2018-09-30 08:47:07 +02:00
Andreas Dangel 14352a7507 Update release notes, mention quickstart ruleset
Refs #1260
2018-09-30 08:45:08 +02:00
Clément Fournier 99d29c78e5 update documentation 2018-09-29 23:20:01 +02:00
Clément Fournier dad61739ed Update quickstart.xml 2018-09-28 13:25:38 +02:00
Andreas Dangel 6253370426 Restore images of names and aliases
Special handling of TableAlias in Joins
ON is a reserved word
2018-09-27 11:31:54 +02:00
Andreas Dangel 4a1a12db29 ORDER is a reserved word as well 2018-09-27 11:31:54 +02:00
Andreas Dangel 11adc28a7e Allow keywords as identifiers for various names
Increase lookaheads in Condition2
2018-09-27 11:31:54 +02:00
Andreas Dangel 71e74dba8d Allow keywords as table alias
Note: BY and GROUP are reserved words
2018-09-27 11:31:54 +02:00
Andreas Dangel 3454804b49 Fully parse select statement in CursorForLoop.
Note: ALL and DISTINCT are reserved words
2018-09-27 11:31:54 +02:00
Juan Martín Sotuyo Dodero c62e4beec3 Merge pull request #1359 from adangel/plsql-delete-statement
[plsql] Support Delete Statement
2018-09-26 20:24:57 -03:00
Andreas Dangel a29fc094f9 Support DeleteStatement 2018-09-26 10:28:10 +02:00
David M. Karr (fullname at gmail.com) b80b99bfc8 Update cpd.md with information about risks
The current CPD documentation covers very well how to use it, but there was no information here that describes why someone would care about how much duplicate code they have.  The developers I work with want to "cheat" on their SonarQube quality gates by excluding some code from CPD checks, because they don't really understand what the problem is. Ironically, the main risk from duplicate code is when that code unintentionally becomes not duplicate anymore, creating a hidden problem that may or may not erupt on you.

The text I've added here is excerpted from a short tech note I wrote to my team on the subject.
2018-09-25 14:52:10 -07:00
Juan Martín Sotuyo Dodero a3a48e2cb9 Merge pull request #1360 from adangel/plsql-select-function
[plsql] Support Function Calls in Select
2018-09-25 16:53:41 -03:00
Juan Martín Sotuyo Dodero 386e91fd43 Merge pull request #1346 from adangel/plsql-update-statement
[plsql] Support update statement
2018-09-25 16:50:52 -03:00
Juan Martín Sotuyo Dodero 12b731fb19 Merge pull request #1279 from adangel/plsql-sql-statements
[plsql] Support for SELECT INTO
2018-09-25 16:46:42 -03:00
Juan Martín Sotuyo Dodero 114922d2d4 Merge pull request #1358 from adangel/update-asm-jfx
[core] Update asm and openfjx
2018-09-25 16:43:07 -03:00
Andreas Dangel 55e0c4baf1 Merge branch 'pr-1357' 2018-09-25 19:26:02 +02:00
Andreas Dangel 0913608457 Update release notes, refs #1357 2018-09-25 19:25:41 +02:00
Andreas Dangel 054c06462f Update asm to 6.2.1 2018-09-25 19:21:30 +02:00
Andreas Dangel 7679220cc0 Update openjfx to version 11 2018-09-25 19:21:21 +02:00
Daniel Reigada 1671046e49 Remove Codacy info from summary table 2018-09-25 10:12:26 +01:00
Daniel Reigada 51225d84ed Remove manual index 2018-09-25 10:11:29 +01:00
Clément Fournier 80bdb7b257 Remove Junit syntax 2018-09-24 17:45:25 +02:00
Clément Fournier 387e794116 Split pmd-test to isolate kotlin dependencies 2018-09-24 15:02:19 +02:00
Daniel Reigada d70c2ba254 Improve Codacy description 2018-09-24 11:54:13 +01:00
Daniel Reigada af06c221d0 Create automated code review section and move Codacy 2018-09-24 11:53:44 +01:00
Daniel Reigada 6fea4ebc2b Remove continuous integrations link from index 2018-09-24 11:42:40 +01:00
Clément Fournier 76b4b6ee7a Merge branch 'master' into kt-test-dsl 2018-09-23 22:26:03 +02:00
Clément Fournier 75f2f18395 Fix PR comments 2018-09-23 21:49:38 +02:00
Clément Fournier 2416b88725 Designer stability improvements 2018-09-23 20:48:36 +02:00
Clément Fournier 00651c2c95 Add test generation to the designer 2018-09-23 20:39:06 +02:00
Juan Martín Sotuyo Dodero 310de01fd0 Merge branch 'master' of github.com:pmd/pmd 2018-09-23 01:29:52 -03:00
Juan Martín Sotuyo Dodero 6721e190b0 Merge branch 'pr-1314' 2018-09-23 01:27:52 -03:00
Juan Martín Sotuyo Dodero d5d083745f Update changelog, refs #1314 2018-09-23 01:22:20 -03:00
Juan Martín Sotuyo Dodero 29c5d5b49b Several improvements after final review 2018-09-23 00:55:04 -03:00
Travis CI (pmd-bot) 438b015b3d Update documentation
TRAVIS_JOB_NUMBER=2851.1
TRAVIS_COMMIT_RANGE=36e91f111d1d...7805868f7201
2018-09-22 07:53:25 +00:00
Juan Martín Sotuyo Dodero 7805868f72 Merge pull request #1354 from adangel/issue-1352
[java] MissingSerialVersionUID false-negative with abstract classes
2018-09-22 04:39:10 -03:00
Travis CI (pmd-bot) 36e91f111d Update documentation
TRAVIS_JOB_NUMBER=2848.1
TRAVIS_COMMIT_RANGE=2e3fe51834af...e30503b3726b
2018-09-22 06:32:10 +00:00
Juan Martín Sotuyo Dodero 10b100dded Merge branch 'master' into issue-1352 2018-09-22 03:23:15 -03:00
Juan Martín Sotuyo Dodero 15f99400be Update release_notes.md
Improve formating
2018-09-22 03:21:51 -03:00
Juan Martín Sotuyo Dodero e30503b372 Merge pull request #1353 from adangel/issue-1348
[apex] AvoidGlobalModifierRule gives warning even when its a webservice - false positive
2018-09-22 03:20:24 -03:00
Juan Martín Sotuyo Dodero 2e3fe51834 Merge pull request #1351 from adangel/issue-1350
[java] MissingSerialVersionUID false-positive on interfaces
2018-09-22 03:15:14 -03:00
Juan Martín Sotuyo Dodero f670fa95ab Merge branch 'pr-1309' 2018-09-22 01:28:36 -03:00
Juan Martín Sotuyo Dodero ca5cddf467 Update changelog, refs #1309 2018-09-22 01:27:52 -03:00
Andreas Dangel 536176f359 [java] MissingSerialVersionUID false-negative with abstract classes
Fixes #1352
2018-09-18 19:13:05 +02:00
Andreas Dangel ec79ac1004 [apex] AvoidGlobalModifierRule gives warning even when its a webservice - false positive
Fixes #1348
2018-09-17 13:20:04 +02:00
Andreas Dangel f67c4a2adc [java] MissingSerialVersionUID false-positive on interfaces
Fixes #1350
2018-09-17 08:57:20 +02:00
Andreas Dangel 3113e4ad0f Merge branch 'pr-1339' 2018-09-14 23:02:16 +02:00
Andreas Dangel 382aa8e142 Update release notes, refs #1339 2018-09-14 23:01:05 +02:00
Andreas Dangel 616746c004 Support UpdateStatement 2018-09-13 11:03:27 +02:00
Andreas Dangel 5bbbaeac1e Support FunctionCall in SelectList 2018-09-12 20:06:02 +02:00
BBG b3a78c4ac6 improve danger message 2018-09-12 16:44:48 +08:00
Andreas Dangel 64137d3231 Merge branch 'pr-1322' 2018-09-11 14:05:54 +02:00
Andreas Dangel eec6aa2a9a Update release notes with API deprecations
refs #881, refs #1322
2018-09-11 14:04:54 +02:00
Andreas Dangel 47171207ff * Make AbstractPropertySource.getPropertySourceType() abstract
* Readd RuleReference.hasOverriddenProperty()
2018-09-11 13:40:13 +02:00
Andreas Dangel 2649cf4e5b Update release notes, refs #1279 2018-09-11 13:14:16 +02:00
Andreas Dangel 3498cde1f9 Add CodingStyleExample.pls for parsing tests 2018-09-11 13:12:12 +02:00
Andreas Dangel c5fdf94b03 Support simple FunctionCall 2018-09-11 13:07:32 +02:00
Andreas Dangel dea38d44c9 Own AST node for FloatingPointCondition 2018-09-11 11:49:40 +02:00
Andreas Dangel 38d97c72a9 Reuse IsNullCondition 2018-09-11 11:46:54 +02:00
Matias Fraga 9a91b4c29e Update branch 2018-09-10 15:59:39 -03:00
Matias Fraga c2643f0278 PR review 2018-09-10 15:55:14 -03:00
Andreas Dangel d47b130a89 Fix unit tests 2018-09-10 20:42:35 +02:00
Andreas Dangel db767317e1 Support IsTypeOfCondition 2018-09-10 20:42:35 +02:00
Andreas Dangel 849e3ada8d Support Between Condition, add test case for In Condition 2018-09-10 20:42:35 +02:00
Andreas Dangel 3760f53ab1 Support NullCondition 2018-09-10 20:42:31 +02:00
Andreas Dangel 78c5ce4636 Support LikeCondition 2018-09-10 19:31:34 +02:00
Andreas Dangel 7f2a052d00 Merge branch 'origin/master' into plsql-sql-statements 2018-09-10 19:11:13 +02:00
Juan Martín Sotuyo Dodero 8b3a9c49cb Merge branch 'pr-1340' 2018-09-10 13:45:15 -03:00
Juan Martín Sotuyo Dodero 7ee3e938cc Update changelog, refs #1340 2018-09-10 13:45:03 -03:00
Kristian Scheibe 5cca9e8f50 Fixed javadoc for test. 2018-09-10 15:32:26 +02:00
Kristian Scheibe f9e2fc7e54 Derive the JavaRuleViolation's class name from all java types and not just classes. 2018-09-10 15:30:01 +02:00
Matias Fraga 5aa4d68c35 Keep the full list of previous comments 2018-09-10 01:42:15 -03:00
Matias Fraga e55f6bc63b Fix checkstyle issues 2018-09-10 01:14:59 -03:00
Matias Fraga c7dfac3549 Expand generic token 2018-09-10 00:39:07 -03:00
Matias Fraga aa54194d19 Initial implementation of GenericToken for antlr languages 2018-09-09 21:51:43 -03:00
Matias Fraga 755ae837c1 Merge branch 'token-manager' of github.com:teamraptor/pmd 2018-09-09 20:21:46 -03:00
Matias Fraga 15bd890110 Generate AntlrTokenManager and decouple the lexer instance from the tokenizer 2018-09-09 20:19:38 -03:00
Matias Fraga 1eed0993b3 Merge branch 'master' of github.com:pmd/pmd into HEAD 2018-09-09 17:39:46 -03:00
Matias Fraga 99a79ccd17 Merge branch 'master' of github.com:teamraptor/pmd 2018-09-09 17:33:53 -03:00
Matias Fraga f6c3669a66 Merge branch 'master' of github.com:pmd/pmd 2018-09-09 17:33:41 -03:00
Andreas Dangel d4cc311486 Merge branch 'pr-1302' 2018-09-09 17:07:04 +02:00
Andreas Dangel 28fbbaa096 Fix unit test 2018-09-09 17:06:43 +02:00
Andreas Dangel 18088c75fc [doc] Update rule testing documentation with new rule test structure 2018-09-09 13:11:09 +02:00
Andreas Dangel 52be023f80 Simplify rule tests, directly inherit from SimpleAggregatorTst
for apex, javascript, jsp, plsql, visualforce, vm, xml
2018-09-09 13:10:44 +02:00
Andreas Dangel f14f00975c [java] Simplify rule tests, directly inherit from SimpleAggregatorTst 2018-09-09 12:58:47 +02:00
Andreas Dangel aaabd20173 [test] Provide a default implementation for test setUp 2018-09-09 12:38:25 +02:00
Andreas Dangel 83b0fc542a [xml] Split the rule tests 2018-09-09 12:01:36 +02:00
Andreas Dangel aec06ae8ed [vm] Split the rule tests 2018-09-09 12:01:36 +02:00
Andreas Dangel 872413b85e [vf] Split the rule tests 2018-09-09 12:01:36 +02:00
Andreas Dangel a5ded9d517 [plsql] Split the rule tests 2018-09-09 12:01:36 +02:00
Andreas Dangel 8b4cdb83da [jsp] Split the rule tests 2018-09-09 12:01:36 +02:00
Andreas Dangel 6e2e389520 [javascript] Split the rule tests 2018-09-09 12:01:36 +02:00
Andreas Dangel 0dc4364395 [apex] Split the rule tests 2018-09-09 12:01:31 +02:00
Andreas Dangel 597d09dd68 [java] Split the rule tests for security 2018-09-09 11:02:09 +02:00
Andreas Dangel 5db7b174d9 [java] Split the rule tests for performance 2018-09-09 10:59:48 +02:00
Andreas Dangel cbd91103e1 [java] Split the rule tests for multithreading 2018-09-09 10:58:05 +02:00
Andreas Dangel fe83b9f5a4 [java] Split the rule tests for error prone 2018-09-09 10:54:21 +02:00
Andreas Dangel 9b51fa802d [java] Split the rule tests for documentation 2018-09-09 10:51:25 +02:00
Andreas Dangel 3185956f75 [java] Split the rule tests for design 2018-09-09 10:47:52 +02:00
Andreas Dangel 06758dae53 [java] Split the rule tests for codestyle 2018-09-09 10:42:08 +02:00
Andreas Dangel 92ce218c42 [java] Split the rule tests for best practices 2018-09-09 10:32:38 +02:00
Juan Martín Sotuyo Dodero 4588879062 Merge branch 'pr-1336' 2018-09-09 02:28:42 -03:00
Juan Martín Sotuyo Dodero b8accbb01a Merge branch 'master' into issue-1325 2018-09-08 22:11:35 -03:00
Juan Martín Sotuyo Dodero 94d298168b Merge branch 'pr-1337' 2018-09-08 22:04:33 -03:00
Juan Martín Sotuyo Dodero d14c7a9636 Use typeres to detect proper AtomicBooleans 2018-09-08 22:04:11 -03:00
Andreas Dangel 06be510702 [java] ConsecutiveLiteralAppends: Fix further FPs/FNs 2018-09-07 16:31:58 +02:00
Andreas Dangel 212bf46be8 [java] LinguisticNaming should support AtomicBooleans
Fixes #1334
2018-09-07 15:21:01 +02:00
Andreas Dangel 7d3f287f38 [java] False positive in ConsecutiveLiteralAppends
Fixes #1325
2018-09-07 14:30:16 +02:00
Travis CI (pmd-bot) 98807dae25 Update documentation
TRAVIS_JOB_NUMBER=2805.1
TRAVIS_COMMIT_RANGE=e3018c3892bb...4999c5f9ffdf
2018-09-05 04:34:34 +00:00
Juan Martín Sotuyo Dodero 4999c5f9ff Merge branch 'pr-1331' 2018-09-05 01:16:24 -03:00
Juan Martín Sotuyo Dodero b0336d3616 Update changelog, refs #1331 2018-09-05 01:16:04 -03:00
Clément Fournier 404b6e8d6e Deprecate one syntax 2018-09-04 12:30:30 +02:00
Clément Fournier 20901cf787 Move node extensions into pmd-test 2018-09-04 12:30:30 +02:00
Clément Fournier d98b91263d Prototype a junit syntax
Inherently less powerful, because we can't generate tests
for several language versions
2018-09-04 12:30:30 +02:00
Clément Fournier e67ae457d9 Abstract over parsing contexts 2018-09-04 12:30:30 +02:00
Clément Fournier 4a3f85d40a Documentation 2018-09-04 12:30:30 +02:00
Clément Fournier 86a1a13dc6 Add Node extensions 2018-09-04 12:30:30 +02:00
Clément Fournier 7284a08779 Add expectParseException for parser crash tests
The generated JavaParser should be added to coveralls
2018-09-04 12:30:30 +02:00
Clément Fournier fd83625e73 Allow to return any return value from childRet 2018-09-04 12:30:30 +02:00
Clément Fournier f5582b057a Implement focus 2018-09-04 12:30:30 +02:00
Clément Fournier 1eb5b7a7c9 Commit to FunSpec style
* Move everything inside ParsingCtx. It's extensible and can accommodate more
configuration options without breaking clients/ dealing with many optional parameters.
* Create tests for CatchStatement.
* Child calls now return the matched node.
* Change behaviour of ignoreChildren: it throws an exception if 'child' is called.
This is to be consistent with the previous item.
2018-09-04 12:30:30 +02:00
Clément Fournier 84ac91b373 Better error messages 2018-09-04 12:30:30 +02:00
Clément Fournier 1703dde463 Generate tests based on version range 2018-09-04 12:30:30 +02:00
Clément Fournier 0ea7707d4c Better error messages 2018-09-04 12:30:30 +02:00
Clément Fournier 9bb22f4ca6 FunSpec integration
Lots of redundancy until we make a choice
2018-09-04 12:30:29 +02:00
Clément Fournier 0eba746afb Add string matchers 2018-09-04 12:30:29 +02:00
Clément Fournier ce25568664 Allow to write tests in Kotlin 2018-09-04 12:30:29 +02:00
Clément Fournier 492f1798d8 Fix tests 2018-09-04 11:44:16 +02:00
Clément Fournier 16f0633193 Fix #1329 2018-09-04 11:34:34 +02:00
Andreas Dangel e3018c3892 [doc] Update gems 2018-09-02 15:36:38 +02:00
Andreas Dangel 848a0761fe Fix release scripts
* fix language var LANG
* fix bundle install command
* automate creation of release notes post in pmd.github.io
* add var "is_release_notes_processor"
* Always install the gems for rendering release notes
2018-09-02 15:31:01 +02:00
Clément Fournier 849cb30054 Remove Beta annotation 2018-09-02 15:11:21 +02:00
Clément Fournier 89d286be59 Merge branch 'master' into api-deprecation-annotations 2018-09-02 15:08:07 +02:00
Andreas Dangel 65a3e1a3f7 Fix old release notes 2018-09-02 14:33:51 +02:00
Andreas Dangel 86c89040b4 Prepare next development version 2018-09-02 14:30:21 +02:00
Andreas Dangel 291d36d841 [maven-release-plugin] prepare for next development iteration 2018-09-02 14:27:42 +02:00
Andreas Dangel b98bd0bb96 [maven-release-plugin] prepare release pmd_releases/6.7.0 2018-09-02 14:27:33 +02:00
Andreas Dangel d8c51db85e Prepare pmd release 6.7.0 2018-09-02 14:19:37 +02:00
Andreas Dangel acdab9df56 [ci] Fix java10 installation for sonar 2018-09-02 12:31:11 +02:00
Andreas Dangel 7a8847bacb [ci] Fix sonar configuration
For now, we need to use java10 with sonar, until sonarjava 5.8.0
is released, which adds support for java11.
Apparantly sonar also loads the classfiles and can't yet load
java11 classes, leading to many errors
"Unsupported class file major version 55" while analyzing
the project.

Also update SONAR_TOKEN

See https://jira.sonarsource.com/browse/SONARJAVA-2877
2018-09-02 12:15:45 +02:00
Andreas Dangel c9f686903e [ci] Coveralls hasn't built the project since June 25th
The previous fix was not enough. Coveralls maven plugin depends on
javax.xml.bind, which has been removed with JDK11, since it is
a EE feature.

Workaround is now, to add the jaxb-api as a plugin dependency, so
that the utility class javax.xml.bind.DatatypeConverter is
available.

Fixes #1317
2018-09-02 10:53:02 +02:00
Juan Martín Sotuyo Dodero 2eaaaa42aa Merge branch 'pr-1327' 2018-09-01 21:18:48 -03:00
Juan Martín Sotuyo Dodero dc19269491 Merge branch 'master' into issue-1323 2018-09-01 20:16:13 -03:00
Andreas Dangel 921d4190d7 [ci] Coveralls hasn't built the project since June 25th
Fixes #1317
2018-09-01 23:15:29 +02:00
Andreas Dangel 2264d3c964 [ci] Fix sonar / coveralls build after switching to jdk 11
Also update jacoco plugin to 0.8.2
2018-09-01 23:11:12 +02:00
Travis CI (pmd-bot) ff5e83b21d Update documentation
TRAVIS_JOB_NUMBER=2790.1
TRAVIS_COMMIT_RANGE=b9501e5c7791...d0efb3cad751
2018-09-01 20:11:10 +00:00
Andreas Dangel 7ebcb30aaa No need to check for missing ':' 2018-09-01 21:41:05 +02:00
Andreas Dangel d0efb3cad7 Merge branch 'pr-1319' 2018-09-01 21:32:08 +02:00
Andreas Dangel 58b1985509 Merge branch 'pr-1324' 2018-09-01 21:32:03 +02:00
Travis CI (pmd-bot) b9501e5c77 Update documentation
TRAVIS_JOB_NUMBER=2786.1
TRAVIS_COMMIT_RANGE=ff63c5681a73...bec314ef276d
2018-09-01 19:29:55 +00:00
Andreas Dangel 378bfe5948 Update release notes, refs #1327 2018-09-01 21:21:03 +02:00
Juan Martín Sotuyo Dodero bec314ef27 Merge branch 'pr-1266' 2018-09-01 16:13:02 -03:00
Andreas Dangel 2fb3cd13cb [java] AvoidUsingHardCodedIP false positive for ":bee"
"::bee" (two colons) is a valid IPv6 address, while ":bee"
is not.

Refs #1323
2018-09-01 21:12:29 +02:00
Juan Martín Sotuyo Dodero ff63c5681a Merge branch 'pr-1326' 2018-09-01 16:07:30 -03:00
Juan Martín Sotuyo Dodero ded5c1ca51 Add 'as' a a valid transformation prefix 2018-09-01 16:07:13 -03:00
Andreas Dangel a30d23e587 [java] LinguisticNaming - make tranform method names configurable
Follow-up for #1252
2018-08-31 11:29:55 +02:00
Juan Martín Sotuyo Dodero 03124c5673 Update changelog, refs #1323 2018-08-30 14:11:10 -03:00
Juan Martín Sotuyo Dodero 6ef3b5a583 [java] Remove no longer used property
- Fixes #1323
2018-08-30 13:54:59 -03:00
Andreas Dangel c6b529dde8 [ci] update github oauth token 2018-08-30 10:50:22 +02:00
Andreas Dangel 0a026a8142 [ci] pmd-regression-tester - disable exit immediately for uploading baseline
See also pmd/pmd-regression-tester#40
It fails at the very last step (determining result code), so
the baseline is created and can be uploaded.
2018-08-30 10:38:41 +02:00
Jeff Hube 86dc44de3e Revert changes to ApexRootNode 2018-08-29 12:28:01 -04:00
Jeff Hube e86166ee62 Add ASTFormalComment as first child, calculate position 2018-08-29 12:26:28 -04:00
Clément Fournier faabb2a84e Code style 2018-08-29 16:06:23 +02:00
Jeff Hube df7cc1c3a7 Add ASTFormalComment 2018-08-28 17:39:29 -04:00
Clément Fournier af5130ab00 Improvements and planned updates around PropertySource 2018-08-28 00:25:06 +02:00
Jeff Hube 42ab05551d Merge branch 'master' into apexdoc 2018-08-27 15:59:42 -04:00
Jeff Hube a17f38a8c1 Remove autogenerated doc changes 2018-08-27 15:58:20 -04:00
Clément Fournier 079fe95152 Merge branch 'pr-1320' 2018-08-27 20:03:14 +02:00
Travis CI (pmd-bot) f25a2e08aa Update documentation
TRAVIS_JOB_NUMBER=2772.1
TRAVIS_COMMIT_RANGE=f3c54cf7ec47...348a11f11995
2018-08-27 16:37:28 +00:00
Juan Martín Sotuyo Dodero 348a11f119 Merge branch 'pr-1303' 2018-08-27 13:21:52 -03:00
Juan Martín Sotuyo Dodero df64d8bfce Merge branch 'master' into deprecate-old-naming-conventions-rules 2018-08-27 12:58:18 -03:00
Juan Martín Sotuyo Dodero 2cf941dd4e [core] Upgrade PMD on self 2018-08-27 12:24:33 -03:00
Travis CI (pmd-bot) f3c54cf7ec Update documentation
TRAVIS_JOB_NUMBER=2768.1
TRAVIS_COMMIT_RANGE=d743303f2e06...982effe7440a
2018-08-27 07:38:24 +00:00
Juan Martín Sotuyo Dodero 982effe744 Merge branch 'pr-1297' 2018-08-27 04:20:34 -03:00
Juan Martín Sotuyo Dodero d743303f2e Update release ruleset 2018-08-27 04:17:43 -03:00
Juan Martín Sotuyo Dodero f13227176c Update changelog 2018-08-27 04:14:12 -03:00
Juan Martín Sotuyo Dodero 26f5a41c47 [java] OneDeclarationPerLine should check fields too 2018-08-27 04:12:39 -03:00
Juan Martín Sotuyo Dodero 45d0e12437 Merge branch 'pr-1315' 2018-08-27 04:06:46 -03:00
Juan Martín Sotuyo Dodero 1740d25cd7 Rule was moved 2018-08-27 04:06:08 -03:00
Juan Martín Sotuyo Dodero 1f79968bbb Update changelog, refs 1315 2018-08-27 03:03:39 -03:00
Juan Martín Sotuyo Dodero 5cf2334413 Allow both strict and lax checking mode 2018-08-27 03:02:44 -03:00
Juan Martín Sotuyo Dodero 7bba6c46a2 Merge branch 'master' into pr-1315 2018-08-27 01:15:25 -03:00
Juan Martín Sotuyo Dodero 7dd07c9151 Merge branch 'pr-1308' 2018-08-26 21:59:13 -03:00
Clément Fournier 8a9e0b9eff Remove page title from the toc 2018-08-27 02:40:41 +02:00
Clément Fournier 5e2b4a8d5c Merge branch 'master' into tocmaker-tag 2018-08-27 02:40:24 +02:00
Juan Martín Sotuyo Dodero 4518289d0c Merge branch 'pr-1310' 2018-08-26 20:43:47 -03:00
Jeff Hube 780a9e5dde Fix pr comments 2018-08-22 11:20:45 -04:00
Jeff Hube cba80b2e0e Update rule since version 2018-08-21 17:03:28 -04:00
Jeff Hube a4176126ca Fix rule description 2018-08-21 17:02:00 -04:00
Jeff Hube 241eda93b9 Add OneDeclarationPerStatement 2018-08-21 15:52:59 -04:00
Jeff Hube d500e7be48 Add ApexDocRule 2018-08-21 12:42:02 -04:00
Juan Martín Sotuyo Dodero cbbc9f495b Merge branch 'pr-1312' 2018-08-20 21:49:56 -03:00
Clément Fournier d528dcd5d4 Update release notes, refs #1312 2018-08-20 18:35:46 +02:00
Clément Fournier 40ce9313ae Deprecate R[UN]SIGNEDSHIFT
No usages to report
2018-08-20 18:08:21 +02:00
Clément Fournier 3269f3a6ca Render release notes before pushing to sourceforge 2018-08-19 17:24:30 +02:00
Clément Fournier bf8964f9a4 Fix inconsistent versioning
Since we don't use a SNAPSHOT version in _config.yml during
development, the release note's version is not SNAPSHOT either.
2018-08-19 17:24:25 +02:00
Tomi De Lucca 543795e550 checkstyle fixes 2018-08-19 04:06:53 -03:00
Tomi De Lucca 1796d2a7a5 PR Review 2018-08-19 03:56:07 -03:00
Matias Fraga 1812880c47 Enhance AntlrTokenizer 2018-08-18 23:20:18 -03:00
Matias Fraga f5069256b9 Remove visitor configuration 2018-08-18 23:14:12 -03:00
Clément Fournier 4066ca9986 Update tocmaker_block.rb 2018-08-19 00:19:02 +02:00
lsoncini a453566caa Merge branch 'master' of https://github.com/pmd/pmd 2018-08-18 17:53:48 -03:00
Clément Fournier d2cdcb7262 Bug 2018-08-18 22:03:13 +02:00
Clément Fournier c7455012d4 Generate toc conditionnally 2018-08-18 20:30:19 +02:00
Clément Fournier 3cf456dbfa Update release script and doc 2018-08-18 17:40:57 +02:00
Clément Fournier 53b2b288ac Generate the release notes' toc 2018-08-18 17:34:48 +02:00
Travis CI (pmd-bot) b8cffe638e Update documentation
TRAVIS_JOB_NUMBER=2743.1
TRAVIS_COMMIT_RANGE=2feac39d2fc4...71ce6c2eae6d
2018-08-17 18:47:44 +00:00
Andreas Dangel 71ce6c2eae [java] use pmd-java:typeIs always with the prefix "pmd-java".
Jaxen ignores the prefix, Saxon will require it.
So, it's more consistent to use the prefix always.
2018-08-17 20:27:09 +02:00
Andreas Dangel 27ac0944b5 [java] Use typeresolution for various (J)Unit rules 2018-08-17 20:20:10 +02:00
Andreas Dangel b9b19ec3ab Merge branch 'pr-1256' 2018-08-17 19:12:53 +02:00
Andreas Dangel 91d4d909ad Update release notes, fixes #940, refs #1256 2018-08-17 19:11:23 +02:00
Travis CI (pmd-bot) 2feac39d2f Update documentation
TRAVIS_JOB_NUMBER=2740.1
TRAVIS_COMMIT_RANGE=e90e01b69582...6684c58bfb0c
2018-08-17 14:40:26 +00:00
Clément Fournier e17a965e03 Merge branch 'master' into deprecate-old-naming-conventions-rules 2018-08-17 16:29:51 +02:00
Andreas Dangel 6684c58bfb Merge branch 'pr-1296' 2018-08-17 16:11:06 +02:00
Clément Fournier 12418e5656 use rule tag 2018-08-17 15:56:39 +02:00
Clément Fournier 101a2c4100 Merge branch 'master' into split-field-naming-conventions 2018-08-17 15:55:42 +02:00
Clément Fournier 5526cae376 Fix pr comments 2018-08-17 15:54:03 +02:00
Andreas Dangel e90e01b695 do-release: move sf-news part just above the announcement email 2018-08-17 10:49:23 +02:00
Andreas Dangel 1855bb5797 Merge branch 'pr-1306' 2018-08-17 10:45:51 +02:00
Andreas Dangel eb03003f66 Cache bundles on travis, use bundle exec 2018-08-17 10:43:12 +02:00
Clément Fournier 94dc4694f2 Use rule tag introduced by #1306 2018-08-16 22:21:28 +02:00
Andreas Dangel ec011cc885 Add additional test cases for expressions in where clauses 2018-08-16 17:19:22 +02:00
Andreas Dangel ec665de1a2 [plsql] Add support for GroupByClause
* Restructure FromClause to have one node with multiple table references
2018-08-16 16:14:57 +02:00
Andreas Dangel cb323a3496 Enforce building with at least java10 2018-08-15 23:40:13 +02:00
Andreas Dangel 9529dd9ad7 [doc] Minimum java version for building is now java10, mention JAVAFX_HOME 2018-08-15 23:26:04 +02:00
Andreas Dangel 53a763d901 Make run.sh / designer.bat compatible with java/openjfx
* Use JAVAFX_HOME to add extra classpath for openjfx
* Add back the jre_specific_vm_options when needed
2018-08-15 23:25:22 +02:00
Andreas Dangel c4857aaa20 [ci] Use openjdk11 for building, add osx into the build matrix
* Allow travis to cache jdk
* cache $HOME/.rvm, install bundler with current rvm ruby (needed for osx)
2018-08-15 23:24:41 +02:00
Andreas Dangel 707781600f Use openjfx dependencies from maven central
* Can use the release flag of maven-compiler-plugin again
* Make the openjfx dependencies as provided, so that they
  don't end up in pmd-bin-*.zip
2018-08-15 23:23:55 +02:00
Clément Fournier 944c1222d2 Separate treatment of public and non-public constants 2018-08-15 18:35:42 +02:00
Juan Martín Sotuyo Dodero ff15f914f4 Merge branch 'pr-1305' 2018-08-15 11:05:22 -03:00
Clément Fournier 43a21997d9 Update do-release.sh 2018-08-15 15:55:05 +02:00
Andreas Dangel be4a3a2940 [core] Deprecate ReportTree
* This change deprecate ReportTree and all related classes
  in net.sourceforge.pmd.lang.dfa.report
* Reworked YAHTMLRender to work without ReportTree
* Adds a unit test for YAHTMLRenderer

Fixes #1283
2018-08-15 10:46:12 +02:00
Clément Fournier 3bbd355d1c Update release_notes 2018-08-15 03:32:47 +02:00
Clément Fournier 22c143f6e6 Take snapshot into account 2018-08-15 03:30:34 +02:00
Clément Fournier b8fb9bd63f Remove logger 2018-08-15 02:46:54 +02:00
Clément Fournier 9d8a8d74fb Update release.sh 2018-08-15 02:43:25 +02:00
Clément Fournier ba19c59bdb Add logger 2018-08-15 01:54:12 +02:00
Clément Fournier e888283b39 Make script to render release notes liquid 2018-08-14 17:50:49 +02:00
Andreas Dangel 89f6ae5806 [java] InvalidSlf4jMessageFormat: Avoid using findDescendantsOfType
to limit the scope of searched nodes
2018-08-14 10:58:41 +02:00
Andreas Dangel 74ed544500 [java] InvalidSlf4jMessageFormat false positive: too many arguments with string concatenation operator
Fixes #1291

If there are multiple Literals for the first parameter, we assume,
they are concatenated together and sum up all placeholders.
Such String literals are concatenated already by the java compiler,
so splitting a String in that way has no negative impact.

This change also makes use of the RuleChain.
2018-08-14 10:58:41 +02:00
Clément Fournier a9c8ad7d97 Add PrivateApi and ReservedSubclassing annotations 2018-08-13 19:26:34 +02:00
Juan Martín Sotuyo Dodero 62612dc507 Merge branch 'pr-1299' 2018-08-13 12:06:46 -03:00
Juan Martín Sotuyo Dodero 1cab291ee8 Merge branch 'pr-1301' 2018-08-13 10:28:01 -03:00
Andreas Dangel f773581459 [core] PMD stops processing file completely, if one rule in a rule chain fails
Fixes #1300
2018-08-13 11:21:04 +02:00
Andreas Dangel f8bb0488d8 [java] RedundantFieldInitializer - NumberFormatException with Long
Fixes #1298
2018-08-13 09:55:02 +02:00
Andreas Dangel 7e53729baa Merge branch 'pr-1295' 2018-08-13 09:28:37 +02:00
Clément Fournier 19b9c841dc Checkstyle 2018-08-13 09:09:26 +02:00
Clément Fournier c9cb88e55c Deprecate old rules 2018-08-13 05:55:30 +02:00
Clément Fournier 51c72c7a9f Update release notes 2018-08-13 01:21:47 +02:00
Clément Fournier 7bc0305835 Add tests 2018-08-13 01:09:48 +02:00
Clément Fournier e4566ea17a Add FieldNamingConventionsRule, document ast 2018-08-13 00:46:31 +02:00
Clément Fournier 44e23e7d2e Make classloaders final in JTypeQName 2018-08-12 23:16:31 +02:00
Clément Fournier eaabd8e646 Rename to quickstart.xml 2018-08-12 20:07:29 +02:00
Clément Fournier 142bf1a82e Merge branch 'master' into default-rset 2018-08-12 20:05:23 +02:00
Travis CI (pmd-bot) 16402c9f13 Update documentation
TRAVIS_JOB_NUMBER=2707.1
TRAVIS_COMMIT_RANGE=7bbb68885965...0ae88f7cd0b8
2018-08-12 17:55:08 +00:00
Clément Fournier 0ae88f7cd0 Merge branch 'pr-1252' 2018-08-12 19:27:20 +02:00
Clément Fournier c3ea6de8e0 Move LinguisticNaming to 6.7.0 2018-08-12 19:25:13 +02:00
Juan Martín Sotuyo Dodero 7bbb688859 Merge branch 'pr-1292' 2018-08-12 14:03:02 -03:00
Andreas Dangel 319c6cd073 Update grammar comment 2018-08-10 15:22:40 +02:00
Andreas Dangel 3332117fe3 [core] Add support for Gradle's AntLoggingAdapter, default fallback loglevel is WARN
Fixes #1288
2018-08-09 20:54:14 +02:00
Andreas Dangel 414e4a13fb Add JoinClause tests, fix outer join with using,
add support for query partition clause
2018-08-09 17:44:49 +02:00
Andreas Dangel e3dfda3cca Simplify grammar 2018-08-09 16:34:22 +02:00
Andreas Dangel bfa15f2191 Merge branch 'pr-1290' 2018-08-08 08:30:44 +02:00
Andreas Dangel fb0e455e49 Update release notes, refs #1290 2018-08-08 08:30:05 +02:00
BBG 01c622af10 fix comments 2018-08-08 10:59:41 +08:00
Travis CI (pmd-bot) 8ea5fa1447 Update documentation
TRAVIS_JOB_NUMBER=2695.1
TRAVIS_COMMIT_RANGE=51a1ef117134...ff5fe372dfe9
2018-08-07 18:04:48 +00:00
Andreas Dangel ff5fe372df Merge branch 'pr-1289' 2018-08-07 19:54:18 +02:00
Andreas Dangel 3c3abcadeb Update release notes, refs #1289, fixes #1258 2018-08-07 19:47:34 +02:00
Andreas Dangel 802104525a LinguisticNaming: add additional property to avoid too many FPs
by default for transform methods
2018-08-07 19:32:38 +02:00
Andreas Dangel 89f027a64f LinguisticNaming: fix Boolean false-positive 2018-08-07 19:21:56 +02:00
Andreas Dangel 7d9fd61c50 Fix wrong merge 2018-08-07 19:17:21 +02:00
BBG ee059422fd Create the documentation about pmdtester 2018-08-07 23:54:14 +08:00
Danny van Heumen 4c0b18068f [java] UselessParentheses: Fix false positive for assignment within parentheses in condition statement. 2018-08-06 23:15:12 +02:00
Andreas Dangel 7bdb10bccd Merge branch 'master' into linguistic-antipatterns 2018-08-06 21:08:45 +02:00
Andreas Dangel 62254aa6c2 Fix review comments for LinguisticNamingRule
* Added specific messages for the different types of linguistic patterns detected
* Fix support for multiple field/variable declaration
2018-08-06 20:54:16 +02:00
Clément Fournier 51a1ef1171 Use https in ruleset template for documentation
Would help avoiding issues like #1249, #1271
2018-08-06 16:14:40 +02:00
Alex Shesterov f2cb480595 Add tests UseAssertEqualsInsteadOfAssertTrue,UseAssertNullInsteadOfAssertTrue,UseAssertSameInsteadOfAssertTrue,UnnecessaryBooleanAssertion (https://github.com/pmd/pmd/issues/940) 2018-08-06 11:38:21 +00:00
Alex Shesterov fadbbbba02 Add tests UseAssertEqualsInsteadOfAssertTrue,UseAssertNullInsteadOfAssertTrue,UseAssertSameInsteadOfAssertTrue,UnnecessaryBooleanAssertion (https://github.com/pmd/pmd/issues/940) 2018-08-06 09:25:49 +00:00
Alex Shesterov 2dbb332f00 Add tests and enhance description for JUnit4TestShouldUseTestAnnotation (https://github.com/pmd/pmd/issues/940) 2018-08-06 09:05:03 +00:00
Alex Shesterov 2ead1237d6 Add tests and enhance descriptions for JUnit4TestShouldUseBeforeAnnotation,JUnit4TestShouldUseAfterAnnotation (https://github.com/pmd/pmd/issues/940) 2018-08-06 08:35:48 +00:00
Andreas Dangel a2d0b41388 [jsp] add test for jspx extension
Refs #1276
2018-08-06 09:44:06 +02:00
Andreas Dangel 2d87f575d3 Merge branch 'pr-1275' 2018-08-06 09:41:42 +02:00
Andreas Dangel dcb9d4ade1 Update release notes, closes #1274 2018-08-06 09:40:04 +02:00
Andreas Dangel 1306a2b859 Merge branch 'pr-1267' 2018-08-06 09:09:45 +02:00
Andreas Dangel 4b72a66e3c Update release notes, refs #1267 2018-08-06 09:09:09 +02:00
Juan Martín Sotuyo Dodero db792af06c Update changelog, refs #1277 2018-08-04 18:02:27 -03:00
Juan Martín Sotuyo Dodero 919aa21761 Merge branch 'pr-1277' 2018-08-04 17:59:46 -03:00
Juan Martín Sotuyo Dodero 5f593561d9 Merge branch 'pr-1265' 2018-08-04 15:18:32 -03:00
Juan Martín Sotuyo Dodero 5ca1f7438c Merge branch 'pr-1269' 2018-08-04 15:14:06 -03:00
Juan Martín Sotuyo Dodero 1a69dbf831 Merge branch 'pr-1281' 2018-08-04 14:56:20 -03:00
Andreas Dangel d859f6e0e3 Test Framework: Only show "Unit Tests" node, if there are unit tests 2018-08-04 18:54:00 +02:00
Andreas Dangel 7192663c1a [plsql] Improvements on the AST for SELECT
* SubqueryOperation is now available
* FromClause is a node on its own
* OuterJoinType is available
2018-08-03 16:50:48 +02:00
Andreas Dangel b9344ef6f6 [plsql] Add support for OrderBy and RowLimiting clauses for SELECT 2018-08-03 15:48:23 +02:00
Andreas Dangel f7bca5618f Merge branch 'pr-1278' 2018-08-02 19:09:04 +02:00
Andreas Dangel 64682ed07f Update release notes, refs #1278 2018-08-02 19:08:55 +02:00
BBG aa2a363994 use pmdtester 1.0.0.pre.beta3 2018-08-02 22:35:18 +08:00
Andreas Dangel c30c3a3a5e Update pmdtester 2018-08-01 22:24:37 +02:00
jordillachmrf 57cba95386 #1276 add support for jspf and tag extensions 2018-08-01 17:22:43 +02:00
jordillachmrf 543aadad20 #1274 Support EL in tag attributes
Adding support to EL in tag attributes

<font size="2" ${something ? 'class=\"red\"' : ''}>
	<c:out value="some value" />
</font>
2018-08-01 16:27:40 +02:00
Andreas Dangel 23f57b5819 Fix NPE for array types 2018-07-30 21:40:25 +02:00
Andreas Dangel dd99a35aaa [core] Test Framework: Sort violations by line/column
Fixes #1191
2018-07-30 20:49:15 +02:00
Andreas Dangel b22a94c4d4 [java] UnnecessaryFullyQualifiedName false positive: static method on shadowed implicitly imported class
Fixes #1255
2018-07-30 19:10:36 +02:00
Andreas Dangel 5316dd061b Merge branch 'pr-1254' 2018-07-30 10:46:11 +02:00
Andreas Dangel 6c059d743a Update release notes, refs #1254 2018-07-30 10:44:23 +02:00
Travis CI (pmd-bot) 46bc8447c5 Update documentation
TRAVIS_JOB_NUMBER=2665.1
TRAVIS_COMMIT_RANGE=ecdd3ad2a793...3820bdc36c75
2018-07-30 05:17:24 +00:00
Juan Martín Sotuyo Dodero 3820bdc36c Merge branch 'pr-1236' 2018-07-30 02:01:49 -03:00
Juan Martín Sotuyo Dodero ecdd3ad2a7 Update changelog, refs #1264 2018-07-30 01:03:24 -03:00
Juan Martín Sotuyo Dodero 078ffa18e4 Merge branch 'pr-1264' 2018-07-30 01:02:23 -03:00
Travis CI (pmd-bot) afaff78468 Update documentation
TRAVIS_JOB_NUMBER=2662.1
TRAVIS_COMMIT_RANGE=5caee3190a23...ad5cd0ddad93
2018-07-30 03:26:59 +00:00
Juan Martín Sotuyo Dodero ad5cd0ddad Update changelog, refs #1258 2018-07-30 00:13:48 -03:00
Juan Martín Sotuyo Dodero a5589e8f3a Merge branch 'pr-1258' 2018-07-30 00:11:08 -03:00
Juan Martín Sotuyo Dodero c7ac7ccbd1 [java] Avoid NoClassDefFoundError with incomplete classpath 2018-07-29 20:59:48 -03:00
Andreas Dangel 582218bed9 [java] MissingSerialVersionUID - add test case, use typeIs 2018-07-29 21:57:01 +02:00
BBG 2b0e9e0ccf danger integration 2018-07-30 00:11:02 +08:00
Andreas Dangel 5caee3190a [ci] more logging for pmd.github.io push, fix docs upload, fix baseline for tags 2018-07-29 13:58:12 +02:00
Andreas Dangel c5e2660c41 Prepare next development version 2018-07-29 12:34:55 +02:00
Andreas Dangel 20f52700b4 [maven-release-plugin] prepare for next development iteration 2018-07-29 12:07:05 +02:00
Andreas Dangel 868f262c21 [maven-release-plugin] prepare release pmd_releases/6.6.0 2018-07-29 12:06:56 +02:00
Andreas Dangel 6acd758246 Prepare pmd release 6.6.0 2018-07-29 11:59:34 +02:00
Andreas Dangel 11cc39a4af Merge branch 'pr-1263' 2018-07-29 11:33:23 +02:00
Andreas Dangel 409e69c474 Merge branch 'pr-1262' 2018-07-29 11:32:52 +02:00
Andreas Dangel aaa50c996e Merge branch 'pr-1253' 2018-07-29 11:32:44 +02:00
Andreas Dangel 55ae5959cc Merge branch 'pr-1248' 2018-07-29 11:32:36 +02:00
Andreas Dangel 167cb97337 Fix missing full_ver in run.sh 2018-07-29 11:26:27 +02:00
Andreas Dangel 7e737b3c8a Update release notes, fix typos 2018-07-29 10:39:03 +02:00
Andreas Dangel b79f5e93c1 Update release notes for java 11 2018-07-29 10:34:47 +02:00
Andreas Dangel 428d6d2f88 [core] "Unsupported build listener" in gradle build
Fixes #1178
2018-07-29 10:23:22 +02:00
Rafael Cortês 888824d24a Fix NullPointerException in CPPTokenizer:99
Due to `skipBlocks = true` and `skipBlocksStart` being uninitialized in `CPPTokenizer`, `maybeSkipBlocks` would always throw a NullPointerException as it is assuming that `setProperties` is always called after the constructor.
Changed `CPPLanguage` to always invoke `setProperties`, similarly to `CsLanguage`.
This only happens in programmatic invocations.
2018-07-29 09:11:15 +01:00
Andreas Dangel 499dcab9d9 [java] NPath complexity false negative due to overflow
Fixes #1226
2018-07-28 17:57:10 +02:00
Andreas Dangel 2a39c7a4d0 Fix sed script to be MacOSX compatible 2018-07-28 12:31:15 +02:00
Andreas Dangel 580c92c550 [plsql] Add initial support for SELECT INTO - still WIP 2018-07-27 15:54:45 +02:00
Clément Fournier aba00d14a9 Add Java default ruleset 2018-07-27 14:12:46 +02:00
Karl-Philipp Richter a5a0efa1fb Use typeof in MissingSerialVersionUID
The construct

```
count(ImplementsList
[ClassOrInterfaceType/@Image='Serializable'
or ClassOrInterfaceType/@Image='java.io.Serializable']) =1
```

doesn't cover subclasses of a class or interface implementing or
extending Serializable whereas the `typeof` operator does.

close #1078
2018-07-26 18:08:07 +02:00
Alex Shesterov 664d76e072 Add JUnit5 BeforeAll,BeforeEach,AfterAll,AfterEach annotations to avoid false positives for JUnit5 tests (https://github.com/pmd/pmd/issues/940) 2018-07-25 18:50:11 +00:00
Alex Shesterov fc3798e76e Add JUnit5 test annotations to avoid false positives for JUnit5 tests (https://github.com/pmd/pmd/issues/940) 2018-07-25 18:46:04 +00:00
Andreas Dangel 407e940dd4 Fix review comments 2018-07-25 19:56:37 +02:00
Andreas Dangel c598d3b049 Merge branch 'pr-1250' 2018-07-23 20:15:18 +02:00
Andreas Dangel 5b03f01e6f Update release notes, refs #1250 2018-07-23 20:15:08 +02:00
Andreas Dangel fa3a985522 Use ruby 2.4.1 2018-07-23 20:14:59 +02:00
Andreas Dangel 45af47af4c Fixes #1225 [core] Error in sed expression on line 82 of run.sh
while detecting installed version of Java
2018-07-23 17:30:19 +02:00
Travis CI (pmd-bot) 90a7074d97 Update documentation
TRAVIS_JOB_NUMBER=2610.1
TRAVIS_COMMIT_RANGE=0f9bc63bfc14...0f92122d8afb
2018-07-23 15:02:12 +00:00
Andreas Dangel 0f92122d8a Merge branch 'pr-1246' 2018-07-23 16:45:18 +02:00
Andreas Dangel e6e188f301 Add test cases for one character lambda parameters and for loop variables 2018-07-23 16:45:05 +02:00
Andreas Dangel a726a06e17 Merge branch 'pr-1242' 2018-07-23 16:30:10 +02:00
Andreas Dangel 80ea2deb7b Add license header 2018-07-23 16:29:58 +02:00
lsoncini 32b7cba79a abstraction for cpd with antlr 2018-07-21 20:10:24 -03:00
Andreas Dangel 0ee6b54d38 Update release notes, mention new rule, refs #109, the original PR 2018-07-21 19:51:18 +02:00
Andreas Dangel a02bfe8861 Combine the two rules into LinguisticNamingRule 2018-07-21 19:46:25 +02:00
Andreas Dangel ede63f0bcb Introduce property booleanPrefixes 2018-07-21 19:18:34 +02:00
Andreas Dangel beeeb74efb Simplify implementation of AttributeTypeAndNameIsInconsistent and MethodTypeAndNameIsInconsistent
Split test cases
2018-07-21 18:50:10 +02:00
BBG f49cd01637 fix comments 2018-07-22 00:45:16 +08:00
Andreas Dangel 7a25d9a910 Checkstyle, Pmd 2018-07-21 14:26:04 +02:00
Andreas Dangel 58446a2ecd Fix runtime errors (NPE, ClassCastException, IndexOutOfBounds) 2018-07-21 14:02:25 +02:00
Arda Aslan bd4095ed41 Added a naming rule called IsDoesNotReturnBoolean.
According to article "Linguistics Antipatterns: What They Are and How Developers Perceive Them",
a method starting with "isX" and not returning boolean introduces a code smell,
reduces maintainability mainly.

Add two linguistics codes smells. one related with methods and the other with variables (these two can be merged into 1 rule later)

Feedbacks are appreciated.
2018-07-21 12:53:31 +02:00
Clément Fournier 8b07d09dbf Fix main split pane color 2018-07-20 20:50:20 +02:00
Clément Fournier 19f50000a4 Highlight parents of the node
Not the prettiest
2018-07-20 20:29:01 +02:00
BBG 3f030a2784 upload baseline of pmdtester automatically 2018-07-21 00:53:39 +08:00
Andreas Dangel 369c3fa0a0 Fix rule reference 2018-07-20 15:33:41 +02:00
Andreas Dangel 43ebc4c3c1 Update release notes - new rule ForLoopNaming (plsql-codestyle) 2018-07-20 15:28:27 +02:00
Andreas Dangel be76e2809f [plsql] Extend CursorForLoopNaming and rename to ForLoopNaming
It covers now both cursor for loops and index for loops.
2018-07-20 15:26:50 +02:00
Andreas Dangel b088c20a96 [plsql] CursorForLoopNaming: Add parameters "allowSimpleLoops" and "pattern" 2018-07-20 15:26:50 +02:00
Andreas Dangel adb7a42494 Update release notes, fixes #681 2018-07-20 15:26:48 +02:00
Andreas Dangel 387a8abca9 [plsql] Verify issue #681: it's fixed 2018-07-20 15:26:11 +02:00
Andreas Dangel ecb1ddb451 [plsql] SELECT INTO with parentheses
This fixes partially #1047
2018-07-20 15:26:11 +02:00
Andreas Dangel 58268812f6 [plsql] New Rule: CursorForLoopNaming 2018-07-20 15:26:09 +02:00
Andreas Dangel 0b264d5feb Fix encoding (from cp1252 -> utf-8) 2018-07-20 15:24:24 +02:00
Andreas Dangel 9c4486f2fb [plsql] Add basic support for CursorForLoop statement 2018-07-20 15:23:27 +02:00
Andreas Dangel c362f5a77f [java] Prepare for Java 11 2018-07-19 22:00:34 +02:00
Clément Fournier cbb7c47f5e Update node finding algorithm
Instead of performing a dumb DFS, we now have an algo
linear in the number of parents of the node.
2018-07-19 16:16:06 +02:00
Clément Fournier 0165b006c7 Styling improvements 2018-07-19 02:19:07 +02:00
Clément Fournier cab4234a1f Fix tests 2018-07-18 02:32:14 +02:00
Clément Fournier 0f9bc63bfc Rename confusing parameter 2018-07-18 02:05:13 +02:00
Clément Fournier ca6a543ed1 Allow length 1 identifiers in naming convention rules 2018-07-18 02:04:27 +02:00
Clément Fournier 2fd179024d Add resource links 2018-07-17 14:47:36 +02:00
Clément Fournier a261c41ae7 Rework everything 2018-07-17 14:36:11 +02:00
Clément Fournier 6a4200e158 Table view less conversion 2018-07-16 19:41:22 +02:00
Clément Fournier 829351cad7 Tab pane less conversion 2018-07-16 03:09:16 +02:00
Clément Fournier c2b35d6f77 Scroll bar less conversion 2018-07-16 03:04:44 +02:00
Travis CI (pmd-bot) 64ee977b6a Update documentation
TRAVIS_JOB_NUMBER=2596.1
TRAVIS_COMMIT_RANGE=bb3426f584e6...7153f1bbdffc
2018-07-15 21:04:50 +00:00
Juan Martín Sotuyo Dodero 7153f1bbdf Include new rule sin release ruleset 2018-07-15 17:49:25 -03:00
Juan Martín Sotuyo Dodero f168288abd Update changelog, mention new rules 2018-07-15 17:48:06 -03:00
Juan Martín Sotuyo Dodero da1f9a5e4e Merge branch 'pr-1214' 2018-07-15 17:41:38 -03:00
Juan Martín Sotuyo Dodero bb3426f584 Merge branch 'pr-1238' 2018-07-15 17:39:03 -03:00
Juan Martín Sotuyo Dodero 29c9121ecd Merge branch 'pr-1229' 2018-07-15 17:37:19 -03:00
Juan Martín Sotuyo Dodero 171a9904aa Update changelog, mention API changes 2018-07-15 17:36:59 -03:00
Juan Martín Sotuyo Dodero 1ae7deeda7 Merge branch 'pr-1239' 2018-07-15 17:32:45 -03:00
Juan Martín Sotuyo Dodero cc9d9f47bd Merge branch 'pr-1241' 2018-07-15 17:30:47 -03:00
Juan Martín Sotuyo Dodero da8b1374c0 Merge branch 'pr-1240' 2018-07-15 17:28:55 -03:00
Andreas Dangel e74539e5b5 Update release notes, fixes #981 2018-07-15 20:42:21 +02:00
Andreas Dangel 832687b042 Add the new tokens as unreserved keywords 2018-07-15 20:31:33 +02:00
Andreas Dangel 7e5cd27ac7 Update release notes, fixes #980 2018-07-15 19:38:08 +02:00
Andreas Dangel b0cc28eead Update release notes, fixes #1047 2018-07-15 19:30:19 +02:00
Andreas Dangel 19a3d5446f [plsql] plsql.ast.ParseException for CREATE TABLE
Fixes #980
2018-07-15 19:10:22 +02:00
Andreas Dangel 251abe223e [plsql] plsql.ast.ParseException when parsing VIEW
Fixes #981
2018-07-15 18:30:32 +02:00
Clément Fournier c7404c535b Simplify 2018-07-15 14:45:01 +02:00
Clément Fournier 5cdd9d5866 Update release notes, refs #1239 2018-07-15 14:40:38 +02:00
Clément Fournier 6221c563c6 Hide context menu arrows on autocomplete 2018-07-15 14:36:01 +02:00
Andreas Dangel 413c98c2f6 [plsql] plsql.ast.ParseException when parsing EXECUTE IMMEDIATE
Fixes #1047
2018-07-15 14:35:20 +02:00
Clément Fournier 388cb86e9f Autohide xpath completion popup 2018-07-11 17:45:32 +02:00
Clément Fournier db9f6bd730 Update release notes, refs #1182 2018-07-11 17:35:56 +02:00
Clément Fournier 503b54ba8d Merge branch 'pr-1182' 2018-07-11 17:35:19 +02:00
Clément Fournier 3c5a7f2bcc Cleanup 2018-07-11 17:29:46 +02:00
Clément Fournier e32935a6dc Merge branch 'pr-1231' 2018-07-09 22:33:06 +02:00
Clément Fournier 2a3bc7850f Update release notes, refs #1231 2018-07-09 22:32:37 +02:00
Ashish Rana 4e853cb994 Minor type fix 2018-07-09 15:21:20 +05:30
Travis CI (pmd-bot) 4ca905b4a0 Update documentation
TRAVIS_JOB_NUMBER=2574.1
TRAVIS_COMMIT_RANGE=f8e20d0ac5e1...80d9eb796e99
2018-07-09 04:25:18 +00:00
Juan Martín Sotuyo Dodero 80d9eb796e Merge branch 'pr-1223' 2018-07-09 01:08:44 -03:00
Clément Fournier 04ff77ce53 Fix tests of ClassTypeResolver
We now allow findDescendantsOfType to match subtypes
2018-07-09 01:08:04 +02:00
Andreas Dangel f8e20d0ac5 Merge branch 'pr-1220' 2018-07-08 10:38:55 +02:00
Andreas Dangel 7821b3c80e Update release notes, refs #1220, fixes #1216 2018-07-08 10:38:22 +02:00
Andreas Dangel 6323724da4 [dogfood] Upgrade pmd to 6.5.0 2018-07-08 10:29:11 +02:00
Andreas Dangel f604fcb989 Merge branch 'pr-1219' 2018-07-08 10:11:02 +02:00
Andreas Dangel 809110a092 Update release notes, refs #1219, fixes #1217 2018-07-08 10:10:55 +02:00
Clément Fournier 3ec2cf4c59 Fix UncommentedEmptyMethodBody 2018-07-03 23:30:30 +02:00
Clément Fournier 07516ee8ac Deprecate isTernary on ConditionalExpression 2018-07-03 02:13:22 +02:00
Andreas Dangel d6ec50b20f [ci] Include travis build number and commit range in commit messages 2018-06-30 16:20:01 +02:00
Andreas Dangel 6996b8e51d [ci] Add more logging to build/deploy/release scripts 2018-06-30 16:05:55 +02:00
Andreas Dangel 2750716f7a Merge branch 'pr-1221' 2018-06-30 10:13:57 +02:00
Andreas Dangel 59145685d7 Update release notes, refs #1221, fixes #1215 2018-06-30 10:13:49 +02:00
Clément Fournier 9dc60df946 Minor fix 2018-06-30 02:39:23 +02:00
akshatbahety 7f3c93debe PMD DogFood 2018-06-30 02:40:03 +05:30
Clément Fournier 40f0c4d59b Fix toc links 2018-06-29 22:33:45 +02:00
Clément Fournier f07728fe9a Fix unnecessaryFQCN false positive 2018-06-29 18:35:05 +02:00
Clément Fournier b0bc21028d Fix cyclo miscounting ternaries 2018-06-29 17:10:49 +02:00
Clément Fournier 4b8dba86cf Fix startup bug 2018-06-27 20:33:17 +02:00
Clément Fournier 118ee1d69d Merge branch 'master' into pr-1182 2018-06-27 18:34:26 +02:00
Juan Martín Sotuyo Dodero c4cf90e4cb Merge branch 'pr-1210' 2018-06-27 12:07:50 -03:00
Clément Fournier 556de19bd8 Add examples 2018-06-27 13:25:48 +02:00
Clément Fournier c0d7085255 Fix typeres bug 2018-06-27 13:07:54 +02:00
Clément Fournier 66a4d8af94 Readd LongVariable to tests 2018-06-27 12:55:18 +02:00
Clément Fournier 9984ee99ec Add FormalParameterNC and LocalVariableNC
These split out VariableNamingConventions.
Still FieldNamingConventions to go.
2018-06-26 23:48:20 +02:00
Clément Fournier 1fb7fc5edd Fix intellij build 2018-06-26 22:17:04 +02:00
Juan Martín Sotuyo Dodero 552bd98e2f Merge branch 'pr-1213' 2018-06-26 12:51:37 -03:00
Andreas Dangel 34a5cbd529 [java] CommentDefaultAccessModifier false positive with nested interfaces (regression from 6.4.0)
Fixes #1211
2018-06-26 17:43:00 +02:00
Andreas Dangel 24f7d32941 Fix build in eclipse 2018-06-26 17:17:43 +02:00
Clément Fournier 80e27d049a Add doc to some AST nodes 2018-06-26 12:21:22 +02:00
Andreas Dangel 38f966d3b6 Fix typo in release script 2018-06-26 09:44:02 +02:00
Andreas Dangel 7a6bc49826 Prepare next development version 2018-06-26 09:39:48 +02:00
Andreas Dangel 444beeb220 [maven-release-plugin] prepare for next development iteration 2018-06-26 09:34:01 +02:00
Andreas Dangel 211002bb34 [maven-release-plugin] prepare release pmd_releases/6.5.0 2018-06-26 09:07:11 +02:00
Andreas Dangel 8f26c54eb8 Prepare pmd release 6.5.0 2018-06-26 09:01:36 +02:00
Juan Martín Sotuyo Dodero 74cf7dc77b Merge branch 'pr-1201' 2018-06-25 17:22:14 -03:00
Andreas Dangel 6167d26fa9 Make jaxen dependency optional. It is shaded into pmd-core. 2018-06-25 21:54:53 +02:00
Andreas Dangel f38a4f95c6 [java] MissingOverrideRule exception when analyzing PMD under Java 9
Fixes #1074

Jaxen is now shaded into pmd-core, without org.w3c.dom.**
2018-06-25 21:54:53 +02:00
akshatbahety edeefa70f0 Minor Fix 2018-06-25 18:50:26 +05:30
Clément Fournier 21a5e47322 Merge branch 'pr-1206' 2018-06-25 09:14:17 +02:00
Clément Fournier 8188732ad5 Update release notes, refs #1206 2018-06-25 09:14:06 +02:00
Travis CI (pmd-bot) 9f0da5c4e9 Update documentation 2018-06-25 04:10:01 +00:00
Juan Martín Sotuyo Dodero 1d4039b8b5 Merge branch 'pr-1203' 2018-06-25 00:55:58 -03:00
Juan Martín Sotuyo Dodero ac0779cb2b Update changelog, refs #1203 2018-06-25 00:55:24 -03:00
Juan Martín Sotuyo Dodero dd249e1c36 Merge branch 'pr-1192' 2018-06-24 19:28:03 -03:00
Juan Martín Sotuyo Dodero 2d6a599bb1 Merge branch 'pr-1198' 2018-06-24 19:09:30 -03:00
Karl-Philipp Richter 28505a8624 Recommend StringBuilder next to StringBuffer
StringBuilder is a faster non-synchronized alternative to StringBuffer
which should be used where synchronization is not needed. Since "use
StringBuilder or StringBuffer" would immediately lead to the question
which one to use the hints "non-synchronized" and "synchronized" are
added.
2018-06-24 23:03:42 +02:00
Andreas Dangel 9e17867610 Use pmd-build-tools 1.2 2018-06-24 21:12:05 +02:00
Clément Fournier e113ed4994 Prop up Ncss report levels, allow greater configurability 2018-06-24 19:07:46 +02:00
Clément Fournier 9706cd0f23 Filter out Less files from resource copying 2018-06-24 18:39:08 +02:00
Andreas Dangel 913fe67db1 Corrections for PR review 2018-06-24 10:15:43 +02:00
Travis CI (pmd-bot) 85a2917e71 Update documentation 2018-06-24 04:49:37 +00:00
Juan Martín Sotuyo Dodero e3b195e753 Merge branch 'pr-836' 2018-06-24 01:39:42 -03:00
Juan Martín Sotuyo Dodero 7cb203b645 Update changelog, refs #836 2018-06-24 01:39:20 -03:00
Juan Martín Sotuyo Dodero 770657dbea New rules un 6.5.0 2018-06-24 01:39:06 -03:00
Juan Martín Sotuyo Dodero 8ee39deace Upgrade to 6.0.0 categories 2018-06-23 22:33:32 -03:00
Juan Martín Sotuyo Dodero d1b9d05a24 Merge branch 'master' into pr-836 2018-06-23 21:20:07 -03:00
Juan Martín Sotuyo Dodero b1655f8ebc Single declaration 2018-06-23 21:16:44 -03:00
Juan Martín Sotuyo Dodero 6f2b200bef Revert "merge"
This reverts commit fe5f0daef9.
2018-06-23 21:13:26 -03:00
Juan Martín Sotuyo Dodero f39865e014 Revert "Merge remote-tracking branch 'Up2Go/master'"
This reverts commit 96fd8fbca6, reversing
changes made to 4e0dd619b6.
2018-06-23 21:07:24 -03:00
Juan Martín Sotuyo Dodero ad26f8a0ef Merge branch 'pr-1195' 2018-06-23 19:03:35 -03:00
Juan Martín Sotuyo Dodero 9a33025d85 Merge branch 'pr-1197' 2018-06-23 18:11:27 -03:00
Andreas Dangel 10ecef850b Upgrade various maven plugins 2018-06-23 12:48:49 +02:00
Andreas Dangel fcfee1969e Fix javadoc warnings 2018-06-23 12:30:08 +02:00
Andreas Dangel b2d98f0a84 Upgrade maven to 3.5.4 2018-06-23 11:10:13 +02:00
Andreas Dangel 70a03a6a68 [java] UnnecessaryFullyQualifiedName: check for package name java.lang 2018-06-23 10:19:38 +02:00
Andreas Dangel c119d88aba Update release notes, refs #1174 2018-06-22 22:39:11 +02:00
Andreas Dangel b82e56158a [java] FormalComment - remove unnecessary check for comment prefix 2018-06-22 22:37:27 +02:00
Andreas Dangel 7221903f73 [java] Deprecated CommentUtil, move parts to AST Comment, fix FormalComment 2018-06-22 22:23:49 +02:00
Andreas Dangel 908d65f8c9 [java] CommentUtil: simplify trim method 2018-06-22 21:18:40 +02:00
Andreas Dangel 6a476698ad [java] CommentUtil: Use a single regex for filtering comment lines 2018-06-22 21:03:59 +02:00
Andreas Dangel f271c736c0 Fix checkstyle 2018-06-22 20:32:22 +02:00
Andreas Dangel 4e4c9a194d [java] UnnecessaryFullyQualifiedName: consider valid java.lang. FQCN usages 2018-06-22 20:00:11 +02:00
Andreas Dangel b5cb2bbb85 [java] Add Unit test for CommentUtil
Fixes #1174
2018-06-21 21:36:56 +02:00
Andreas Dangel 66882dca8d [java] UnnecessaryFullyQualifiedName doesn't detect java.lang FQ names as violations
Fixes #1186
2018-06-21 17:35:26 +02:00
Andreas Dangel a89d5413ab [ci] [docs] Improved detection for changes in documentation
Now only updating docs on sourceforge, if there are changes
2018-06-20 20:57:27 +02:00
Andreas Dangel d3482ecd58 [ci] [docs] Improved detection for changes in documentation 2018-06-20 20:08:30 +02:00
akshatbahety 9c71a70294 Minor Fix 2018-06-20 21:02:42 +05:30
akshatbahety 978d77a462 Minor Fix 2018-06-20 17:42:57 +05:30
Clément Fournier b76c00e493 Fix highlighting algo misplacing some style classes 2018-06-19 11:42:07 +02:00
Andreas Dangel 8f49328bfa [ci] [doc] Skip updating gh-pages, if only feed.xml changed 2018-06-19 09:04:08 +02:00
Andreas Dangel fb6b4aa883 Use DesignerStarter for Windows, too 2018-06-18 20:40:25 +02:00
Andreas Dangel fd3f58ba59 Simplified check if javafx is available before starting the designer 2018-06-18 20:38:56 +02:00
Clément Fournier ee971c2747 Revert disabling css logging
Doesn't compile on Java 9. We may be able to use reflection to bypass this,
but I leave it for future work
2018-06-17 15:12:42 +02:00
Clément Fournier f34cd37f73 Merge branch 'master' into designer-node-highlighting 2018-06-17 14:25:46 +02:00
Clément Fournier e1066fe5ae Reorder designer menus 2018-06-17 14:25:35 +02:00
Clément Fournier 76ecd31999 Unclutter designer console output
We turn off the css logger, and allow RichTextFX to access internal javafx API to avoid
the illegal access warning.
2018-06-17 14:15:05 +02:00
Andreas Dangel d1c82a1c0b Update release notes, refs #1193 2018-06-17 10:15:11 +02:00
Juan Martín Sotuyo Dodero b9bb042565 [doc] Fix Incremental Analysis page title 2018-06-16 22:49:43 -03:00
Clément Fournier cd5a039e3c Fix ExecutorService not shutdown 2018-06-17 02:10:33 +02:00
Andreas Dangel 0ed13477ad [ci] [doc] call git config for the freshly cloned repo 2018-06-16 22:47:20 +02:00
Andreas Dangel eb67eec4ad Update generated documentation 2018-06-16 22:35:52 +02:00
Clément Fournier 4054125252 Checkstyle 2018-06-16 22:29:08 +02:00
Andreas Dangel 6ed35c477b Merge branch 'pr-1162' 2018-06-16 22:25:32 +02:00
Clément Fournier cfe8790368 Merge branch 'master' into designer-node-highlighting 2018-06-16 22:25:31 +02:00
Andreas Dangel 1c523c08b2 Merge branch 'pr-1138' 2018-06-16 22:24:55 +02:00
Andreas Dangel 04fd520139 Update release notes, refs #1138, fixes #1119 2018-06-16 22:23:42 +02:00
Clément Fournier f8061db6ab PMD:check fix 2018-06-16 22:12:10 +02:00
Travis CI (pmd-bot) ae225e4c34 Update documentation 2018-06-16 18:07:52 +00:00
Clément Fournier ba4c71dd08 Touchup 2018-06-16 20:02:51 +02:00
Andreas Dangel 9bf3472159 Merge branch 'pr-1184' 2018-06-16 19:51:58 +02:00
Andreas Dangel b95efe2e1c Use String.format 2018-06-16 19:51:49 +02:00
Andreas Dangel 79efd28e2f Add missing escapes in release notes 2018-06-16 19:38:50 +02:00
Andreas Dangel 6afc424961 Merge branch 'pr-1155' 2018-06-16 19:38:32 +02:00
Andreas Dangel c20ed11512 Update release notes, refs #1155, fixes #667 2018-06-16 19:37:52 +02:00
Andreas Dangel 2d880807b6 Merge branch 'pr-1121' 2018-06-16 19:27:46 +02:00
Andreas Dangel 53ed213bdc dogfood: Only fail rules with priority 1 or 2 2018-06-16 17:50:19 +02:00
Andreas Dangel 5a7bbe19a2 dogfood: fix missing override
Note: the rule is disabled for pmd-xml, refs #1074
2018-06-16 17:48:36 +02:00
Andreas Dangel 2c987a2688 Upgrade m-pmd-p to 3.10.0 2018-06-16 15:12:14 +02:00
Clément Fournier 9708bf1e74 Remove StyleContext, split CustomCodeArea in two 2018-06-16 00:15:38 +02:00
Clément Fournier 45321f6328 Remove ability to disable XPath result highlighting 2018-06-16 00:15:38 +02:00
Clément Fournier bb237b94e4 Split secondary layer into error + name occurence 2018-06-16 00:15:38 +02:00
Clément Fournier f07c4f708c Factorise syntax highlighting stylesheet with Less 2018-06-16 00:15:38 +02:00
Clément Fournier f668262f39 Style updates are not queued anymore
This caused unexpected behaviour for dubious performance improvements
2018-06-16 00:15:38 +02:00
Clément Fournier abe79b2af4 Cache StyleCollection#toSpans
Cache hit rate is great when you're inspecting the AST or XPath results without changing the text
2018-06-16 00:15:38 +02:00
Clément Fournier 9d41d552c0 Prevent XPath from reeavaluating when the code is unparsable
It previously was reevaluated on an out-of-date compilation
unit. It makes no sense to keep an out-of-date root node in
the AstManager so we now use Optional to indicate there is
no compilation unit.
2018-06-16 00:15:38 +02:00
Clément Fournier ff34b7d1c7 Fix recentFiles always reverted 2018-06-16 00:15:38 +02:00
Clément Fournier 99ded1c500 Use icon pack for xpath toolbar 2018-06-16 00:15:38 +02:00
Clément Fournier 7deed84084 Documentation 2018-06-16 00:15:38 +02:00
Clément Fournier 0726616bc4 Fix highlighting twitching on rapid updates 2018-06-16 00:15:38 +02:00
Clément Fournier e58bfe2cba Cleanup 2018-06-16 00:15:38 +02:00
Clément Fournier 3d35bc3127 Add syntax highlighting to the XPath result listview 2018-06-16 00:15:38 +02:00
Clément Fournier 1e3f0ce85e Simplify the codeArea's interface 2018-06-16 00:15:38 +02:00
Clément Fournier 16ee4ce5fc Highlight focus node lines 2018-06-16 00:15:38 +02:00
Clément Fournier eea4403121 Better scroll to node on the editor
We scroll so that the node is made entirely visible
2018-06-16 00:15:38 +02:00
Clément Fournier 732cedcfb5 Fix bug with single node in span 2018-06-16 00:15:38 +02:00
Clément Fournier 5934f1be38 Highlight selected linenumber in the gutter 2018-06-16 00:15:38 +02:00
Clément Fournier 865412171f Use Less mixin to generate xpath style classes 2018-06-16 00:15:38 +02:00
Clément Fournier 6e406b89b7 Improve XPath violation display 2018-06-16 00:15:38 +02:00
Clément Fournier c5063cdd70 Use LESS to factorise stylesheets 2018-06-16 00:15:38 +02:00
Clément Fournier 4231d1aaf9 Add inline highlighting back 2018-06-16 00:15:38 +02:00
Clément Fournier f9a791a10c Fix some bugs, cleanup 2018-06-16 00:15:38 +02:00
Clément Fournier a78b01aaa6 Subtract previous syntax layer instead of recomputing everything 2018-06-16 00:15:38 +02:00
Clément Fournier 87c2c89da2 StyleCollection depth layering, use better algorithm 2018-06-16 00:15:38 +02:00
Clément Fournier 1fa46a5620 Treat syntax highlight specially, introduce NodeStyleSpan 2018-06-16 00:15:38 +02:00
Clément Fournier 3e4cf99e33 Cleanup 2018-06-16 00:15:38 +02:00
Clément Fournier 3aedc65444 Queue styling updates 2018-06-16 00:15:38 +02:00
Clément Fournier 5fc7a997da Fix highlighting wiped off by new changes 2018-06-16 00:15:38 +02:00
Clément Fournier b45789100a Fix bug 2018-06-16 00:15:38 +02:00
Clément Fournier 76445b13bb Highlighting XPath results doesn't autoscroll anymore
Styling improvements. The previous paradigm for highlighting nodes
was to change the fill and make it bold, I'm now more inclined to
change the background/box or just use bold weight for the focus
node.

With syntax highlighting, it's more readable
2018-06-16 00:15:38 +02:00
Clément Fournier a59c82e72a Allow to toggle the result highlighting on/off 2018-06-16 00:15:38 +02:00
Clément Fournier 9ff78a63d2 Outline XPath results with borders on the editor 2018-06-16 00:15:38 +02:00
Clément Fournier 0fd7f282f5 Highlight error nodes from the event log panel 2018-06-16 00:15:38 +02:00
akshatbahety 39ec32ea63 Minor Fix 2018-06-15 15:25:47 +05:30
akshatbahety 7e07208366 Minor fixes 2018-06-14 23:09:13 +05:30
akshatbahety 2db426fb0c Minor Removal Fix 2018-06-14 18:57:35 +05:30
akshatbahety 32136e0e9e Bug Fixes 2018-06-14 18:16:12 +05:30
akshatbahety 4bb34b1c8e Minor Update 2018-06-14 17:13:33 +05:30
akshatbahety 1e839a6c04 Display Autocomplete near carat , it's a hack 2018-06-14 03:22:18 +05:30
akshatbahety ee2678a210 Minor fixes , working on others 2018-06-14 00:28:43 +05:30
Andreas Dangel 5241ebf3cd Merge branch 'pr-1154' 2018-06-13 20:09:39 +02:00
Andreas Dangel 715cb8c4f7 Update release notes, refs #1154 2018-06-13 20:08:54 +02:00
Andreas Dangel 88ac2f5227 Use ASTAnyTypeDeclaration.getTypeKind() 2018-06-13 20:08:03 +02:00
akshatbahety 23d000536c Minor fixes 2018-06-13 17:29:27 +05:30
akshatbahety da24020ad9 Minor fixes 2018-06-13 16:42:10 +05:30
akshatbahety 3ec5136dd9 Highlight the suggestions , some bugs fixing them 2018-06-13 16:39:52 +05:30
akshatbahety 0447fd3ddb String Filter and Replace Update 2018-06-13 02:36:13 +05:30
akshatbahety a3d8a806a0 Minor Fixes , Fixed the AutoCorrect String Bug 2018-06-13 00:48:48 +05:30
akshatbahety 05a733d65d String Filtering , I think this is working 2018-06-12 20:45:16 +05:30
Clément Fournier 3c668afb33 Fix homepage internal links 2018-06-12 14:57:19 +02:00
akshatbahety a5c83089d3 Minor Fixes 2018-06-12 17:26:17 +05:30
akshatbahety a7113b79c4 Some PR Fixes as suggested , still working on others 2018-06-12 16:08:06 +05:30
Juan Martín Sotuyo Dodero 58a59222b0 Merge branch 'fp-unnecessary-modifier-enum' 2018-06-12 00:52:07 -03:00
Juan Martín Sotuyo Dodero eeca5bbf3a Update changelog, refs #1153 2018-06-12 00:51:25 -03:00
akshatbahety cbf8e6ac4a PR fixes 2018-06-12 06:07:55 +05:30
Clément Fournier 71ddcea0e7 Typo!! 2018-06-12 01:38:36 +02:00
Clément Fournier 22023ccfb5 Fix possible NPE 2018-06-12 00:27:30 +02:00
Clément Fournier 3a7e6815bf Update warning link 2018-06-12 00:24:36 +02:00
Clément Fournier c0077a2eed Create new incremental analysis page, make linking to CLI options possible 2018-06-12 00:22:38 +02:00
Clément Fournier 5cf60df09e Typo 2018-06-11 20:29:23 +02:00
Clément Fournier 77bd3e9510 Improvements for PR #1153 2018-06-11 20:28:00 +02:00
Clément Fournier 72cbfe630f Improve UnnecessaryModifier messages 2018-06-11 19:31:20 +02:00
akshatbahety 51e0180076 Minor Fixes 2018-06-11 14:42:40 +05:30
akshatbahety 2af2aaf74a Minor Changes 2018-06-11 05:13:54 +05:30
akshatbahety 48c4e2ae10 Basic functioning of autocomplete is ready 2018-06-11 04:57:04 +05:30
akshatbahety 44c464c961 Minor Update 2018-06-11 02:31:04 +05:30
akshatbahety 9770c8855d Got the String matching sorted 2018-06-11 02:04:32 +05:30
akshatbahety 7f99c20e1f Git issue 2018-06-10 19:03:55 +05:30
akshatbahety 67da35bf05 Minor Fixes 2018-06-10 18:56:12 +05:30
akshatbahety 2aaa468ba4 Minor Updates 2018-06-10 18:39:26 +05:30
akshatbahety 0a85e86e59 Made the changes as required , some pending 2018-06-10 18:30:18 +05:30
Juan Martín Sotuyo Dodero b7b31d16f6 Merge branch 'pr-1179' 2018-06-10 02:26:56 -03:00
Clément Fournier 178d42cc24 Checkstyle 2018-06-10 04:24:48 +02:00
Clément Fournier 577ad0faaa Forgot something 2018-06-10 04:14:55 +02:00
Clément Fournier 4aaab66c50 Merge branch 'master' into split-variableNamingConventions 2018-06-10 04:09:55 +02:00
Clément Fournier f0e0b3caa2 Moar reverting 2018-06-10 04:07:37 +02:00
Clément Fournier b08da58069 Rule messages can no longer be declared in Java
This caused problems with the RuleSetWriter. Schade.
2018-06-10 04:05:21 +02:00
Clément Fournier 82b4189bc5 Fix javadoc warning 2018-06-10 03:58:32 +02:00
Clément Fournier 735b8dfe37 Use better name 2018-06-10 03:41:22 +02:00
Clément Fournier b4c492d94f More doc 2018-06-10 03:35:52 +02:00
Clément Fournier 5cf7891d71 Add getXPathAttributes() to Node interface
Deprecate AttributeNode
2018-06-10 03:26:28 +02:00
Clément Fournier bf466b8b84 Document Attribute 2018-06-10 03:09:20 +02:00
Clément Fournier 9aacc4d206 Rearrange code 2018-06-10 03:03:57 +02:00
Clément Fournier 3a8febb200 Document AttributeAxisIterator 2018-06-10 03:00:45 +02:00
Juan Martín Sotuyo Dodero ab9aac28a2 Merge branch 'pr-1180' 2018-06-09 21:37:25 -03:00
Clément Fournier c3aa662b77 Add unit test 2018-06-10 02:23:30 +02:00
Clément Fournier 57d999c617 Use EventSource in the EventLogger 2018-06-10 02:17:25 +02:00
Juan Martín Sotuyo Dodero b9cb627483 Update changelog, refs #1173 2018-06-09 20:14:52 -03:00
Juan Martín Sotuyo Dodero 5219172267 [core] Fix broken concatenation on CPD GUI
- Fixes #1173
2018-06-09 20:14:02 -03:00
Juan Martín Sotuyo Dodero 914293daad Restrict upper bound of generic 2018-06-09 20:08:22 -03:00
Juan Martín Sotuyo Dodero 226d4c7c07 Merge branch 'pr-1163' 2018-06-09 20:06:55 -03:00
Juan Martín Sotuyo Dodero f0071f64fa Merge branch 'pr-1169' 2018-06-09 19:51:16 -03:00
Juan Martín Sotuyo Dodero c93b6c6812 Update changelog, refs #1169 2018-06-09 19:49:21 -03:00
Travis CI (pmd-bot) 5ffe69ee49 Update documentation 2018-06-09 21:49:08 +00:00
Juan Martín Sotuyo Dodero 3ca449426e Merge branch 'pr-1172' 2018-06-09 18:39:01 -03:00
Juan Martín Sotuyo Dodero 2ed1549eff Update changelog, refs #1172 2018-06-09 18:38:49 -03:00
Juan Martín Sotuyo Dodero 26a5dd625e Merge branch 'pr-1183' 2018-06-09 18:07:23 -03:00
Juan Martín Sotuyo Dodero eaf474209b Update changelog, refs #1183 2018-06-09 18:07:10 -03:00
jakehemmerle c6989507cd fixed typos 2018-06-09 11:52:59 -04:00
akshatbahety 6a88b5d671 The basic working is there the suggestions are being filtered on the text entered by the user but I think there could be a better way (maybe or maybe my approach is good) need to revamp somethings in the UI @oowekyala need some guidance here. 2018-06-09 18:02:17 +05:30
akshatbahety eddb9bedfe Xpath suggestions , under progress 2018-06-09 16:46:22 +05:30
Clément Fournier 4754bddafe Update release notes, refs #1159 2018-06-09 01:52:45 +02:00
Clément Fournier 2eebe2b07e Merge branch 'pr-1159' 2018-06-09 01:50:24 +02:00
Clément Fournier 1d4eb00ba3 Improve styling 2018-06-09 01:49:00 +02:00
Clément Fournier cb86f2a4b0 Take the chance to display attributes correctly in the designer 2018-06-08 21:47:33 +02:00
Clément Fournier 226de4875d Fix XML node length with autoclosing element 2018-06-08 21:40:53 +02:00
Clément Fournier 18df5835ff Fix Saxon not reading Xml attributes 2018-06-08 20:36:08 +02:00
Clément Fournier e533c54ffb Fix visitors not started 2018-06-08 19:43:23 +02:00
akshatbahety 7a6e40cd04 Start on the autocomplete feature made basic UI upgrade to show the popup items for suggestions working on positioning the context menu directly under the code 2018-06-08 21:45:16 +05:30
akshatbahety 2f730806fb Merge branch 'master' of https://github.com/pmd/pmd 2018-06-08 19:05:41 +05:30
akshatbahety 8380d3d5a9 Minor updates 2018-06-08 15:07:54 +05:30
akshatbahety 6fe9459d1c Minor updates 2018-06-08 14:30:19 +05:30
akshatbahety 84f9c9db32 Minor updates 2018-06-07 17:58:57 +05:30
akshatbahety 7fd3ba4679 Updates 2018-06-07 17:03:19 +05:30
Akshat Bahety 1de2313472 Typo 2018-06-07 16:54:29 +05:30
Akshat Bahety 6d2bbb0ede Classloader is completed. 2018-06-07 16:25:41 +05:30
Akshat Bahety c61fb73d7b Classloader is completed. 2018-06-07 16:24:31 +05:30
Akshat Bahety 5ae8e72930 Data flow is working properly thanks to @oowekyala for helping me out.
UI is upgraded to make sure buttons are active only when needed (will make a small addition to moveitem up and moveitem down button as discussed)
About the ClassLoader I am a bit confused about how to use `ClasspathClassLoader` I think will be able to merge it today before evening IST.
2018-06-07 04:24:19 +05:30
Andreas Dangel 92e74bb228 Use snapshot build of pmd-build-tools 2018-06-05 22:36:07 +02:00
Akshat Bahety 30f63266fe added the Cancel button
the list needs to be updated in the popup to make the data flow as required
working on validation and left out a couple of changes due to some reasons
2018-06-05 21:56:57 +05:30
Clément Fournier 7eaffe1088 Checkstyle 2018-06-05 05:27:40 +02:00
Clément Fournier 6ae7df6e95 Check if enum switch is exhaustive 2018-06-05 03:01:01 +02:00
Clément Fournier fafd851e20 WIP, whitelists all enums 2018-06-05 00:48:28 +02:00
Clément Fournier cc5a99b232 Last touch 2018-06-04 23:45:06 +02:00
Clément Fournier 45ea598337 Fix highlighter 2018-06-04 23:09:37 +02:00
Clément Fournier 4e29b793d2 Fix ConcurrentModificationException on designer
It was triggered when restoring multiple properties,
since the items where added to a collection that was
being iterated.

Also fix a small bug when creating a property named
TODO -> the next property was allowed to be called
TODO if the name wasn't changed, since the name field
wasn't changed, so didn't trigger reevaluation of the
validators.
2018-06-04 00:47:45 +02:00
Akshat Bahety 9b341a62b6 UI Updates. 2018-06-02 19:14:07 +05:30
Matthew Duggan a7cec0d48d Update stylesheets with a default namespace (Fixes #1168) 2018-06-02 14:00:17 +09:00
Travis CI (pmd-bot) eaa907cd36 Update documentation 2018-06-01 17:42:29 +00:00
Juan Martín Sotuyo Dodero f00bfc6370 Merge branch 'pr-1165' 2018-06-01 14:30:41 -03:00
Akshat Bahety 7e1d36ba06 List can be reordered , I'll update the UI by day's end.
I need to still test the classPathLoader @jsotuyod some guidance needed here.
2018-06-01 17:36:44 +05:30
Akshat Bahety 705e007bd7 List can be reordered , I'll update the UI by day's end.
I need to still test the classPathLoader @jsotuyod some guidance needed here.
2018-06-01 17:35:40 +05:30
Andreas Dangel 9bb638fef2 Reformatting 2018-06-01 09:38:15 +02:00
Andreas Dangel 439624319a [ecmascript] InnaccurateNumericLiteral false positive with hex literals
Fixes #861
2018-06-01 09:38:08 +02:00
Clément Fournier da90b25859 Fix tests 2018-05-31 17:59:12 +00:00
Clément Fournier f65e67e3bd Add space 2018-05-31 17:52:31 +00:00
Andreas Dangel f74b7194a4 Fix site.url 2018-05-31 13:11:45 +02:00
Andreas Dangel 9df2aed725 Add logging 2018-05-31 13:06:39 +02:00
Andreas Dangel 0263f658c6 Merge branch 'master' into improve-doc-site-navigation 2018-05-31 13:04:53 +02:00
Andreas Dangel 39ca8e2e51 Make the commit quiet 2018-05-31 13:03:20 +02:00
Andreas Dangel eed145b53a Updated gems 2018-05-31 12:57:05 +02:00
Andreas Dangel 362b1798cf Revert Gemfile - using group ":jekyll_plugins" disables local plugins 2018-05-31 12:56:51 +02:00
Andreas Dangel cce2ede528 Push the generated site to gh-pages branch 2018-05-31 12:41:00 +02:00
Andreas Dangel b2a7448974 Update release notes, refs #869 2018-05-31 11:08:42 +02:00
Andreas Dangel 7b54c5a6c9 [java] GuardLogStatement false positive with something.error on return
Fixes #869
2018-05-31 11:07:10 +02:00
Andreas Dangel d86891da85 [java] GuardLogStatement false positive with Math.log
Fixes #869
2018-05-31 10:29:07 +02:00
Clément Fournier f8ee148f68 Add XPath syntax highlighter to Rouge
This is only used when building the site, like the Liquid extensions
2018-05-31 10:20:00 +02:00
Akshat Bahety 8b553ff53d UI Upgrades (understood that we need the components to be scalable will push that in next commit , and rename the fx:id too ) , dropped the list. 2018-05-31 12:05:36 +05:30
Clément Fournier 63e22779bc Enforce fx:id naming convention
Refs pmd/build-tools#7
2018-05-31 07:41:38 +02:00
Juan Martín Sotuyo Dodero 48861e1da2 Merge branch 'pr-1161' 2018-05-30 20:52:17 -03:00
Juan Martín Sotuyo Dodero 6035620bdb Update changelog, refs #1161 2018-05-30 20:51:08 -03:00
Akshat Bahety 8d24a06385 Updated the UI (still some work left) , Working on the fileNames in the list view , about the UI I think this shouldn't be scalable as the components would be just too much out of place , and about showOpenMultipleDialog there need to be a cast in place which throws an exception so I have kept the showOpenDialog till now. Will be working on classPathGenerator tomorrow. 2018-05-31 02:42:56 +05:30
Clément Fournier e4b9befd44 Fix issue 1158 2018-05-30 22:41:06 +02:00
Andreas Dangel 677cf9a298 Change starter script to support early access java builds 2018-05-30 22:09:01 +02:00
Clément Fournier 9a935d8ae3 Merge branch 'pr-1156' 2018-05-30 21:50:16 +02:00
Akshat Bahety eefecf692a Merge branch 'master' of https://github.com/akshatbahety/pmd 2018-05-30 22:39:36 +05:30
Akshat Bahety b16b8f9ccb Merge remote-tracking branch 'upstream/master' 2018-05-30 22:30:50 +05:30
Clément Fournier 95ac9691d3 Fix NPE, controller not found 2018-05-30 18:29:48 +02:00
Clément Fournier ab536988d8 Fix starter script
It didn't consume correctly trailing info (eg date on java 10).
This is a horribly mistake and makes the script fail on a JRE 10.
We could consider updating the binary distribution for 6.4.0...
@jsotuyod @adangel
2018-05-30 17:58:46 +02:00
Travis CI (pmd-bot) 753a8d236d Update documentation 2018-05-30 14:54:04 +00:00
Juan Martín Sotuyo Dodero 0c52c6520e Merge branch 'pr-1157' 2018-05-30 11:40:37 -03:00
Akshat Bahety 61a5d1494b auxClassPath UI 2018-05-30 15:21:37 +05:30
Andreas Dangel 81c5051832 Fixes #715: [xml] ProjectVersionAsDependencyVersion false positive 2018-05-30 09:23:00 +02:00
Andreas Dangel fddd0d84af Merge branch 'pr-1152' 2018-05-30 09:01:11 +02:00
Andreas Dangel eced574622 Minor tweaks for release script: RELEASE_RULESET var and more header lines for release_notes_old.md 2018-05-30 09:01:00 +02:00
Juan Martín Sotuyo Dodero 26b942d529 [ci] Use latest pmd on self 2018-05-30 01:21:21 -03:00
Juan Martín Sotuyo Dodero 148c3651fc [java] AtLeastOneConstructor supports Lombok
- Lombok annotations that create a constructor whitelist the class
 - Take the chance to cover a bunch of other FNs
 - Improve documentation on the rule
 - Some other minor improvements
 - Fixes #667
2018-05-30 01:20:13 -03:00
Juan Martín Sotuyo Dodero 78c437bf93 Checkstyle fixes 2018-05-30 00:02:57 -03:00
Juan Martín Sotuyo Dodero 286ee2906b [java] Fix FP with CommentDefaultAccessModifierRule
- Enum constructors should not be reported, even if nested
 - Nested annotation members should not be reported
2018-05-29 23:40:47 -03:00
Juan Martín Sotuyo Dodero 094430679c [java] Fix FN in UnnecessaryModifierRule
- Enum constructors are inherently private, no need to add that
modifier
2018-05-29 23:06:31 -03:00
Juan Martín Sotuyo Dodero e3065c388e Automatically update release_notes_old.md 2018-05-29 17:42:27 -03:00
Juan Martín Sotuyo Dodero d333cc87be Make sure to include the release ruleset if necessary 2018-05-29 17:11:40 -03:00
Juan Martín Sotuyo Dodero 59d7834df1 Fix release ruleset name 2018-05-29 16:55:12 -03:00
Juan Martín Sotuyo Dodero 191b887ff1 Run in batch mode 2018-05-29 16:43:58 -03:00
Juan Martín Sotuyo Dodero 32c34d43cb Automatically reset the release notes 2018-05-29 16:08:48 -03:00
Juan Martín Sotuyo Dodero 9e86b00968 Clean backup poms after release 2018-05-29 15:56:45 -03:00
Juan Martín Sotuyo Dodero 3edb87360a Add new ruleset for 6.4.0 new rules 2018-05-29 15:32:30 -03:00
Juan Martín Sotuyo Dodero 31667cdb89 Fix reference to sitemap_generator.sh 2018-05-29 14:56:54 -03:00
Juan Martín Sotuyo Dodero 7aea5b126f Prepare next development version 2018-05-29 14:05:00 -03:00
Juan Martín Sotuyo Dodero a788d4b586 [maven-release-plugin] prepare for next development iteration 2018-05-29 13:58:54 -03:00
Juan Martín Sotuyo Dodero e9d78ede3c [maven-release-plugin] prepare release pmd_releases/6.4.0 2018-05-29 13:58:44 -03:00
Juan Martín Sotuyo Dodero 7a1207323d Prepare pmd release 6.4.0 2018-05-29 13:47:13 -03:00
Juan Martín Sotuyo Dodero 50aa05ffa3 Add missing deprecations to changelog 2018-05-29 13:28:08 -03:00
Juan Martín Sotuyo Dodero 805aa8a9dc Merge branch 'pr-1073' 2018-05-29 13:21:56 -03:00
Juan Martín Sotuyo Dodero 45a390aafb Update changelog 2018-05-29 13:21:34 -03:00
Juan Martín Sotuyo Dodero 5359f4d89d Minor review improvements 2018-05-29 13:19:58 -03:00
Andreas Dangel 1b190be3b1 Replace nbsp (U+00A0) with normal space (U+0020)
Avoiding bash error:
run.sh: line 82: $'[\302\240pmd': command not found
2018-05-28 21:54:32 +02:00
Andreas Dangel 3c6a292407 Merge branch 'master' into java10-basic-support 2018-05-28 21:28:12 +02:00
Andreas Dangel a46288547d Rework "var" support for java10 using void production for LocalVariableType 2018-05-28 21:18:59 +02:00
Andreas Dangel 0b0479d7c0 Prevent using "var" as type name, annotation name or enum with Java 10 2018-05-28 20:07:10 +02:00
Andreas Dangel 4b096b4f96 Don't return "var" as typeImage for inferred variable types 2018-05-28 19:38:16 +02:00
Juan Martín Sotuyo Dodero 47286ac8c5 Merge pull request #1135 from adangel/ci-scripts
Update to ci scripts
2018-05-27 17:53:18 -03:00
Clément Fournier 9391483180 Merge branch 'master' into improve-doc-site-navigation 2018-05-27 20:12:25 +02:00
Clément Fournier c0a0f577bb Fix titlemaker bug 2018-05-27 20:10:15 +02:00
Clément Fournier 3465b1a77c Add description to index page 2018-05-27 20:08:43 +02:00
Clément Fournier a6062bd5a4 Merge branch 'pr-1148' 2018-05-27 18:05:28 +02:00
Clément Fournier e6b141c30d Update release notes, refs #1148 2018-05-27 18:04:23 +02:00
Clément Fournier 3aa703e7d0 Improve doc 2018-05-27 17:58:04 +02:00
Travis CI (pmd-bot) 6b23baf659 Update documentation 2018-05-27 08:49:06 +00:00
Andreas Dangel 879727b653 Merge branch 'pr-1149' 2018-05-27 10:27:55 +02:00
Andreas Dangel 540c1e22a4 Update release notes, refs #1149 2018-05-27 10:27:42 +02:00
Juan Martín Sotuyo Dodero 456bd44c62 [java] Fix doc for CommentDefaultAccessModifierRule
- We now create docs from the properties registered on the class, so
the default was undocumented. Therefore, I moved the default from XML to
code
 - I take the chance to convert the property to a RegexProperty as it's
most apropriate
 - I take the chance to allow `/* package */` as valid too by default
2018-05-27 04:21:31 -03:00
Andreas Dangel 932517bb79 Merge branch 'pr-1133', fixes #1131 2018-05-27 08:59:33 +02:00
Juan Martín Sotuyo Dodero bc7c31fc96 Update changelog 2018-05-26 20:16:40 -03:00
Juan Martín Sotuyo Dodero 989126ba9b Use ClassUtils to load classes 2018-05-26 20:12:09 -03:00
Juan Martín Sotuyo Dodero 15c2eb928b Merge pull request #1117 from oowekyala/issue1108-refactor-premature-declaration
[java] Refactor PrematureDeclaration
2018-05-26 19:23:45 -03:00
Juan Martín Sotuyo Dodero 2eb0f39546 Improve release notes 2018-05-26 18:57:57 -03:00
Juan Martín Sotuyo Dodero 61677e6ee9 Update changelog, refs #1131 2018-05-26 18:06:57 -03:00
Juan Martín Sotuyo Dodero 6fa5a45e62 Improvements for consistency 2018-05-26 18:05:37 -03:00
Juan Martín Sotuyo Dodero dd6ef52289 Remove usage of deprecated methods 2018-05-26 18:00:48 -03:00
Juan Martín Sotuyo Dodero 7ce534134f Update changelog 2018-05-26 17:43:26 -03:00
Andreas Dangel ba55164b2f Merge branch 'pr-1141' 2018-05-26 22:37:04 +02:00
Juan Martín Sotuyo Dodero 0e7d210bed Update docs 2018-05-26 17:30:18 -03:00
Clément Fournier 929c2dfba2 Corrections for PR #1141 2018-05-26 21:54:39 +02:00
Clément Fournier e13c9f3fff Fix designer bug with language selection
The autorefresh didn't take into account the case where the language or XPath version
changes, making the choiceboxes useless
2018-05-26 21:41:16 +02:00
Andreas Dangel ff0a26633c There doesn't seem to be an "eval" available with that version 2018-05-26 21:32:27 +02:00
Andreas Dangel 175b4285d3 [doc] Update gems 2018-05-26 21:31:19 +02:00
Clément Fournier 8080afe101 Update release notes, refs #1137 2018-05-26 21:18:05 +02:00
Clément Fournier db50f9fb60 Merge branch 'pr-1137' 2018-05-26 21:15:00 +02:00
Clément Fournier 14e575de33 Cleanups
Formatting, a bit of doc, add padding around labels in UI
2018-05-26 21:14:30 +02:00
Juan Martín Sotuyo Dodero 0e44b279f7 Fix AvoidThrowingRawExceptionTypes 2018-05-26 14:48:26 -03:00
Akshat Bahety b63321ab9c Updates 2018-05-26 22:58:55 +05:30
Andreas Dangel 6a4306aee5 Merge branch 'pr-1147' 2018-05-26 19:23:46 +02:00
Andreas Dangel 8963b084a7 Update release notes, fixes #1145, refs #1147 2018-05-26 19:23:11 +02:00
Andreas Dangel 89a3b6b991 Move comment about why PMDParameter.RulePriorityValidator needs to be public static 2018-05-26 19:22:20 +02:00
Akshat Bahety 46951e362a Updates 2018-05-26 19:14:23 +05:30
Juan Martín Sotuyo Dodero 7572a49d35 [java] Deprecate the old typeof function
- Have new functions typeIs() and typeIsExactly() with simpler syntaxes
 - Nag about the deprecated usage of the old method
 - Replace all internal usages with the new one
 - Have the functions use the TypeHelper to avoid multiple separate
implementations of the same behavior
 - Tidy up a little the TypeHelper
2018-05-26 06:01:56 -03:00
Clément Fournier 3c3883ef8b Fix designer XPath panel popup showing up on double click
It was very easy to trigger accidentally and was annoying
2018-05-26 08:36:21 +02:00
Akshat Bahety 1efe2ad87d Code Format 2018-05-26 10:17:47 +05:30
Akshat Bahety 830809e91b Auto XPath Expression Update 2018-05-26 09:52:12 +05:30
Clément Fournier 401ef67fe1 Prettify Suppressing warnings 2018-05-25 20:47:59 +02:00
Clément Fournier 68c2228248 Prettify CPD page, add sample CPD usage to quickstart page 2018-05-25 20:39:14 +02:00
Akshat Bahety f07f0b8fff Merge branch 'master' of https://github.com/pmd/pmd 2018-05-25 22:51:06 +05:30
Clément Fournier c6367a84d8 Fix JCommander help for -min option 2018-05-25 18:35:20 +02:00
Clément Fournier dcd05a7e5b Fix bug with XPath exceptions in the designer
They would be logged to stderr and not forwarded to the event log
2018-05-25 04:12:05 +02:00
Clément Fournier c145ff5d3f render_markdown filter 2018-05-25 03:16:01 +02:00
Clément Fournier de080f02e4 Improve CLI reference 2018-05-25 03:02:37 +02:00
Akshat Bahety 6f2cbfc613 Removed RefreshAST from Designer 2018-05-25 00:43:31 +05:30
Andreas Dangel 19d65171bd Rename colors.sh -> logger.sh 2018-05-24 19:20:12 +02:00
Andreas Dangel 281f151197 Use log_info, log_error, log_success functions instead of the colors 2018-05-24 19:18:57 +02:00
Juan Martín Sotuyo Dodero ec015d5604 Merge pull request #1144 from oowekyala/update-issue-template
[core] Update issue template
2018-05-24 13:22:19 -03:00
Clément Fournier eb21f3189d Small improvements 2018-05-24 17:58:54 +02:00
Clément Fournier a66064446a Update issue template 2018-05-24 17:24:52 +02:00
Clément Fournier ae8a26c22d Change index title 2018-05-24 17:23:44 +02:00
Travis CI (pmd-bot) fcd38e3932 Update documentation 2018-05-24 14:37:58 +00:00
Juan Martín Sotuyo Dodero 56e4605eae Merge branch 'pr-1134' 2018-05-24 11:24:59 -03:00
Juan Martín Sotuyo Dodero c42b39315f Update changelog, refs #1134 2018-05-24 11:24:38 -03:00
Andreas Dangel 206b389974 Update release notes for 6.4.0 - This is a minor release. 2018-05-24 08:30:07 +02:00
Clément Fournier cf0eb9a9bd Checkstyle 2018-05-24 03:58:29 +02:00
Clément Fournier f26e982b7f Update release notes, refs #1141 2018-05-24 01:37:21 +02:00
Clément Fournier 463c1c03cd Fix #1114 - Star import overwritten by explicit import is not correctly handled 2018-05-24 01:33:01 +02:00
Clément Fournier fbd58c14d5 Make tests more readable 2018-05-24 01:25:34 +02:00
Clément Fournier f463038327 Cleanup UnnecessaryFQN 2018-05-24 01:25:31 +02:00
Clément Fournier 3e159310d2 Document ASTImportDeclaration 2018-05-24 01:10:20 +02:00
Akshat Bahety beabf09339 Checkstyle Updates 2018-05-24 02:20:46 +05:30
Akshat Bahety b4b22e96b8 Checkstyle Updates 2018-05-24 01:03:44 +05:30
Clément Fournier c80cfd6113 Corrections for PR #1134 2018-05-23 21:25:22 +02:00
Travis CI (pmd-bot) ebf00fc7cf Update documentation 2018-05-23 18:40:20 +00:00
Andreas Dangel 3a65e5059c Merge branch 'pr-1140' 2018-05-23 20:22:23 +02:00
Andreas Dangel f300d4713b Update release notes, fixes #720, refs #1140 2018-05-23 20:22:14 +02:00
Clément Fournier 0fa74aacfb Improve test readability 2018-05-23 19:41:04 +02:00
Clément Fournier 9cc8068881 Whitelist lambda parameters 2018-05-23 19:38:06 +02:00
Clément Fournier 5ecf60b73c Refactor ShortVariable
No change in functionality, but less wasted tests
2018-05-23 19:32:22 +02:00
Clément Fournier 89bc6c94c8 Whitelist main classes with private static fields 2018-05-23 17:13:44 +02:00
Clément Fournier 8e1ff80573 Allow Helper as a suffix 2018-05-23 17:06:58 +02:00
Clément Fournier 5ea314bc74 Update pmd-doc tests 2018-05-23 16:31:29 +02:00
Clément Fournier c75a209d31 Fix some display issues with Bootstrap grid, rewrite index summary
Update 404.md
2018-05-23 16:10:16 +02:00
Clément Fournier 5da6525276 Corrections for PR 2018-05-23 04:03:31 +02:00
Clément Fournier cbfd39b7ca Revert to simple shuffle layout 2018-05-23 02:44:30 +02:00
Clément Fournier 56bcc6f700 Add knowledge base style filter buttons 2018-05-23 02:42:01 +02:00
Akshat Bahety 7d5b44cd8a Merge Conflicts 2018-05-23 02:18:04 +05:30
Akshat Bahety c272f5251d Removes the need to use RefreshAST every time 2018-05-23 02:03:40 +05:30
Andreas Dangel fef93eec64 [ci] Add webhooks build notification for gitter 2018-05-22 20:40:37 +02:00
Andreas Dangel 8d21a855e5 Update default snapshot documentation url, use github 2018-05-22 20:31:45 +02:00
Andreas Dangel ac9f0ac1d4 [ci] Add colors, don't fail the build/release if upload to sourceforge fails 2018-05-22 20:29:32 +02:00
Andreas Dangel 958c509209 [ci] Upload the generated documentation to pmd.sourceforge.net as well 2018-05-22 20:29:32 +02:00
Clément Fournier 392998e4a3 Cleanup 2018-05-22 17:09:26 +02:00
Clément Fournier f5a0750557 Ignore main method when detecting utility classes 2018-05-22 16:17:10 +02:00
Clément Fournier 1140c1ec56 Allow Utils as suffix 2018-05-22 16:06:19 +02:00
Clément Fournier fe8752bf67 update tests 2018-05-22 15:49:43 +02:00
Clément Fournier ce0f151c66 Update codestyle.xml 2018-05-22 15:46:32 +02:00
Clément Fournier 56339f6793 Update rule desc 2018-05-22 15:45:34 +02:00
Clément Fournier 9e7aceed56 Allow numbers in utility class names by default
Refs #1065
2018-05-22 15:41:26 +02:00
Travis CI (pmd-bot) 72f5539a8b Update documentation 2018-05-22 04:58:32 +00:00
Juan Martín Sotuyo Dodero d846fc5b51 Merge branch 'pr-1129' 2018-05-22 01:48:35 -03:00
Juan Martín Sotuyo Dodero f06603fc67 Update changelog, refs #1129 2018-05-22 01:48:20 -03:00
Juan Martín Sotuyo Dodero c3dcb70e9c Further improvements 2018-05-22 01:45:13 -03:00
Karl-Philipp Richter 16ad6904bd Adjust InefficientEmptyStringCheck documentation
InefficientEmptyStringCheckRule.java and the corresponding section
both contain information which the other doesn't. The class Javadoc and
the description section in performance.xml has thus been adjusted.
2018-05-22 06:40:25 +02:00
Juan Martín Sotuyo Dodero aa2f8b70f1 [java] improve how we deal with broken classes 2018-05-22 01:34:37 -03:00
Juan Martín Sotuyo Dodero c417d68191 Merge branch 'pr-1126' 2018-05-21 17:00:10 -03:00
Juan Martín Sotuyo Dodero 9ebf624ccb Update changelog, refs #1126 2018-05-21 16:59:22 -03:00
Clément Fournier 5485d08630 Order shuffle panels w.r.t the sidebar ordering 2018-05-21 16:49:12 +02:00
Andreas Dangel 6392642692 Fix release notes, take 2 2018-05-21 15:08:44 +02:00
Andreas Dangel c85365798b Fix release notes 2018-05-21 15:07:08 +02:00
Andreas Dangel b808da70a0 Update documentation 2018-05-21 15:03:29 +02:00
Andreas Dangel 4138cdc018 Merge branch 'pr-966' 2018-05-21 14:57:34 +02:00
Andreas Dangel 43f9237e63 Update release notes, fixes #955, refs #966 2018-05-21 14:55:16 +02:00
Andreas Dangel af7a8b3eb6 Merge branch 'pr-1123' 2018-05-21 13:45:20 +02:00
Travis CI (pmd-bot) edbc1f479a Update documentation 2018-05-21 11:36:09 +00:00
Andreas Dangel c95428d27a Merge branch 'pr-1046' 2018-05-21 13:12:24 +02:00
Andreas Dangel 430238113c Update release notes, refs #1046 2018-05-21 12:59:38 +02:00
Andreas Dangel b3460f6951 whitespaces, javadoc 2018-05-21 12:53:51 +02:00
Andreas Dangel f14fbd02b5 Rework InsecureCryptoIvRule to use RuleChain on AllocationExpression
No need for Util. Use Symbol Table instead.
2018-05-21 12:46:29 +02:00
Andreas Dangel e9f6668c9b Rework HardCodedCryptoKeyRule to use RuleChain on AllocationExpression and symbol table 2018-05-21 12:40:34 +02:00
Andreas Dangel af250c3503 whitespaces 2018-05-21 11:56:23 +02:00
Clément Fournier dacb0c2e61 Add some more panels to the shuffle page 2018-05-21 11:54:10 +02:00
Clément Fournier 918a812d92 Add logic to exclude some pages based on some tags 2018-05-21 11:54:10 +02:00
Clément Fournier bb51792ba7 Add shuffle animations to landing page 2018-05-21 11:54:10 +02:00
Clément Fournier 36d07a5060 Update tags all over 2018-05-21 11:54:10 +02:00
Clément Fournier c3a74507c6 Brush up Suppressing warnings 2018-05-21 11:54:10 +02:00
Clément Fournier 04b0859fb2 Merge Understanding rulesets into Making rulesets 2018-05-21 11:54:10 +02:00
Clément Fournier 891df94c49 Fix header level 2018-05-21 11:54:10 +02:00
Clément Fournier 29e4ce1314 You should transform "using rule properties" to a whole "configuring rules" page 2018-05-21 11:54:10 +02:00
Clément Fournier 8f43350b64 Rewrite understanding_rulesets.md, needs merging with making_rulesets.md 2018-05-21 11:54:10 +02:00
Clément Fournier 457ba978b5 Update tags, make CLI reference page 2018-05-21 11:54:10 +02:00
oowekyala 34ddf6a2ef Added installation page as quickstart 2018-05-21 11:54:10 +02:00
Clément Fournier 1993fce431 Create parameterised include for shuffle panel
Also added some liquid extensions
2018-05-21 11:54:10 +02:00
Clément Fournier 9924bd8bfe Landing page is WIP, add some tags to languages 2018-05-21 11:54:10 +02:00
Andreas Dangel ac7b94aaa2 The rule is new with 6.4.0. Sort alphabetically 2018-05-21 11:52:11 +02:00
Andreas Dangel 4d31d1fb04 whitespaces 2018-05-21 11:51:24 +02:00
Andreas Dangel 1ee12a4792 Merge branch 'pr-1080'
Fixes #1018
2018-05-21 11:39:21 +02:00
Andreas Dangel ae3900451e [ui] add "var" as keyword for syntax highlighter 2018-05-21 11:26:26 +02:00
Andreas Dangel a305f78e26 [java] Reuse isTypeInferred of ASTTYpe for variables 2018-05-21 11:17:25 +02:00
Andreas Dangel 8f4b2647c4 Merge branch 'master' into java10-basic-support 2018-05-21 10:07:05 +02:00
Karl-Philipp Richter 1f18181ef5 Improve implementation hint in InefficientEmptyStringCheck
The alternative implementation mentions iterating over the string and
checking for whitespace which is pretty clear, however, showing the
implementation doesn't hurt, nor does the hint for Apache
commons-lang's StringUtils.isBlank which does exactly that.

The if statement in the demonstration of inefficient code can lead to
confusion because users _might_ think that the check is only
inefficient inside an if statement although it's clear from the
description that it's not.
2018-05-21 06:15:17 +02:00
Juan Martín Sotuyo Dodero 625431f8b1 Remove unnecessary log 2018-05-20 20:33:26 -03:00
Travis CI (pmd-bot) 1d3906356d Update documentation 2018-05-20 06:10:48 +00:00
Juan Martín Sotuyo Dodero 75ea178df4 Merge branch 'pr-1053' 2018-05-20 02:55:25 -03:00
Juan Martín Sotuyo Dodero 998dd2d3ee Merge branch 'pr-1111' 2018-05-20 02:48:22 -03:00
Juan Martín Sotuyo Dodero a4e4acb4d9 Simplify code 2018-05-20 02:43:18 -03:00
Juan Martín Sotuyo Dodero 3bbebdcabd Fix checkstyle 2018-05-20 02:32:10 -03:00
Juan Martín Sotuyo Dodero 7a23ca638a Avoid NPE
- Fix a bunch of errors in message building along the way
2018-05-20 02:25:58 -03:00
Clément Fournier a4ea6f8fb5 Multiple improvements and bug corrections in VariableDeclaratorId 2018-05-20 01:09:24 +02:00
Clément Fournier 07b8c4f9b2 Merge branch 'pr-1068' 2018-05-20 01:09:10 +02:00
Clément Fournier a0ed10c0e7 Update release notes, refs #1075 2018-05-19 23:53:54 +02:00
Clément Fournier bb1dd661db Merge branch 'pr-1075' 2018-05-19 23:43:44 +02:00
Juan Martín Sotuyo Dodero 4e7c778d3a Merge branch 'pr-1122' 2018-05-19 13:42:59 -03:00
Andreas Dangel 25f51db8d7 [java] Parser Error / Nullpointer when analyzing local generic class 2018-05-19 14:33:30 +02:00
Andreas Dangel bdb48a963f whitespace 2018-05-19 14:09:32 +02:00
Andreas Dangel f5f07220ad [java] Fix NPE in InsecureCryptoIvRule 2018-05-19 14:06:02 +02:00
Andreas Dangel 1211e88363 [java] Fix null pointer with local vars in type resolution 2018-05-19 13:25:08 +02:00
Andreas Dangel 17fc7fae5a [java] Fix NPE with ForLoopCanBeForeachRule when using this 2018-05-19 12:02:11 +02:00
Andreas Dangel 0b90fd0154 [java] Fix processing error with Cast + MethodReference
Occurred in https://github.com/spring-projects/spring-framework/blob/master/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java#L746
2018-05-19 10:29:20 +02:00
Clément Fournier 059b0f15c0 Abstract functionality of naming conventions rules 2018-05-19 00:19:14 +02:00
Juan Martín Sotuyo Dodero 38f758cf26 Merge branch 'pr-1118' 2018-05-18 19:09:04 -03:00
Clément Fournier 4f6150548e Fix bug with getImage overriding 2018-05-18 21:42:18 +02:00
Andreas Dangel f80dc37e6c Merge branch 'pr-1116' 2018-05-18 21:10:43 +02:00
Andreas Dangel 8747d3e395 Merge branch 'pr-1113' 2018-05-18 21:08:24 +02:00
Clément Fournier fb4bf5f4c7 Fix a couple of typos & checkstyle warnings 2018-05-18 21:08:03 +02:00
Clément Fournier c10d920248 Fix implementation of isFindBoundary, add some doc 2018-05-18 21:00:35 +02:00
Clément Fournier d1ce28d0c9 Fix wrong implementation of hasImageEqualTo 2018-05-18 20:54:43 +02:00
Clément Fournier bf10765b0b Update release notes, refs #1116 2018-05-18 18:52:01 +02:00
Clément Fournier 8f9a8d9cb4 Remove invalid doc for multifile analysis 2018-05-18 18:50:10 +02:00
Clément Fournier 9eefc901e4 Fix link to CONTRIBUTING.md
Closes #1112
2018-05-18 14:36:52 +02:00
Clément Fournier 8c34397397 Use "latest" in sitemap instead of the other 2018-05-18 02:19:20 +02:00
Clément Fournier cc9bd77560 Use standard output instead of hardcoding output file 2018-05-18 02:10:41 +02:00
Clément Fournier 3687f9308e Plug into release.sh 2018-05-18 01:51:05 +02:00
Clément Fournier b22467e32a Add index pages 2018-05-18 01:32:42 +02:00
Clément Fournier 1272f597e6 Simplify, "latest" dir is ignored 2018-05-18 01:18:09 +02:00
Clément Fournier f7f11990ad First version, with two loops 2018-05-18 01:16:02 +02:00
Clément Fournier 3062397c95 Add test case for premature decl inside lambda 2018-05-17 23:34:14 +02:00
Clément Fournier 3a572e4a0f Add todo for faster impl of hasDescendantOfAnyType 2018-05-17 23:26:30 +02:00
Clément Fournier 69c8af287a Fix a random false negative 2018-05-17 23:21:00 +02:00
Clément Fournier 7fb2641153 Simplify rule 2018-05-17 23:20:58 +02:00
Clément Fournier eb4610c0fc Add regression test case, refs #1108 2018-05-17 23:08:25 +02:00
Andreas Dangel 787d62420c Fix unit test, handle Pattern special 2018-05-17 21:00:05 +02:00
Andreas Dangel 61ce9ca3b3 Update changelog, refs #1111 2018-05-17 20:36:09 +02:00
Andreas Dangel 69fc648edd [java] JUnit4TestShouldUseTestAnnotation
*   use xpath 2.0
*   add new regex parameter
*   use typeof
2018-05-17 20:35:58 +02:00
Andreas Dangel dcf73bf91a [java] False Alarm of JUnit4TestShouldUseTestAnnotation on Predicates
Fixes #572
2018-05-17 16:32:47 +02:00
Travis CI (pmd-bot) 699a8fe099 Update documentation 2018-05-17 12:00:39 +00:00
Clément Fournier cb6b8277e4 Merge branch 'pr-1101' 2018-05-17 13:48:49 +02:00
Clément Fournier b93320f723 Update release notes, refs #1101
Closes #1021
2018-05-17 13:47:24 +02:00
Akshat Bahety 6d1d5e5963 Code Style Changes 2018-05-17 12:44:33 +05:30
Andreas Dangel fa24fa04af Merge branch 'pr-1106' 2018-05-16 19:43:27 +02:00
Andreas Dangel 0544441caa Update release notes, refs #1106, fixes #1100 2018-05-16 19:42:19 +02:00
Andreas Dangel 7b51dd1570 Extend unit tests, refs #1100 2018-05-16 19:41:58 +02:00
Akshat Bahety dd3f20956f Changes 2018-05-16 23:04:42 +05:30
Travis CI (pmd-bot) 5dfdb5870e Update documentation 2018-05-16 17:24:19 +00:00
Andreas Dangel fe44f9267e Fix unit test, refs #1105 2018-05-16 19:05:45 +02:00
Juan Martín Sotuyo Dodero 6d7926ca39 Merge branch 'pr-1105' 2018-05-16 12:10:32 -03:00
Robert Sösemann 9a2ac14b05 [vf] URLENCODE is ignored as valid escape method #1100 2018-05-16 15:46:40 +02:00
Clément Fournier ead33c45bc Update release notes, refs #1105 2018-05-16 14:26:25 +02:00
Clément Fournier 47ffacdf59 Add header before XPath expression in docs 2018-05-16 14:20:25 +02:00
Juan Martín Sotuyo Dodero d2dcbd4f1c Merge branch 'master' into issue-1051 2018-05-15 10:25:50 -03:00
Akshat Bahety efc4644b93 Checkstyle Update 2018-05-15 17:57:18 +05:30
Travis CI (pmd-bot) 03aa8d3629 Update documentation 2018-05-15 07:34:43 +00:00
Andreas Dangel 03354aa92a Merge branch 'pr-1097' 2018-05-15 09:17:30 +02:00
Andreas Dangel 9edcbc5d42 Update release notes, refs #1097 2018-05-15 09:16:47 +02:00
Andreas Dangel 393cac8930 [java] Use typeResolution for AvoidThrowingRawExceptionTypes 2018-05-15 09:16:04 +02:00
Andreas Dangel a5207b017c Merge branch 'pr-1098' 2018-05-15 09:09:51 +02:00
Andreas Dangel 8d6e357383 Update release notes, refs #1098 2018-05-15 09:08:58 +02:00
Andreas Dangel bc31d9ac63 [java] Simplify ByteInstantiation and ShortInstantiation, too
refs #1098
2018-05-15 09:07:52 +02:00
Andreas Dangel 89a1ad99ba Merge branch 'pr-1099' 2018-05-15 08:53:43 +02:00
Akshat Bahety 80d87aab0f Fixes #1021
adding the error file for typeres
2018-05-14 20:03:35 +05:30
Akshat Bahety 8fb843626c Merge branch 'master' of https://github.com/pmd/pmd 2018-05-14 19:52:28 +05:30
Akshat Bahety 958fd34c0f Fixes #1021 2018-05-14 19:45:41 +05:30
Juan Martín Sotuyo Dodero 676e76dbc1 Update changelog, refs #1099 2018-05-12 02:10:07 -03:00
Juan Martín Sotuyo Dodero 13f0c8000a [java] Don't report UseUtilityClass when extending
- Since the parent class is not a utility, we are neither (the parent
class may have non-static methods and fields).
 - Since this is more general than the original check for exception
types, we remove that
 - Fixes #824
 - Take the chance to have the rule use the rulechain
2018-05-12 02:06:42 -03:00
Juan Martín Sotuyo Dodero 9b3fcc2608 [java] Simplify LongInstantiation and IntegerInstantiation
- Narrow down both rule's search space (therefore making better usage
of the rulechain and reducing number of checks performed)
 - Use type resolution to simplify the rules and avoid FPs when
declaring classes with the same names
2018-05-12 01:37:59 -03:00
Juan Martín Sotuyo Dodero a378299978 Use type resolution for AvoidThrowingRawExceptionTypes
- Fixes the false negatives
 - Is actually 100X faster as we avoid all those `//ImportDeclaration`
2018-05-12 01:06:38 -03:00
Juan Martín Sotuyo Dodero 43839bd772 Failing test case for AvoidThrowingRawExceptionTypes 2018-05-12 01:03:33 -03:00
Andreas Dangel 70cbfd028e Merge remote-tracking branch 'origin/master' into java10-basic-support 2018-05-11 16:21:08 +02:00
Andreas Dangel c7ee1e02e4 Update release notes, fixes #743 2018-05-11 16:17:06 +02:00
Andreas Dangel 93347719b3 [java] Rename ASTType.isVarType to ASTType.isTypeInferred 2018-05-11 16:17:00 +02:00
Andreas Dangel b0266e3e77 [java] Populate types for VariableDeclarator and VariableDeclaratorId
when using local-var type inference
2018-05-11 16:16:52 +02:00
Andreas Dangel a1b2d59fc2 [java] infer type for method arguments, too 2018-05-11 16:16:38 +02:00
Andreas Dangel fd3c425d0a [java] Resolve var type in enhanced for loop 2018-05-11 14:36:16 +02:00
Andreas Dangel e2815a62d7 [java] var type in for loops and try-with-resources
Note: for loop enhanced doesn't support the type resolution yet
2018-05-11 09:43:05 +02:00
Juan Martín Sotuyo Dodero 1e73b8c0c5 Further cleanups 2018-05-11 01:14:26 -03:00
Juan Martín Sotuyo Dodero d4c016d19d Update changelog, refs #1080 2018-05-10 20:56:24 -03:00
Juan Martín Sotuyo Dodero 85d3089413 Fix copy paste 2018-05-10 20:53:22 -03:00
Juan Martín Sotuyo Dodero cf914f424d [core] Hack to get Ant's log level
- Very ugly, uses reflection and is limited to the few
implementatations that come with Ant itself or and testutils
 - Intended as a starting point for fixing #1018
2018-05-10 20:53:22 -03:00
Juan Martín Sotuyo Dodero 254c08ea75 Rework into an autoclosable
- Allow callers to simply use a try-with-resources around the measured
code
2018-05-10 20:23:52 -03:00
Juan Martín Sotuyo Dodero c51fac8dad Better handle mono-thread case 2018-05-09 19:29:54 -03:00
Juan Martín Sotuyo Dodero 0e1b565d03 Minor cleanups 2018-05-09 19:18:43 -03:00
Juan Martín Sotuyo Dodero 21ee3f76ed Merge branch 'pr-1085' 2018-05-09 19:14:06 -03:00
Juan Martín Sotuyo Dodero 1fc1797281 Update changelog, refs #1085 2018-05-09 19:13:49 -03:00
Clément Fournier 329e092e00 Make ClassNamingConventions' utility class definition more precise
Classes which have a superclass or implement an interface are not flagged
as utility classes anymore.
2018-05-08 19:41:17 +02:00
Andreas Dangel ad4166e300 Merge branch 'pr-1083' 2018-05-08 09:17:40 +02:00
Andreas Dangel 5b0ea25f04 Update release notes, fixes #1077, refs #1083 2018-05-08 09:17:23 +02:00
Clément Fournier a8bd283545 Fix lambda qname infix in enum constants 2018-05-08 01:31:08 +02:00
Andreas Dangel f0b847a7ad [java] Determine type for Local Variable using the initializer's expression 2018-05-07 19:47:25 +02:00
Juan Martín Sotuyo Dodero bcb3f65edb Avoid NPE 2018-05-07 02:43:34 -03:00
Juan Martín Sotuyo Dodero fb55ca703e Also keep lambdas in a single scope 2018-05-06 20:42:51 -03:00
Juan Martín Sotuyo Dodero c8b34b0dec Simplify test 2018-05-06 20:42:51 -03:00
Juan Martín Sotuyo Dodero 980c72a10a Simplify constructor scopes 2018-05-06 20:42:51 -03:00
Juan Martín Sotuyo Dodero eec6ad88c8 Update changelog, refs #1068 2018-05-06 20:42:51 -03:00
Juan Martín Sotuyo Dodero 5de405d23f [java] Fix scoping inconsistencies
- Reduce LocalScope creations. Method parameters and method locals have
the same visibility / reachability, so they should be in the same scope.
 - Fix the grammar `assert` lookahead. There is no need to use `(`
 - Fix illegal test code (shadowing of parameters is illegal)
 - Update Scope tests to deal with changes
 - Fixes #1051
2018-05-06 20:42:33 -03:00
Juan Martín Sotuyo Dodero 2f4d852017 Use the right import 2018-05-03 21:45:52 -03:00
Juan Martín Sotuyo Dodero 0bb75c2ce0 Changes requested by reviewer 2018-05-03 21:41:05 -03:00
Clément Fournier dd2dcf6357 Merge branch 'pr-1071' 2018-05-03 23:43:59 +02:00
Juan Martín Sotuyo Dodero 8af01d6565 [core] Rework benchmarking code
The old implementation had many limitations:
 - Relayed ALL measuring logic to the client
 - Used `synchronized` methods
 - Was unable to measure nested operations without mixing values
 - Mixed wall-clock and CPU time, which caused trouble when running
multithreaded analysis (negative values for non-meassured time)
 - A separate `main` existed which was undocumented and unsupported.

So I reworked it and added some goodies along the way:
 - When not running in benchmark mode, all operations are NOOPs
 - Nested operations are the default. Total and self time are
differentiated. This allows and encourages to better track overhead (ie:
time spent in a loop over another timed operation)
 - We can meassure call count along with custom counters, which add
meaning to metrics
 - Wall clock time for total execution is separated from all other CPU
times
 - All meassurements are done by the `TimeTracker` itself
 - No `synchronized` use, all structs are thread-safe and lock as little
and sporadically as possible
 - Categories can be split up by labels
 - The tracker is generic, has little knowledge of what is being
tracked. Same applies to report rendering. This is extremely flexible to
add more and custom tracks in the future
2018-05-02 12:31:53 -03:00
Juan Martín Sotuyo Dodero 863083d1a8 Merge branch 'pr-1072' 2018-05-01 14:55:40 -03:00
Clément Fournier 08a37c75cb Avoid some unnecessary computations
They're possibly expensive, eg tree traversal
2018-05-01 18:16:08 +02:00
Andreas Dangel d3d2fc2b9a [java] Fix rule error due to new AST structure 2018-05-01 17:14:06 +02:00
Andreas Dangel 4af3a52356 [java] Fix unit test - default language is now java10 2018-05-01 17:14:06 +02:00
Andreas Dangel 18dfba939c [java] First step for java10 local variable type inference 2018-05-01 17:14:06 +02:00
Andreas Dangel 8201ec984a [java] Use multiple threads for PMDCoverageTest 2018-05-01 16:48:29 +02:00
Andreas Dangel 60ac38cd71 [java] Update PMDCoverageTest to verify stderr now 2018-05-01 16:48:29 +02:00
Andreas Dangel d85db07196 [core] Report exceptions thrown during rule execution 2018-05-01 16:48:24 +02:00
Juan Martín Sotuyo Dodero 0d56d76226 Update changelog, refs #1071 2018-04-30 19:04:43 -03:00
Juan Martín Sotuyo Dodero 7a5ff4fcfc [java] Fix false-positives on PrematureDeclaration
- The code failed to detect closures once we enforced find boundaries,
so we now explicitely ask to cross them
2018-04-30 19:02:53 -03:00
Juan Martín Sotuyo Dodero 5ce1bc331f Merge branch 'pr-1069' 2018-04-30 15:53:59 -03:00
Juan Martín Sotuyo Dodero 046d219fb1 Update changelog, refs #1069 2018-04-30 15:53:09 -03:00
Travis CI (pmd-bot) 618de0bb33 Update documentation 2018-04-30 18:09:23 +00:00
Juan Martín Sotuyo Dodero 69ab78accc Merge branch 'pr-1070' 2018-04-30 14:58:16 -03:00
Clément Fournier 7810c893a3 Checkstyle 2018-04-30 18:34:59 +02:00
Clément Fournier 30774b9ccc Update release notes, refs #1070
Closes #1065
2018-04-30 18:28:56 +02:00
Clément Fournier f8e7b778db Allow numbers in class names 2018-04-30 18:26:05 +02:00
Clément Fournier d34fd86735 Fix static and private method overriding 2018-04-30 17:58:22 +02:00
Clément Fournier 2abd5c5a59 Fix protected Object members in interface should not be overridden 2018-04-30 17:35:06 +02:00
Andreas Dangel c6716388b9 Prepare next development version 2018-04-29 09:57:56 +02:00
Andreas Dangel 85874e7e9c [maven-release-plugin] prepare for next development iteration 2018-04-29 09:54:45 +02:00
Andreas Dangel 10c66fbf38 [maven-release-plugin] prepare release pmd_releases/6.3.0 2018-04-29 09:54:36 +02:00
Andreas Dangel 1c93a66747 Prepare pmd release 6.3.0 2018-04-29 09:48:03 +02:00
Andreas Dangel f0b3ca893e Fix unit test 2018-04-28 20:58:21 +02:00
Andreas Dangel 7d46c453c2 Merge branch 'pr-945' 2018-04-28 20:53:46 +02:00
Travis CI (pmd-bot) 109de192ed Update documentation 2018-04-28 18:35:14 +00:00
Andreas Dangel 098ad9d8a1 Merge branch 'pr-1059' 2018-04-28 20:14:32 +02:00
Andreas Dangel 1051d8b822 Merge branch 'pr-1060' 2018-04-28 20:13:31 +02:00
Andreas Dangel f11c15cbab Merge branch 'pr-1040' 2018-04-28 20:09:51 +02:00
Juan Martín Sotuyo Dodero 9f20fe164c Merge branch 'pr-1058' 2018-04-28 12:40:16 -03:00
Juan Martín Sotuyo Dodero d77d389107 Merge branch 'pr-1062' 2018-04-28 12:36:39 -03:00
Juan Martín Sotuyo Dodero 0cd74d9c29 Update changelog, refs #1062 2018-04-28 12:36:23 -03:00
Austin Shalit 13ecaf970f Update ASM to version 6.1.1
This should bring ASM to a version that supports Java 10.
2018-04-28 11:12:53 -04:00
Andreas Dangel 9ca83da878 [doc] Surround the delimiter with spaces, so that the browser can
wrap the default value of multi properties nicely.
2018-04-28 12:05:47 +02:00
Clément Fournier fd40bef3c2 Dummy commit, to rerun the build 2018-04-28 00:15:06 +02:00
Clément Fournier cb53810e68 Refactor test, no more XPath 2018-04-28 00:04:45 +02:00
Clément Fournier ae7536c623 Fix simple comments 2018-04-27 23:50:30 +02:00
Clément Fournier 43d8dc4742 Fix confusing lack of markup 2018-04-27 23:20:25 +02:00
Clément Fournier f7cf9c16a4 Update release notes, refs #1060
Closes #1004
2018-04-27 23:02:57 +02:00
Clément Fournier fd6b9098e8 Add checkSingleIfStmt property to ControlStatementBraces
Setting this property to false whitelists if statements without braces,
provided they do not appear in an if statement chain.

The property checkIfElseStmt overrides the new property. Unsetting the
former causes the latter to be noop.
2018-04-27 22:55:50 +02:00
Andreas Dangel 95f4ac62e8 [java] Property ignoredAnnotations does not work for SingularField and ImmutableField
Fixes #1056
2018-04-27 22:26:45 +02:00
Andreas Dangel 529d2da054 [doc] Document the delimiter for multi valued properties 2018-04-27 21:56:45 +02:00
Andreas Dangel 970fdffbb9 [doc] Fix multi value property documentation for rules
Fixes #1057
2018-04-27 21:45:40 +02:00
Clément Fournier 751ee8e167 Merge branch 'master' into improve-method-naming-conventions-rule 2018-04-27 00:07:52 +02:00
Clément Fournier 7d7c2dc94a Add known issue disclaimer 2018-04-26 15:02:55 +02:00
Clément Fournier 7a4a5496aa Support java10 correctly 2018-04-26 14:45:42 +02:00
Clément Fournier 6e1c2482f8 Support windows 2018-04-26 14:42:19 +02:00
Clément Fournier dcf1a94cf8 Fix bug with empty scopes appearing with no parents
Not sure hiding empty scopes adds much, but it certainly does mess with the
current algorithm
2018-04-26 14:42:19 +02:00
Clément Fournier 930bdd235c Checkstyle + pmd 2018-04-26 14:42:19 +02:00
Clément Fournier 8c2cc4f792 Fix clicking on already selected tree item
The editor now scrolls back to the clicked node
2018-04-26 14:42:19 +02:00
Clément Fournier 5e819c5826 Make the ast treeview autoscroll when selecting a node that's not
visible
2018-04-26 14:42:12 +02:00
Juan Martín Sotuyo Dodero 9ee838758c Merge branch 'pr-778' 2018-04-25 01:43:07 -03:00
Juan Martín Sotuyo Dodero b8e90e44d6 Update changelog, refs #778 2018-04-25 01:39:39 -03:00
Juan Martín Sotuyo Dodero 4c3f6e5c6b Merge branch 'pr-1033' 2018-04-25 00:35:26 -03:00
Juan Martín Sotuyo Dodero fd48b98aa2 Merge branch 'pr-1048' 2018-04-25 00:20:49 -03:00
Juan Martín Sotuyo Dodero fabc52946f Update changelog, refs #1048 2018-04-25 00:20:06 -03:00
Andreas Dangel 00bcecd603 Merge branch 'pr-1031' 2018-04-24 22:24:05 +02:00
Andreas Dangel 6cb0b47ef5 [apex] Add test case, refs #776
Note: only solution right now is supressing the rule for the string.
2018-04-24 22:22:48 +02:00
gibarsin 0942ae36f8 Make MultiThreadProcessor more space efficient 2018-04-24 15:51:10 -03:00
Andreas Dangel 6ccbd11f9d [doc] Update sample configuration of CyclomaticComplexity rule 2018-04-24 15:08:33 +02:00
Sergey Gorbaty 98fe1d3757 Final util 2018-04-23 14:25:08 -07:00
Sergey Gorbaty ac8135c6a5 Style fix 2018-04-23 14:23:25 -07:00
Sergey Gorbaty fcac918bd5 merging upstream 2018-04-23 14:03:58 -07:00
Sergey Gorbaty 2378444862 comments 2018-04-23 14:01:28 -07:00
Andreas Dangel c7e493f283 [java] Enable security ruleset for all-java.xml 2018-04-23 21:21:22 +02:00
Travis CI (pmd-bot) 260f1da440 Update documentation 2018-04-23 19:20:29 +00:00
Andreas Dangel ba6f3fb5cb Merge branch 'pr-1042' 2018-04-23 21:02:48 +02:00
Andreas Dangel 1f662e81f7 Update release notes, refs #1042 - new rule 2018-04-23 21:01:11 +02:00
Andreas Dangel 092ec8264a Merge branch 'pr-1045', fixes #1036 2018-04-23 20:29:40 +02:00
Andreas Dangel 391193c044 PMD dogfooding - avoid unnecessary local before return 2018-04-23 20:29:13 +02:00
Andreas Dangel fd71799c83 Don't consider null literal inside lambda 2018-04-23 19:32:13 +02:00
Andreas Dangel bc9b18cc69 [java] NullAssignment false positive
Fixes #629
2018-04-23 19:32:13 +02:00
Andreas Dangel bf8855c1e5 Merge branch 'pr-1039' 2018-04-23 18:59:05 +02:00
Andreas Dangel 43e9a7c31b Update release notes, fixes #695 2018-04-23 18:57:46 +02:00
Clément Fournier 71ebcca079 Fix typos in release notes 2018-04-23 14:28:13 +02:00
Juan Martín Sotuyo Dodero f855b572cc Update userdocs 2018-04-23 03:09:20 -03:00
Juan Martín Sotuyo Dodero 0243c08f84 Merge branch 'pr-1044' 2018-04-23 02:16:18 -03:00
Juan Martín Sotuyo Dodero dac6d8c1a5 Update changelog, refs #1044 2018-04-23 02:15:45 -03:00
Akshat Bahety b095e05bae Merge pull request #1 from akshatbahety/patch-2
Singleton Test Case
2018-04-23 10:32:32 +05:30
Akshat Bahety 92ecdde2f4 Singleton Test Case
Added a test case to check the singleton rule for nested classes
2018-04-23 10:29:43 +05:30
Akshat Bahety c137ebaa60 CheckStyle Updated 2018-04-23 10:04:32 +05:30
Akshat Bahety bee7adb33a Removed Debugging parts
Updated the file, removed the unnecessary debugging statements
2018-04-23 09:48:34 +05:30
Juan Martín Sotuyo Dodero 59bfc7ab52 Update changelog, refs #1045 2018-04-23 01:05:34 -03:00
Juan Martín Sotuyo Dodero a91bc4bfb6 [core] Log only once all messages
- CLI runs log only to stderr, never to stdout
 - Both Ant and CLI runs log only once, the root logger never gets a
hold of the logs, completely isolating PMD
2018-04-23 01:02:35 -03:00
Akshat Bahety 1a51582963 Solution for issue #816
Fixed the issue with traversing the tree and checking out if the getInstance method is used twice under the same class.
2018-04-23 02:08:16 +05:30
Juan Martín Sotuyo Dodero ce264cf0e4 Fix typos 2018-04-22 16:00:28 -03:00
Clément Fournier 855d528563 Merge branch 'pr-1041' 2018-04-22 18:05:39 +02:00
Clément Fournier 933235b140 Update release notes, refs #1041
Closes #1020
2018-04-22 18:05:30 +02:00
Juan Martín Sotuyo Dodero 6c19d9bed6 Update changelog, refs #1039 2018-04-22 02:48:35 -03:00
Juan Martín Sotuyo Dodero fc2e0a625f [python] Support comment based CPD suppressions 2018-04-21 20:33:30 -03:00
Sergey Gorbaty 6f881116ed Removing comment 2018-04-19 14:15:49 -07:00
Sergey Gorbaty ec86fd2584 HardCoded keys used as secrets 2018-04-19 14:13:15 -07:00
Sergey Gorbaty d7ac0b8186 Using narrower scoped AST node + scope for global declarations 2018-04-18 15:20:26 -07:00
Sergey Gorbaty f9ebe4c119 Version change and use of shorthands 2018-04-18 10:25:12 -07:00
Andreas Dangel 3d9c63a271 Update jacoco plugin for java10 compatibility 2018-04-18 10:28:56 +02:00
Andreas Dangel 22a50a14cf [ci] switch to Oracle jdk10 to support javafx 2018-04-18 10:05:53 +02:00
Andreas Dangel 6c6f644675 [ci] Switch to OpenJDK 10
See https://sormuras.github.io/blog/2018-03-20-jdk-matrix.html
2018-04-18 09:48:46 +02:00
Andreas Dangel 73a18d5fbd Update surefire plugin to support building with java10 2018-04-18 09:26:26 +02:00
Sergey Gorbaty d3afc40c67 Remove unused code 2018-04-17 17:00:02 -07:00
Sergey Gorbaty 86e95d876c Refactoring 2018-04-17 16:47:13 -07:00
Sergey Gorbaty 9d360ced03 all zeros 2018-04-17 15:37:00 -07:00
Sergey Gorbaty 04bf04af10 Simple example 2018-04-17 15:36:33 -07:00
Sergey Gorbaty 475744b515 Code example 2018-04-17 15:32:33 -07:00
Sergey Gorbaty 1f7fc0ac8b Indentation and license 2018-04-17 15:27:58 -07:00
Sergey Gorbaty a3f30476ce Hard-coded IV used in crypto operations 2018-04-17 15:02:05 -07:00
Andreas Bergander 7c7a66d750 Make BasicProjectMemoizer thread safe. Fixes issue #1020. 2018-04-17 17:51:32 +02:00
Clément Fournier 3716329a3a Update rule desc and changelog 2018-04-16 16:00:17 +02:00
Clément Fournier 34cc9ed8fe Add tests 2018-04-16 16:00:17 +02:00
Clément Fournier 47923d6eb4 Add regex properties to MethodNamingConventions
Brush up some AST classes
2018-04-16 16:00:12 +02:00
Juan Martín Sotuyo Dodero 539773eb5b Fix PMD dogfooding 2018-04-15 15:37:40 -03:00
Juan Martín Sotuyo Dodero b965090cc7 [plsql] Support comment-based CPD suppressions 2018-04-15 14:21:42 -03:00
Juan Martín Sotuyo Dodero 29aed16cb9 PMD dogfooding 2018-04-15 12:53:06 -03:00
Juan Martín Sotuyo Dodero dd1a2910c1 Fixing broken build 2018-04-15 12:46:08 -03:00
Juan Martín Sotuyo Dodero 94f00f4baf [obj-c] Add support for CPD comment-based suppressions 2018-04-15 03:07:48 -03:00
Juan Martín Sotuyo Dodero cf9b768b90 [matlab] Support comment based CPD suppressions 2018-04-15 02:58:04 -03:00
Juan Martín Sotuyo Dodero 78f7343713 [javascript] Support comment based CPD suppressions 2018-04-15 02:21:28 -03:00
Juan Martín Sotuyo Dodero 94103cb0c2 Merge branch 'pr-1030' 2018-04-15 02:09:35 -03:00
Juan Martín Sotuyo Dodero 04c6451e29 Update PR template
- Use maven wrapper
 - Request to pass PMD dogfood rules
2018-04-15 02:08:21 -03:00
Juan Martín Sotuyo Dodero 052c46f5b6 Merge branch 'pr-1006' 2018-04-15 02:06:41 -03:00
Juan Martín Sotuyo Dodero 9d4354333d Use atomic operations on concurrentmap
- Take the chance to actually use the lazy loading
2018-04-15 02:05:45 -03:00
Juan Martín Sotuyo Dodero e838179bb2 Fix PMD dogfooding 2018-04-15 01:44:02 -03:00
Juan Martín Sotuyo Dodero 47e345945e [cpp] Allow CPD suppressions with comments 2018-04-14 22:33:37 -03:00
Clément Fournier 83ce600782 Use JunitLoggingRule to intercept log 2018-04-14 04:00:38 +02:00
Clément Fournier 5a65701d0c Add hamcrest matchers to pom for pmd-core 2018-04-14 03:51:35 +02:00
Clément Fournier 0138b1a69b Use ConcurrentMap instead of Set 2018-04-14 03:34:36 +02:00
Andreas Dangel 28714a156b [java] enable type resolution for AvoidUsingShortType
refs #586
2018-04-13 11:12:51 +02:00
Juan Martín Sotuyo Dodero d6bea21ed6 [core] Refactor CPD token filtering
- Define a generic `TokenFilter` interface in pmd-core
 - Provide a base, extension-friendly `JavaCCTokenFilter` to process and
filter JavaCC token streams, honoring `CPD-OFF` and `CPD-ON` comments
 - Refactor the `JavaTokenizer` to use `JavaCCTokenFilter` by extending
it and adding custom Java-specific token filters
2018-04-11 01:49:40 -03:00
Travis CI (pmd-bot) 379eaed2c8 Update documentation 2018-04-10 15:50:58 +00:00
Juan Martín Sotuyo Dodero 95b20073ae Merge branch 'pr-1032' 2018-04-10 12:34:49 -03:00
Andreas Dangel 5fa3167868 Corrections from PR #1032 2018-04-10 17:29:23 +02:00
Andreas Dangel b720210723 [java] AvoidUsingShortType erroneously triggered on overrides of 3rd party methods
Fixes #586
2018-04-10 16:29:04 +02:00
Juan Martín Sotuyo Dodero ffd88ef11e Update changelog, refs #776 2018-04-10 01:31:51 -03:00
Juan Martín Sotuyo Dodero c77b0b44f3 [apex] Stricter hardcoded ID detection
- IDs are only 15, or 18 digits long
 - 18 digits long IDs are actually 15 digit IDs + checksum, which is now
validated
 - Resolves #776
2018-04-10 01:28:29 -03:00
Andreas Dangel 9d40872259 Avoid potential NPE 2018-04-09 20:29:49 +02:00
Andreas Dangel bd7489c773 [doc] fix link understanding_rulesets -> making_rulesets 2018-04-09 19:40:27 +02:00
Andreas Dangel f1923bd4b2 Merge branch 'pr-1026' 2018-04-09 19:30:22 +02:00
Andreas Dangel 228e0be0cd Update release notes, refs #1030 2018-04-09 17:30:40 +02:00
Andreas Dangel ee5a7eefa3 [java] Refactor how the classloader is passed along, avoiding static 2018-04-09 17:07:07 +02:00
Travis CI (pmd-bot) e315b3b409 Update documentation 2018-04-09 13:53:11 +00:00
Juan Martín Sotuyo Dodero b30a31397c Fix checkstyle 2018-04-09 10:43:36 -03:00
Juan Martín Sotuyo Dodero 1126a9334b Merge branch 'pr-1029' 2018-04-09 10:40:02 -03:00
Juan Martín Sotuyo Dodero e86a635e46 Merge branch 'pr-1028' 2018-04-09 10:35:57 -03:00
Andreas Dangel 82cbd52240 [java] Fix wrong classloader for JavaQualifiedName 2018-04-09 15:34:25 +02:00
Andreas Dangel 354108dc40 [java] False positive for useless parenthesis
Fixes #1023
2018-04-09 12:28:13 +02:00
Andreas Dangel 3275c70b43 Remove old, left-over ruleset documentation 2018-04-09 11:40:20 +02:00
Andreas Dangel 955ab11922 [doc] Use the rule names for the search index, include language
This provides better user experience for the search box on the
documentation page. The search results show now the rule name,
the language and the ruleset name.
2018-04-09 11:36:25 +02:00
Travis CI (pmd-bot) 427a6e041e Update documentation 2018-04-09 06:36:13 +00:00
Juan Martín Sotuyo Dodero 2f5501cc06 Escape pipes in rule default values
- This was breaking the tables for rules such as Java's
`EmptyCatchBlock`
2018-04-09 03:22:27 -03:00
Juan Martín Sotuyo Dodero e2c1be9b25 Update changelog, refs #894 & #899 2018-04-09 02:23:07 -03:00
Juan Martín Sotuyo Dodero 50158421c1 [java] Prevent NPEs during JavaTypeDefinitionSimple.toString
- Resolves #894
 - Resolves #899
2018-04-09 02:20:25 -03:00
Travis CI (pmd-bot) d300dc460f Update documentation 2018-04-08 07:44:16 +00:00
Andreas Dangel bfae79011d Fix checkstyle 2018-04-08 09:33:12 +02:00
Juan Martín Sotuyo Dodero a24e52b658 Merge branch 'pr-1024' 2018-04-07 21:30:25 -03:00
Juan Martín Sotuyo Dodero 0d8b41de08 Update changelog, refs #1024 2018-04-07 21:29:52 -03:00
Juan Martín Sotuyo Dodero f8e64abb6e Simplify regexp 2018-04-07 21:23:12 -03:00
Juan Martín Sotuyo Dodero 8a9a47bcad Merge branch 'pr-1007' 2018-04-07 21:09:35 -03:00
Juan Martín Sotuyo Dodero ae48542132 Revert check on initializers 2018-04-07 21:06:02 -03:00
Juan Martín Sotuyo Dodero de68b4902f Fix doc formatting 2018-04-07 19:47:18 -03:00
Clément Fournier 8ae3916505 Merge branch 'master' into update-classnamingconventions 2018-04-07 17:42:19 +02:00
Clément Fournier a3c93766df Move toCamelCase to StringUtil 2018-04-07 17:38:59 +02:00
Clément Fournier 4496aa7d6a Add getKind to AnyTypeBodyDeclaration 2018-04-07 17:24:24 +02:00
Utku Cuhadaroglu 56bf57ec2e Try to fix problem about enum whitlist 2018-04-07 18:09:45 +03:00
Andreas Dangel 4e331aca23 Add MicroDoc to credits page 2018-04-06 14:52:22 +02:00
Andreas Dangel 99a73ca59b Merge branch 'pr-1012'
Closes #1009
2018-04-06 10:01:52 +02:00
Andreas Dangel 344c67150f Update release notes, refs #1009, refs #1012 2018-04-06 09:50:02 +02:00
Utku Cuhadaroglu e869ea43da fixed test typo 2018-04-05 18:22:22 +03:00
Utku Cuhadaroglu ace459c670 Accept Enums as a Declaration 2018-04-05 18:18:22 +03:00
Utku Cuhadaroglu 99d38c2a52 Merge pull request #1 from pmd/master
Updated to Original
2018-04-05 18:02:43 +03:00
BBG c94890b353 fixed comments 2018-04-05 18:41:20 +08:00
Travis CI (pmd-bot) 798c027d8d Update documentation 2018-04-04 15:02:55 +00:00
Andreas Dangel fff1a5eeee Merge branch 'pr-1010' 2018-04-04 16:44:53 +02:00
Andreas Dangel 9ed902f3df Update release notes
refs #1003, refs #1010
2018-04-04 16:43:27 +02:00
Andreas Dangel daa117b31d Merge branch 'pr-1013' 2018-04-04 15:43:33 +02:00
Juan Martín Sotuyo Dodero a74553603d Merge branch 'issue-719' 2018-04-03 21:33:05 -03:00
Juan Martín Sotuyo Dodero c9621b8880 More explicit implementation 2018-04-03 21:29:47 -03:00
Andreas Dangel 324e3f1208 Merge branch 'pr-1016' 2018-04-03 22:00:53 +02:00
kenji21 19f5110dc1 Update Swift.g4 for swift 4.1 2018-04-03 10:22:42 +02:00
kenji21 ea07ab1359 Merge remote-tracking branch 'upstream/master' 2018-04-03 08:49:12 +02:00
Juan Martín Sotuyo Dodero eea475cd65 Update changelog, refs #719 2018-04-03 03:44:44 -03:00
Juan Martín Sotuyo Dodero cb5c100465 [java] Ignore receiver parameters when matching signatures
- Allow sto match all method calls, meaning UnusedPrivateMethod will
not longer produce false positives
 - Resolves #719
2018-04-03 03:42:43 -03:00
Juan Martín Sotuyo Dodero 2052087676 [java] Allow UnusedFormalParameter to ignore receiver params
- Part of #719
2018-04-03 03:42:09 -03:00
Juan Martín Sotuyo Dodero dbaf2475cf Update changelog, refs #988 2018-04-03 02:38:40 -03:00
Juan Martín Sotuyo Dodero 8c6688b854 [core] Ignore missing files form auxclasspath
- Resolves #988
2018-04-03 02:33:44 -03:00
BBG 27d2d88158 fixed comments 2018-04-02 10:36:35 +08:00
BBG c0846c26a7 merge master 2018-04-01 19:46:45 +08:00
BBG ca1aff2e8e fixed pmd violation 2018-04-01 19:16:28 +08:00
BBG eb09126fb0 detects unnecessary constructor in enum 2018-04-01 19:16:28 +08:00
BBG a8b3cebb96 Issue #1003: rewriting UneccessaryConstructorRule into java rule 2018-04-01 19:16:28 +08:00
Clément Fournier 3ca6e40197 Merge branch 'master' into update-classnamingconventions 2018-03-29 18:48:31 +02:00
Clément Fournier a24d2cdb22 Add Generate XPath from stack trace in context menu
The dialog parses a stack trace into an XPath query.
2018-03-29 16:47:30 +02:00
BBG c1306659fb Issue #1009: fixed FP of JUnitAssertionsShouldIncludeMessage with assertEquals in Junit5 2018-03-29 17:11:00 +08:00
Juan Martín Sotuyo Dodero 109c68be4d Merge branch 'pr-1011' 2018-03-29 02:12:22 -03:00
Juan Martín Sotuyo Dodero 5bc18b8298 Fix checkstyle warnings 2018-03-29 02:12:02 -03:00
Juan Martín Sotuyo Dodero 8aba5be2a1 Merge branch 'tree-transversal-boundaries' 2018-03-29 01:57:01 -03:00
Juan Martín Sotuyo Dodero 1e3b1bf0b5 Merge branch 'master' into tree-transversal-boundaries 2018-03-29 01:54:56 -03:00
Andreas Dangel 5156b1e856 Merge branch 'pr-1002'
Closes #994
2018-03-28 09:17:57 +02:00
Andreas Dangel 42bec12c58 Update changelog, refs #994 refs #1002 2018-03-28 09:15:46 +02:00
Clément Fournier a3e687d7ee Update release notes, refs #1008 2018-03-28 00:57:37 +02:00
Clément Fournier 0545eadaad Merge branch 'pr-1008'
[core] DOC: fix closing tag for <pmdVersion>
2018-03-28 00:54:15 +02:00
stonio 8be7db8d3b Fix closing tag for pmdVersion 2018-03-27 17:40:45 +02:00
Clément Fournier 66983f0882 Use the rulechain 2018-03-27 15:32:25 +02:00
Clément Fournier 82799bdfe2 Fix property names and utility class detection 2018-03-27 15:05:06 +02:00
Clément Fournier 600ff54187 Update rule documentation and changelog 2018-03-27 14:10:40 +02:00
Clément Fournier c7f5de7aa1 Make ClassNamingConventions configurable 2018-03-27 13:41:22 +02:00
Clément Fournier 958a26db38 CStyle 2018-03-26 20:53:29 +02:00
Clément Fournier 74bb7598c3 Ensure java rules don't use deprecated attributes
This could be extended to other languages once we
tackle #360
2018-03-26 20:36:40 +02:00
Clément Fournier 7754224f9d Fix deprecated XPath attribute not found
Deprecated attributes are not eliminated from the attribute iterator
anymore, which made deprecating attributes API breaking.

Instead, deprecated attribute usage are now detected and logged as
warnings
2018-03-26 20:29:14 +02:00
Clément Fournier 4253e8717e Improvements to designer syntax highlighting 2018-03-26 18:23:48 +02:00
Ishan Srivastava e9e0ac97c6 [doc] Delete duplicate page contributing
as it is less maintained than contributing.md

Closes https://github.com/pmd/pmd/issues/994
2018-03-26 15:13:08 +05:30
Andreas Dangel 8625d769f1 Prepare next development version 2018-03-26 09:26:47 +02:00
Andreas Dangel f3ab54d6da [maven-release-plugin] prepare for next development iteration 2018-03-26 09:23:23 +02:00
Andreas Dangel 59b360a60a [maven-release-plugin] prepare release pmd_releases/6.2.0 2018-03-26 09:23:14 +02:00
Andreas Dangel a9dfd6e218 Prepare pmd release 6.2.0 2018-03-26 09:17:36 +02:00
Andreas Dangel 3bcecddbb0 Merge branch 'pr-986' 2018-03-26 09:03:24 +02:00
Juan Martín Sotuyo Dodero 7ef2168eae Merge branch 'pr-958' 2018-03-25 23:39:14 -03:00
Juan Martín Sotuyo Dodero a895d9d3d9 Update changelog, refs #958 2018-03-25 23:37:37 -03:00
BBG ab660eda54 Issue #955: resolve conflics 2018-03-26 10:35:59 +08:00
BBG bd33ea2cc6 Issue #955: add subtree comparison function 2018-03-26 10:11:09 +08:00
Clément Fournier d5f206dc0b Issue #955: add new rule to detect identical catch statement
It flags identical catch statements, based on token equality between the two blocks
Identical catch blocks.
2018-03-26 10:11:09 +08:00
Clément Fournier cf9db2fed3 Ignore UselessOverridingMethod 2018-03-25 17:03:16 +02:00
BBG 9d9fa22c31 Issue #956: fixed comments 2018-03-25 14:06:43 +08:00
Clément Fournier 6751608b49 Merge branch 'master' into fix-ast-reference-type 2018-03-24 23:59:28 +01:00
Clément Fournier ea700d84ec Fix designer 2018-03-24 23:48:46 +01:00
Clément Fournier c589b026ff Make type of formal parameter consistent with variable declarator id 2018-03-24 23:45:09 +01:00
Clément Fournier d6213b79b1 Merge branch 'master' into fix-ast-reference-type 2018-03-24 22:54:37 +01:00
Travis CI (pmd-bot) 3f1c441a5c Update documentation 2018-03-24 21:31:12 +00:00
Clément Fournier dbcaf663f4 Fix CompareObjectsWithEquals 2018-03-24 22:17:59 +01:00
Andreas Dangel 14d474f333 Merge branch 'pr-991'
Closes #974
2018-03-24 22:13:37 +01:00
Andreas Dangel 8dfef6c165 Update changelog, refs #974 2018-03-24 22:13:27 +01:00
Clément Fournier ee85254bd0 Merge branch 'master' 2018-03-24 19:05:13 +01:00
Clément Fournier a193af1d4a Use auxclasspath ClassLoader to resolve type qualified names 2018-03-24 19:03:29 +01:00
BBG f0ed81751a Issue #956: add AbstractJavaAnnotatableNode class 2018-03-24 18:39:22 +08:00
BBG f86ca456a0 Issue #956: fixed comments 2018-03-24 18:39:22 +08:00
BBG 7616f8b7a8 Issue #956: Refactor ignoredAnnotationsDescripror in AbstractIgnoredAnnotRule class 2018-03-24 18:39:22 +08:00
BBG e654c265a9 Issue #956: fixed comment 2018-03-24 18:39:21 +08:00
BBG 6888806e12 Fixed issue956 2018-03-24 18:39:21 +08:00
Juan Martín Sotuyo Dodero cec32a8508 Merge branch 'pr-996' 2018-03-23 11:23:31 -03:00
Clément Fournier d22c99b280 Rename VarDeclID method to isTypeInferred 2018-03-23 13:27:55 +01:00
Clément Fournier f72463ebde Remove unnecessary comment 2018-03-23 13:18:52 +01:00
Andreas Dangel 579914fb7e Delete old dogfood rulesets 2018-03-23 10:33:41 +01:00
Andreas Dangel f9ef2c8c4b Remove maven profile jdk8-modules and enable all modules by default
We are now enforcing java9 for building, so these modules are anyway
enabled always
2018-03-23 10:23:56 +01:00
Andreas Dangel f335e83043 Cleanup pom.xml files 2018-03-23 10:21:16 +01:00
Andreas Dangel 6cd084b7ce Use release build-tools 1.1.0: uses latest dogfood ruleset
Closes #361
2018-03-23 10:12:38 +01:00
Juan Martín Sotuyo Dodero c71db57733 Merge branch 'master' into tree-transversal-boundaries 2018-03-23 01:19:46 -03:00
Juan Martín Sotuyo Dodero 257d11e4f1 Add unit test for boundary checking 2018-03-23 01:18:53 -03:00
Juan Martín Sotuyo Dodero 809310cbd2 Improve javadocs 2018-03-23 01:17:05 -03:00
Juan Martín Sotuyo Dodero a1ea36adc0 Simplify calls where possible 2018-03-23 00:52:54 -03:00
Juan Martín Sotuyo Dodero f00a085087 Merge branch 'pr-987' 2018-03-22 11:51:14 -03:00
Clément Fournier 5ebde0a0e9 Update changelog, refs #993
Closes #992
2018-03-22 15:05:20 +01:00
Clément Fournier d4c5bd011c Merge branch 'pr-993' 2018-03-22 15:03:40 +01:00
Clément Fournier 89db6fe71d Structure improvement 2018-03-22 15:02:53 +01:00
Clément Fournier d699c277ea Update release notes, refs #989
Closes #978
2018-03-22 14:41:13 +01:00
Clément Fournier b969974653 Merge branch 'pr-989' 2018-03-22 14:40:40 +01:00
Clément Fournier dba594353f Fix link and grammar 2018-03-22 14:35:44 +01:00
Andreas Dangel f2c8b5e2e8 Make the project be importable by IntelliJ IDEA
See https://youtrack.jetbrains.com/issue/IDEA-188690
2018-03-21 21:54:31 +01:00
Bolarinwa Saheed 08f1fea25b Update writing_documentation.md to fix Issue #992 2018-03-21 19:22:15 +01:00
Travis CI (pmd-bot) d865fb4627 Update documentation 2018-03-21 16:11:04 +00:00
Clément Fournier e6e07d22b4 Merge branch 'pr-990' 2018-03-21 16:59:48 +01:00
Clément Fournier da8969ecb7 Update release notes, refs #990
Closes #832
2018-03-21 16:55:58 +01:00
Clément Fournier 6c9c229516 Remove one example
That example would have been flagged by the rule
2018-03-21 16:52:13 +01:00
Bolarinwa Saheed 3e24180da1 Moved all the description inside a single CDATA tag 2018-03-21 14:17:27 +01:00
Travis CI (pmd-bot) 482cb01d7c Update documentation 2018-03-20 22:56:50 +00:00
Clément Fournier b52bd878f6 Update the description of MissingOverride 2018-03-20 23:43:15 +01:00
Bolarinwa Saheed 8f54d451d9 Extended the documentation with some markdown inline 2018-03-20 21:58:38 +01:00
Bolarinwa Saheed 87aafcc8ef Added link to Writing Documentation (Dev Docs) 2018-03-20 20:25:43 +01:00
Bolarinwa Saheed e04f7c2d4f Update design.xml - AvoidThrowingNullPointerException to close Issue #832 2018-03-20 19:54:19 +01:00
Bolarinwa Saheed d3aa3df15e Revert "Doc on AvoidThrowingNullPointerException updated to close Issue #832"
This reverts commit e27dad1862.
2018-03-20 17:58:17 +01:00
Clément Fournier 603a306370 Deprecate former rules, update changelog 2018-03-20 17:47:09 +01:00
Clément Fournier 67acede81f Report multiple blocks under case label 2018-03-20 17:47:09 +01:00
Clément Fournier b4b52e037b Revert "Refine case statement treatment"
This reverts commit 580560c28c56cb57ca5350f9035856b1362400ec.
2018-03-20 17:47:09 +01:00
Clément Fournier 1ae8b1c8e6 Refine case statement treatment
Every dangling unbraced statement will be flagged individually
This complexifies the expression, and still ignores some cases, eg:
  case 3:
    {
      x++;
    }
    {
      y++;
      break;
    }

in which the label should be flagged anyway
2018-03-20 17:47:09 +01:00
Clément Fournier 2711d88e3c Add support for case stmts
A case label is flagged if one of its subordinate
    statements is not braced. The message could be more
    explicit, eg, if we flagged the unbraced statement
    instead of the label in case part of the label's
    statements are braced
2018-03-20 17:46:54 +01:00
Clément Fournier ac3e59a4b7 Add new rule ControlStatementBraces 2018-03-20 17:45:44 +01:00
Bolarinwa Saheed e27dad1862 Doc on AvoidThrowingNullPointerException updated to close Issue #832 2018-03-20 15:45:39 +01:00
Bolarinwa Saheed 55c34feb97 Update Contibute.md to close Issue #978 2018-03-20 14:09:17 +01:00
Clément Fournier 045308948a Fix pmd-java8 tests 2018-03-20 14:07:33 +01:00
Clément Fournier 73f6b2f6cf Fix compilation + checkstyle + pmd 2018-03-20 13:46:45 +01:00
Juan Martín Sotuyo Dodero b3a9b9017a Revamp changelog 2018-03-19 17:17:52 -03:00
Clément Fournier 9ff4636194 Add getPrintableName to MethodLikeKind 2018-03-19 15:41:56 +01:00
Clément Fournier 0ebd2ba35c Hide ImmutableList, exposing List instead 2018-03-19 15:23:44 +01:00
Clément Fournier 0f61f2576d Move qname classes into another package 2018-03-19 14:25:00 +01:00
Clément Fournier 26e97032ef Minor changes 2018-03-19 14:25:00 +01:00
Clément Fournier 4154a5931e Add qname resolution step to the designer 2018-03-19 14:25:00 +01:00
Clément Fournier ccc1443373 Use JavaQualifiedName to resolve anonymous classes types in ClassTypeResolver
Success! We still need to figure out a straightforward bridge between JavaTypeDefinition and qualified names
2018-03-19 14:25:00 +01:00
Clément Fournier eb8908796c Allow TypeQualifiedNames to resolve their own type lazily
This could allow us to share the JavaQualifiedName implementations
with type resolution
2018-03-19 14:25:00 +01:00
Clément Fournier 1f1637bafd Split JavaQualifiedName into type and operation specific subclasses 2018-03-19 14:24:56 +01:00
Clément Fournier 3c8fcfa6c2 Cleanup QualifiedNameFactory 2018-03-19 14:05:51 +01:00
Clément Fournier 0bba8a2249 Resolve all MethodLike qnames 2018-03-19 14:05:51 +01:00
Clément Fournier 134d529442 Consider anonymous classes
* ASTAllocationExpression and ASTEnumConstant implement JavaQualifiableNode
* It's not satisfying yet, too much code duplication. They should  be
considered by the metrics framework. A good solution would be to add a
new node (see #905)
2018-03-19 14:05:51 +01:00
Clément Fournier 06e38128c4 Wire the visitor into SourceCodeProcessor
We need a way to configure which visitors are run on nodes
obtained from ParserTstUtil
2018-03-19 14:05:51 +01:00
Clément Fournier ba3611f241 Add visitor to populate qualified names
* Currently populates ASTAnyTypeDeclarations with their qname
* Package tails are shared
2018-03-19 14:05:51 +01:00
Juan Martín Sotuyo Dodero 46ab578f28 Simplify rules when possible 2018-03-19 01:48:46 -03:00
Juan Martín Sotuyo Dodero 36ac7ddd4c Merge branch 'pr-975' 2018-03-19 01:39:06 -03:00
Juan Martín Sotuyo Dodero 4254fb3f15 Merge branch 'pr-895' 2018-03-19 01:33:07 -03:00
Juan Martín Sotuyo Dodero 1301a3821b Update changelog, refs #895 2018-03-19 01:32:52 -03:00
Travis CI (pmd-bot) 5d2ed89dc1 Update documentation 2018-03-18 15:43:17 +00:00
Juan Martín Sotuyo Dodero acd365ad98 Add new rule to release ruleset 2018-03-18 12:32:04 -03:00
Juan Martín Sotuyo Dodero 2a6a3c5832 Merge branch 'pr-984' 2018-03-18 12:28:38 -03:00
Juan Martín Sotuyo Dodero 0f63ac9131 Update changelog, refs #984 2018-03-18 12:28:19 -03:00
Kirk Clemens 1bd44a3b52 issue983 Update rule to use rule chain pattern 2018-03-17 22:55:04 -05:00
Kirk Clemens 844ab0e6d4 issue983 Add a new test case for an annotation with a single non value element 2018-03-17 19:38:40 -05:00
Kirk Clemens 313da24a71 issue983 Remove pom changes checked in by mistake 2018-03-17 19:37:07 -05:00
Kirk Clemens 28f292f736 issue983 Add new UnnecessaryAnnotationValueElement rule 2018-03-17 19:33:49 -05:00
Clément Fournier c967e63e6a Merge branch 'master', fix merge conflicts 2018-03-13 16:15:44 +01:00
Clément Fournier 58f76f054e Use javadoc @deprecated for ASTConstructorDeclaration.getParameters 2018-03-13 16:13:39 +01:00
Clément Fournier 92da9faee4 Fix pmd warnings 2018-03-13 00:33:37 +01:00
Juan Martín Sotuyo Dodero 0eef25e57b Checkstyle fixes 2018-03-12 16:53:38 -03:00
Andreas Dangel b6c84e2ba3 [java] Remove new method getFormalParameters to preserve API compatibility
Refs #912
Refs #881
2018-03-12 20:38:38 +01:00
Juan Martín Sotuyo Dodero 783b449d60 Fix bad merge 2018-03-12 01:41:09 -03:00
Juan Martín Sotuyo Dodero 240d26ef69 Remove unused imports 2018-03-12 01:20:00 -03:00
Juan Martín Sotuyo Dodero 8b3fd24c5a Simplify test 2018-03-12 01:20:00 -03:00
Juan Martín Sotuyo Dodero 8deaf20f4d findDescendantsOfType defaults to not crossing boundaries
- A few places actually need to do so, and some other were simply wrong
 - We can now cross the boundary if searching dowm from it
 - Anonymous inner classes are still somewhat inconsistent
2018-03-12 01:20:00 -03:00
Juan Martín Sotuyo Dodero cdc50f7667 Remove no longer needed parent check
- Also break once we have a result
2018-03-12 01:17:19 -03:00
Juan Martín Sotuyo Dodero 180cfc1dcc Update changelog, refs #370 & #904 2018-03-12 01:17:19 -03:00
Juan Martín Sotuyo Dodero 19c3487f9e Add test case for #370
- Fixes #370
2018-03-12 01:13:29 -03:00
Juan Martín Sotuyo Dodero ba54b1c91a Fix failing tests 2018-03-12 01:13:29 -03:00
Juan Martín Sotuyo Dodero f725f1ebfa [java] Honor find boundaries
- This fixes #904
 - `hasDescendantOfType`, `getFirstDescendantOfType` and
`findDescendantsOfType` are now consistent
2018-03-12 01:13:29 -03:00
Clément Fournier 9eb79af16b Update docs 2018-03-12 01:01:58 +01:00
Clément Fournier e643da230d Merge branch 'master' 2018-03-12 00:36:56 +01:00
Travis CI (pmd-bot) f25e35f42d Update documentation 2018-03-11 09:50:28 +00:00
Andreas Dangel d27273581f Fix PMD / Checkstyle issues 2018-03-11 10:32:37 +01:00
Andreas Dangel f4441ce938 Merge branch 'pr-912' 2018-03-11 10:15:28 +01:00
Andreas Dangel 96446f384b Update release notes, new rule MissingOverride, refs #912 2018-03-11 10:07:51 +01:00
Andreas Dangel 4514e6fb19 Update versions for new classes 2018-03-11 10:07:11 +01:00
Juan Martín Sotuyo Dodero 451815bf0a Merge branch 'pr-954' 2018-03-11 02:23:26 -03:00
Juan Martín Sotuyo Dodero 1577931fe3 Update changelog 2018-03-11 02:21:59 -03:00
Juan Martín Sotuyo Dodero 5ead2eda16 Use TemporaryFolder instead 2018-03-11 02:16:01 -03:00
Juan Martín Sotuyo Dodero 53e11481dc Merge branch 'pr-952' 2018-03-11 01:41:22 -03:00
Juan Martín Sotuyo Dodero 75b74afe8d Update changelog, refs #952 2018-03-11 01:40:28 -03:00
Juan Martín Sotuyo Dodero 136d147210 Use positive checks 2018-03-11 01:38:29 -03:00
Juan Martín Sotuyo Dodero 309a2a4924 Merge branch 'pr-951' 2018-03-11 01:28:54 -03:00
Juan Martín Sotuyo Dodero 8f5b2a04b8 Update changelog, refs #951 2018-03-11 01:26:19 -03:00
Clément Fournier 6943803ccb Merge branch 'pr-908' 2018-03-11 01:59:55 +01:00
Juan Martín Sotuyo Dodero df2677457c Use relative links in docs 2018-03-10 18:23:19 -03:00
Juan Martín Sotuyo Dodero 161d7be37e Update broken links in doc 2018-03-10 17:30:19 -03:00
Juan Martín Sotuyo Dodero 05ab784d0b Merge branch 'pr-969' 2018-03-10 17:16:51 -03:00
Juan Martín Sotuyo Dodero 20cddf5079 Update changelog, refs #969 2018-03-10 17:16:12 -03:00
Juan Martín Sotuyo Dodero 185fd15953 Refactor lombok check into separate method 2018-03-10 17:13:25 -03:00
Andreas Dangel d6ccc58f20 Corrections from PR review (#908), make the metrics visitors extendable again 2018-03-10 20:52:11 +01:00
Juan Martín Sotuyo Dodero 5ba5082ae2 Merge branch 'pr-965' 2018-03-10 16:49:13 -03:00
Juan Martín Sotuyo Dodero 7a0a31b149 Update changelog, refs #963 2018-03-10 16:47:56 -03:00
Clément Fournier 9766e632a9 Remove breaking API changes of JavaQualifiedName
Checked with japicmp
2018-03-10 19:20:02 +01:00
Clément Fournier 2fd5d7c41b Remove breaking binary changes with metrics framework
Spotted using japicmp
2018-03-10 18:49:48 +01:00
Clément Fournier 110c8db6e0 Update release notes, refs #970 2018-03-10 17:13:35 +01:00
Clément Fournier c88641fa5c Merge branch 'pr-970' 2018-03-10 17:11:27 +01:00
epidemia 87f2403ec3 Remove unused import 2018-03-10 16:43:59 +03:00
epidemia 6e2b75e245 Fixed inefficient use of keySet iterator instead of entrySet iterator for pdm-java 2018-03-10 16:35:43 +03:00
epidemia 219b80a13b Fixed inefficient use of keySet iterator instead of entrySet iterator for pdm-java 2018-03-10 16:03:19 +03:00
Clément Fournier e592d4baf2 Update release notes, refs #967 2018-03-10 13:50:51 +01:00
Clément Fournier 75ecf7b66f Merge branch 'pr-967' 2018-03-10 13:47:43 +01:00
Clément Fournier 4053e548bf Fix link 2018-03-10 13:47:31 +01:00
Andreas Dangel 8bd1e3b486 Fix PMD dogfood: UncommentedEmptyMethodBody, SimplifyBooleanReturns,
UnnecessaryLocalBeforeReturn, OptimizableToArrayCall,
ClassWithOnlyPrivateConstructorsShouldBeFinal,
UseLocaleWithCaseConversions, NonStaticInitializer, UseCollectionIsEmpty
2018-03-10 12:04:50 +01:00
Kirk Clemens d0ba8998e7 Minor code cleanup 2018-03-09 23:22:49 -06:00
Kirk Clemens d94ff95db8 Fix checkstyle issues 2018-03-09 23:02:29 -06:00
Kirk Clemens 9938a4491c Issue 968 Add logic to handle lombok private constructors with utility classes 2018-03-09 22:53:14 -06:00
epidemia 4c76a7f695 Issue 959: fixed broken link to XPath Rule Tutorial 2018-03-09 18:55:52 +03:00
Andreas Dangel 5b93b14373 Fix PMD dogfood: AssignmentInOperand, LooseCoupling 2018-03-09 16:28:14 +01:00
Stephen 264403b354 Make Varargs trigger ArrayIsStoredDirectly
fixes #963
2018-03-09 07:05:13 -08:00
Andreas Dangel c85abd258a Fix PMD dogfood: AvoidPrefixingMethodParameters, UnnecessaryConstructor,
AvoidUsingShortType
2018-03-09 16:04:15 +01:00
Andreas Dangel 9fb3206d9e PMD dogfood: Upgrade PMD to 6.1.0 2018-03-09 13:00:52 +01:00
Andreas Dangel cf88117820 Fix PMD dogfood: UnusedFormalParameter, UselessParentheses and UselessOverridingMethod 2018-03-09 12:52:20 +01:00
Andreas Dangel b8a34eda97 TypeHelper: Remove misleading warning of incomplete auxclasspath
*   Failing to resolve a class in that situation might happen, since
    we use it to probe types
*   Simplify AbstractJUnitRule
2018-03-09 11:22:15 +01:00
Andreas Dangel f452adbf6a Fix PMD dogfood: SimplifiedTernary 2018-03-09 10:26:23 +01:00
Andreas Dangel 5972c32ecf Fix checkstyle 2018-03-09 10:01:00 +01:00
Andreas Dangel fb4d564e8b Fix PMD dogfood: AvoidBranchingStatementAsLastInLoop 2018-03-09 09:58:04 +01:00
Andreas Dangel f3a358c419 Fix PMD dogfood: EmptyCatchBlock 2018-03-09 09:58:04 +01:00
Andreas Dangel 7aaa9966c2 Fix PMD dogfood: AvoidCatchingThrowable
Refs #361
2018-03-09 09:57:15 +01:00
Andreas Dangel 4ace14899c Fix PMD dogfood: UnusedPrivateField
Refs #361
2018-03-09 09:57:15 +01:00
Andreas Dangel e9abdf7a92 Update pmd configuration to use dogfood and fail build on violations
Refs #361
2018-03-09 09:53:15 +01:00
Clément Fournier ca4500b40b Delete multi property, add tests 2018-03-06 23:42:41 +01:00
Clément Fournier 9fcf146241 Add RegexMultiProperty 2018-03-06 23:41:32 +01:00
Clément Fournier d489698157 Add RegexProperty 2018-03-06 23:40:56 +01:00
Clément Fournier f60a64adb8 checkstyle 2018-03-05 22:25:26 +01:00
Clément Fournier 3d5a0aa4c6 Cleanup 2018-03-05 22:14:57 +01:00
Clément Fournier f8864e9060 Make real Ant test cases 2018-03-05 21:58:05 +01:00
Clément Fournier f74a6b3887 Update release notes 2018-03-05 20:56:48 +01:00
Clément Fournier 5d590a259e Add basic Ant test cases, correct behaviour 2018-03-05 20:52:39 +01:00
Clément Fournier 07a9859ce3 Update Ant task and user docs 2018-03-05 17:15:08 +01:00
Clément Fournier ff1c90d753 Some corrections for PR #954 2018-03-05 16:47:34 +01:00
Clément Fournier 0967d50275 Merge branch 'pr-950' 2018-03-05 14:42:21 +01:00
Clément Fournier e2c6f1e467 Add '-no-cache' CLI switch, to disable incremental analysis
- The switch discards the argument provided to '-cache' if any
- Using the switch disables the suggestion to use incremental analysis
- Rule tests use that option to avoid the warning, which clutters build logs
- Refs #946
2018-03-05 13:47:48 +01:00
BBG 4e2aee3da3 Issue #839: SignatureDeclareThrowsException's IgnoreJUnitCompletely property not honored for constructors 2018-03-04 22:03:58 +08:00
BBG 92031b1792 Add ignoredAnnotations ptoperty to unusedPrivateMethod rule 2018-03-04 21:32:19 +08:00
Juan Martín Sotuyo Dodero 30afff46c6 [java] Avoid a NPE in Type Resolution
- If a class extends a class that references / extends a missing class,
it's possible for the `NoClassDefFoundError` to only rise once we call
`isAnonymousClass()` on the `Class`.
 - For consistency with missing classes, we set the type to null.
 - Logging such missing classes is still pending #194
2018-03-04 03:46:05 -03:00
Travis CI (pmd-bot) dc4f6b180b Update documentation 2018-03-04 00:22:50 +00:00
Clément Fournier e43e7316a7 Merge branch pr-943 2018-03-04 01:06:45 +01:00
Clément Fournier 534d0b62f2 Update release notes, refs #943
Closes #907
2018-03-04 00:57:13 +01:00
Clément Fournier c96358506b Minor cleanups 2018-03-04 00:52:00 +01:00
Clément Fournier ba8aeaf648 Use abstract class + interface for AnyTypeDeclaration hierarchy
Remove one breaking API change
2018-03-04 00:37:04 +01:00
Clément Fournier c9cfb1f29f Rename MethodLike to MethodLikeNode 2018-03-04 00:37:01 +01:00
Clément Fournier 0ef1955080 Use abstract class + interface for MethodLike hierarchy
Removes a breaking API change
2018-03-04 00:36:21 +01:00
Juan Martín Sotuyo Dodero fdd399393d Update changelog, refs #941 2018-03-03 17:08:07 -03:00
Juan Martín Sotuyo Dodero 0e4a793dd3 Merge branch 'pr-941' 2018-03-03 17:06:56 -03:00
Juan Martín Sotuyo Dodero a802fafb29 Merge branch 'pr-948' 2018-03-03 16:02:45 -03:00
Juan Martín Sotuyo Dodero 1415d283bc Merge branch 'pr-947' 2018-03-03 16:01:53 -03:00
BBG 8b279fac25 fixes #907 2018-03-03 22:01:21 +08:00
Andreas Dangel 65a5d3f835 [java] Migrate internal rulesets used in unit tests
Avoiding deprecation warnings
References #946
2018-03-03 11:53:22 +01:00
Andreas Dangel 5a5977b1ea Update release notes, fixes #928 2018-03-02 20:34:34 +01:00
Andreas Dangel d6508c1b28 Fix checkstyle 2018-03-02 20:26:36 +01:00
Andreas Dangel c94b3790bf Upgrade checkstyle, use pmd-build-tools 1.1.0-SNAPSHOT 2018-03-02 20:24:48 +01:00
Clément Fournier 57e050f8c5 Fix typo 2018-03-02 18:34:46 +01:00
Clément Fournier 09f5384040 Fix NPE caused by unresolved bound in intersection type 2018-03-02 14:10:46 +01:00
Clément Fournier 59901a4687 Fix type resolution of multiple declaration when array dimensions differ 2018-03-02 00:51:52 +01:00
Clément Fournier d12268bb53 Fix ReferenceType array type resolution for primitive type
ReferenceType previously rolled up the type of its child
without checking for array dimensions.

Add method to JavaTypeDefinition to dimension array type
2018-03-02 00:51:52 +01:00
Clément Fournier 0e61cba1ac Add test case, doesn't pass right now but it's the end goal 2018-03-02 00:51:39 +01:00
Clément Fournier 5daa72adc9 Cleanup ClassTypeResolverTest 2018-03-01 22:43:49 +01:00
reudismam e1b954289a Use char notation to represent a character to improve performance. 2018-02-26 19:40:40 -03:00
Juan Martín Sotuyo Dodero c8cd8e1fa8 Changelog update, Add more details about changes in Rhino 2018-02-25 19:29:23 -03:00
Juan Martín Sotuyo Dodero 502e96e3a3 Merge branch 'pr-930' 2018-02-25 19:27:02 -03:00
Juan Martín Sotuyo Dodero 5bf8945f99 Merge branch 'pr-937' 2018-02-25 19:24:52 -03:00
Andreas Dangel 8947876dab Update release script to follow documented release procedure 2018-02-25 12:05:56 +01:00
Andreas Dangel 67a9f84a9c Fix release script 2018-02-25 10:04:45 +01:00
Andreas Dangel b71857e02b Prepare next development version 2018-02-25 10:00:22 +01:00
Andreas Dangel 098b0dcac0 [maven-release-plugin] prepare for next development iteration 2018-02-25 09:53:26 +01:00
Andreas Dangel 101b71a13e [maven-release-plugin] prepare release pmd_releases/6.1.0 2018-02-25 09:53:19 +01:00
Andreas Dangel 17e991b662 Prepare pmd release 6.1.0 2018-02-25 09:45:42 +01:00
Andreas Dangel 84e388cdf2 Merge branch 'pr-801' 2018-02-24 22:42:20 +01:00
Andreas Dangel 6b4962e479 Update release notes, refs #801 2018-02-24 22:41:36 +01:00
Andreas Dangel 039e4157e8 Merge branch 'pr-931' 2018-02-24 21:40:02 +01:00
Andreas Dangel 3c280b8ef2 Use Files.move instead of File.renameTo
This prevents problems when building PMD under Windows
2018-02-24 20:40:38 +01:00
Andreas Dangel 8f6f8e9842 Corrections for PR #931 2018-02-22 08:54:29 +01:00
Andreas Dangel cc08bd47cf [java] UnusedImports false positive for static import
Fixes #925
2018-02-21 20:43:14 +01:00
Andreas Dangel d619fd360d [ecmascript] Update rhino to 1.7.7.2
Refs #699
2018-02-21 19:56:20 +01:00
Travis CI (pmd-bot) bff93c53fb Update documentation 2018-02-20 17:01:00 +00:00
Juan Martín Sotuyo Dodero 97d8893b43 Merge branch 'pr-927' 2018-02-20 13:47:14 -03:00
Juan Martín Sotuyo Dodero 906c162d04 Update changelog, refs #927 2018-02-20 13:46:43 -03:00
Andreas Dangel 09f871d92e Merge branch 'pr-918', fixes #909 2018-02-20 08:36:59 +01:00
Andreas Dangel 25421ba340 Update release notes, refs #918, refs #909 2018-02-20 08:35:49 +01:00
wata727 8127b3c8e3 Fix example of AbstractClassWithoutAnyMethod 2018-02-20 14:45:22 +09:00
Travis CI (pmd-bot) 23b25056f0 Update documentation 2018-02-20 04:51:36 +00:00
Juan Martín Sotuyo Dodero e6bf9f031f Merge branch 'pr-926' 2018-02-20 01:40:06 -03:00
Juan Martín Sotuyo Dodero 90095480b0 Merge branch 'pr-924' 2018-02-20 01:37:10 -03:00
Clément Fournier a6d3c2baa1 Miscellaneous cleanups 2018-02-20 01:24:23 +01:00
Clément Fournier 1c991dd79e Fix property test random crash 2018-02-20 01:24:02 +01:00
Clément Fournier 3257aeae4f Corrections for PR #912 2018-02-20 00:34:15 +01:00
Akshat Bahety e2f37d4d97 Indentation
changed to 8 spaces for qa plugin.
2018-02-20 04:20:55 +05:30
Andreas Dangel acf6a31bed [java] ConsecutiveLiteralAppends with types other than string
*   Updated documentation to include also non-string literals
*   Added additional test cases
*   Fixes #541
2018-02-19 20:03:31 +01:00
Juan Martín Sotuyo Dodero b6a8402dc7 Merge branch 'pr-923' 2018-02-18 20:22:21 -03:00
Andreas Dangel 73de6eb1f0 [ci] Use Java9 for building PMD
Fixes #854
2018-02-18 21:49:25 +01:00
Juan Martín Sotuyo Dodero 1c9a4fd31c Merge branch 'pr-922' 2018-02-18 17:36:57 -03:00
Andreas Dangel 394948624f Update release notes, fixes #853 2018-02-18 20:37:59 +01:00
Andreas Dangel 18c79a34f4 Fix deprecations 2018-02-18 20:25:42 +01:00
Andreas Dangel 2087dd9472 Fix integration test - scala is now active always 2018-02-18 20:24:04 +01:00
Andreas Dangel 9392239c45 scala update, part 2
* Update to new scala API
* remove comments support which was not used anyway
* Use scala-maven-plugin to generate javadoc
2018-02-18 20:23:32 +01:00
Andreas Dangel 74ae8d0d6e Remove profile jdk9-disabled - scala is now active always 2018-02-18 19:07:37 +01:00
Andreas Dangel fc21190bb7 scala update, part 1 2018-02-18 18:52:07 +01:00
Andreas Dangel 9c007afb57 Fixes #795
Merge branch 'pr-919'
2018-02-18 18:40:33 +01:00
Andreas Dangel 9fbaa835ab Fix typo, add removal version for deprecated interfaces/classes 2018-02-18 18:40:25 +01:00
Andreas Dangel 7997e16f1b Merge branch 'pr-920' 2018-02-18 18:35:22 +01:00
Andreas Dangel aac36cb11e Update release notes, refs #920 2018-02-18 18:35:12 +01:00
Juan Martín Sotuyo Dodero 32af9cabf2 [java] Update valid identifiers
- Newer Java versions have allowed for a lot more tokens in identifiers
2018-02-18 04:44:27 -03:00
Juan Martín Sotuyo Dodero 21d02f90af Remove unused import 2018-02-18 04:37:44 -03:00
Juan Martín Sotuyo Dodero 6d1a8888a9 Update changelog, refs #795 2018-02-17 21:45:15 -03:00
Juan Martín Sotuyo Dodero 1c68248eee Update tests 2018-02-17 21:39:59 -03:00
Juan Martín Sotuyo Dodero 46aa1e2f2a Remove usages of deprecated classes 2018-02-17 21:39:10 -03:00
Juan Martín Sotuyo Dodero 08560add78 Deprecate FileReporter 2018-02-17 21:38:39 -03:00
Juan Martín Sotuyo Dodero 33626e7a2d Implement new renderer for CPD
- Write directly to writers, don't handle strings
2018-02-17 21:37:51 -03:00
Juan Martín Sotuyo Dodero 78890afe13 Merge branch 'pr-884' 2018-02-17 17:32:52 -03:00
Juan Martín Sotuyo Dodero cdb28f72ff Update changelog 2018-02-17 17:32:09 -03:00
Juan Martín Sotuyo Dodero 0253a0c615 Merge branch 'pr-916' 2018-02-17 17:25:54 -03:00
Travis CI (pmd-bot) 94bb23d22c Update documentation 2018-02-17 17:30:18 +00:00
Juan Martín Sotuyo Dodero 123f2139b9 Merge branch 'pr-914' 2018-02-17 14:17:04 -03:00
Juan Martín Sotuyo Dodero 1992a0d33b Update changelog, refs #914 2018-02-17 14:16:47 -03:00
Juan Martín Sotuyo Dodero f4c7cc70bc Merge branch 'pr-901' 2018-02-17 14:13:55 -03:00
Juan Martín Sotuyo Dodero 99d853c39d Update changelog, refs #901 2018-02-17 14:13:32 -03:00
Juan Martín Sotuyo Dodero f62fe38d97 Minor cleanups 2018-02-17 14:12:23 -03:00
Akshat Bahety d2fb476eae Docs Updated qa-Eclipse
Added a qa-Eclipse plugin to the table.
2018-02-17 12:28:11 +05:30
Clément Fournier 22596e5176 Add ghost production for TypeAnnotation to cleanup the grammar
Type annotations can be nearly everywhere since Java 8, which makes the grammar
really hard to read when the check for correct jdk version is repeated all over
the place.
2018-02-16 23:53:37 +01:00
Clément Fournier c401e2cbc6 Move boilerplate to an abstract class 2018-02-16 15:31:52 +01:00
Clément Fournier d25fbcf8c0 Remove unnecessary javadoc 2018-02-16 00:25:06 +01:00
Clément Fournier f2ba4e442c Update FormalParameter type resolution for varargs 2018-02-15 23:58:20 +01:00
Clément Fournier 4e3f1395e4 Consider return type covariance 2018-02-15 11:58:02 +01:00
Clément Fournier 6440d043c8 Cleanup, ensure no false positive 2018-02-15 02:33:33 +01:00
Clément Fournier ab634bf720 Consider Object methods inherited into interfaces 2018-02-15 01:15:33 +01:00
Akshat Bahety 997a1f61fa Documentation Updated
As written in issue #891 apex uses Single Quotes ' ' instead of Double " "
Updated the document to represent the same to the user.
2018-02-15 05:32:47 +05:30
Clément Fournier 8884599f8d Consider varargs parameters 2018-02-15 00:12:21 +01:00
Clément Fournier 64a7e3780e Use bridge method as cue to which method is overridden
This adds support for methods inherited from a supertype with type parameters.
Overloads of the inherited (bridged) methods defined in the subclass
with the same number of parameters still go undetected.

RuleViolationComparator contains a good example of this: the two compare
methods compile to three methods: compare(RV,RV), compare(String,String)
and a bridge method compare(Object,Object). But short of doing more
complicated analysis on the type parameters (or reading the bytecode),
there is no way to determine whether the bridge delegates to the
compare(String,String) or compare(RV,RV), so we can't know which is
overridden.

Another corner case is the following:
public <V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V... values)

in AbstractDelegateRule, inherited from Rule. I don't know yet why it's
not detected.
2018-02-14 19:40:29 +01:00
Clément Fournier f330007278 Change algorithm to explore hierarchy only once, avoid exploring same classes twice 2018-02-14 17:32:19 +01:00
Clément Fournier f1d0d74087 Checkstyle 2018-02-14 01:22:22 +01:00
Clément Fournier 4bb707a3bd Test case for generic method 2018-02-14 00:42:07 +01:00
Clément Fournier 5ddb5a2a29 Make ASTFormalParameter a typenode
It feels right
2018-02-14 00:25:00 +01:00
Clément Fournier 9b93311c53 Cleanup ASTAnnotation
It's now a typenode
2018-02-14 00:14:20 +01:00
Clément Fournier 7db3f4a006 Add MissingOverrideRule and some tests
Doesn't support method overriden from generic supertype.
Known limitations that are supposed to be fixed shortly
are #910 and anonymous enum constants (the fix for that
is somewhere in my branches, after #895)
2018-02-13 23:29:37 +01:00
Clément Fournier 8cb7573379 Fix problem with outer enum and annotation types 2018-02-13 12:30:38 +01:00
Clément Fournier 733c871b96 Fix nested anonymous class bug with type resolution 2018-02-13 02:46:55 +01:00
Juan Martín Sotuyo Dodero cd9f4f2248 Merge branch 'pr-892' 2018-02-08 23:06:02 -03:00
Clément Fournier 1d9a2f194d Fix merge fail + checkstyle 2018-02-08 18:55:00 +01:00
Clément Fournier 40a5e3c569 Merge branch 'master' into improve-javaqualifiedname 2018-02-08 17:03:15 +01:00
Clément Fournier a039788dfb Fix the bugfix
Qualified names now use structural comparison to determine equality. Using toString
hid away some bugs. We still use toString to shortcut the comparison,
since it's cached.
2018-02-08 16:59:07 +01:00
Clément Fournier 3ede676e0a Fix two bugs with qname regex parsing 2018-02-08 16:24:46 +01:00
Clément Fournier 8d520b6d8d Update JavaParserVisitorReducedAdapter to consider MethodLike 2018-02-07 23:14:28 +01:00
Juan Martín Sotuyo Dodero 2909eb02b7 Merge branch 'pr-903' 2018-02-07 12:59:26 -03:00
Juan Martín Sotuyo Dodero ef85cf4c8f Update changelog, refs #903 2018-02-07 12:59:08 -03:00
Clément Fournier c245ef1ea9 Format test cases 2018-02-07 14:18:33 +01:00
Clément Fournier 45cb5f3252 Minor style corrections 2018-02-07 14:12:01 +01:00
Clément Fournier bb2e35b815 Fix ImmutableField false positive when lambda is in constructor
Fixes #855
2018-02-07 14:05:47 +01:00
Clément Fournier 240ccfb32f Improve a confusing code construct 2018-02-06 18:30:09 +01:00
Juan Martín Sotuyo Dodero 90527c646e Update changelog, refs #900 2018-02-05 02:30:22 -03:00
Clément Fournier 3d8d9ff013 Corrections for PR comments #901 2018-02-04 20:47:20 +01:00
Clément Fournier 5a3e1941d0 Use multi valued property as a PoC 2018-02-03 14:31:31 +01:00
Clément Fournier 5e8e125afa Replace synthetic proxy with static proxy for Xml nodes
Fixes #739
2018-02-03 14:24:24 +01:00
Juan Martín Sotuyo Dodero 117f4cf87a Merge branch 'pr-900' 2018-02-02 13:48:54 -03:00
reudismam 7e380e5d98 Use isEmpty method. 2018-02-02 12:28:25 -03:00
Andreas Dangel 7938dcd8c4 [ci] Add pmd-commits@lists.sourceforge.net for build notifications 2018-02-01 19:25:46 +01:00
Clément Fournier b30d64dd4f Make cyclo count lambdas separately 2018-02-01 00:28:32 +01:00
Clément Fournier 7e2930be3f Adapt the metrics framework to consider MethodLike 2018-02-01 00:28:32 +01:00
Clément Fournier ba10a60a7c Add JavaQualifiedName support for lambdas.
Add MethodLike superclass to ASTMethodDecl, ASTConstructorDecl, ASTLambdaExpr
2018-02-01 00:28:27 +01:00
Clément Fournier 1f6fc296c5 Split JavaQualifiedName into static factory + class 2018-01-31 22:44:59 +01:00
Clément Fournier 72a901089f Optimise format regex
Use possessive quantifiers to make it fail faster
2018-01-31 22:44:59 +01:00
Clément Fournier 332dadce2d Cleanup JavaQualifiedName to make it really immutable
Use an immutable list to avoid array copies everywhere
2018-01-31 22:44:59 +01:00
Clément Fournier 5fcfb0af8f Formatting and code rearrangement 2018-01-31 22:44:59 +01:00
Clément Fournier ece8c7e84c Add qualified name support for anonymous classes
* Simplify the API of JavaQualifiedName
* The name of an anonymous class is for now
  only available via JavaQualifiedName factories,
  not from the nodes
2018-01-31 22:44:59 +01:00
Clément Fournier a3c0f7d3ab Documentation 2018-01-31 22:44:59 +01:00
Clément Fournier f7636f27f3 Make JavaQualifiedName represent packages like in the JLS
The unnamed package is not represented as a lone full stop anymore.

Rename QualifiedNameTest into JavaQualifiedNameTest
2018-01-31 22:44:59 +01:00
Clément Fournier 55d3bbe881 Refactor ASTAnyTypeDeclaration into an abstract class.
Remove getQualifiedName's copypasta.
2018-01-31 22:44:59 +01:00
Clément Fournier 6ab52371cc Fix NPE in ForLoopCanBeForeach 2018-01-30 16:29:00 +01:00
Clément Fournier 47cfc3909c Merge branch 'master' into issue-784 2018-01-30 16:09:44 +01:00
Andreas Dangel 79882b1eb0 [ci] Fix coveralls integration: run a install first 2018-01-30 09:53:59 +01:00
Andreas Dangel 5c8016e58e Merge branch 'pr-889' 2018-01-30 09:43:29 +01:00
Andreas Dangel 257402cf95 Merge branch 'pr-890' 2018-01-30 09:34:06 +01:00
Juan Martín Sotuyo Dodero f86a06be4a Fix checkstyle 2018-01-29 23:26:42 -03:00
Juan Martín Sotuyo Dodero c2e11ddff2 [ci] Upgrade m-pmd-p
- Reenable pmd dogfoding
 - Upgrade to use PMD 6.0.1 on self
2018-01-29 23:19:43 -03:00
Juan Martín Sotuyo Dodero 75b60b8a88 Update changelog, refs #888 2018-01-29 14:12:54 -03:00
Juan Martín Sotuyo Dodero f9df6ed01e [java] Fix grammar for <> in Java 1.8
- Fixes #888
 - Allow the contents of an anonymous class to use diamong notation, but
the anonymous class itself can't use it
2018-01-29 14:10:40 -03:00
Juan Martín Sotuyo Dodero 53fa98a672 Merge branch 'pr-886' 2018-01-27 20:03:43 -03:00
Juan Martín Sotuyo Dodero 4c079ff9c5 Update changelog, refs #886 2018-01-27 20:03:26 -03:00
Matias Comercio bdf988030c Add missing unit test 2018-01-26 19:02:18 -03:00
Matias Comercio d8d271c2f1 Fix issue-885
False positive on Java rule: CompareObjectsWithEqualsRule

Enum class exlicit usage was not being considered an Enum type in the rule
2018-01-26 18:18:10 -03:00
Andreas Dangel 22a42ecd6f Merge branch 'pr-878' 2018-01-26 10:13:42 +01:00
Andreas Dangel 9062b4f09e [java] CommentRequiredRule: Add unit test
Add a unit test to verify the dysfunctionalReason is detected
correctly.

Refs #877
2018-01-26 09:58:50 +01:00
Juan Martín Sotuyo Dodero b439bb823f Merge branch 'pr-875' 2018-01-25 21:25:18 -03:00
Juan Martín Sotuyo Dodero 0360e0838e Update changelog, refs #875 2018-01-25 21:24:15 -03:00
Juan Martín Sotuyo Dodero 41de94776e Properly handle shortnames with comma-separated args
- Also added unit tests to make sure the behavior is as expected
2018-01-25 21:20:13 -03:00
Clément Fournier 91790c387d Merge branch 'pr-870' 2018-01-26 00:22:34 +01:00
Clément Fournier 21650ba85a Move util.documents into n.s.pmd.documents
Fix commit 40ad978 compilation errors
2018-01-26 00:20:38 +01:00
Juan Martín Sotuyo Dodero c34519431c Merge branch 'pr-828' 2018-01-25 19:55:33 -03:00
Juan Martín Sotuyo Dodero 476d9a6d4d Update changelog, refs #828 2018-01-25 19:54:16 -03:00
Juan Martín Sotuyo Dodero 6a801ee26c Move document classes out of the util package 2018-01-25 19:53:58 -03:00
Juan Martín Sotuyo Dodero a33958bc63 Merge branch 'pr-882' 2018-01-25 19:49:32 -03:00
Juan Martín Sotuyo Dodero f816bb65ba Merge branch 'pr-883' 2018-01-25 19:43:58 -03:00
Clément Fournier 35157be961 Update release notes, refs #784 2018-01-25 23:22:41 +01:00
Clément Fournier 69937a40e5 Fix ForLoopCanBeForeach flagging loops with two iterators
Resolves #784
2018-01-25 23:16:46 +01:00
Clément Fournier 34c29e93fb Update release notes, refs #825 2018-01-25 22:59:24 +01:00
Clément Fournier 6fb01ca19d ExcessiveClassLength considers annotation and enum types 2018-01-25 22:57:28 +01:00
Clément Fournier 3f38835d78 ExcessiveMethodLength considers constructors 2018-01-25 22:52:44 +01:00
Clément Fournier b7950cca1b Merge branch 'pr-868' 2018-01-25 18:46:03 +01:00
Clément Fournier 95eede5493 Update release notes, refs #868 2018-01-25 18:41:27 +01:00
Juan Martín Sotuyo Dodero 49a7c7d75b update broken url 2018-01-25 12:10:27 -03:00
Clément Fournier 0578b36145 Cleanup AbstractNode 2018-01-25 14:15:57 +01:00
Juan Martín Sotuyo Dodero ae0ef47e1d Merge branch 'pr-879' 2018-01-25 10:09:45 -03:00
gonzalo c25089ef9a PR Improvements - 3 2018-01-25 09:46:38 -03:00
Clément Fournier b1c5e3dfc0 Revert making AbstractVFNode and AbstractJspNode abstract
Revert me for 7.0.0

see #881, #879
2018-01-25 12:14:22 +01:00
gonzalo 80aba0c858 PR Improvements - 2 2018-01-24 23:35:22 -03:00
Clément Fournier 0316462916 Checkstyle 2018-01-25 03:13:22 +01:00
Clément Fournier 1bdca98f03 Flag deprecated impl to find it quickly 2018-01-25 03:10:04 +01:00
Clément Fournier 27ccd140ef Cleanup 2018-01-25 03:06:54 +01:00
Clément Fournier 6a3b332aee Abstract toString into AbstractNode, deprecate the implementation
Log that the default implementation will be removed
2018-01-25 03:02:44 +01:00
gonzalo 3d818b0963 PR Improvements - 1 2018-01-24 20:09:13 -03:00
Clément Fournier cd105125d8 Update release notes, refs #879 2018-01-24 19:36:17 +01:00
Clément Fournier 3c0bb45a60 Add getXPathNodeName to the Node interface
A default implementation is available in AbstractNode
to preserve compatibility with the previous way, which
used Object.toString.

Fixes #569
2018-01-24 19:22:36 +01:00
Juan Martín Sotuyo Dodero ccb8bae42d Update changelog, refs #877 2018-01-24 01:46:10 -03:00
Juan Martín Sotuyo Dodero 7ec99ba218 [java] Fix misconfiguration detection
- Resolves #877
2018-01-24 01:45:02 -03:00
Robert Sösemann c90061d067 Merge pull request #1 from pmd/master
Update my fork
2018-01-23 23:37:44 +01:00
Clément Fournier 0fb9c4678c Update release notes, refs #845 2018-01-23 21:17:31 +01:00
Clément Fournier 80bd38485a Merge branch 'pr-845'
Refs #543
2018-01-23 21:09:08 +01:00
Alberto Fernandez 9936b1f833 removed unnecesary counter 2018-01-23 17:56:10 +01:00
John Zhang aeb554ee62 Issue 872 fix
This commit attempts a fix to issue 872.
The inputFileName ('master' file) parameter may be null,
in which case the function returns just the file name if short name is required.
2018-01-23 11:46:02 +11:00
Travis CI (pmd-bot) 8aeddd09a4 Update documentation 2018-01-21 20:01:11 +00:00
Juan Martín Sotuyo Dodero 02e84360aa [doc] Update sidebar generation 2018-01-21 16:50:02 -03:00
Juan Martín Sotuyo Dodero 10d8b194bb Revert "Update documentation"
This reverts commit 3548fd14c0.
2018-01-21 16:24:40 -03:00
Juan Martín Sotuyo Dodero c436e9bd94 Fix checkstyle errors 2018-01-21 16:16:06 -03:00
Juan Martín Sotuyo Dodero 26288b0022 [core] Remove usages of deprecated PMD.VERSION
- Take the chance to add some helpers to PMDVersion that seem needed
 - Have CodeClimate renderer point to pmd.github.io rather than SF
2018-01-21 16:02:48 -03:00
Travis CI (pmd-bot) 3548fd14c0 Update documentation 2018-01-21 18:12:05 +00:00
Juan Martín Sotuyo Dodero 142fb16358 Merge branch 'pr-860' 2018-01-21 14:59:31 -03:00
Juan Martín Sotuyo Dodero 33edaeb46b Update changelog, refs #803 2018-01-21 14:52:55 -03:00
Juan Martín Sotuyo Dodero 527bfce72f Merge branch 'pr-803' 2018-01-21 14:52:00 -03:00
Juan Martín Sotuyo Dodero 77f3637f53 Remove quotes 2018-01-21 14:51:43 -03:00
Juan Martín Sotuyo Dodero 1065006b8a Upodate changelog, refs #790 2018-01-21 14:47:45 -03:00
Juan Martín Sotuyo Dodero e1e8ad5984 Merge branch 'pr-790' 2018-01-21 14:47:11 -03:00
Juan Martín Sotuyo Dodero 17c925b9db Update changelog, refs #830 2018-01-21 14:45:06 -03:00
Juan Martín Sotuyo Dodero 3de3335714 Merge branch 'pr-830' 2018-01-21 14:42:09 -03:00
Juan Martín Sotuyo Dodero 69fc4ffc2d Update changelog, refs #791 2018-01-21 14:39:57 -03:00
Juan Martín Sotuyo Dodero e6be5b3e44 Merge branch 'pr-818' 2018-01-21 14:39:07 -03:00
Andreas Dangel 5bcc09ccc4 Release script: add step to update docs/_config.yml 2018-01-21 16:51:52 +01:00
Andreas Dangel 182dadaa4b Prepare next development version 2018-01-21 16:45:02 +01:00
Andreas Dangel 8fbb156fd9 [maven-release-plugin] prepare for next development iteration 2018-01-21 16:42:50 +01:00
Andreas Dangel 0e460317e4 [maven-release-plugin] prepare release pmd_releases/6.0.1 2018-01-21 16:42:42 +01:00
Andreas Dangel 585b2c4642 Prepare pmd release 6.0.1 2018-01-21 16:30:51 +01:00
Andreas Dangel 34b9d23887 Update/fix release script
*   fix syntax error
*   allow to override the next version
2018-01-21 16:22:59 +01:00
Travis CI (pmd-bot) 81c5b27df0 Update documentation 2018-01-21 15:02:06 +00:00
Andreas Dangel b3f4520ed1 Merge branch 'pr-867' 2018-01-21 15:42:40 +01:00
Andreas Dangel 02989303a6 [java] Avoid double rule de-referincing in controversial and migrating_* 2018-01-21 15:42:28 +01:00
Andreas Dangel 594f7e3254 Merge branch 'pr-865' 2018-01-21 15:30:48 +01:00
Andreas Dangel f7ecfaa01b Update release notes, refs #865 2018-01-21 15:30:41 +01:00
gonzalo 9d7d89b669 Add XPath flow documentation && Made small refactor 2018-01-21 11:09:50 -03:00
Juan Martín Sotuyo Dodero 15db5ad0b4 [java] typeresolution points directly to categories
- Fixes #866
2018-01-21 06:21:55 -03:00
Juan Martín Sotuyo Dodero abc73bfc7b [core] Log all rules' movements to categories
- All rules will log where they where moved to, even if the ruleset is
referenced as a whole
 - All deprecation warnings now let's users know on which version
support will be removed.
2018-01-21 05:43:49 -03:00
Andreas Dangel c6bc5ff306 Merge branch 'pr-857'
Closes #827
2018-01-20 17:57:38 +01:00
Clément Fournier f8ca4a75d3 Extract Pattern constant from parse method 2018-01-20 01:53:23 +01:00
Andreas Dangel 3472bf1764 [doc] Fix wrong bootclasspath to be able to use java8 api 2018-01-18 16:33:33 +01:00
Andreas Dangel 7faba76809 Update release notes, fixes #848 2018-01-17 20:57:28 +01:00
Andreas Dangel 411be4ac00 [doc] Further changes for windows compatibility 2018-01-17 20:51:56 +01:00
Andreas Dangel 090975a972 [doc] Fix file handle leak in SidebarGenerator 2018-01-17 20:19:33 +01:00
Andreas Dangel 1ef5367498 [doc] Fix build/unit tests under windows
* expect line names with windows path normalized to unix paths
* normalize line endings
* File.separator might be a backslash and needs to be escaped in regex
2018-01-17 19:41:45 +01:00
Alberto Fernandez 2c2c2f4dd9 Checkstyle fixes 2018-01-17 16:06:54 +01:00
Alberto Fernandez 883bed3cf8 Better detection of corner cases
the firts changes checks for a exact level to search AdditiveExpression.

So code like
throw new Exception("something bad:" + (e)); gets undetected.

This change search if part of a AdditiveExpression to the base node.
2018-01-17 15:25:38 +01:00
Clément Fournier 6e461f09d7 Update release notes, refs #827 2018-01-17 00:15:35 +01:00
Clément Fournier 65949bcf6e Merge branch 'master' of github.com:pmd/pmd into issue-827 2018-01-17 00:15:13 +01:00
Clément Fournier 2ca4b347c3 Make TCC consider local classes.
If a local class is declared inside a method of the outer class,
then attribute accesses made by the local class count as if they
are made by the enclosing method.
2018-01-16 23:42:29 +01:00
Clément Fournier 8cfc073b8c Add local class support to JavaQualifiedName 2018-01-16 20:35:15 +01:00
Clément Fournier 27b4abe221 Add isLocal() to ASTClassOrInterfaceDeclaration 2018-01-16 18:18:23 +01:00
Juan Martín Sotuyo Dodero c843a6f534 Make test cases more direct
- No personal interpretation, but let Java process the values
2018-01-16 01:14:42 -03:00
Andreas Dangel 96cc4f01f3 Merge branch 'pr-849'
Closes #841
2018-01-15 20:45:34 +01:00
Andreas Dangel 23a673114c Merge branch 'pr-835' 2018-01-15 20:42:48 +01:00
Juan Martín Sotuyo Dodero fe53f8bb91 Update changelog, refs #841 2018-01-14 16:17:11 -03:00
Juan Martín Sotuyo Dodero 391c1e8842 Unify literal parsing logic 2018-01-14 16:15:22 -03:00
Juan Martín Sotuyo Dodero ab96e34099 [java] Resolve NumberFormatException
- InsufficientStringBufferDeclaration now supports all numbr formats
(even octal and binary)
 - We move the logic of understanding the literal value to the literal
node. Looking for other places where this logic is being replicated is
pending
2018-01-14 16:14:38 -03:00
Juan Martín Sotuyo Dodero a5b546d044 Java 7 compatible implementation 2018-01-13 21:01:37 -03:00
Juan Martín Sotuyo Dodero 79a43fac0f Update changelog, refs #831 2018-01-13 20:44:29 -03:00
Juan Martín Sotuyo Dodero 303f05d8d3 [java] Resolve StackOverflow in JavaTypeDefinitionSimple.toString()
- Resolves #831
2018-01-13 20:43:01 -03:00
Juan Martín Sotuyo Dodero 0c9f27bbbe Inline gitter badge 2018-01-13 20:42:22 -03:00
Juan Martín Sotuyo Dodero b0775343ca Merge pull request #840 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2018-01-13 20:41:48 -03:00
Juan Martín Sotuyo Dodero 554abc4ac9 Merge branch 'pr-846' 2018-01-13 20:40:46 -03:00
Andreas Dangel ff9a951c9e Determine java7 home with jdk_switcher 2018-01-13 11:23:26 +01:00
Andreas Dangel 4f62e84392 Use openjdk7
See https://raw.githubusercontent.com/michaelklishin/jdk_switcher/1e091549285fb0f2591cef679b4135cfbfcc0b4c/jdk_switcher.sh for the paths
See travis-ci/travis-ci#7964
2018-01-13 11:13:59 +01:00
Andreas Dangel 12409be1ef Update release notes, refs #842 2018-01-12 23:37:14 +01:00
Andreas Dangel 4ba1cbcb46 Use bootclasspath when building for java7
Note: this is only works correctly, if the property java7.home is set
Fixes #842
2018-01-12 23:36:18 +01:00
Alberto Fernandez a4d5ff683d Fix checkstyle 2018-01-12 23:31:58 +01:00
Alberto Fernandez 4f67d99c9f Fix false negative PreserveStackTrace on string concatenation
PMD should fire PreserveStackTrace in the following code

public void foo(String a) throws Exception {
    try {
        int i = Integer.parseInt(a);
    } catch(Exception e){
        throw new Exception("something bad:" + e);
        // Stack trace is lost, but no violation was reported!
    }
}

Closes pmd/pmd#543
2018-01-12 23:09:17 +01:00
Anand 3f71e7392e Remove dependency from pmd test 2018-01-11 15:22:59 -08:00
Anand 7a403acaa7 Add rule preventing the use of non existent annotations in apex 2018-01-11 15:22:49 -08:00
Andreas Dangel 9bc7074fb9 Merge branch 'pr-821' 2018-01-11 17:30:40 +01:00
Andreas Dangel b6fc30964e Add unit test, refs #817 2018-01-11 17:29:34 +01:00
Andreas Dangel 17ea5a89a0 Merge branch 'pr-820' 2018-01-11 17:16:04 +01:00
The Gitter Badger e6df2c4436 Add Gitter badge 2018-01-11 07:48:19 +00:00
Anand 96fd8fbca6 Merge remote-tracking branch 'Up2Go/master'
# Conflicts:
#	pmd-apex/src/main/resources/rulesets/apex/ruleset.xml
2018-01-09 17:33:32 -08:00
gonzalo 40ad978d8f Receive Charset of Document in the constructor 2018-01-08 08:56:40 -03:00
gonzalo de09472421 Change filePath type from String to Path 2018-01-08 02:34:30 -03:00
gonzalo 000d72d3be Change name in document operations comparator inner method && Change visibility of getter in DocumentFile 2018-01-08 02:29:44 -03:00
gonzalo bb8b2cdd4e [WIP] Working fix for <Line, Offset> mapping to support any type of line separators in the same source file && other minor fixes 2018-01-08 01:55:52 -03:00
Clément Fournier 4b43bbcb19 Merge branch 'pr-822' 2018-01-08 00:33:17 +01:00
Juan Martín Sotuyo Dodero dd0c94a082 Merge branch 'pr-826' 2018-01-07 18:17:31 -03:00
Juan Martín Sotuyo Dodero 4ce6a019e1 Add test scenario 2018-01-07 17:33:33 -03:00
Tobias Weimer fd51f6254a Update performance.xml
Added missing CDATA
2018-01-07 19:19:17 +01:00
Tobias Weimer af4c5b2a87 Update performance.xml
Added note about Arrays.asList()
2018-01-05 15:47:16 +01:00
Tobias Weimer 142e533833 Update performance.xml
new Boolean(), new Byte() and new Short() are deoprecated in JDK 9 too.
2018-01-05 15:29:59 +01:00
gonzalo 40bb0a0fe6 Remove Java 8 and 9 language usages 2018-01-03 23:37:58 -03:00
gonzalo f09a9b62bd Remove source/target configuration for maven-compiler-plugin added by IDEA 2018-01-03 12:03:13 -03:00
gonzalo 8f6484cadc Add operations to manipulate a document 2018-01-03 11:30:07 -03:00
Andreas Dangel baee671c4a Update release notes, refs #782 2018-01-01 16:33:35 +01:00
Clément Fournier 17dee8d1aa Merge branch 'pr-823' 2017-12-31 18:54:14 +01:00
Juan Martín Sotuyo Dodero 72b22cfa5f Update changelog, refs #812 2017-12-31 01:38:26 -03:00
Juan Martín Sotuyo Dodero 2059eac54b [java] Fix concurrency issue on metrics' framework
- Resolves #812
2017-12-31 01:36:56 -03:00
Juan Martín Sotuyo Dodero 99f8a72f27 Update changelog, refs #800 2017-12-31 01:23:13 -03:00
Juan Martín Sotuyo Dodero c64f6af157 [java] Avoid NPE in ForLoopCanBeForeachRule
- Take the chance to make this rule use the rulechain
 - This partially fixes #800, but the FN is still unhandled
2017-12-31 01:20:04 -03:00
Juan Martín Sotuyo Dodero c10a8c6844 Update changelog, refs #817 2017-12-31 01:03:13 -03:00
Juan Martín Sotuyo Dodero 83496c0e59 [java] Fix NPE on UnnecessaryModifierRule
- Fixes #817
2017-12-31 01:01:30 -03:00
Juan Martín Sotuyo Dodero ec7f64fe55 Update changelog, refs #814 2017-12-31 00:49:59 -03:00
Juan Martín Sotuyo Dodero 729d77614f Handle more kinds of errors
- Handle equally incomplete classpath, having a classpath which
   requires a different JRE version than the one used to run PMD and
   others.
 - Fixes #814
2017-12-31 00:48:23 -03:00
Clément Fournier ea63134e6b Reorganise sidebar and files 2017-12-31 00:36:18 +01:00
Andreas Dangel f4577f9e14 [core] Only issue a deprecation warning, if the referenced ruleset is not empty
and all rules have been deprecated.
Fixes #782
2017-12-28 17:17:11 +01:00
Juan Martín Sotuyo Dodero cd58d15bc2 Merge branch 'pr-806' 2017-12-24 13:35:45 -03:00
Andreas Dangel 4700692e29 [java] Rewrite GuardLogStatementRule without XPath
- uses now a Java only implementions
- Fixes #783
2017-12-24 11:51:29 +01:00
Andreas Dangel 0ce2939c6b Change version to 6.0.1-SNAPSHOT 2017-12-23 09:54:03 +01:00
Andreas Dangel 0c46f3b6dc Merge branch 'pr-804' 2017-12-23 09:41:58 +01:00
Juan Martín Sotuyo Dodero 3d75a7fdfd Update changelog, refs #794 2017-12-23 02:03:41 -03:00
Juan Martín Sotuyo Dodero f1b4674505 Update docs
- Be more clear as to how to enable incremental analysis
 - Fix broken links
2017-12-23 02:02:09 -03:00
Juan Martín Sotuyo Dodero d5a7edf7ff Log links to the proper PMD version 2017-12-23 02:01:43 -03:00
Juan Martín Sotuyo Dodero 19cda30527 Merge branch 'pr-798' 2017-12-23 00:57:09 -03:00
Andreas Dangel 109f458dbf Fixes #793 [java] Parser error with private method in nested classes in interfaces
*   Remember old state to allow nesting
*   Fix ASTMethodDeclaration.isInterfaceMember
*   Extended tests
2017-12-22 12:03:20 +01:00
Tobias Weimer 99ea002a95 Update similarprojects.md
Added SpotBugs
2017-12-21 20:58:13 +01:00
Clément Fournier bc95ca803c Beanify controllers, new settings persistence logic
Add property edition to the XPath panel
2017-12-21 17:08:11 +01:00
Juan Martín Sotuyo Dodero b25e68d907 Merge branch 'pr-799' 2017-12-21 00:35:48 -03:00
Juan Martín Sotuyo Dodero 3f478bc6f3 Update changelog, refs #799 2017-12-21 00:35:05 -03:00
Travis CI (pmd-bot) ca41530cf3 Update documentation 2017-12-21 02:41:34 +00:00
Juan Martín Sotuyo Dodero a42203edc4 Merge branch 'pr-786' 2017-12-20 23:32:30 -03:00
Juan Martín Sotuyo Dodero 0d33ba12b2 Update changelog, refs #786 2017-12-20 23:31:54 -03:00
Juan Martín Sotuyo Dodero 481dcc85b3 Merge branch 'pr-789' 2017-12-20 23:27:56 -03:00
Juan Martín Sotuyo Dodero 9788b8a998 Merge branch 'pr-796' 2017-12-20 23:25:04 -03:00
Juan Martín Sotuyo Dodero 91bce046f5 Update change log, refs #796 2017-12-20 23:24:37 -03:00
Robert Sösemann 9304c70084 Fixes #788 [apex] Method chaining breaks ApexCRUDViolation 2017-12-20 23:25:40 +01:00
Andreas Dangel 64b862eef9 Fixes #793 [java] Parser error with private method in nested classes in interfaces 2017-12-20 22:42:34 +01:00
Andreas Dangel ef41c71870 github - Update issue template 2017-12-20 20:39:41 +01:00
Robert Sösemann f267a8f7c7 Fixed https://github.com/pmd/pmd/issues/792 2017-12-20 15:58:12 +01:00
Tobias Weimer 766565a0bf Update performance.xml
new Integer() and new Long() is deoprecated in JDK 9.
2017-12-19 20:55:48 +01:00
Tobias Weimer fbd9306889 Update performance.xml
Reference to Arrays.copyOf
2017-12-19 20:52:23 +01:00
Tobias Weimer 75fe76cbf5 Update errorprone.xml
Note that Oracle has declared Object.finalize() as deprecated since JDK 9.
2017-12-19 20:48:45 +01:00
Clément Fournier 904924a0c5 Update framework impl page 2017-12-19 12:25:29 +01:00
Clément Fournier 4f7786abc9 Update metrics tuto page 2017-12-19 00:40:00 +01:00
Clément Fournier c5ddb2fa3c Remove code ref 2017-12-18 12:50:45 +01:00
Clément Fournier 42deb3791c Fix #785: NPE with metrics on empty declarations 2017-12-17 12:59:49 +01:00
Andreas Dangel b3161639f8 [doc] Update Ruby/Jekyll/Gems 2017-12-15 18:26:26 +01:00
Andreas Dangel 1e25611991 [doc] next version 2017-12-15 16:50:58 +01:00
Andreas Dangel 342b5c3c1d [ci] fix uploading doc to pmd.github.io during release 2017-12-15 16:46:34 +01:00
Andreas Dangel 05d29f4c9b [doc] fix documentation of rule pom/ProjectVersionAsDependencyVersion 2017-12-15 16:46:34 +01:00
Andreas Dangel cb954e93e5 Prepare next development version 2017-12-15 16:45:46 +01:00
Travis CI (pmd-bot) cdc33280d6 Update documentation 2017-12-15 15:21:42 +00:00
Andreas Dangel a975048655 [maven-release-plugin] prepare for next development iteration 2017-12-15 16:01:22 +01:00
Andreas Dangel 9b6fe90225 [maven-release-plugin] prepare release pmd_releases/6.0.0 2017-12-15 16:01:14 +01:00
Andreas Dangel 63742b98e9 Avoid pmdVersion property which conflicts with releasing
See https://issues.apache.org/jira/browse/MRELEASE-932
2017-12-15 15:50:56 +01:00
Andreas Dangel e88db416b2 [doc] Update release docu 2017-12-15 15:39:59 +01:00
Andreas Dangel bab09de827 Prepare pmd release 6.0.0 2017-12-15 15:39:39 +01:00
Travis CI (pmd-bot) bc66441da6 Update documentation 2017-12-15 11:12:04 +00:00
Andreas Dangel ca07aa2964 [doc] Update release notes, docs 2017-12-15 12:02:24 +01:00
Andreas Dangel 5eb3ecd5ad [core] Make sure, a language with empty version selects the default version 2017-12-15 12:02:04 +01:00
Andreas Dangel d6a9be55a8 Unify rule category names 2017-12-15 11:22:33 +01:00
Andreas Dangel 998cad8595 [java] fix PMDCoverageTest ruleset 2017-12-15 11:13:35 +01:00
Andreas Dangel bd77ba6a0f [ci] Go back to java8 in order to include scala in the release 2017-12-15 11:05:36 +01:00
Andreas Dangel a61b2e16c1 [scala] Properly activate/decativate scala depending on java version 2017-12-15 10:58:09 +01:00
Andreas Dangel 02fadc1689 [core] Fix classloader closed issue when executing Ant task
Note: the problem (ClassNotFoundExceptions) only shows up with java8
- with java9 the classloader seems to be still usable, even after
we closed it...
2017-12-15 10:32:06 +01:00
Andreas Dangel 99d1e96b1b [doc] Update doc regarding properties
refs #504, refs #762
2017-12-11 19:50:33 +01:00
Andreas Dangel 7e5c272f17 release notes: add missing toc entry 2017-12-09 10:44:39 +01:00
Travis CI (pmd-bot) 5ae9607cfc Update documentation 2017-12-09 09:42:47 +00:00
Andreas Dangel c8645440f2 Update release notes with new rules 2017-12-09 10:24:30 +01:00
Andreas Dangel 1bdb412c09 Merge branch 'pr-764' 2017-12-09 10:12:12 +01:00
Andreas Dangel 060848a455 Update release notes, refs #764
closes #762
closes #763
2017-12-09 10:11:10 +01:00
Andreas Dangel 2f4e1ba20d Update release notes, closes #766 2017-12-09 09:44:29 +01:00
kenji21 56cead8423 Add Associated Type Constraints & Class and Protocol Existential example
Update token count to match these additions already managed by the
grammar
2017-12-08 06:13:11 +01:00
kenji21 b10e21df7f Add more swift4 syntax and update grammar for multiline 2017-12-08 06:06:19 +01:00
kenji21 315bb87c7f Update Swift.g4 grammar to have swift4 keypath support 2017-12-08 06:06:19 +01:00
Juan Martín Sotuyo Dodero 83c15e2e45 Merge branch 'pr-774' 2017-12-08 00:59:32 -03:00
Juan Martín Sotuyo Dodero 9c832e3ac5 Update changelog, refs #774 2017-12-08 00:59:03 -03:00
Juan Martín Sotuyo Dodero 0f9e521ea7 Update docs 2017-12-08 00:54:48 -03:00
Juan Martín Sotuyo Dodero 3817dc2782 Improve docs 2017-12-08 00:42:56 -03:00
Juan Martín Sotuyo Dodero 53a9449141 Use autogenerated versions of docs 2017-12-08 00:39:29 -03:00
Travis CI (pmd-bot) 5a228d2b6f Update documentation 2017-12-08 01:56:40 +00:00
Juan Martín Sotuyo Dodero b32644c744 Merge branch 'pr-775' 2017-12-07 22:48:36 -03:00
Juan Martín Sotuyo Dodero dc75904de6 Make sure we only recomend this to "modern" JVMs 2017-12-07 22:48:08 -03:00
Juan Martín Sotuyo Dodero 8accdf01a4 Merge branch 'pr-733' 2017-12-07 22:41:15 -03:00
Andreas Dangel a86aea2379 [apex] Create separate module "pmd-apex-jorje" which provides the apex jorje parser 2017-12-06 20:14:03 +01:00
Andreas Dangel 6a5e49efee [apex] Attach apex jorje jar using classifier "apex-jorje" 2017-12-05 22:34:43 +01:00
Andreas Dangel 38bc6bf1fa [apex] Fix suppress warnings support 2017-12-04 21:44:57 +01:00
Andreas Dangel 892a673c9f [apex] Remove empty catches, fix old reflections calls in Helper 2017-12-04 21:44:57 +01:00
Andreas Dangel dbcd36cd7a [apex] Fix ApexCRUDViolation rule
- reflection not necessary anymore
- constructor is now not anymore returned
as <init> but as the actual name
2017-12-04 21:44:57 +01:00
Andreas Dangel 7f8c8a0854 [apex] Fix line/column numbering 2017-12-04 21:44:57 +01:00
Andreas Dangel 29c7061bde [apex] Adjust to new apex jorje 2017-12-04 21:44:52 +01:00
Andreas Dangel 6caad3485c [apex] Add script to create minimized apex jorje jar, add jar as dependency 2017-12-04 21:14:27 +01:00
Andreas Dangel 7fa49aacc6 [apex] Declare transitive dependencies 2017-12-04 21:13:54 +01:00
Travis CI (pmd-bot) e8023e8913 Update documentation 2017-12-04 04:41:05 +00:00
Juan Martín Sotuyo Dodero 2ff93cc82e Merge branch 'pr-772' 2017-12-04 01:33:05 -03:00
Travis CI (pmd-bot) 8405ce3d65 Update documentation 2017-12-03 18:48:50 +00:00
Andreas Dangel b3a7271b98 Merge branch 'pr-771' 2017-12-03 19:32:19 +01:00
Andreas Dangel 83b2e91f3d Update release notes, closes #768 2017-12-03 19:22:11 +01:00
Andreas Dangel 07cb937d6e [java] Update OptimizableToArrayCall rule for current JVMs
See https://sourceforge.net/p/pmd/bugs/1454/
and https://shipilev.net/blog/2016/arrays-wisdom-ancients/
2017-12-01 11:41:23 +01:00
Chas Honton ac36d678bb Updates per suggestions; merge four rules into one 2017-11-30 21:53:48 -08:00
Chas Honton 51241368b3 Avoid using FileInput/Output - see JDK-8080225 2017-11-30 20:10:04 -08:00
Andreas Dangel e84800b34c Update ruleset factory compatibility 2017-11-30 22:54:07 +01:00
Andreas Dangel 0f96c82695 Update release notes, closes #457 2017-11-30 22:49:34 +01:00
Andreas Dangel 5e3b4504d8 [java] Remove old rules GuardDebugLogging and GuardLogStatementJavaUtil 2017-11-30 22:48:01 +01:00
Andreas Dangel 1447ac8a4a [java] Merge GuardDebugLogging and GuardLogStatementJavaUtil into
the rule GuardLogStatement
2017-11-30 22:38:14 +01:00
Clément Fournier 2c94dd993d Corrections for PR #771 2017-11-30 19:31:11 +01:00
Clément Fournier 41a6b78231 Revert back to __ from :: for Apex namespaces 2017-11-30 18:38:11 +01:00
Clément Fournier 41a3202a18 Fix Apex metrics framework failing on triggers, refs #768 2017-11-30 15:22:26 +01:00
Clément Fournier 36ba0e9581 Add a handle on the value parser of the property 2017-11-30 11:34:44 +01:00
Clément Fournier 53f6c39f65 Make the constants available from the string type id 2017-11-29 00:18:40 +01:00
Clément Fournier b81158ecf0 Convert PropertyDescriptorUtil to an enum and enrich its interface
refs #763
2017-11-28 19:44:24 +01:00
Clément Fournier 539d541ffd Hide factories of MethodProperty, MethodMultiProperty, FileProperty from XPath rules
refs #762
2017-11-28 19:02:29 +01:00
Clément Fournier abdb96238d Improve builders interface 2017-11-28 18:49:23 +01:00
Travis CI (pmd-bot) 345cc50f78 Update documentation 2017-11-27 20:11:47 +00:00
Andreas Dangel ae6894c73f Merge branch 'pr-761' 2017-11-27 20:57:45 +01:00
Andreas Dangel a0de21003a Update release notes, refs #760 2017-11-27 20:57:23 +01:00
Andreas Dangel be29ba44e2 Merge branch 'pr-758' 2017-11-27 20:55:42 +01:00
Andreas Dangel cbeaea0e73 Update release notes, refs #758 2017-11-27 20:54:37 +01:00
Andreas Dangel 7976170300 [doc] Update working with properties
Refs #736
2017-11-27 20:48:38 +01:00
Andreas Dangel 8eb5170b31 Merge branch 'pr-736' 2017-11-27 20:47:27 +01:00
Andreas Dangel acef94f28a Update release notes, refs #736 2017-11-27 20:46:44 +01:00
Juan Martín Sotuyo Dodero 309b964441 [apex] Avoid FPs on non-existing else block
- IfElseStatement always has 2 BlockStatements, for the if and the
   else, even if not present on the code. When that happens, the phantom
   block is given the same location the parent has.
 - Fixes #760
2017-11-27 10:43:23 -03:00
Clément Fournier 4724ed4636 Expose the full mappings in property descriptor util 2017-11-25 16:15:42 +01:00
Juan Martín Sotuyo Dodero decf2ae7d0 Merge branch 'pr-756' 2017-11-25 00:26:02 -03:00
Travis CI (pmd-bot) fe6592882c Update documentation 2017-11-25 02:43:53 +00:00
Juan Martín Sotuyo Dodero e3a6ee76d4 Merge branch 'pr-753' 2017-11-24 23:35:47 -03:00
Andreas Dangel 456432ad6f Resolve deprecated usages 2017-11-24 20:48:02 +01:00
Andreas Dangel 08b018274c [core] Fix rule loading - only override the flags, if they are true
Avoid disabling type resolution
2017-11-24 20:45:13 +01:00
Andreas Dangel b879e76d8b Update release notes 2017-11-24 20:21:12 +01:00
Andreas Dangel fa1e16fcf8 [java] Remove FUTURE comment from AccessNode 2017-11-24 20:15:58 +01:00
Andreas Dangel 4214a75fc4 [core] Add bean-like getter/setter for Rule 2017-11-24 20:13:20 +01:00
Andreas Dangel 2a1b7addb4 Revert "[core] add temporary support for maven debug output"
This reverts commit 61376f8112.

With https://issues.apache.org/jira/browse/MPMD-246 this is not needed
anymore.
2017-11-24 18:11:12 +01:00
Andreas Dangel 71ee2b6d9e Merge branch 'pr-749' 2017-11-24 14:36:55 +01:00
Andreas Dangel 62eb616ea6 Update release notes, refs #749 2017-11-24 14:36:06 +01:00
Andreas Dangel 114afdaa0e [doc] Fix type names of property value types 2017-11-24 14:35:00 +01:00
Andreas Dangel c49ae6b769 Merge branch 'pr-742' 2017-11-24 11:51:18 +01:00
Andreas Dangel 6c14880afa Merge branch 'pr-741' 2017-11-24 11:45:10 +01:00
Andreas Dangel 4ad209c81f Update release notes, refs #732 2017-11-24 11:44:59 +01:00
Andreas Dangel 3bad361e2f [java] Change MoreThanOneLoggerRule to avoid classloader issues
refs #732
2017-11-24 11:43:23 +01:00
Andreas Dangel 2d0f6ffc89 [doc] Fix automated links generation
Resolves #751
2017-11-24 09:51:08 +01:00
Andreas Dangel 3132080b83 [doc] Fix how moved and deprecated rules are linked
Text should be the old name, the link should point to the new name/rule
2017-11-24 09:28:05 +01:00
Travis CI (pmd-bot) 70fc3d75bb Update documentation 2017-11-23 20:47:04 +00:00
Andreas Dangel 8b77f6769e Merge branch 'pr-748' 2017-11-23 21:27:41 +01:00
Andreas Dangel 31725ae241 Merge branch 'pr-747' 2017-11-23 21:25:36 +01:00
Travis CI (pmd-bot) 9bfde52869 Update documentation 2017-11-23 19:39:06 +00:00
Andreas Dangel 6136de2d28 Fix Metrics ruleset name 2017-11-23 20:30:32 +01:00
Andreas Dangel f436e8b38f [ci] fix sonar.host.url - it's now https://sonarcloud.io 2017-11-23 20:23:31 +01:00
Andreas Dangel 72b5bda178 Deprecate the old bgastviewer implementation 2017-11-23 20:20:38 +01:00
Juan Martín Sotuyo Dodero a95b2a6d85 Deprecate the old designer's classes 2017-11-23 00:39:43 -03:00
Juan Martín Sotuyo Dodero cbef7a5602 Merge branch 'pr-731' 2017-11-22 18:03:49 -03:00
Andreas Dangel 204e64ea62 Merge branch 'pr-711' 2017-11-22 21:51:31 +01:00
Andreas Dangel 7d7189f749 Update release notes, refs #711 2017-11-22 21:43:57 +01:00
Andreas Dangel c17322a9e6 Add new designer to start scripts 2017-11-22 21:37:38 +01:00
Andreas Dangel 47a29fdb17 Add break and adjust logging 2017-11-22 21:31:13 +01:00
Andreas Dangel 16c3c161bc Merge remote-tracking branch 'origin/master' into api-ruleset-compatibility 2017-11-22 21:29:28 +01:00
Clément Fournier 9c0b865477 Add disclaimer and xpath example 2017-11-21 22:38:28 +01:00
Clément Fournier 6fa288497a Remove the remains of the old article.
That part was about developing a UI for an IDE plugin. The info was heavily outdated, and the up to date info can be found in the javadoc of the PropertyDescriptor interface.
2017-11-21 22:38:28 +01:00
Clément Fournier c43717f66d Fix some inconsistencies 2017-11-21 22:38:27 +01:00
Clément Fournier 09d9cdd3a5 Update title, link and sidebar 2017-11-21 22:38:27 +01:00
Clément Fournier 02f0ab05a8 Remove outdated info 2017-11-21 22:38:27 +01:00
Clément Fournier 2101233235 Complete XPath properties doc 2017-11-21 22:38:13 +01:00
Juan Martin Sotuyo Dodero b4e0cd3649 [java] EmptyCatchBlock ignore expected by default
- We chnge the default to ignore exceptions named `ignore` or
   `expected`, users can still override this behaviour.
2017-11-21 18:30:50 -03:00
Juan Martin Sotuyo Dodero 4e29faa3eb [java] Merge EmptyStaticInitializer into EmptyInitializer 2017-11-21 17:51:59 -03:00
Juan Martin Sotuyo Dodero 802e7a7df0 Fix checkstyle 2017-11-21 17:51:34 -03:00
Clément Fournier b654b1b839 Complete properties doc for java rules 2017-11-21 21:21:46 +01:00
Juan Martín Sotuyo Dodero 4cae41deb9 Merge branch 'master' into api-ruleset-compatibility 2017-11-21 14:54:41 -03:00
Juan Martín Sotuyo Dodero a9ce410845 Merge branch 'master' into api-ruleset-compatibility 2017-11-21 14:53:42 -03:00
Juan Martin Sotuyo Dodero e79cc20da4 Merge branch 'pr-723' 2017-11-21 14:50:42 -03:00
Juan Martin Sotuyo Dodero 23035524b9 Update changelog, refs #723 2017-11-21 14:50:00 -03:00
Juan Martin Sotuyo Dodero 4f5b18dfba Simplifications 2017-11-21 14:48:06 -03:00
Juan Martin Sotuyo Dodero 62397892ae Merge branch 'pr-746' 2017-11-21 13:49:16 -03:00
Juan Martin Sotuyo Dodero 42676fee09 Update changelog, refs #746 2017-11-21 13:49:02 -03:00
Clément Fournier 77048f16ea Fix another few things 2017-11-21 17:33:29 +01:00
Clément Fournier 60abf4994f Fix typo in incremental analysis log message 2017-11-21 17:14:21 +01:00
Juan Martin Sotuyo Dodero 1ad3c7e194 Merge branch 'pr-744' 2017-11-21 12:50:04 -03:00
Juan Martin Sotuyo Dodero 0bdf831845 Update changelog, refs #744 2017-11-21 12:49:49 -03:00
Juan Martin Sotuyo Dodero b5fc443ae3 Further improve the CPD supported language list 2017-11-21 12:48:43 -03:00
Travis CI (pmd-bot) 41b6644c1f Update documentation 2017-11-21 15:43:00 +00:00
Juan Martin Sotuyo Dodero 8edd3ed091 Merge branch 'pr-733' 2017-11-21 12:34:06 -03:00
Michał Kuliński 452a77abfd Added Apex to supported languages 2017-11-21 16:32:58 +01:00
Juan Martin Sotuyo Dodero 324e0216df Update changelog, refs #733 2017-11-21 12:29:41 -03:00
Clément Fournier 5a978cb7b0 Make CommentRequirement private 2017-11-21 11:45:09 +01:00
Clément Fournier 632ed17464 Corrections for PR #723 2017-11-21 11:28:25 +01:00
Juan Martin Sotuyo Dodero 6028e77e62 [core] Improve classloaders
- Avoid a race condition that could produce multiple threads loading
   the same class at the same time.
 - Fixed a broken check on PMDASMClassLoader that would always return
   false.
2017-11-21 00:16:20 -03:00
Juan Martin Sotuyo Dodero 3ca4b71f72 [java] Don't expect to load classes from execution classpath
- We can't assume the classes needed for analysis will be available
in the execution classpath, we need to make sure to load them from the
same classloader / auxclaspath used during analysis.
 - Resolves #732
2017-11-21 00:12:52 -03:00
Travis CI (pmd-bot) 0ff05ed740 Update documentation 2017-11-20 20:38:24 +00:00
Juan Martin Sotuyo Dodero d8fdbde68d Merge branch 'pr-727' 2017-11-20 17:29:41 -03:00
Juan Martin Sotuyo Dodero a2985b89ab Update changelog, refs #727 2017-11-20 16:57:51 -03:00
Juan Martin Sotuyo Dodero 3ffeeca518 Only allow null default values 2017-11-20 16:56:10 -03:00
Juan Martin Sotuyo Dodero 73df7d048a Merge branch 'pr-729' 2017-11-20 16:37:12 -03:00
Juan Martin Sotuyo Dodero 301f8db6f5 Merge branch 'pr-738' 2017-11-20 15:49:16 -03:00
Clément Fournier 7fa795ba89 Revert "Fix xml/InvalidDependencyTypes property", which triggers #739
This reverts commit 9e6be2d8a2.
2017-11-19 18:17:37 +01:00
Clément Fournier d4b39729f1 Make attributes support full value range 2017-11-19 16:19:18 +01:00
Travis CI (pmd-bot) 45c74ba6f6 Update documentation 2017-11-19 13:06:13 +00:00
Andreas Dangel c4b8c72cf6 Merge remote-tracking branch 'origin/master' 2017-11-19 13:53:21 +01:00
Andreas Dangel 98ac510443 Merge branch 'pr-734' 2017-11-19 13:47:02 +01:00
Andreas Dangel 35bed4e2d0 Update release notes, refs #734 2017-11-19 13:44:54 +01:00
Andreas Dangel fd0cdb9514 Mark property "reportLevel" of CyclomaticComplexityRule as deprecated 2017-11-19 13:39:21 +01:00
Clément Fournier 9e6be2d8a2 Fix xml/InvalidDependencyTypes property 2017-11-19 13:30:20 +01:00
Travis CI (pmd-bot) ab80d18ff6 Update documentation 2017-11-19 09:54:59 +00:00
Andreas Dangel 7a29a71c0d Merge branch 'pr-737' 2017-11-19 10:38:55 +01:00
Andreas Dangel 05836de7a8 Update release notes, refs #737 2017-11-19 10:38:16 +01:00
Andreas Dangel d2d79bcfca Update release notes, mention the new rule categories 2017-11-19 10:31:10 +01:00
Andreas Dangel 9b8571e688 [doc] Mention rule categories 2017-11-19 10:30:38 +01:00
Andreas Dangel ca3960a106 [doc] Remove reference to gettingstarted ruleset 2017-11-19 09:46:49 +01:00
Clément Fournier 3055d25aac Fix doc 2017-11-18 15:34:42 +01:00
Clément Fournier 79dd6c525f Fix npath documentation bad rendering 2017-11-18 15:31:58 +01:00
Clément Fournier 3f91560c11 Remove directories from recent files 2017-11-18 14:47:51 +01:00
Clément Fournier 38034fe517 Make export wizard work! 2017-11-17 22:06:45 +01:00
Clément Fournier 456ae3db98 Put list cell factories into fxml 2017-11-17 21:58:50 +01:00
Clément Fournier 2dce5e1ea5 Improve scope hierarchy node display 2017-11-17 21:13:19 +01:00
Clément Fournier f9c00d8408 Cleanup pom 2017-11-17 20:33:16 +01:00
Clément Fournier 652b80004d Make Saxon support multival properties as XPath sequences 2017-11-17 18:41:07 +01:00
Clément Fournier 09da4255df Change List<> syntax to List[] for xpath prop descriptors 2017-11-17 14:09:34 +01:00
Andreas Dangel 42da2b89f2 [doc] Use category instead of rulesets 2017-11-13 21:29:24 +01:00
Clément Fournier 7cab3cbc73 Move CyclomaticComplexity from metrics to design w/ deprecated property 2017-11-12 13:33:05 +01:00
Juan Martín Sotuyo Dodero 227a0046c5 Merge branch 'pr-726' 2017-11-11 19:14:02 -03:00
Juan Martín Sotuyo Dodero 64627765e3 Update changelog, refs #726 2017-11-11 19:13:16 -03:00
Clément Fournier 2eee7a1276 Decouple enum constants from their labels 2017-11-11 22:40:02 +01:00
Clément Fournier a9843c6a44 Add accessor comment requirement property 2017-11-11 22:17:11 +01:00
Clément Fournier 3e1a787f26 Fix override property 2017-11-11 22:17:11 +01:00
Clément Fournier 57deb9d78d Pretty print the messages 2017-11-11 22:17:11 +01:00
Clément Fournier e316fcc64f Remove some garbage 2017-11-11 22:17:00 +01:00
Clément Fournier 2efb52be14 Add ignore override property 2017-11-11 20:59:27 +01:00
Andreas Dangel ea38e30204 Update release notes, refs #394 2017-11-11 14:31:27 +01:00
Andreas Dangel 58b996a634 [core] Add all rules of a ruleset, if the ruleset itself is deprecated
that is: The ruleset only contains deprecated rules.
2017-11-11 14:06:50 +01:00
Clément Fournier bf3ce9d37a Allow null value for numeric properties 2017-11-11 12:20:43 +01:00
Clément Fournier b9a605c86a Shorten test case 2017-11-11 12:07:51 +01:00
Andreas Dangel 0e389af616 [core] Add old RuleSetFactory constructor back for API backwards compatibility 2017-11-11 12:07:13 +01:00
Andreas Dangel ba3e2bc788 [core] RuleSetFactory: Filter by minimumPriority at the end
-   Resolves #394
2017-11-11 12:03:45 +01:00
Clément Fournier 64d07ccf5a Add annotations to apex syntax highlighter 2017-11-10 20:34:08 +01:00
Andreas Dangel 6b5e8ce344 [doc] List the rules of the additional rulesets 2017-11-10 20:18:23 +01:00
Clément Fournier 2979d82755 Allow tokens to receive several css classes 2017-11-10 18:57:59 +01:00
Andreas Dangel 490fe312f2 [doc] Move the additional rulesets to the bottom 2017-11-10 17:59:04 +01:00
Andreas Dangel 26ba531c85 [doc] Add sidebar entries for rule categories 2017-11-10 17:49:16 +01:00
Andreas Dangel 9a9fb0b12f [doc] Scan for additional rulesets and list them per language 2017-11-10 14:23:22 +01:00
Andreas Dangel 06a1244e15 [doc] Add unit test for all rulesets and fix existing rulesets 2017-11-10 14:03:05 +01:00
Andreas Dangel 1c9c750a0a [doc] Strip leading whitespace indentation from rule description 2017-11-10 11:44:35 +01:00
Andreas Dangel 490bf99a01 [doc] Mark deprecated properties 2017-11-10 10:35:55 +01:00
Travis CI (pmd-bot) c647f73811 Update documentation 2017-11-09 21:19:35 +00:00
Andreas Dangel fe086dd1ee Merge remote-tracking branch 'pmd-sf/master' 2017-11-09 22:07:30 +01:00
Andreas Dangel 3b624bf687 Merge branch 'pr-722' 2017-11-09 22:04:46 +01:00
Andreas Dangel 24d79fe5b9 Merge branch 'pr-722' 2017-11-09 21:57:28 +01:00
Andreas Dangel 80638f663d Update release notes, refs #722 2017-11-09 21:57:21 +01:00
Clément Fournier c1ccc26de8 Fix #725: numeric property descriptors now check their default value 2017-11-09 21:25:41 +01:00
Clément Fournier 947d4ab1a8 Fix issue #721 2017-11-09 20:54:03 +01:00
Clément Fournier 31696c7397 Deprecate compat property for 7.0.0 2017-11-09 20:28:09 +01:00
Clément Fournier 695defcc61 Add old property back and log warning + correct the property range 2017-11-09 15:02:59 +01:00
Travis CI (pmd-bot) b159143a06 Update documentation 2017-11-08 20:08:46 +00:00
Andreas Dangel d0f0c467a0 Merge branch 'pr-717' 2017-11-08 20:54:12 +01:00
Clément Fournier 33b22cb7de Remove ruledef dir 2017-11-08 19:08:45 +01:00
Clément Fournier d3f72c27bd Adapt to changes on master 2017-11-08 19:08:01 +01:00
Clément Fournier 3dfdef1467 Correct override behaviour 2017-11-08 18:57:10 +01:00
Clément Fournier b7caf2ff76 Remove rule factory singleton 2017-11-08 18:57:10 +01:00
Clément Fournier f98ac47045 Inline ruleset schema constants 2017-11-08 18:57:10 +01:00
Clément Fournier b5761ec2a1 Fix documentation 2017-11-08 18:57:10 +01:00
Clément Fournier e3bc90c1eb Use enum constants to identify nodes 2017-11-08 18:57:10 +01:00
Clément Fournier 86b0bb4cd7 Rule references use rule factory. Properties declared in a rule ref throw an exception while parsing 2017-11-08 18:57:10 +01:00
Clément Fournier 845e7ca7a8 Plug into RuleSetFactory 2017-11-08 18:56:09 +01:00
Clément Fournier d933deed6b Fix merge conflicts 2017-11-08 18:52:53 +01:00
Clément Fournier 8a048fd18d Rule factory and builder 2017-11-08 18:52:53 +01:00
Clément Fournier f8bea7f580 Move NPathComplexity from metrics to design 2017-11-08 14:11:36 +01:00
Clément Fournier 1337533920 Use enum for css class names in highlighters 2017-11-08 13:10:54 +01:00
Clément Fournier e336a4f711 Use ${project.version} in the pom.xml 2017-11-08 12:49:26 +01:00
Juan Martín Sotuyo Dodero aa3068fedd Merge branch 'pr-716' 2017-11-07 23:11:22 -03:00
Juan Martín Sotuyo Dodero 2c0957a07b Add back the removed UnnecessaryFinalModifier rule 2017-11-07 20:39:30 -03:00
Andreas Dangel 6bba28acbe Add categories.properties files 2017-11-07 22:23:17 +01:00
Clément Fournier 56c8662d2c Merge branch 'master' into fx-designer 2017-11-07 19:34:41 +01:00
Clément Fournier 7d85448659 Merge branch 'master' into fx-designer 2017-11-07 19:34:02 +01:00
Clément Fournier 539269b3d7 Correct syntax highlighters 2017-11-07 19:31:28 +01:00
Juan Martín Sotuyo Dodero 7bbf6d1a56 Update changelog, refs #717 2017-11-07 00:34:15 -03:00
Juan Martín Sotuyo Dodero f9f96b84fe [java] merge UnnecessaryFinalModifier into UnnecessaryModifier
- I take the chance to also flag final resources in try-with-resources
 - This resolves #411
 - This resolves #676
 - The rule is now using the rulechain
2017-11-07 00:34:00 -03:00
Juan Martín Sotuyo Dodero b1665cf6c1 Merge branch 'pr-708' 2017-11-06 18:54:59 -03:00
Andreas Dangel 243044b056 [doc] Update doc for xml/pom rules 2017-11-06 21:26:23 +01:00
Andreas Dangel d07dcb085a [xml] Move pom/ProjectVersionAsDependencyVersion to errorprone 2017-11-06 21:22:45 +01:00
Juan Martín Sotuyo Dodero 25da0c86f2 Merge branch 'pr-697' 2017-11-06 13:41:27 -03:00
Clément Fournier 82b76de771 More 2017-11-06 13:58:14 +01:00
Clément Fournier fc683fbe12 Small improvements, PR #711 2017-11-06 13:57:12 +01:00
Clément Fournier 29f373dd78 Fix a few things, PR #711 2017-11-06 00:38:33 +01:00
Clément Fournier 9f10c9ca5c Fix core and pom bug 2017-11-05 23:14:31 +01:00
Clément Fournier b5a9857fbf Remove unnecessary icons 2017-11-05 17:13:31 +01:00
Clément Fournier eef30d2761 Add verbose mode 2017-11-05 16:52:39 +01:00
Juan Martín Sotuyo Dodero 9e1342f30a Merge branch 'pr-696' 2017-11-04 19:48:28 -03:00
Juan Martín Sotuyo Dodero 9e894fdce9 Update changelog, refs #696 2017-11-04 19:47:58 -03:00
Juan Martín Sotuyo Dodero 8d381daeb3 Merge branch 'pr-669' 2017-11-04 19:40:14 -03:00
Juan Martín Sotuyo Dodero 3b28625b8a Update changelog, refs #669 2017-11-04 19:39:31 -03:00
Juan Martín Sotuyo Dodero 5d6a03612e Rename builder method 2017-11-04 19:19:39 -03:00
Travis CI (pmd-bot) c011398c93 Update documentation 2017-11-04 21:26:32 +00:00
Juan Martín Sotuyo Dodero e7e5e13a7d Merge branch 'pr-703' 2017-11-04 18:18:13 -03:00
Andreas Dangel e064efbad3 [apex] Move AvoidHardCodingId Rule to errorprone 2017-11-04 20:16:04 +01:00
Travis CI (pmd-bot) dd2b06f748 Update documentation 2017-11-04 19:12:47 +00:00
Andreas Dangel d0b3845ba0 Consider renamed rule MisleadingVariableName in RuleSetFactoryCompatibility 2017-11-04 19:57:31 +01:00
Andreas Dangel e1a588f499 Merge branch 'master' into ruleset-categories 2017-11-04 19:53:21 +01:00
Andreas Dangel 04c8d0a6c9 Merge branch 'pr-687' 2017-11-04 19:40:56 +01:00
Andreas Dangel 961cf8d49a Merge branch 'pr-686' 2017-11-04 19:32:36 +01:00
Juan Martín Sotuyo Dodero 0c0486d40c Update maven wrapper to 3.5.2 2017-11-04 02:27:42 -03:00
Travis CI (pmd-bot) 1678017fe0 Update documentation 2017-11-03 21:24:16 +00:00
Juan Martín Sotuyo Dodero 9e024e06c0 Merge branch 'pr-706' 2017-11-03 18:16:28 -03:00
Juan Martín Sotuyo Dodero 6b618f6ce2 Merge branch 'pr-705' 2017-11-03 17:58:19 -03:00
Juan Martín Sotuyo Dodero 4f53c3efb8 Merge branch 'pr-707' 2017-11-03 17:53:25 -03:00
Juan Martín Sotuyo Dodero e4440982cc Merge branch 'pr-704' 2017-11-03 17:51:34 -03:00
Travis CI (pmd-bot) 51c7024a77 Update documentation 2017-11-03 20:43:10 +00:00
Juan Martín Sotuyo Dodero e74237c74b Merge branch 'pr-700' 2017-11-03 17:26:34 -03:00
Andreas Dangel 17f2e793d7 Fix TODO - false positive of UselessParenthesis (refs #709) 2017-11-03 20:09:16 +01:00
Andreas Dangel e0f92716d9 [xml] Reorganize rules into categories 2017-11-03 17:36:25 +01:00
Andreas Dangel 5b0472950c [vm] Reorganize rules into categories 2017-11-03 17:08:34 +01:00
Andreas Dangel cae170f4e2 [visualforce] Reorganize rules into categories 2017-11-03 16:37:34 +01:00
Andreas Dangel 9f70e9d2c8 [doc] Update generated plsql ruleset files 2017-11-03 16:30:15 +01:00
Andreas Dangel 5459636fbe [plsql] Move rules and tests to new packages 2017-11-03 16:24:51 +01:00
Andreas Dangel d05ca8ade4 [plsql] Reorganize rules into categories 2017-11-03 16:17:14 +01:00
Andreas Dangel ac49d6fb6f [doc] Update generated jsp ruleset files 2017-11-03 15:37:24 +01:00
Andreas Dangel 15526591d4 [jsp] Move rules and tests to new packages 2017-11-03 15:31:00 +01:00
Andreas Dangel f05c865a24 [jsp] Reorganize rules into categories 2017-11-03 15:20:42 +01:00
Andreas Dangel 981887869d [doc] Update generated apex ruleset files 2017-11-03 14:45:56 +01:00
Andreas Dangel 7e3b3fbff5 [apex] Update code climate ruleset 2017-11-03 14:45:27 +01:00
Andreas Dangel 8c53cb8879 [apex] Move rules and tests to new packages 2017-11-03 14:25:26 +01:00
Andreas Dangel e9425e34d8 [apex] Reorganize rules into categories 2017-11-03 14:05:40 +01:00
Andreas Dangel f00224cd90 [javascript] Update rule category descriptions 2017-11-03 12:27:00 +01:00
Andreas Dangel 5359b71569 [doc] Update generated ruleset documentation 2017-11-03 12:24:38 +01:00
Andreas Dangel aacae9e47d [java] Update category descriptions 2017-11-03 12:18:22 +01:00
Andreas Dangel 19c48cbcee [doc] Fix unit test 2017-11-03 12:13:45 +01:00
Andreas Dangel 20863e1853 Fix checkstyle 2017-11-03 12:08:00 +01:00
Andreas Dangel c9952e613c [core] fix references to new rules for v6.0.0 2017-11-03 12:04:45 +01:00
Andreas Dangel 77959e9937 [java] Fix unit tests 2017-11-03 12:04:26 +01:00
Andreas Dangel 238494b092 [java] Moving rules into correct packages according to the new category - Part 3 2017-11-03 11:54:34 +01:00
Andreas Dangel 696c1cb651 [java] Moving rules into correct packages according to the new category - Part 2 2017-11-02 20:36:28 +01:00
Andreas Dangel b3e485d325 [java] Moving rules into correct packages according to the new category - Part 1 2017-11-01 20:17:11 +01:00
Andreas Dangel c29f2a44e6 Revert "Temporarily disable the unit tests until the rules are moved into the"
This reverts commit ded09b6498.
2017-11-01 18:54:10 +01:00
Clément Fournier ac2ff0f6af Merge branch 'master' into properties-builder 2017-11-01 18:47:29 +01:00
Andreas Dangel 69be69c35c [javascript] Add category descriptions 2017-11-01 18:44:34 +01:00
Andreas Dangel fb79716cfa [javascript] Move rule AvoidTrailingComma to errorprone 2017-11-01 18:43:35 +01:00
Clément Fournier fc0cb45f49 Merge branch 'master' into properties-builder 2017-11-01 18:21:54 +01:00
Clément Fournier 6b50104cb5 Corrections for PR #669 2017-11-01 18:17:57 +01:00
Clément Fournier 8915e17f20 Fix focus problems 2017-11-01 15:47:46 +01:00
Clément Fournier 63a35c2967 Merge branch 'master' of https://github.com/pmd/pmd into fx-designer 2017-11-01 15:29:32 +01:00
Clément Fournier c58921303d Support Java 9 and 8 2017-11-01 15:29:11 +01:00
Clément Fournier 1295f29ac9 Export to rule wizard 2017-10-31 19:01:51 +01:00
Andreas Dangel 593226ce2a [doc] Update generated ecmascript ruleset files 2017-10-31 15:58:35 +01:00
Andreas Dangel a4248afbbc [javascript] Move rules and tests to new packages 2017-10-31 15:48:05 +01:00
Andreas Dangel b2f8cc094c [javascript] Reorganize rules into categories 2017-10-31 15:32:50 +01:00
Andreas Dangel 1d07ad353e [doc] Update generated ruleset documentation 2017-10-31 12:17:55 +01:00
Andreas Dangel 57c1021c3c [java] Move rules between categories, fix typo for AvoidAccessibilityAlteration 2017-10-31 11:58:22 +01:00
Juan Martín Sotuyo Dodero c466179c2a Handle SecurityErrors on bad auxclasspath entries 2017-10-31 01:53:03 -03:00
Andreas Dangel cee3d6ad2d Fix invalid language version 2017-10-30 22:00:52 +01:00
Andreas Dangel cc5ff0a018 [doc] Adjust rule doc generator to use "category" 2017-10-30 21:19:49 +01:00
Andreas Dangel 68a56ee0d8 [java] Move category rulesets into own category directory
restore previous design rulesest
2017-10-30 21:19:36 +01:00
Andreas Dangel bf6eacf96b [java] Fix wrong externalInfoUrls, add missing minimumLanguageVersion 2017-10-30 21:19:04 +01:00
Juan Martín Sotuyo Dodero 64628370c8 Merge branch 'pr-679' 2017-10-30 16:56:17 -03:00
Juan Martín Sotuyo Dodero eb526f55ac Update changelog, refs #679 2017-10-30 16:55:40 -03:00
Juan Martín Sotuyo Dodero 91d40710dc Temporarily disable PMD checks on Travis 2017-10-30 16:54:38 -03:00
Matias Comercio 9348c54afb Fix PR - 1
- Remove unnecessary asserts for checking setup
- Improve `for` loop performance in AbstractNode.removeChildAtIndex method
- Remove unnecessary detachment of the node being removed children
2017-10-30 15:39:16 -03:00
Juan Martín Sotuyo Dodero 67f0fbbbfe Add missing @Overrides 2017-10-30 00:26:42 -03:00
Andreas Dangel 0a38e06442 [doc] add generated ruleset documentation 2017-10-29 21:32:45 +01:00
Andreas Dangel 6a6ef9e18e [doc] fix doc generator tests which depended on a ruleset from java 2017-10-29 21:28:40 +01:00
Andreas Dangel ded09b6498 Temporarily disable the unit tests until the rules are moved into the
correct packages
2017-10-29 21:12:39 +01:00
Andreas Dangel 42973c4291 [java] Reorganize rulesets into new categories
Best Practices, Code Style, Design, Documentation, Error Prone,
Multithreading, Performance, Security
2017-10-29 21:11:59 +01:00
Matias Comercio 2466ba7163 Add remove & removeChildAtIndex to Node interface
- Implement these methods at AbstractNode.
- Add AbstractNodeTest class with test cases for the implemented methods.
  - Add JUnitParams dependency: https://github.com/Pragmatists/JUnitParams
  - Implement these test cases using JUnitParams features
2017-10-29 13:18:06 -03:00
Matias Comercio 8e120da008 Fix missing validation on cast for AbstractJavaRule 2017-10-28 19:47:32 -03:00
Juan Martín Sotuyo Dodero 368ca2b3d6 Merge branch 'pr-694' 2017-10-28 18:14:38 -03:00
Juan Martín Sotuyo Dodero 6072b50f11 Update changelog, refs #694 2017-10-28 18:14:16 -03:00
Matias Comercio d21be5ddc1 Add minor fixes to root pom 2017-10-28 17:44:18 -03:00
Andreas Dangel 989dd133fd Merge branch 'pr-692' 2017-10-28 20:18:56 +02:00
Andreas Dangel 2dec92c9d5 Merge branch 'pr-691' 2017-10-28 20:04:10 +02:00
Andreas Dangel 0cff7b841a [java] Mark ASTArrayDimsAndInits and ASTVariableDeclaratorId as Dimensionable 2017-10-28 20:01:07 +02:00
Andreas Dangel 6b1b135104 Merge branch 'pr-690' 2017-10-28 19:55:59 +02:00
Andreas Dangel ca9b42b7e5 Merge branch 'pr-689' 2017-10-28 19:48:39 +02:00
gonzalo 91b8a22b42 Update GenericToken specialToken method to obtain only comment tokens 2017-10-28 14:42:44 -03:00
gonzalo e8fdbdbca4 Update GenericToken interface to expose directly region methods 2017-10-28 14:42:44 -03:00
gonzalo 0e011767ce Change ant tasks over (VM) Token class 2017-10-28 14:42:44 -03:00
gonzalo c606d409f4 Change ant tasks over (Python) Token class 2017-10-28 14:42:44 -03:00
gonzalo 1c0d762a37 Change ant tasks over (PL/SQL) Token class 2017-10-28 14:42:44 -03:00
gonzalo da902d658f Change ant tasks over (Objective-C) Token class 2017-10-28 14:42:44 -03:00
gonzalo 026576e266 Change ant tasks over (Matlab) Token class 2017-10-28 14:42:44 -03:00
gonzalo f29e3f0408 Change ant tasks over (CPP) Token class 2017-10-28 14:42:44 -03:00
gonzalo 647a17f060 Change ant tasks over (Ecmascript5) Token class 2017-10-28 14:42:44 -03:00
gonzalo 26461e59c1 Simplify method name in GenericToken && improve ant task replacetoken 2017-10-28 14:42:44 -03:00
gonzalo 95835b8134 Update getter in GenericToken 2017-10-28 14:42:44 -03:00
gonzalo 00ed0a1eab Add RegionByLineImpl javadoc 2017-10-28 14:42:44 -03:00
gonzalo 00ce16c177 [Not Working] Change ant tasks over (VisualForce) Token class 2017-10-28 14:42:44 -03:00
gonzalo 020abafeab Change ant tasks over (JSP) Token class 2017-10-28 14:42:44 -03:00
gonzalo 490b34fea3 Change ant tasks over (Java) Token class 2017-10-28 14:42:44 -03:00
gonzalo 2d01332635 Convert GenericToken from class to interface && Add RegionByLine 2017-10-28 14:42:44 -03:00
Andreas Dangel 591737b2d9 Merge branch 'pr-688' 2017-10-28 19:41:28 +02:00
Andreas Dangel c728db039e Merge branch 'pr-683' 2017-10-28 19:31:49 +02:00
Andreas Dangel 6d846af07e Merge branch 'pr-680' 2017-10-28 19:27:39 +02:00
Andreas Dangel 20f16762f2 Update release notes, refs #680 2017-10-28 19:19:27 +02:00
Juan Martín Sotuyo Dodero d1d9c6f3c6 [java] Fix NPE in type resolution
- The resolution of `GenericArrayType` was broken, so we caused NPEs.
 - Those types are now properly resolved, but the test case is still
incomplete due to missing pieces in type inference
2017-10-27 23:53:17 -03:00
Juan Martín Sotuyo Dodero 71d94b4ccd [java] Avoid runtime errors on incomplete classpath 2017-10-27 02:27:32 -03:00
Juan Martín Sotuyo Dodero 83d513edca Fix specificity test for varargs vs fixed
- We used to fail upon mixing varargs with fixed arity instead of
treating the vararg as a fixed arity as per the spec
2017-10-27 00:57:21 -03:00
Juan Martín Sotuyo Dodero 1d02c24b34 Consider only direct children 2017-10-27 00:08:26 -03:00
Juan Martín Sotuyo Dodero b3dea3240c Generalize test 2017-10-26 22:38:40 -03:00
Juan Martín Sotuyo Dodero b76945bbbb Be consistent on naming 2017-10-26 22:33:31 -03:00
Juan Martín Sotuyo Dodero 05927af574 [java] Properly resolve array types
- Honor dimensions of arrays
 - Resolve types for allocations as well as declarations of arrays
2017-10-26 22:31:29 -03:00
Juan Martín Sotuyo Dodero d8f203a859 Chesktyle 2017-10-26 18:03:54 -03:00
Juan Martín Sotuyo Dodero 8fe2befbbc Add a proper test case 2017-10-26 13:11:39 -03:00
Juan Martín Sotuyo Dodero ae2898e238 [java] Properly handle 0-arg calls
- We no longer take all methods as applicable for a 0-arg method call
during type resolution.
2017-10-26 12:23:44 -03:00
Juan Martín Sotuyo Dodero 71200e6a67 Default to reduce to false for the time being 2017-10-26 10:06:18 -03:00
Juan Martín Sotuyo Dodero 92cc66a8cd Checkstyle fixes 2017-10-26 01:13:04 -03:00
Juan Martín Sotuyo Dodero 9d59c0317c [java] Fix boxing rules
- Boolean types were not considered since we were using the
subtypability set which deals exclusively with numeric types
 - Fixes #650
2017-10-26 00:54:47 -03:00
Juan Martín Sotuyo Dodero eb22ab194c Update changelog, refs #603 2017-10-25 18:06:34 -03:00
Juan Martín Sotuyo Dodero 1308b2c7fa [core] Changes to execution classpath invalidate cache
- Resolves #603
2017-10-25 18:03:13 -03:00
Juan Martín Sotuyo Dodero ebeab0f445 [java] Simplify ForLoopShouldBeWhileLoop
- Remove checks that will always be true (a node can't be a Type and
a Statement and an Expression at the same time)
 - Simplify count(*) > 1 checks (expensive) for an Expression check (the one
node we actually care about)
2017-10-25 12:57:35 -03:00
Juan Martín Sotuyo Dodero 20093c809a Rework ruleset loading
- ResourceLoader is now instantiable, and we can tell which classloader
to use to get resources
 - We will always use the execution classloader, or just add the paths
added by ant, but *never* the auxclasspath
 - The classpath added by Ant won't get into the auxclasspath either
2017-10-24 18:07:09 -03:00
Juan Martín Sotuyo Dodero 042b1bda02 [java] Handle properly reduction incompatibilities
- When a reduce operation return null (it's incompatible), we should
handle it properly instead of producing a NPE.
2017-10-24 00:13:01 -03:00
Juan Martín Sotuyo Dodero 42d965844f Avoid duplicate code 2017-10-23 17:46:21 -03:00
Juan Martín Sotuyo Dodero 96bb1f4bc7 [core] Support parent-last classloading
- We will now always load classes from auxclasspath during
typeresolution, even if we have a class with the same name in PMD's
classpath
 - This prevents conflicts when using different versions of the same
dependencies
2017-10-23 14:23:05 -03:00
Juan Martín Sotuyo Dodero 2d15c6dba6 Merge branch 'pr-661' 2017-10-19 00:42:27 -03:00
Juan Martín Sotuyo Dodero 91bf92fe26 Update changelog, refs #661 2017-10-18 23:59:07 -03:00
Juan Martín Sotuyo Dodero 8ef0d6989c Move AvoidHardcodingIdRule to style ruleset 2017-10-18 23:58:44 -03:00
Juan Martín Sotuyo Dodero e3f9c728d7 content update 2017-10-18 23:51:01 -03:00
Juan Martín Sotuyo Dodero b9e76ab28f Merge branch 'pr-675' 2017-10-18 11:45:41 -03:00
Juan Martín Sotuyo Dodero fded4f140f Update changelog, refs #675 2017-10-18 11:45:26 -03:00
gonzalo c00400ef77 Fix try with final resource 2017-10-18 08:50:06 -03:00
Travis CI (pmd-bot) 53210842c8 Update documentation 2017-10-17 16:59:20 +00:00
Juan Martín Sotuyo Dodero fc3da283bd Merge branch 'pr-666' 2017-10-17 13:43:52 -03:00
Juan Martín Sotuyo Dodero 92f1cdd923 Update changelog, refs #666 2017-10-17 13:42:28 -03:00
Juan Martín Sotuyo Dodero 30aa7fca11 Add DoNotExtendJavaLangThrowable to release ruleset 2017-10-17 13:35:45 -03:00
Juan Martín Sotuyo Dodero 2e3e884426 Merge branch 'pr-665' 2017-10-17 13:13:06 -03:00
Juan Martín Sotuyo Dodero a8823b96cf Merge branch 'pr-670' 2017-10-17 12:54:51 -03:00
Andreas Dangel 2b60ecaead Update release notes, refs #605 2017-10-16 21:26:12 +02:00
Andreas Dangel ffcf5cb704 [apex] Remove shading for the apex modules - not needed anymore
Fixes #605. The apex modules do not contain any non-apex code anymore
(not an uber-jar anymore).

Explicitely defining asm as runtime dependency.
2017-10-16 21:26:12 +02:00
Andreas Dangel 4eab602fd3 Merge branch 'pr-668' 2017-10-16 21:18:14 +02:00
Andreas Dangel 4f2c7960e6 Update changelog, refs #668 2017-10-16 21:18:06 +02:00
Clément Fournier d7d502e0c4 Fix maven 2017-10-16 19:53:43 +02:00
Clément Fournier a986e38b3d Merge branch 'master' of https://github.com/pmd/pmd into fx-designer 2017-10-16 13:54:30 +02:00
Clément Fournier c50311bd85 Correct formatter 2017-10-16 00:08:56 +02:00
Clément Fournier a47471f742 Replace IntegerProperty 2017-10-15 22:22:36 +02:00
Clément Fournier d891fe048a Fix javadoc warnings on pmd-core 2017-10-15 22:07:34 +02:00
Clément Fournier 13f3651048 Cleanup 2017-10-15 21:56:09 +02:00
Clément Fournier 57631bfb30 Few PoCs 2017-10-15 19:59:58 +02:00
Clément Fournier 12855d3cf2 Fix tests 2017-10-15 18:02:24 +02:00
Clément Fournier 6295a96783 Refactored everything 2017-10-15 17:50:02 +02:00
Clément Fournier 2c16faff36 Refactor numeric properties 2017-10-15 16:45:26 +02:00
Clément Fournier 2d449dbef6 Full builder hierarchy 2017-10-15 16:30:14 +02:00
Clément Fournier 610cd21a9c Clarify design 2017-10-15 15:58:23 +02:00
Clément Fournier 2e272c3f7b More mature design w/ small PoC 2017-10-15 14:42:44 +02:00
Clément Fournier aff5f20112 Draft of builders 2017-10-15 13:08:47 +02:00
Clément Fournier 4f6e55ce26 Mediator pattern 2017-10-14 20:02:00 +02:00
Robert Painsi 82b219428b [java] Add DoNotExtendJavaLangThrowable rule
Copy and pasted code from DoNotExtendJavaLangError rule.

Resolves #367
https://github.com/pmd/pmd/issues/367
2017-10-14 18:19:55 +02:00
Andreas Dangel 77968550ef [java] Fix unit tests 2017-10-13 14:09:47 +02:00
Andreas Dangel 944b2f448b [java] Move rule SignatureDeclareThrowsException from typeresolution to strictexception
Replace existing rule with the typeresolution-based implementation.
2017-10-13 14:04:27 +02:00
Andreas Dangel 8470d32322 [java] Move rule UnusedImports from typeresolution to imports
Replace existing rule with the typeresolution-based implementation.
2017-10-13 12:54:26 +02:00
Andreas Dangel a89d449169 [java] Move rule CloneMethodMustImplementCloneable from typeresolution to clone
Replace existing rule with the typeresolution-based implementation.
2017-10-13 12:37:04 +02:00
Andreas Dangel 2ef082ae19 [java] Move rule LooseCoupling from typeresolution to coupling
Replace existing rule with the typeresolution-based implementation.
2017-10-13 12:36:36 +02:00
Andreas Dangel 598c7910a3 Merge branch 'pr-664' 2017-10-13 10:51:00 +02:00
Andreas Dangel d2c52eb37b Merge branch 'pr-662' 2017-10-13 10:48:31 +02:00
Andreas Dangel e737e38d73 [ci] check for var encrypted_5630fbebf057_iv in setup-secrets
This should now allow forked builds to finally run on travis...
2017-10-13 10:37:16 +02:00
Juan Martín Sotuyo Dodero 6f5f6d3d97 Update changelog, refs #328 2017-10-10 12:10:59 -03:00
Juan Martín Sotuyo Dodero dbe0168865 [java] Avoid errors upon resolving invalid classes
- Resolves #328
 - Take the chance to simplify some error handling
(`NoClassDefFoundError` extends `LinkageError`)
2017-10-10 12:08:52 -03:00
Juan Martín Sotuyo Dodero a81d142317 [core] Avoid a phony warning about not using cache
- Avoid creating a NoopAnalysisCache by default to prevent a phony
warning about not using the cache being printed.
 - This way, we only produce a new instance lazily if not configured,
preserving the same behaviour bu without the warning.
2017-10-10 00:46:07 -03:00
Jan Aertgeerts 475405e18f [apex] test issue - count 2017-10-09 23:43:43 +02:00
Jan Aertgeerts 9845f74f68 [apex] rework visit 2017-10-09 23:35:14 +02:00
Jan Aertgeerts 6989b45067 [apex] avoid hardcoding id's 2017-10-09 23:24:47 +02:00
Travis CI (pmd-bot) da8ac69f4e Update documentation 2017-10-09 19:10:37 +00:00
Juan Martín Sotuyo Dodero 6000bcb2e2 Merge branch 'pr-660' 2017-10-09 15:51:11 -03:00
Juan Martín Sotuyo Dodero 047dfa54f0 Update changelog, refs #660 2017-10-09 15:48:40 -03:00
Juan Martín Sotuyo Dodero 4dcef95e43 Add new apex-performance/AvoidSoslInLoops rule to 600 ruleset 2017-10-09 15:44:20 -03:00
Jan Aertgeerts 96de1715cd [apex] avoid sosl in loops 2017-10-09 16:04:54 +02:00
Travis CI (pmd-bot) 591eedecea Update documentation 2017-10-08 23:28:51 +00:00
Juan Martín Sotuyo Dodero 60c87ff783 Merge branch 'pr-625' 2017-10-08 20:20:10 -03:00
Juan Martín Sotuyo Dodero 34a565ca00 Update changelog, refs #625 2017-10-08 20:00:36 -03:00
Juan Martín Sotuyo Dodero 3c067d8071 Add references to 6.0.0 release ruleset 2017-10-08 19:55:32 -03:00
Travis CI (pmd-bot) ec63573517 Update documentation 2017-10-08 22:54:47 +00:00
Juan Martín Sotuyo Dodero 33804aa08f Merge branch 'pr-632' 2017-10-08 19:45:38 -03:00
Juan Martín Sotuyo Dodero f3b3bdb693 Update changelog, refs #632 2017-10-08 19:44:56 -03:00
Juan Martín Sotuyo Dodero 9b28bdbe86 Add AvoidDirectAccessTriggerMap to 6.0.0 release rs 2017-10-08 19:37:16 -03:00
Andreas Dangel 5279901a03 [ci] fix script 2017-10-08 09:54:02 +02:00
Andreas Dangel f13ba86f9c [ci] consider forked builds as pull requests
forked builds are travis builds on forked repos
2017-10-08 09:43:56 +02:00
Jan Aertgeerts dedf954cb0 [apex] move to style ruleset and add literal expression in arrayload exception 2017-10-07 23:28:38 +02:00
Andreas Dangel 61376f8112 [core] add temporary support for maven debug output
refs #650
2017-10-07 21:28:56 +02:00
Juan Martín Sotuyo Dodero 005e0d0fdf Merge branch 'pr-653' 2017-10-06 19:09:21 -03:00
Juan Martín Sotuyo Dodero 312d896db8 update changelog, refs #653 2017-10-06 19:08:59 -03:00
Andreas Dangel 1c3049ee6c Fix checkstyle 2017-10-06 21:07:25 +02:00
Andreas Dangel 1af49cdca9 Fix checkstyle 2017-10-06 20:25:01 +02:00
Andreas Dangel af4ddfbbcf [java] Fix rule StringToString after arrays are arrays 2017-10-06 20:17:09 +02:00
Andreas Dangel e84866aa8d [java] typeresolution: don't throw if the type variables couldn't be resolved 2017-10-06 20:09:26 +02:00
Andreas Dangel ece871c2f7 [java] typeresolution: when we couldn't resolve a method in
the first two phases, we assumed, that it would be varargs method.
This is not always the case.
2017-10-06 19:48:55 +02:00
Andreas Dangel afae1385aa [java] typeresolution: support varags with generics 2017-10-06 18:05:30 +02:00
Andreas Dangel acc05d4c9c [java] typeresolution: resolve arrays in some cases correctly 2017-10-06 18:05:27 +02:00
Andreas Dangel 04e65cd20c [java] typeresolution: avoid NPE if no type is known for a method argument 2017-10-06 18:05:27 +02:00
Andreas Dangel 231956c47e [java] typeresolution: simple inheritance/override check 2017-10-06 18:05:24 +02:00
Andreas Dangel c0302cd314 [java] check for parsing/processing errors in unit test 2017-10-05 22:40:37 +02:00
Andreas Dangel 1582e40055 [java] typeresolution - add unit test for abstract return type case 2017-10-05 22:31:55 +02:00
Andreas Dangel 716e21221c [java] typeresolution: add test for generic wildcard method parameters 2017-10-05 22:28:00 +02:00
Juan Martín Sotuyo Dodero d5a83ae807 Revert "Revert "Merge branch 'pr-287'""
This reverts commit 63ea1906af.
2017-10-05 17:03:57 -03:00
Andreas Dangel efb78e9f79 [java] TypeResolution - support basic method overriding 2017-10-05 21:39:16 +02:00
Andreas Dangel 2e5dcf9a95 [java] Fix NPE in NcssCount rule
Parent could also be a enum or an annotation and not just a class/interface.
2017-10-05 21:04:25 +02:00
Andreas Dangel dd596f0aef [java] Typeresolution: Return empty set instead of null for erased cadidate set 2017-10-05 20:56:46 +02:00
Andreas Dangel b517838fbb [java] Fix ClassTypeResolver when using annotated types 2017-10-04 21:09:49 +02:00
Andreas Dangel 1ecf87c2b5 [java] Fix RedundantFieldInitializerRule not able to parse java7 literals with underscore 2017-10-04 20:54:42 +02:00
Clément Fournier 0cb4d99645 Make it work 2017-10-02 23:05:04 +02:00
Clément Fournier 15b638082b Split fxml and controllers 2017-10-02 02:24:39 +02:00
Clément Fournier 619f19cd83 Extracted XPath and node info 2017-10-01 22:06:19 +02:00
Clément Fournier e96604dec2 Merge branch 'master' of https://github.com/pmd/pmd into fx-designer 2017-10-01 17:49:28 +02:00
Clément Fournier 9d1c491c8d Use random group names in highlighters 2017-10-01 15:37:26 +02:00
Clément Fournier b8ac709161 Change syntax highlighting algorithm
Boost in time and space performance
2017-10-01 15:00:34 +02:00
Andreas Dangel 6fc758c21a [ci] enable all java9 modules for sonar and coveralls 2017-10-01 14:08:07 +02:00
Andreas Dangel e991f2c4f3 [ci] run sonar and coveralls without travis wait 2017-10-01 13:40:49 +02:00
Andreas Dangel a1a4b0b9eb Defining jacoco version, so that sonar might work again 2017-10-01 13:18:35 +02:00
Juan Martín Sotuyo Dodero d192c5668b Merge branch 'pr-646' 2017-09-30 19:16:57 -03:00
Juan Martín Sotuyo Dodero e055416aaa Merge branch 'pr-645' 2017-09-30 18:54:03 -03:00
Juan Martín Sotuyo Dodero f7c0437470 Merge branch 'pr-644' 2017-09-30 18:40:48 -03:00
Juan Martín Sotuyo Dodero 077792cf26 Update changelog, refs #644 2017-09-30 18:40:00 -03:00
Juan Martín Sotuyo Dodero 5d51df880a Add JUnit test to validate output 2017-09-30 18:37:04 -03:00
Juan Martín Sotuyo Dodero 8086746d96 Merge branch 'pr-606' 2017-09-30 17:38:55 -03:00
Clément Fournier c0c5e73a0b Improve syntax highlighting performance 2017-09-30 17:37:50 +02:00
Clément Fournier ab8feda251 Styling 2017-09-30 15:24:31 +02:00
Andreas Dangel 24097aa3fa Fix whitespace 2017-09-30 11:32:01 +02:00
Andreas Dangel d7c1dac59a Merge branch 'pr-619' 2017-09-30 11:31:27 +02:00
Andreas Dangel 54b68c9238 Update changelog, refs #618 2017-09-30 11:30:39 +02:00
Andreas Dangel 72db0dfc07 Merge branch 'pr-616' 2017-09-30 10:39:04 +02:00
Andreas Dangel 15a1097aa2 Update release notes, mention PMD.setupReport is gone. 2017-09-30 10:38:20 +02:00
Andreas Dangel ef42ac0d88 Update release notes, refs #604 2017-09-29 19:52:16 +02:00
Andreas Dangel e60d1c2a24 Merge branch 'pr-615' 2017-09-29 19:42:11 +02:00
Andreas Dangel 66b67a8a95 Merge branch 'pr-614' 2017-09-29 14:16:29 +02:00
Andreas Dangel f59ec03db1 Merge branch 'pr-612' 2017-09-29 11:42:08 +02:00
Andreas Dangel 883465772c [doc] Updated getting help 2017-09-29 11:38:11 +02:00
Andreas Dangel 3f2610ea21 Merge branch 'pr-602' 2017-09-29 11:21:26 +02:00
Andreas Dangel eb6624deb6 Update doc about "How PMD Works" 2017-09-29 11:20:42 +02:00
Andreas Dangel f7d67df442 Remove ruleset schema 3.0.0 2017-09-29 11:20:37 +02:00
Andreas Dangel b42ba5ea45 Update release notes, refs #602 2017-09-29 10:41:09 +02:00
Clément Fournier e21cf002f6 Documentation 2017-09-28 21:21:01 +02:00
Clément Fournier 1de1633587 Improve syntax highlighting internals 2017-09-28 21:20:41 +02:00
Clément Fournier 3f503e9f7d Draft of exception logging 2017-09-28 00:25:56 +02:00
Andreas Dangel 712a29d3ea Update release notes, mentioning java9 is the new default 2017-09-27 21:26:21 +02:00
Andreas Dangel 5bfff7615f Add missing entity resolver in unit test 2017-09-27 21:20:45 +02:00
Andreas Dangel 8113696941 Update ASM library to support java9 2017-09-27 21:11:37 +02:00
Clément Fournier 9e906da5db Fix xml syntax highlighter overflow 2017-09-27 12:44:24 +02:00
Clément Fournier f0f289df0c Major UI redesign, looking good 2017-09-27 01:35:59 +02:00
Clément Fournier 4173e7c495 Fix synchronization problem 2017-09-25 23:09:46 +02:00
Clément Fournier cd16b18ed6 Revamp syntax highlighting + support XML 2017-09-25 22:41:13 +02:00
Clément Fournier 0e2803c1f8 Nice tab model 2017-09-25 15:16:02 +02:00
Clément Fournier 8a05e36196 Focus from violation results to ast -> inefficient for large files 2017-09-24 18:25:08 +02:00
Clément Fournier 27addb5014 Made UI for event logging 2017-09-24 17:40:26 +02:00
Clément Fournier f686c4858c Fix open recent menu 2017-09-24 16:08:59 +02:00
Clément Fournier 0f6ad23a78 Change xpath selection to choicebox 2017-09-24 15:06:49 +02:00
Clément Fournier 7e475632b4 Make css great again 2017-09-24 14:37:39 +02:00
Clément Fournier 49dd443a48 Reorganise style context 2017-09-24 13:39:17 +02:00
Clément Fournier fa19af9a57 Refactor CSS pt 1 2017-09-24 13:29:43 +02:00
Andreas Dangel 2f67eaf7e6 [ci] Update travis scripts to use java 9 2017-09-24 10:39:54 +02:00
Andreas Dangel 166f958ce2 [doc] Update docs, remove toolchain requirements, require java 9 2017-09-24 10:39:49 +02:00
Andreas Dangel 577ef1ff71 Declaring used dependencies explicitly
as determined by dependency:analyze
2017-09-24 10:39:49 +02:00
Andreas Dangel a175b90665 Update plugins 2017-09-24 10:39:44 +02:00
Andreas Dangel b72f1bd18c Adjust javadoc settings: disable doclint, add weird dependency 2017-09-24 10:39:39 +02:00
Clément Fournier 1451ff80a2 Improve Java syntax highlighting 2017-09-24 03:16:44 +02:00
Clément Fournier f784d85b92 Add XPath syntax highlighter 2017-09-24 02:42:20 +02:00
Clément Fournier 5cb7aa0620 Move language selection into choicebox 2017-09-24 00:52:16 +02:00
Clément Fournier facc7c141c Simplify syntax highlighting internals 2017-09-23 23:49:56 +02:00
Clément Fournier b8a99a2174 Add logo proposition 2017-09-23 22:43:39 +02:00
Clément Fournier 1878916abe Apex syntax highlighter 2017-09-23 22:43:07 +02:00
Clément Fournier a8f8d60870 Add manifest stuff to package jar 2017-09-23 22:40:34 +02:00
Clément Fournier f5e72214ba Add opt out for syntax highlighting 2017-09-23 20:25:16 +02:00
Andreas Dangel 8bd413591f Add enforcer plugin to make sure, we are using java9 2017-09-23 19:24:37 +02:00
Andreas Dangel ade0d7d029 Update compiler plugin, use "release" option, adjust java.version properties
No need for the toolchain plugin anymore
2017-09-23 19:24:17 +02:00
Andreas Dangel 8fc518c814 Using java9 as default version 2017-09-23 18:48:37 +02:00
Clément Fournier d93fa7535e Syntax highlighting for Java 2017-09-23 18:48:02 +02:00
Clément Fournier a66c5a448f Style layer management 2017-09-23 16:03:34 +02:00
Clément Fournier ca2e28742d Custom code area control 2017-09-23 02:15:01 +02:00
Andreas Dangel 51181f123f Update release notes, refs #584 2017-09-23 00:31:02 +02:00
Andreas Dangel 6590a358e6 Support concise try-with-resources with java9 2017-09-23 00:15:08 +02:00
Andreas Dangel 280a656f87 Checkstyle 2017-09-22 23:51:56 +02:00
Andreas Dangel f30eb4b5ff Use semantic lookahead for the module productions
The new keyword are only "restricted keywords" and can still be used
as identifiers.
2017-09-22 23:43:43 +02:00
Andreas Dangel 07eede38db Fix unit test after changing return type to String (for XPath attributes) 2017-09-22 23:39:38 +02:00
Filipe Esperandio a4c1150891 Fix wrong internal property name 2017-09-22 17:18:48 -03:00
Filipe Esperandio 4d01d2c6d5 Remove import 2017-09-22 17:13:01 -03:00
Filipe Esperandio c6aaf3fbc4 Prevent internal dev-properties from being displayed on CodeClimate's documentation markdown 2017-09-22 17:10:10 -03:00
Andreas Dangel 1020bf73db Enhance grammar to parse Java 9 module-info.java 2017-09-22 21:35:24 +02:00
Andreas Dangel cb772167bb Simplify Java Language Module 2017-09-22 15:37:23 +02:00
Andreas Dangel fa44c405bd Interface methods can be private now 2017-09-22 15:32:24 +02:00
Andreas Dangel 672f9216dd Simplify grammar: TypeArguments is not used here, it's resolved
as a child by ClassOrInterfaceType already
2017-09-22 15:32:24 +02:00
Andreas Dangel 77222904de Check for diamond operator for anonymous classes 2017-09-22 15:32:19 +02:00
Andreas Dangel 722b2b1657 Allow nested private methods 2017-09-22 13:33:08 +02:00
Andreas Dangel cfa4b5b85c Add Java9 Language Module, Update grammar
* Java8 mode now rejects private methods in interfaces
* Java9 mode now rejects "_" as identifier
2017-09-22 12:19:38 +02:00
Clément Fournier d12e70aab5 Truly disable multifile 2017-09-22 01:04:48 +02:00
Jan Aertgeerts 2639b4fe66 [apex] Add AvoidDirectAccessTriggerMap rule to the performance set 2017-09-20 12:42:22 +02:00
Jan Aertgeerts 8bc6810196 [apex] add empty statement block rule 2017-09-19 10:21:55 +02:00
Jan Aertgeerts a890dbf68c [apex] use correct AST 2017-09-18 20:12:57 +02:00
Jan Aertgeerts 5d7237cd2d [apex] style, indent 2017-09-18 00:35:00 +02:00
Jan Aertgeerts 882139e189 [apex] fix tests and add to ruleset for tests 2017-09-17 23:35:42 +02:00
Clément Fournier 60d40aee6b Checkstyle 2017-09-17 23:17:32 +02:00
Clément Fournier 4f25c1feb3 Add test case for operations 2017-09-17 22:54:40 +02:00
Clément Fournier 8af7d28197 Corrections for PR #602 2017-09-17 22:38:54 +02:00
Jan Aertgeerts 62c1a6fc68 [apex] single quote ruining tests xml 2017-09-17 21:50:39 +02:00
Jan Aertgeerts 1ddd5d2ac6 [apex] fix catch xpath and add meaningful names for test cases 2017-09-17 21:37:54 +02:00
Jan Aertgeerts 8a95fcd257 [apex] fix xpath, test recheck 2017-09-17 19:54:01 +02:00
Jan Aertgeerts bec10ce1d2 [apex] add tests for empty checks 2017-09-17 19:42:24 +02:00
Jan Aertgeerts 00b06ef810 [apex] version since in empty rules, correct xpath expression 2017-09-17 18:46:05 +02:00
Jan Aertgeerts cacb82ace5 [apex] Add test for empty xpath checks. 2017-09-17 18:45:37 +02:00
Clément Fournier 4545c8bf18 Ignore typeres failures 2017-09-17 16:35:24 +02:00
Jan Aertgeerts c3da9ec086 empty code ruleset for apex 2017-09-17 16:19:51 +02:00
Clément Fournier 48b89ac8d2 Remember recent files 2017-09-17 15:18:29 +02:00
Clément Fournier 6e645502ec Fix divider positions on maximize 2017-09-17 14:03:39 +02:00
Clément Fournier 62a1fbd189 Save full screen setting 2017-09-17 02:28:48 +02:00
Clément Fournier 88f4e2722e Scope hierarchy 2017-09-16 20:26:58 +02:00
Clément Fournier fee9c5cdef Add license and load source from file 2017-09-16 18:24:21 +02:00
Travis CI (pmd-bot) df87db8d7a Update documentation 2017-09-16 14:34:19 +00:00
Andreas Dangel 9e55969eb1 Merge branch 'pr-601' 2017-09-16 16:18:17 +02:00
Andreas Dangel 16eb55d0c8 Merge branch 'pr-596' 2017-09-16 16:09:45 +02:00
Andreas Dangel 4272674488 Merge branch 'pr-593' 2017-09-15 11:07:56 +02:00
Andreas Dangel 7ec56e37b0 Merge branch 'pr-592' 2017-09-15 10:59:14 +02:00
Juan Martín Sotuyo Dodero 8d808049f3 Merge branch 'pr-620' 2017-09-14 11:49:25 -03:00
Juan Martín Sotuyo Dodero 5bbca3e59d Update changelog, refs #620 2017-09-14 11:49:08 -03:00
Juan Martín Sotuyo Dodero 02fc43737a Remove commented default access modifier 2017-09-14 11:47:52 -03:00
Clément Fournier 51fc08a8f6 Fix compil error 2017-09-14 15:31:31 +02:00
Clément Fournier 0349ad74c1 Forgot stuff in n.s.pmd 2017-09-14 15:28:40 +02:00
Clément Fournier 45cb608c17 Merge branch 'multifile-split' of https://github.com/oowekyala/pmd into multifile-split 2017-09-14 14:37:18 +02:00
Clément Fournier f02026995d Merge upstream 2017-09-14 14:37:00 +02:00
Clément Fournier 4743b92a09 Merge branch 'master' into multifile-split 2017-09-14 00:30:04 +02:00
Clément Fournier 6a162c238c Moved properties to n.s.pmd.properties 2017-09-14 00:05:55 +02:00
Juan Martín Sotuyo Dodero 14cb503713 [core] Revamp charset / stream management
- File encoding is converted to Charset only once. Errors in it's setup
wil fail the run immeditable instead of producing one error per file.
 - We make sure to close the source stream from the same place we create
it, by using try-with-resources
 - When wrapping the stream to a reader, we use try-with-resources
again, just in case
 - The bechmark code now takes into account charset setup, and more
closely resembles the normal execution path
 - This fixes #618
2017-09-13 18:22:38 -03:00
Juan Martín Sotuyo Dodero 09d49c6e68 Merge branch 'pr-587' 2017-09-12 18:01:10 -03:00
Juan Martín Sotuyo Dodero 8273c9e188 Update changelog, refs #587 2017-09-12 18:00:25 -03:00
Juan Martín Sotuyo Dodero 835792d0fb Merge branch 'pr-607' 2017-09-12 17:50:37 -03:00
Juan Martín Sotuyo Dodero be27dea8de Checkstyle fixes 2017-09-12 17:23:12 -03:00
Juan Martín Sotuyo Dodero e734c9cce9 Add failing test scenario for repeated config error 2017-09-12 17:11:38 -03:00
Juan Martín Sotuyo Dodero 62fd6b3be4 [core] dysfunctional rules are removed only once
Under multi-thread runs, each thread parsed it's own copy of the
ruleset, and removed dysfunctional rules. This meant 1 `ConfigError` per
thread was being generated.
  Since #519, we now log `ConfigErrors`, meaning multiple identical
logs in reports and noise for the user.
  Therefore, we change our approach. RuleSets are parsed only once.
Dysfunctional rules are filtered and reported early on, before
dispathing actual file analysis. Each analysis thread can then produce
their own copy of the ruleset by taking advantage of the `deepCopy`
support for rules, ruleset and rulesets introduced in #464.
  The result is not only more concise reports, but the analysis thread
actually perform less work. Rulesets XMLs are parsed exactly once,
instead of 1 + 1 per thread as before, and rule configuration is
validated only once.

  During this process an issue with how property descriptors where
copied has arised and was fixed. A new unit test to validate this
scenario has been introduced.
2017-09-12 17:11:25 -03:00
Andreas Dangel ee727c4504 Fix remaining tests after merge 2017-09-11 22:08:32 +02:00
Andreas Dangel 54423d05a6 Merge branch 'master' into junit-rule-pmd-test-runner 2017-09-11 22:04:55 +02:00
Andreas Dangel 29523c7ec5 [doc] Fix doc about testing framework 2017-09-11 21:58:00 +02:00
Andreas Dangel 59b12b7bcd Apply schema for apex rules tests 2017-09-11 21:56:06 +02:00
Andreas Dangel d10d4abe52 Apply schema for xml rules tests 2017-09-11 21:56:06 +02:00
Andreas Dangel dd0b776d1d Apply schema for velocity rules tests 2017-09-11 21:56:05 +02:00
Andreas Dangel 5266436b69 Apply schema for plsql rules tests 2017-09-11 21:56:05 +02:00
Andreas Dangel 284938b97b Apply schema for visualforce tests 2017-09-11 21:56:05 +02:00
Andreas Dangel c903294c61 Apply schema for jsp rules tests 2017-09-11 21:56:05 +02:00
Andreas Dangel 555448aba8 Apply schema for javascript rules tests 2017-09-11 21:56:05 +02:00
Andreas Dangel 4f5cae32d9 Apply schema for java rules tests 2017-09-11 21:55:50 +02:00
Andreas Dangel ef3d3a87c6 Fix schema and exception reporting
* relax order of test-code and code-fragment
* allow sourceType with language version
* define complexTypes
* relax requirements
2017-09-11 21:55:25 +02:00
Andreas Dangel 72b5ca8b4f Fix schema and parser after rename 2017-09-11 21:55:25 +02:00
Andreas Dangel 21388c3638 [doc] Mention schema in documentation 2017-09-11 21:55:25 +02:00
Andreas Dangel 116f218907 Add schema validation to rule tests 2017-09-11 21:55:18 +02:00
Clément Fournier 732af08f16 Corrections for PR #587 2017-09-10 21:30:45 +02:00
Juan Martín Sotuyo Dodero 599f588e16 Typo 2017-09-10 06:09:57 -03:00
Juan Martín Sotuyo Dodero 4ef8495dcb Update changelog, refs #615 2017-09-10 05:51:16 -03:00
Juan Martín Sotuyo Dodero 1f4144e975 Update changelog, refs #614 2017-09-10 05:43:08 -03:00
Juan Martín Sotuyo Dodero ad1013c2ba Fix typo 2017-09-10 05:36:58 -03:00
Juan Martín Sotuyo Dodero 49d314fc5b [core] Incremental Analysis can detect changes to jars
- We now look inside the jars of the classpath in search for any
changes. If we find any, we invalidate the cache.
 - Resolves #604
2017-09-10 05:35:09 -03:00
Juan Martín Sotuyo Dodero 9418ab1822 [core] Improve incremental analysis logging
- Resolves #608
 - Log succesful cache loading
 - Log hits / misses on debug, reason for miss too
 - Invite users to enable incremental analysis
 - Provide a new section on the web for the feature. May be promoted to
a top level page at some point.
2017-09-09 21:57:28 -03:00
Juan Martín Sotuyo Dodero 116c428708 [core] Restrict root element of ruleset xml
- Unfortunately DTD doesn't allow to do this... we should probably
cease to support DTD altogether...
2017-09-09 19:45:12 -03:00
Juan Martín Sotuyo Dodero 2bb4d3fbfe Restrict root element to pmd 2017-09-09 19:27:23 -03:00
Travis CI (pmd-bot) 6d4e902a2a Update documentation 2017-09-09 22:20:05 +00:00
Juan Martín Sotuyo Dodero 1e67bbc9c1 Merge branch 'pr-568' 2017-09-09 19:11:58 -03:00
Juan Martín Sotuyo Dodero 1600891562 Merge branch 'pr-598' 2017-09-09 18:56:30 -03:00
Juan Martín Sotuyo Dodero 2fdb8de3f2 Update changelog, refs #598 2017-09-09 18:55:29 -03:00
Clément Fournier e993a7bf21 Test xml keys are unique 2017-09-09 18:00:38 +02:00
Andreas Dangel 4f371618d9 Add initial xml schema for rule tests 2017-09-09 11:11:35 +02:00
Travis CI (pmd-bot) 3d18e8b36f Update documentation 2017-09-09 08:12:38 +00:00
Andreas Dangel aba96473f3 Merge branch 'pr-566' 2017-09-09 09:58:16 +02:00
Andreas Dangel 388afb9618 Fix typo 2017-09-09 09:58:05 +02:00
Andreas Dangel a50d5a82cc Add new rule to internal ruleset 600.xml 2017-09-09 09:56:27 +02:00
Andreas Dangel 4672249157 Update release notes, refs #566 2017-09-09 09:54:53 +02:00
Andreas Dangel 41b4eed58f Merge remote-tracking branch 'origin/master' into pr-566 2017-09-09 09:53:17 +02:00
Andreas Dangel b99d8ec519 [doc] Add the minimal version of "Getting help" 2017-09-08 16:35:56 +02:00
Andreas Dangel b5eb2ef467 Fix checkstyle 2017-09-08 16:35:48 +02:00
Andreas Dangel cb9f0d0c69 [doc] Add test framework documentation 2017-09-08 16:35:48 +02:00
Andreas Dangel 9498473c20 PMDTestRunner should not fail, if there are no unit tests 2017-09-08 16:35:48 +02:00
Andreas Dangel 276028d04e Simplify PMDTestRunner 2017-09-08 16:35:48 +02:00
Andreas Dangel 154616e9f5 Create a new JUnit test runner to execute rule tests
This runner now also supports Before, After, and (JUnit) Rules.
2017-09-08 16:35:48 +02:00
Andreas Dangel d8351ee6d6 Merge branch 'pr-588' 2017-09-08 16:28:13 +02:00
Andreas Dangel 2fe26b7e53 Update release notes, refs #588 2017-09-08 16:27:53 +02:00
Clément Fournier dfb6bd4d50 Fix unneeded recompilation causing loss of node focus 2017-09-08 00:41:43 +02:00
Clément Fournier 61c98d25cb Display metrics in node info section 2017-09-08 00:18:35 +02:00
Clément Fournier 68cb110491 Preserve old cache file 2017-09-07 23:50:30 +02:00
Clément Fournier 8944071975 Cache compilation unit 2017-09-07 23:50:16 +02:00
Clément Fournier b7aefda068 Checkstyle 2017-09-07 18:46:00 +02:00
oowekyala 443f73b744 Fix #388 2017-09-07 17:21:11 +02:00
Juan Martín Sotuyo Dodero 194106fb73 Update changelog, refs #601 2017-09-07 12:12:26 -03:00
Clément Fournier cb76a82e77 Documentation 2017-09-07 17:11:25 +02:00
Juan Martín Sotuyo Dodero 96d2983f4f [core] Fix NPE on cache
- Resolves #600
2017-09-07 12:05:58 -03:00
Clément Fournier 9bf8a50a30 Fix ncss tests 2017-09-07 00:16:36 +02:00
Clément Fournier 4f393648cb Separation in apex module 2017-09-07 00:00:11 +02:00
Clément Fournier e2d8076f9e Deleted the façade 2017-09-06 23:33:24 +02:00
Clément Fournier 7464705cf7 Merge branch 'master' of https://github.com/pmd/pmd into multifile-split 2017-09-06 23:25:51 +02:00
Clément Fournier be936fb0cd Save left toolbar divider position 2017-09-06 23:18:54 +02:00
Clément Fournier 1cbc4b06f4 Remove the refresh XPath toggle 2017-09-06 21:17:37 +02:00
Clément Fournier 500fa16abf Improve encapsulation 2017-09-06 21:01:32 +02:00
Clément Fournier 9beee76492 Fix xpath eval 2017-09-06 19:38:58 +02:00
Clément Fournier 8127404f2c Documentation for metric XPath function 2017-09-06 11:24:20 +02:00
Clément Fournier d1a311fe7b Merge branch 'master' of https://github.com/pmd/pmd into xpath-metrics 2017-09-06 10:55:18 +02:00
Clément Fournier 1e9724a8b8 Small improvements 2017-09-06 00:15:24 +02:00
Clément Fournier d925c91bb6 Implemented settings save/restore cycle 2017-09-06 00:05:06 +02:00
Clément Fournier 660ce96558 Refactor into MVP 2017-09-06 00:05:06 +02:00
Clément Fournier 681552af86 Language version selection 2017-09-06 00:05:06 +02:00
Clément Fournier 2828f5c9bc UI redesign 2017-09-06 00:04:54 +02:00
Travis CI (pmd-bot) 6d8c41113f Update documentation 2017-09-05 16:54:59 +00:00
Andreas Dangel fdfd0f79e6 Merge remote-tracking branch 'origin/master' 2017-09-05 18:38:23 +02:00
Travis CI (pmd-bot) 5e5ddc36b6 Update documentation 2017-09-05 16:29:26 +00:00
Andreas Dangel a887393d29 Merge branch 'pr-591' 2017-09-05 18:28:17 +02:00
Andreas Dangel fa86d073af Merge branch 'pr-585' 2017-09-05 18:03:47 +02:00
Andreas Dangel a41df604e5 Update release notes, refs #585 2017-09-05 18:03:15 +02:00
Andreas Dangel 2e9c21f9a6 Merge branch 'master' into docs-updates 2017-09-05 17:46:42 +02:00
Andreas Dangel 57cfbb08cc [doc] fix typos 2017-09-05 17:44:22 +02:00
Andreas Dangel 7120369c12 [doc] document for each rule a sample how to reference it 2017-09-05 17:37:31 +02:00
Andreas Dangel b37210d8da [doc] Add "Understanding Rulesets" 2017-09-05 17:28:42 +02:00
Andreas Dangel f4fa09bfdc [doc] XPath rule: Add missing ruleset example 2017-09-05 17:18:38 +02:00
Andreas Dangel b7f3032070 [doc] Update gems 2017-09-05 17:05:03 +02:00
Juan Martín Sotuyo Dodero c6acda64f2 Update changelog, refs #565 2017-09-04 11:47:48 -03:00
Juan Martín Sotuyo Dodero 02c016d95f [java] java-basic/DontCallThreadRun false negative
- Use type resolution to determine when we are using a `Thread`
 - Fixes #565
2017-09-04 11:35:36 -03:00
Juan Martín Sotuyo Dodero 402b14f859 Update changelog, refs #593 2017-09-04 02:06:47 -03:00
Juan Martín Sotuyo Dodero 079fc1cc68 [core] Provide and XML Schema for XML reports
- Fixes #538
2017-09-04 02:01:50 -03:00
Juan Martín Sotuyo Dodero 3023a8274d Update changelog, refs #592 2017-09-03 21:23:09 -03:00
Juan Martín Sotuyo Dodero e295711343 Harden XML parsing
- Fixes #532
2017-09-03 21:12:15 -03:00
Juan Martín Sotuyo Dodero 1ede9323a2 Update changelog, refs #591 2017-09-03 20:15:47 -03:00
Juan Martín Sotuyo Dodero 0b90595de3 Update changelog, refs #533 2017-09-03 20:06:07 -03:00
Juan Martín Sotuyo Dodero cdc5cde3a0 Merge branch 'pr-533' 2017-09-03 19:56:14 -03:00
Juan Martín Sotuyo Dodero e18fb2398b Include stacktrace for ProcessingError on reports 2017-09-03 19:55:02 -03:00
Juan Martín Sotuyo Dodero de506f35ae Improve java-design/MissingStaticMethodInNonInstantiatableClass
- Remove false positives
 - Simplify xpath expression
 - Don't use count for checking for `= 0` or `> 0`
 - Fixes #590
2017-09-03 18:52:19 -03:00
Juan Martín Sotuyo Dodero 69b44c4cb4 Fix compilation warning 2017-09-03 18:47:04 -03:00
Clément Fournier f8a717b6af Attributes popup, still buggy 2017-09-01 09:16:32 +02:00
Clément Fournier 76ab8d5cf2 XPath version and errors 2017-08-31 21:19:54 +02:00
Clément Fournier c25b503026 Fix highlighting 2017-08-31 18:44:07 +02:00
Clément Fournier 6ed3bcd463 Highlighting of selected node 2017-08-31 16:46:41 +02:00
Clément Fournier 22ee16b09b Icons 2017-08-31 14:29:43 +02:00
Clément Fournier 097ae9cb1f XPath evaluation, custom CodeArea dependency 2017-08-31 00:21:03 +02:00
Clément Fournier 12bb17bf8f XPath attributes in listview 2017-08-30 23:16:24 +02:00
Clément Fournier 85cb3fc215 Add xpath pane 2017-08-30 21:07:32 +02:00
Clément Fournier fbccc8a523 TreeCellFactory to format ast tree cells 2017-08-30 20:20:01 +02:00
Clément Fournier f240760c4a TreeView for the AST working 2017-08-30 15:17:12 +02:00
Clément Fournier 36bc618789 Refresh AST button 2017-08-30 15:15:12 +02:00
Clément Fournier 6c63f39a29 Styling for code area 2017-08-30 15:15:12 +02:00
Clément Fournier 820b561cc4 Rename package 2017-08-30 15:15:12 +02:00
Clément Fournier 808ef0cc89 Added text area handle 2017-08-30 15:15:12 +02:00
Clément Fournier e7c1a520d6 Moved to pmd-ui 2017-08-30 15:15:12 +02:00
oowekyala 14d0d14a18 Draft w/ mvn system dependency 2017-08-30 15:15:12 +02:00
Clément Fournier e751992761 XPath function for metrics 2017-08-29 23:04:20 +02:00
Andreas Dangel d301e99737 Merge branch 'pr-583' 2017-08-29 19:55:11 +02:00
Andreas Dangel ef90939d8c Update release notes, refs #583 2017-08-29 19:54:34 +02:00
Clément Fournier 5b519459b9 Move static constants of ValueParser to class ValueParsers 2017-08-29 19:53:44 +02:00
Clément Fournier d3300079b9 Add reference to GodClassRule, complete code sample 2017-08-29 13:27:21 +02:00
Clément Fournier cc362d764f Moved NcssCountRule to codesize.xml 2017-08-28 22:01:11 +02:00
Juan Martín Sotuyo Dodero 2c5190aa91 Merge branch 'pr-582' 2017-08-28 16:42:11 -03:00
Juan Martín Sotuyo Dodero ef91d41680 Merge branch 'pr-579' 2017-08-28 16:18:42 -03:00
Juan Martín Sotuyo Dodero 6d30cf7789 Update changelog, refs #579 2017-08-28 16:14:24 -03:00
Andreas Dangel 6fccc0c2eb Merge branch 'pr-518' 2017-08-28 20:31:08 +02:00
Andreas Dangel cb2e7a3a13 Update release notes, refs #518 2017-08-28 20:30:12 +02:00
Bendegúz Nagy 599f91a796 Java, typeres: rename JavaTypeDefinitionSpecial to JavaTypeDefinitionUpper 2017-08-28 19:27:17 +02:00
Bendegúz Nagy e1892944ff Java, typeres: make java type definition lower bound into a subclass 2017-08-28 13:59:30 +02:00
Clément Fournier 87e1e1834d Pimp up the docs 2017-08-28 01:07:52 +02:00
Clément Fournier ac7e1e970f WeakHashMap for project memoizers 2017-08-27 23:42:13 +02:00
Clément Fournier dcf5403003 Cache signatures in nodes 2017-08-27 23:32:17 +02:00
Clément Fournier 8b0eaa6c3d Remove fluent API for sigmasks 2017-08-27 23:32:17 +02:00
Clément Fournier 584041e1e7 Removed the metrics visitor 2017-08-27 23:32:17 +02:00
Clément Fournier eed9859053 Hide multifile from rules 2017-08-27 23:32:17 +02:00
oowekyala 76b9b39368 Separated multifile analysis from metrics 2017-08-27 23:32:09 +02:00
Clément Fournier c1459ab4f9 Added version info to the API 2017-08-26 21:58:52 +02:00
Clément Fournier 99a42461a7 Writing custom metrics 2017-08-26 21:58:46 +02:00
Andreas Dangel 23a936e654 Merge branch 'pr-580' 2017-08-26 11:06:33 +02:00
Andreas Dangel fcdc2bde4d Update relase notes, refs #580 2017-08-26 11:05:41 +02:00
Andreas Dangel d31d0dd7cd Merge branch 'pr-578' 2017-08-26 10:57:34 +02:00
Andreas Dangel f6be3b8620 Update release notes, refs #578 2017-08-26 10:56:20 +02:00
Travis CI (pmd-bot) 0055eb15f3 Update documentation 2017-08-25 18:18:18 +00:00
Juan Martín Sotuyo Dodero 1e4c963003 Merge branch 'pr-581' 2017-08-25 15:01:54 -03:00
Juan Martín Sotuyo Dodero c7314cc55e Update changelog, refs #581 2017-08-25 15:01:37 -03:00
Andreas Dangel 87d8a2fc45 [core] java9 build updates
* Updates the javadoc maven plugin, so that PMD can be built
  with a java9+mvn3.5.0 environment
* Makes sure, that the java8 modules are also enabled for java9
  and later
2017-08-25 11:47:20 +02:00
Niklas Baudy f0d5f9392a Address comments. 2017-08-25 08:34:09 +02:00
Clément Fournier 5a2fc3e2c3 Checkstyle 2017-08-25 00:20:45 +02:00
Clément Fournier f5530660af Corrections for PR #578 2017-08-24 23:57:16 +02:00
Niklas Baudy cfa99e291e Relax AbstractClassWithoutAnyMethod when class is annotated by @AutoValue. 2017-08-24 23:27:04 +02:00
Andreas Dangel d3757e7611 Merge branch 'pr-464' 2017-08-24 23:01:21 +02:00
Clément Fournier 9d5b2a5e7c Add AbstractMetric to topple the class hierarchy of metrics 2017-08-24 22:28:43 +02:00
Bendegúz Nagy 186d0edd91 Java, typeres: update generics parsing to produce upper and lower bounds 2017-08-24 22:10:17 +02:00
Andreas Dangel ef90a6ed4c [doc] Finish pull request documentation
refs #359
2017-08-24 21:35:08 +02:00
Juan Martín Sotuyo Dodero d544c7f122 Merge branch 'pr-570' 2017-08-24 11:15:57 -03:00
Juan Martín Sotuyo Dodero 7fb8989977 Update changelog, refs #570 2017-08-24 11:15:12 -03:00
Bendegúz Nagy 2126517563 Java, typeres: fix PR comments 2017-08-24 16:06:51 +02:00
Bendegúz Nagy a61ca6b2b3 Java, typeres: fix PR comments 2017-08-24 12:16:55 +02:00
Clément Fournier f631abc6d3 Fix tests 2017-08-24 09:53:30 +02:00
Clément Fournier 9f1e520ee9 Data class rule displays metric values 2017-08-24 09:24:07 +02:00
Clément Fournier 925be17be3 Merge upstream 2017-08-24 09:09:21 +02:00
Andreas Dangel c675004a7d [doc] Fixes from PR #568 2017-08-23 21:08:58 +02:00
Andreas Dangel 1008f7ef70 Merge branch 'pr-573' 2017-08-23 20:40:08 +02:00
Andreas Dangel 0e906f386a Update release notes, refs #573 2017-08-23 20:39:05 +02:00
Juan Martín Sotuyo Dodero 1967b7de8d Add Visualforce to README 2017-08-23 14:55:09 -03:00
Andreas Dangel b1b2683e92 [core] Use new schema version 3.0.0 2017-08-22 20:59:42 -03:00
Travis CI (pmd-bot) 9a4e1fb577 Update documentation 2017-08-22 21:48:40 +00:00
Juan Martín Sotuyo Dodero 9f64519b0a Merge branch 'pr-576' 2017-08-22 18:30:50 -03:00
Juan Martín Sotuyo Dodero 8abfe5958e Update changelog, refs #576 2017-08-22 18:30:28 -03:00
Marcel Möhring dbf3adb770 [doc][java] Add hint for Guava users in InefficientEmptyStringCheck
Fixes issue #571.
2017-08-22 22:51:43 +02:00
Clément Fournier 57439e9dc9 Remove findChildNodesWithXPathChecked from Node interface 2017-08-22 22:23:22 +02:00
Clément Fournier e45061962e Corrections for PR #573 2017-08-22 22:23:11 +02:00
Andreas Dangel 4cf5be95cd [doc] Enhance pull request documentation, use existing page
refs #359
2017-08-22 20:45:47 +02:00
Clément Fournier d85f4ce341 Documentation 2017-08-22 17:14:29 +02:00
Clément Fournier 5001701989 Use ATFD metric in GodClassRule -> done refactoring 2017-08-22 17:14:27 +02:00
Clément Fournier 2f678791cc ATFD metric 2017-08-22 17:13:54 +02:00
Clément Fournier d14603078d Use TCC metric in GodClassRule 2017-08-22 17:13:54 +02:00
Clément Fournier 6a6804c7a1 TCC metric 2017-08-22 17:13:53 +02:00
Clément Fournier a9be7d4f59 Use WMC metric in GodClassRule 2017-08-22 16:20:14 +02:00
Clément Fournier 43bbe83e6b Fix Woc integer division 2017-08-22 16:15:52 +02:00
Bendegúz Nagy 8676d8b544 Java, typeres: model wildcard types 2017-08-22 03:05:43 +02:00
Bendegúz Nagy 86d7d24e9c Java, typeres: model intersection types 2017-08-22 02:58:57 +02:00
Bendegúz Nagy c17ab78ae1 Java, typeres: model lower bounds 2017-08-22 02:58:57 +02:00
Bendegúz Nagy ed42fed650 Java, typeres: model upper bounds 2017-08-22 02:58:57 +02:00
Andreas Dangel 7f87882a43 [doc] Add first draft for pull request merge process
refs #359
2017-08-21 22:33:20 +02:00
Andreas Dangel 08dddc2ba7 Merge branch 'pr-567' 2017-08-21 22:23:42 +02:00
Andreas Dangel 2fa98064c7 Update release notes, refs #567 2017-08-21 22:08:29 +02:00
Andreas Dangel bc2ed8cade Merge branch 'metric-options' of https://github.com/oowekyala/pmd into pr-567 2017-08-21 22:07:13 +02:00
Andreas Dangel aef1c81da0 Merge branch 'pr-515' 2017-08-20 19:40:11 +02:00
Andreas Dangel 9ed5f651fa Remove unused ProgressMonitor interface 2017-08-20 19:33:24 +02:00
Andreas Dangel b49eb24579 Merge branch 'issue-463' of https://github.com/Monits/pmd into pr-515 2017-08-20 19:30:15 +02:00
Clément Fournier 8f45685af6 Documented metrics and rule 2017-08-20 18:00:55 +02:00
Clément Fournier 1379142788 Added test case 2017-08-20 17:43:03 +02:00
Clément Fournier 768c8a7227 Started doc 2017-08-20 17:43:03 +02:00
Clément Fournier 6e4a293009 DataClassRule working -> champagne!! 2017-08-20 17:42:54 +02:00
Clément Fournier 55c6c8865d WOC tests 2017-08-20 17:41:35 +02:00
Clément Fournier 60df71fc85 NOAM tests 2017-08-20 17:41:35 +02:00
Clément Fournier 3643883f5f NOPA tests 2017-08-20 17:41:35 +02:00
Clément Fournier acc06a91e4 Consider double results in metric test rules 2017-08-20 17:41:35 +02:00
Clément Fournier ea097cc600 WOC metric 2017-08-20 17:41:35 +02:00
Clément Fournier 68490f7320 Added metric keys 2017-08-20 17:41:35 +02:00
Clément Fournier 41f0c14d17 NOPA metric 2017-08-20 17:41:35 +02:00
Clément Fournier 21f268c0fb NOAM metric 2017-08-20 17:41:34 +02:00
Clément Fournier 47aa1435ad Consider ConcurrentModificationException in iterator loop 2017-08-20 14:30:00 +02:00
Clément Fournier 9b05d5264e Corrections for PR #567 2017-08-19 20:23:38 +02:00
Andreas Dangel 9ae5f0d3a9 Merge branch 'pr-553' 2017-08-19 18:42:57 +02:00
Andreas Dangel 785b04944c Fix checkstyle 2017-08-19 18:34:54 +02:00
Andreas Dangel dc5b814d05 Update release notes, refs #553 2017-08-19 18:32:49 +02:00
Andreas Dangel b58e23ca71 Merge branch 'parserTst++' of https://github.com/oowekyala/pmd into pr-553 2017-08-19 18:31:31 +02:00
Andreas Dangel e05940b246 [doc] Complete the maven PMD version upgrade example
To be sure, that it works, all dependencies need to be referenced/overridden.
Refs #402
2017-08-19 10:40:33 +02:00
Andreas Dangel 5957bc3db5 [doc] Restored original author information 2017-08-18 20:37:35 +02:00
Andreas Dangel f3a3af1333 [doc] Upgrade PMD version at runtime for Maven PMD Plugin
Fixes #402
2017-08-18 19:55:16 +02:00
Andreas Dangel 2c2d62a66a [doc] Restructure Tools + Integrations 2017-08-18 19:42:12 +02:00
Andreas Dangel f0134cbca7 [doc] Add "Writing Documentation" 2017-08-18 19:06:39 +02:00
Clément Fournier 4096f9f077 Update doc 2017-08-18 17:58:12 +02:00
Clément Fournier d28620fd45 Removed a few hundred unnecessary lines 2017-08-18 15:22:15 +02:00
Clément Fournier 8b11246bb3 Replaced javadoc for metrics with link to doc site 2017-08-18 14:58:04 +02:00
Clément Fournier 36f3dbaf03 ConsiderAssert option for cyclo 2017-08-18 14:53:46 +02:00
Clément Fournier 66b418de79 Update doc 2017-08-18 14:44:57 +02:00
oowekyala d33039870b Fixed tests 2017-08-18 14:44:57 +02:00
oowekyala 3a2866b703 Finished the doc 2017-08-18 14:44:57 +02:00
oowekyala f747129e8c Internal builder for MetricOptions 2017-08-18 14:44:57 +02:00
oowekyala 8bac632333 Documentation 2017-08-18 14:44:57 +02:00
oowekyala 34894bca6f Decorators work 2017-08-18 14:44:57 +02:00
oowekyala ceba5afece MetricOptions bundle, decorator doesn't work
The decorator needs some work because the decorated visitor takes over control to visit the children
2017-08-18 14:44:57 +02:00
oowekyala 6408b57b8e Varargs options -> bad 2017-08-18 14:44:57 +02:00
Clément Fournier eb645b379a Fix failed build 2017-08-18 13:56:31 +02:00
Clément Fournier 7194328c4f Completed doc and tests 2017-08-18 12:12:45 +02:00
Andreas Dangel fd1a3b78fa [doc] Create developer resources 2017-08-18 10:47:11 +02:00
Andreas Dangel dda923fe1e [doc] Rework introduction page 2017-08-18 10:33:43 +02:00
Andreas Dangel b3f76562a3 Update email for pmd-bot 2017-08-18 09:45:15 +02:00
oowekyala 1c73437a78 Merge branch 'master' of https://github.com/pmd/pmd into for2foreach 2017-08-17 21:46:26 +02:00
Travis CI (pmd-bot) 0351b88c83 Update documentation 2017-08-17 18:54:02 +00:00
Juan Martín Sotuyo Dodero 24213a80ca Merge branch 'pr-562' 2017-08-17 15:35:18 -03:00
Andreas Dangel 24e9a9f5c5 [doc] Add UnnecessaryParentheses back as deprecated and moved 2017-08-17 20:25:13 +02:00
Andreas Dangel 35e25912ac Merge remote-tracking branch 'origin/master' into docs-update-for-405
# Conflicts:
#	pmd-java/src/main/resources/rulesets/java/controversial.xml
#	pmd-java/src/main/resources/rulesets/java/design.xml
#	pmd-java/src/main/resources/rulesets/java/unnecessary.xml
2017-08-17 20:15:10 +02:00
Andreas Dangel 0cf2bb4845 [doc] Remove internal links from release_notes_old.md...
...since they don't and won't work
...and we have a TOC generated anyways
2017-08-17 20:06:30 +02:00
Juan Martín Sotuyo Dodero a661b5a2bb Merge branch 'pr-563' 2017-08-17 15:04:36 -03:00
Juan Martín Sotuyo Dodero 0b56cdd416 Update changelog, refs #563 2017-08-17 15:04:16 -03:00
Andreas Dangel b3f04079d6 [doc] Fixes from PR review 2017-08-17 20:01:50 +02:00
Bendegúz Nagy 80a15c7851 Java, typeres: fix PR comments 2017-08-17 18:11:37 +02:00
Travis CI (pmd-bot) 42c7980932 Update documentation 2017-08-16 18:28:00 +00:00
Juan Martín Sotuyo Dodero 8eb2986192 Merge branch 'pr-556' 2017-08-16 15:18:00 -03:00
Juan Martín Sotuyo Dodero ddc9fcacbc Update changelog, refs #556 2017-08-16 15:16:44 -03:00
Juan Martín Sotuyo Dodero 93c3393999 Add fully qualified test case 2017-08-16 15:16:35 -03:00
Juan Martín Sotuyo Dodero 9d234d9567 Merge branch 'pr-554' 2017-08-16 14:16:25 -03:00
Juan Martín Sotuyo Dodero 3ba55ff1c0 Update changelog, refs #554 2017-08-16 14:15:46 -03:00
oowekyala 248b9837d6 Corrections for PR #554 2017-08-16 17:26:08 +02:00
oowekyala 2b8ed89edd Merge branch 'master' of https://github.com/pmd/pmd into for2foreach 2017-08-16 15:56:47 +02:00
oowekyala 2d5f1355c2 Deleted controversial/UnnecessaryParentheses 2017-08-16 14:37:46 +02:00
oowekyala a4dc70610b Enhanced unnecessary/UselessParentheses with tests from controversial/UnnecessaryParentheses 2017-08-16 14:31:52 +02:00
Bendegúz Nagy bc20be1ed8 Java, typeres: add basic method type inference 2017-08-16 00:02:34 +02:00
Bendegúz Nagy 1426b23ce5 Java, typeres: add support for producing initial method inference constraints 2017-08-16 00:02:34 +02:00
Bendegúz Nagy 90b802526c Java, typeres: add producing initial bounds for method invocation 2017-08-16 00:02:34 +02:00
Andreas Dangel c48e2dad01 [ci] update email notification 2017-08-15 20:39:34 +02:00
Andreas Dangel 3a8a4ae969 Merge branch 'pr-557' 2017-08-15 20:36:55 +02:00
Andreas Dangel dc8d3403f7 Update changelog, refs #557 2017-08-15 20:36:33 +02:00
Andreas Dangel 238f5f9eab Merge branch 'npath' of https://github.com/oowekyala/pmd into pr-557 2017-08-15 20:35:30 +02:00
Andreas Dangel fa6b41215f Merge branch 'pr-555' 2017-08-15 20:31:01 +02:00
Andreas Dangel 16c55fca20 Remove bogus file 2017-08-15 20:26:00 +02:00
Andreas Dangel 28470d47ff Update changelog, refs #555 2017-08-15 20:13:08 +02:00
Andreas Dangel 35fb3c8723 Merge branch 'cyclo' of https://github.com/oowekyala/pmd into pr-555 2017-08-15 20:11:53 +02:00
oowekyala 0df423f1d2 Removed some redundancy in ClassTypeResolver and MetricsVisitorTest 2017-08-15 14:56:07 +02:00
oowekyala 17bb56a179 Made ParserTst a static utility class 2017-08-15 14:40:18 +02:00
Andreas Dangel c8c4b73c80 [doc] Move the changelog to docs as "pmd_release_notes"
Also update the release scripts
2017-08-15 14:31:03 +02:00
Andreas Dangel 23d947b4bf [doc] Add syntax highlighting for code examples 2017-08-15 14:31:03 +02:00
Andreas Dangel f918249eda [doc] Fix unit test after ruleset.xml changes 2017-08-15 14:31:03 +02:00
Andreas Dangel b8cea8b7d4 [xml] Fix unit tests 2017-08-15 14:31:03 +02:00
Andreas Dangel f29dcd549f Remove remaining references to pmd-build-tools-plugin 2017-08-15 14:31:03 +02:00
Andreas Dangel 819da2c3b4 [doc] [xml] Adjust externalInfoUrl properties to new site - Part 11
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel ceef1819e5 [doc] [vm] Adjust externalInfoUrl properties to new site - Part 10
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel af782c542c [doc] [visualforce] Adjust externalInfoUrl properties to new site - Part 9
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel 9eb3aef9d6 [doc] [plsql] Adjust externalInfoUrl properties to new site - Part 8
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel 69267eebdd [doc] [jsp] Adjust externalInfoUrl properties to new site - Part 7
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel 7efa9021be [doc] [javascript] Adjust externalInfoUrl properties to new site - Part 6
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel cfa4e15d54 [doc] [apex] Adjust externalInfoUrl properties to new site - Part 5
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel 1aaf52f0b0 [doc] [java] Adjust externalInfoUrl properties to new site - Part 4
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel 9b1b3654b3 [doc] [java] Adjust externalInfoUrl properties to new site - Part 3
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel 745acfa350 [doc] [java] Adjust externalInfoUrl properties to new site - Part 2
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel 6e02494e5e [doc] [java] Adjust externalInfoUrl properties to new site - Part 1
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel 3972be80cc [doc] Render rule names as keywords, so that the rules can be searched 2017-08-15 14:31:03 +02:00
Andreas Dangel 85c41033f5 [doc] Fix relative paths to images 2017-08-15 14:31:03 +02:00
Andreas Dangel 3d9511a0e5 [doc] Remove old maven site 2017-08-15 14:31:03 +02:00
Juan Martín Sotuyo Dodero f3aa28ca1c Merge branch 'pr-550' 2017-08-15 00:30:17 -03:00
Juan Martín Sotuyo Dodero 98d43ee9dd Update changelog, refs #550 2017-08-15 00:29:39 -03:00
Bendegúz Nagy 288ca5da43 Java, typres: fix PR comments 2017-08-14 22:17:27 +02:00
Andreas Dangel 888dd2305c Merge branch 'pr-545' 2017-08-14 10:21:20 +02:00
Andreas Dangel 40c65acabb Update changelog, refs #545 2017-08-14 10:20:48 +02:00
oowekyala 41123508bc Use typeresolution in UncommentedEmptyConstructorRule 2017-08-13 23:28:39 +02:00
oowekyala 7d126ab206 Fix cyclo doc 2017-08-13 19:23:42 +02:00
oowekyala b24edf9565 Merge branch 'master' of https://github.com/pmd/pmd into npath 2017-08-13 19:20:48 +02:00
oowekyala 3d08dbb480 Fix #357 2017-08-13 19:18:25 +02:00
oowekyala abc70c6cf6 Fix test 2017-08-13 18:42:46 +02:00
oowekyala 5bd2fc1382 Merge branch 'master' of https://github.com/pmd/pmd into cyclo 2017-08-13 18:40:46 +02:00
oowekyala 69b32d4c00 Fix #537 2017-08-13 18:36:13 +02:00
oowekyala 5cff0e7a7a Added some utility methods to ParserTst 2017-08-13 17:56:40 +02:00
oowekyala 65fd4ea123 Added examples to metric docs & visitor description 2017-08-13 16:59:22 +02:00
oowekyala 54ec57bb3e Corrections for PR #545 2017-08-13 16:58:59 +02:00
oowekyala 2598c2dcce Merge branch 'master' of https://github.com/pmd/pmd into PR-apex 2017-08-13 16:57:59 +02:00
Travis CI (pmd-bot) 52d78d2fa9 Update documentation 2017-08-13 11:40:50 +00:00
Andreas Dangel 4c255cb1fa [ci] Fix script to actually push the docs 2017-08-13 13:30:49 +02:00
Andreas Dangel 8fa15fa0f0 Merge branch 'pr-548' 2017-08-13 12:44:23 +02:00
Andreas Dangel 908e8edc13 Update docs 2017-08-13 12:37:57 +02:00
Andreas Dangel c38961720d Update changelog, refs #548 2017-08-13 12:07:15 +02:00
Andreas Dangel d87ae0e4f7 Merge branch 'docs-metrics' of https://github.com/oowekyala/pmd into pr-548 2017-08-13 12:05:51 +02:00
Juan Martín Sotuyo Dodero 39250fce10 Merge branch 'pr-489' 2017-08-12 20:20:58 -03:00
Juan Martín Sotuyo Dodero df0eba603d Update changelog, reflect impact of Apex Jorje update 2017-08-12 20:19:24 -03:00
Juan Martín Sotuyo Dodero 8fc1cc526d Merge branch 'pr-552' 2017-08-12 19:27:13 -03:00
Juan Martín Sotuyo Dodero 25f081de24 Merge branch 'pr-526' 2017-08-12 19:23:45 -03:00
Andreas Dangel 332e982508 Merge branch 'pr-539' 2017-08-12 22:07:22 +02:00
Andreas Dangel 86f5fa99c0 Merge branch 'issue-536' of https://github.com/Monits/pmd into pr-539 2017-08-12 22:06:56 +02:00
Andreas Dangel c8dd41ac32 [ci] Push changes to docs, if there are any
refs #526
2017-08-12 21:55:31 +02:00
Andreas Dangel 58e52a5ce3 Update changelog, refs #489 2017-08-12 19:12:44 +02:00
Andreas Dangel d070c35112 Merge remote-tracking branch 'origin/master' into apex-update 2017-08-12 19:10:32 +02:00
Andreas Dangel 9a71a6fd75 [apex] Handle blockstatements without curly braces
The new parser seems to always return a BlockStatement, regardless
whether it's a real block or just an expression statement.
2017-08-12 18:48:38 +02:00
Andreas Dangel 174184d9bc [apex] fix syntax errors in unit tests
Note: the test case in VariableNamingConvetion with a
custom annotation type is not relevant
for apex, since there are no custom annotations.
2017-08-12 17:52:33 +02:00
oowekyala c9d3c8b5ae Moved to migrating ruleset 2017-08-12 17:51:12 +02:00
Andreas Dangel da4272dc74 [doc] update generated documentation 2017-08-12 12:08:17 +02:00
Andreas Dangel ca9004b9f7 [doc] add test for simple markdown formatting in rule description 2017-08-12 12:02:03 +02:00
Andreas Dangel a4416a78e2 [doc] add minimum language version, add property for tests 2017-08-12 11:55:40 +02:00
Andreas Dangel f1630932f2 [doc] update generated documentation 2017-08-12 11:47:47 +02:00
Andreas Dangel 2bff86d0f7 [doc] Output XPath expression and link to rule class implementation 2017-08-12 11:22:54 +02:00
oowekyala ff89698cd2 Considers iterators 2017-08-11 23:16:13 +02:00
Andreas Dangel 06e8e32d23 [doc] update generated documentation 2017-08-11 21:52:18 +02:00
Andreas Dangel 9111316c01 [doc] Support renamed/moved rules 2017-08-11 21:37:24 +02:00
oowekyala d749166191 Prefix increment works 2017-08-11 21:35:06 +02:00
Andreas Dangel 171ebad444 [doc] Add deprecation label for deprecated rules 2017-08-11 20:28:06 +02:00
Andreas Dangel ba32ed572b [core] Take deprecated flag into account when loading rulesets/rules 2017-08-11 20:17:37 +02:00
oowekyala 1f6ef4a497 Removed false positives with start index != 0 2017-08-11 19:32:14 +02:00
Bendegúz Nagy f51c75fa73 Java, typeres: basic type variable resolution in place 2017-08-11 18:41:49 +02:00
Bendegúz Nagy 7e49521762 Java, typeres: WIP resolution 2017-08-11 18:19:17 +02:00
Bendegúz Nagy 7a707aa7b6 Java, typeres: add erased candidate set and minimal erased candidate set methods 2017-08-11 18:19:17 +02:00
Bendegúz Nagy 0f657b3a52 Java, typeres: add supertype set and erased supertype set methods to JavaTypeDefinition 2017-08-11 18:19:17 +02:00
Bendegúz Nagy 37139c4038 Java, typeres: implement equals for JavaTypeDefinition 2017-08-11 18:19:17 +02:00
Bendegúz Nagy c94bb39352 Java, typeres: partial resolution algorithm for type inference 2017-08-11 18:19:17 +02:00
Bendegúz Nagy b22b4ec588 Java, typeres: compute variable's dependencies in type inference resolution step 2017-08-11 18:19:17 +02:00
oowekyala b9e71bf4e4 Support for iteration on arrays 2017-08-11 18:16:55 +02:00
oowekyala 038503677b Added more tests 2017-08-11 17:49:00 +02:00
oowekyala c0f1d36b05 First test passed 2017-08-11 13:02:59 +02:00
Andreas Dangel 2816988454 [doc] update generated documentation
Note: only new lines have been added
2017-08-11 11:41:15 +02:00
Andreas Dangel d6c23fd17f [doc] Add unit test for rule doc generator
Therefore the file writer has been mocked. The rulesets to be
documented are now given, rather than determined by the generator.
2017-08-11 11:40:38 +02:00
Andreas Dangel 0b9b7e2a5d Fix checkstyle 2017-08-10 19:41:00 +02:00
Andreas Dangel 5113af6568 Fix build 2017-08-10 19:27:33 +02:00
Andreas Dangel d537b2acbe [doc] move RuleDocGenerator into pmd-doc
It'll be executed during package phase.
2017-08-10 19:18:35 +02:00
Andreas Dangel 8bdb0a5d22 [doc] add pmd-doc submodule 2017-08-10 19:00:10 +02:00
Juan Martín Sotuyo Dodero 69fc7c8451 Merge branch 'pr-549' 2017-08-09 12:24:42 -03:00
Juan Martín Sotuyo Dodero 79ff3a461d Update changelog, refs #549 2017-08-09 12:24:15 -03:00
oowekyala 0958621ca8 Fix #521 2017-08-09 16:51:43 +02:00
oowekyala 319e6977d1 Fix spacing problem in descriptions 2017-08-09 14:59:10 +02:00
oowekyala 4be56ab274 Added code example for npath 2017-08-08 22:09:24 +02:00
oowekyala 1105d62a29 Interface doc 2017-08-08 20:33:47 +02:00
oowekyala 2bd9dc6a70 Finished NPath description 2017-08-08 16:39:12 +02:00
oowekyala b86f0aec59 Fix npath bugs with ternary 2017-08-08 16:00:30 +02:00
oowekyala c9783209f4 Changed defaults 2017-08-08 15:54:08 +02:00
oowekyala a712f5cc5c Refactored Cyclo into op metric
The rule now uses WMC to report classes
2017-08-08 15:51:45 +02:00
oowekyala 6abe95d2be Metrics rule descriptions 2017-08-08 15:43:41 +02:00
oowekyala 193ae355bb Documentation 2017-08-08 00:13:20 +02:00
oowekyala 62d40be59a Merge branch 'master' of https://github.com/pmd/pmd into docs-metrics 2017-08-07 22:23:05 +02:00
oowekyala 51bc82c889 Custom namespace when they're unknown 2017-08-07 19:49:11 +02:00
oowekyala 904b7f84fa Merge branch 'master' of https://github.com/pmd/pmd into metrics-apex 2017-08-07 18:15:32 +02:00
oowekyala b937d84515 Documentation 2017-08-07 18:01:29 +02:00
oowekyala 02307ca8d5 Code examples for doc + fix Ncss ignoring asserts 2017-08-07 17:47:57 +02:00
Andreas Dangel 585a555ba5 Merge pull request #542 from oowekyala/metrics-abstraction
[java, core] Metrics abstraction
2017-08-07 17:05:05 +02:00
oowekyala e9f4674f30 Merge branch 'master' of https://github.com/pmd/pmd into docs-metrics 2017-08-07 16:17:34 +02:00
oowekyala f982acca32 Checkstyle 2017-08-06 23:57:36 +02:00
oowekyala 3b27387c76 Updated changelog 2017-08-06 22:22:17 +02:00
oowekyala f804e11ec5 Merge branch 'metrics-abstraction' into metrics-apex 2017-08-05 14:44:32 +02:00
oowekyala 6c8c6f917a Made basicProjectMemoizer abstract 2017-08-05 14:44:15 +02:00
oowekyala 510938c013 Merge branch 'metrics-abstraction' into metrics-apex 2017-08-04 22:27:49 +02:00
oowekyala 58c7978913 Checkstyle fix 2017-08-04 22:27:29 +02:00
oowekyala 05b502e247 Fix Apex module 2017-08-04 22:26:58 +02:00
oowekyala 2df4ad9bf4 Merge metrics-abstraction + fix pmd-java 2017-08-04 21:36:50 +02:00
oowekyala 78814b5edb Deleted OperationStats 2017-08-04 21:29:43 +02:00
oowekyala 2771448a37 Restricted qualifiedName interface 2017-08-04 19:44:43 +02:00
oowekyala 152dddf6c5 Separated memoization from signature matching 2017-08-04 19:19:50 +02:00
oowekyala 35e2610473 Merge branch metrics-abstraction 2017-08-03 18:56:00 +02:00
oowekyala 909f989571 Checkstyle fixes 2017-08-03 18:49:04 +02:00
oowekyala 379f1be403 Merge branch metrics-abstraction 2017-08-03 18:46:26 +02:00
oowekyala 6d0ebbf63d Resolve conflicts 2017-08-03 18:42:58 +02:00
oowekyala aa8c21d6e9 Picked changes to pmd-core and pmd-java from branch metrics-apex 2017-08-03 18:10:24 +02:00
oowekyala f2e9a9a1ac Merge branch 'master' of https://github.com/pmd/pmd into metrics-apex 2017-08-03 18:00:11 +02:00
Dennis Kieselhorst 1643e10cbd add Throwable to ProcessingError to allow full error reporting 2017-08-03 09:21:01 +02:00
Juan Martín Sotuyo Dodero 0b2389c798 Update changelog, refs #536 2017-08-02 23:58:57 -03:00
Juan Martín Sotuyo Dodero 86501e6bc0 [java] CommentDefaultAccessModifierRule should consider constructors too
- Resolves #536
2017-08-02 23:56:34 -03:00
Juan Martín Sotuyo Dodero be5ae89bc0 Merge branch 'pr-524' 2017-08-02 16:39:04 -03:00
Juan Martín Sotuyo Dodero 57b556350c Update changelog, refs #524 2017-08-02 16:38:18 -03:00
Bendegúz Nagy bd503ba139 Java, typeres: fix PR comments 2017-08-02 21:13:28 +02:00
Andreas Dangel 1b71861d9b Merge pull request #519 from Monits/render-config-errors
[core] Render config errors
2017-08-02 16:52:18 +02:00
Andreas Dangel ed3c8e85c4 Merge pull request #529 from oowekyala/metrics-abstraction
[java] Abstracted the Java metrics framework
2017-08-01 20:06:42 +02:00
oowekyala 661dfdb6c1 Merge branch 'master' of https://github.com/pmd/pmd into metrics-apex 2017-08-01 19:20:33 +02:00
Clément Fournier acb8e6582c Merge branch 'master' into metrics-abstraction 2017-08-01 19:16:00 +02:00
oowekyala ba73842aa4 Changelog entry 2017-08-01 19:15:03 +02:00
oowekyala 40af40bcd2 Made signature matching optional + doc 2017-08-01 19:07:44 +02:00
oowekyala a0c6437c0e Cyclo rule + more stuff 2017-08-01 17:02:51 +02:00
oowekyala 68452939ab More work 2017-08-01 17:01:10 +02:00
oowekyala e1c985c7d5 Adapted components to AST 2017-08-01 16:56:21 +02:00
oowekyala e4e3fd33d8 Marker interface for class and interface 2017-08-01 16:55:30 +02:00
Juan Martín Sotuyo Dodero 8d3abb1268 Merge branch 'pr-535' 2017-08-01 11:24:33 -03:00
Juan Martín Sotuyo Dodero bb75cce2e7 Update changelog, refs #535 2017-08-01 11:24:16 -03:00
Clément Fournier acd710a8f3 Fix broken Apex visitor adapter 2017-08-01 15:41:56 +02:00
oowekyala 6a0e7c5879 Corrections for PR #529 2017-08-01 11:56:45 +02:00
Andreas Dangel fece0cc702 [doc] Update generated rule doc 2017-07-31 21:15:00 +02:00
Andreas Dangel 0266912494 [doc] Sort the rules also on the language index page 2017-07-31 21:14:15 +02:00
Andreas Dangel 1d706726af [doc] Update generated rule doc 2017-07-31 21:11:21 +02:00
Andreas Dangel 3e39828dd9 [doc] Fixes for #526 2017-07-31 21:10:55 +02:00
oowekyala e662aef673 Moved the index into language specific doc 2017-07-30 23:31:39 +02:00
oowekyala 162f4bc3f0 Memoization tests ok 2017-07-30 23:05:43 +02:00
oowekyala 1bee5d7e39 Minimal tests 2017-07-30 18:56:00 +02:00
oowekyala 8f8e129e4f Metric keys 2017-07-30 16:45:12 +02:00
oowekyala d9273add4f Façade and Computer 2017-07-30 15:25:58 +02:00
oowekyala e02dfae300 Visitor 2017-07-30 15:14:55 +02:00
oowekyala e9fab949b7 Operation signatures 2017-07-30 15:02:03 +02:00
oowekyala 7fd85f77a3 Groundwork: qualifiednames 2017-07-30 00:13:56 +02:00
oowekyala a61fe03e86 Merge branch 'master' of https://github.com/pmd/pmd into metrics-apex 2017-07-30 00:09:08 +02:00
oowekyala 231758fa3a Merge branch 'master' of https://github.com/pmd/pmd into metrics-abstraction 2017-07-30 00:04:21 +02:00
Juan Martín Sotuyo Dodero fe1d7748ad Merge branch 'pr-528' 2017-07-29 19:02:06 -03:00
oowekyala d4ede86230 Merge branch master from upstream 2017-07-30 00:01:50 +02:00
Juan Martín Sotuyo Dodero 04f4f86160 Update changelog, refs #528 2017-07-29 19:01:25 -03:00
Juan Martín Sotuyo Dodero 3bcdb7787d Merge branch 'pr-530' 2017-07-29 18:55:16 -03:00
Juan Martín Sotuyo Dodero 9046179cdb Update changelog, refs #530 2017-07-29 18:54:44 -03:00
Juan Martín Sotuyo Dodero 4c96b9bb20 Update changelog, refs #525 2017-07-29 18:51:43 -03:00
oowekyala 3b48ef6407 Fix issue #527 2017-07-29 20:07:19 +02:00
oowekyala 5e035b8e57 Flattened the packages in pmd-core 2017-07-29 16:50:06 +02:00
oowekyala 7fc250ad6d SignatureMatcher interface 2017-07-29 16:26:43 +02:00
oowekyala 56f3b3ea62 Specific interface for the java project mirror 2017-07-29 14:52:09 +02:00
oowekyala 622170991f Abstracted Façade, Memoizer, Computer 2017-07-29 13:53:45 +02:00
Ayoub Kaanich d33b9d9eae Fix typo 2017-07-29 07:41:47 +01:00
oowekyala 63e51152f5 Abstracted Computer, Memoizer, ProjectMirror 2017-07-28 21:53:38 +02:00
Andreas Dangel 92fc1e4fbe Merge branch 'pr-517' 2017-07-28 14:55:18 +02:00
Andreas Dangel c1f6ce0f00 Update changelog, refs #517 2017-07-28 14:53:52 +02:00
Andreas Dangel b94f218155 Merge branch 'docs-metrics' of https://github.com/oowekyala/pmd into pr-517 2017-07-28 14:53:05 +02:00
Andreas Dangel a2279a735a Merge branch 'pr-523' 2017-07-28 14:52:38 +02:00
Andreas Dangel a31739c0c2 Update changelog, refs #523 2017-07-28 14:45:38 +02:00
Andreas Dangel 93b7b122f4 Merge branch 'npath' of https://github.com/oowekyala/pmd into pr-523 2017-07-28 14:44:06 +02:00
oowekyala 05f2ffce4c Extracted the facade and stripped responsibilities of packageStats 2017-07-28 13:18:13 +02:00
oowekyala 66df4948a0 More corrections 2017-07-28 13:02:54 +02:00
Andreas Dangel 4c3e65c8f9 Fix checkstyle 2017-07-28 12:23:17 +02:00
Andreas Dangel 4dd218bc25 [doc] Add initially generated rule docs and update sidebar 2017-07-28 12:16:12 +02:00
Andreas Dangel 84313b9ebe [doc] Create a simple rule doc generator 2017-07-28 12:16:12 +02:00
Andreas Dangel 509acb6d8f [doc] Add option to select the active sidebar item
If the page contains the variable "sidebaractiveurl" in the yaml
frontmatter, this is additionally used to select the active item
in the sidebar. Useful, if the page doesn't have its own item,
but wants to activate e.g. the parent page.
2017-07-28 12:16:12 +02:00
Andreas Dangel 236154100f [doc] Add possibility to override editme link location
If the page contains the variable "editmepath" in the yaml frontmatter,
this will be used instead of "page.path" (the actual markdown file).
This is useful, if the page is generated from another source.
2017-07-28 12:16:12 +02:00
Juan Martín Sotuyo Dodero 5360974903 Merge branch 'pr-525' 2017-07-27 21:58:12 -03:00
Juan Martín Sotuyo Dodero d5d32f996b Make bash scripts executable 2017-07-27 21:43:34 -03:00
Matias Comercio e5ddad3c3b Remove pushed .gitignored files
These files were already at the repository
but they should have been ignored
2017-07-27 18:31:20 -03:00
oowekyala 7e5374ea8d Corrections for PR #523 2017-07-27 22:46:45 +02:00
Matias Comercio 5880a85bb1 Autofix line ending issues
These files didn't have the expected line ending according to
the .gitattributes rule: `*       text=auto`.

Don't know why this could have happened, but all these files
where created before the mentioned rule
2017-07-27 17:28:29 -03:00
oowekyala edc8d980bb Signed nodes for field and operation declarations 2017-07-27 18:35:14 +02:00
oowekyala 582eedf4f6 Abstracted qualified names 2017-07-27 18:01:54 +02:00
oowekyala 8c33501ffe OperationStats are accessible from packageStats 2017-07-27 17:34:02 +02:00
oowekyala 796f1a1fc1 Split ClassStats' responsibilities 2017-07-27 17:05:32 +02:00
Bendegúz Nagy 9959338890 Java, typeres: add support for explicit type arguments 2017-07-27 16:50:50 +02:00
Juan Martín Sotuyo Dodero b899cc1001 Merge branch 'pr-522' 2017-07-27 11:15:38 -03:00
Juan Martín Sotuyo Dodero 739da071f3 Update changelog, refs #522 2017-07-27 11:15:15 -03:00
oowekyala 1ee8cc4e8d Fix bug in key hashcode with null names or metric 2017-07-27 01:18:31 +02:00
oowekyala bccaabb00d Merge branch 'master' of https://github.com/pmd/pmd into npath 2017-07-27 00:59:19 +02:00
oowekyala 9eedf85395 Finished the tests 2017-07-27 00:47:26 +02:00
oowekyala d06cb63d38 Tests of the rule 2017-07-26 23:50:08 +02:00
Bendegúz Nagy 704d87b470 Java, typeres: fix PR comments 2017-07-26 23:44:51 +02:00
Andreas Dangel bad96d16d7 Merge pull request #516 from Monits/issue-468
[java] Fix issue 468
2017-07-26 20:21:43 +02:00
oowekyala bef9e64021 Reused existing npath implementation 2017-07-26 19:49:41 +02:00
oowekyala 9c3a97f641 First iteration of npath 2017-07-26 17:49:58 +02:00
oowekyala 904c127069 Merge branch 'metrics' into npath 2017-07-26 15:29:10 +02:00
Bendegúz Nagy 87bbe9e5b3 Java, typedef: fix a bug with nested classes if the outter class is generic 2017-07-26 12:44:54 +02:00
oowekyala 97b3a59efb Corrections for PR #517 2017-07-26 01:51:43 +02:00
Andreas Dangel b4e799aaef Merge branch 'pr-511' 2017-07-25 21:41:22 +02:00
Andreas Dangel 2e01150764 Update changelog, refs #511 2017-07-25 21:41:13 +02:00
Andreas Dangel 2c0f0c2b99 Merge branch 'metrics' of https://github.com/oowekyala/pmd into pr-511 2017-07-25 21:39:49 +02:00
Andreas Dangel 1211a6f93a [ci] use a container-based build environment again
Since we don't use docker anymore, let's try to use a container-based
build environment again
2017-07-25 21:33:48 +02:00
Andreas Dangel 0a4d212438 [ci] fix rsync paths 2017-07-25 21:14:08 +02:00
Andreas Dangel ff0149fb7f [ci] run jekyll directly without docker 2017-07-25 21:09:23 +02:00
Andreas Dangel e432a32818 [ci] we seem to have some kind of permission problem 2017-07-25 20:40:58 +02:00
Juan Martín Sotuyo Dodero aad99cdf49 Update changelog, refs #519 2017-07-25 13:43:57 -03:00
Juan Martín Sotuyo Dodero 6fcfa04a1f Add tests and update old ones 2017-07-25 12:52:59 -03:00
Juan Martín Sotuyo Dodero 86883f26c7 [core] Render config errors
- All renderers preivously including processing errors now also include
configuration errors.
 - I take the chance to fix a couple of issues with `VBHTMLRenderer`,
that was rendering processing errors using `toString()` (which has a
default implementation)
 - Notice that renderers that didn't previously include processing
errors are unmodified
2017-07-25 12:52:49 -03:00
Juan Martín Sotuyo Dodero 87aa70a096 Merge branch 'pr-514' 2017-07-25 11:41:17 -03:00
Juan Martín Sotuyo Dodero 84a542a790 Update changelog, refs #514 2017-07-25 11:40:46 -03:00
oowekyala 82d071a102 Rename metrics.metrics to metrics.impl 2017-07-25 15:41:12 +02:00
oowekyala 194bc6d71a Fix Checkstyle violations 2017-07-25 14:18:26 +02:00
Bendegúz Nagy 67e4daa177 Java, typeres: fix for PR comments 2017-07-25 13:27:46 +02:00
oowekyala e14e338ef4 Made backwards compatible constructors 2017-07-25 11:35:11 +02:00
oowekyala edf8ce0732 Factorized enumerated property 2017-07-25 11:27:55 +02:00
oowekyala 01257cb8eb Merge branch 'master' into docs-metrics 2017-07-25 10:11:15 +02:00
oowekyala 33d1327bdb Merge branch 'master' into metrics-followup 2017-07-25 10:10:49 +02:00
oowekyala dddf78d443 Checkstyle fixes 2017-07-25 10:04:44 +02:00
oowekyala 2fa7cab876 Merge branch 'metrics' into metrics-followup 2017-07-25 09:34:49 +02:00
oowekyala 962b4587b5 Revert renaming classStats, opStats, packStats 2017-07-25 09:34:07 +02:00
Juan Martín Sotuyo Dodero f5c345bd0a Update changelog, res #468 2017-07-24 17:51:41 -03:00
Juan Martín Sotuyo Dodero df2765152e [java] Resolve #468
- This is still not perfect. There are plenty of scenarios where this
could fail (ie: multidimensional arrays), but is closer to what we want
without a full rewrite.
 - On the future we need to review this rule once again.
2017-07-24 17:49:25 -03:00
Juan Martín Sotuyo Dodero 9143630351 Merge branch 'pr-508' 2017-07-24 17:28:33 -03:00
Juan Martín Sotuyo Dodero 9bef9eb508 Merge branch 'pr-507' 2017-07-24 17:27:10 -03:00
Juan Martín Sotuyo Dodero 3519d82ddb Fix checkstyle issues 2017-07-24 16:57:30 -03:00
Juan Martín Sotuyo Dodero 7a965ea363 Add exclusion of transitive dependency
- Allow the invalid import from ever happening again
2017-07-24 16:55:58 -03:00
Juan Martín Sotuyo Dodero 583184aae2 Fix bad imports 2017-07-24 16:55:58 -03:00
Juan Martín Sotuyo Dodero cf7cc735b2 Update changelog 2017-07-24 16:55:58 -03:00
Juan Martín Sotuyo Dodero 1d639b6c96 Remove usages of deprecated methods 2017-07-24 16:55:58 -03:00
Juan Martín Sotuyo Dodero 94ed1e8a86 Remove usages of deprecated methods 2017-07-24 16:11:15 -03:00
Juan Martín Sotuyo Dodero ffbd8c02ff Deprecate a bunch of useless methods
- Either not used, or we have better implementations available on
Apache commons
2017-07-24 15:50:22 -03:00
Juan Martín Sotuyo Dodero 0ab96a3da6 Remove deprecated APIs 2017-07-24 15:14:46 -03:00
Juan Martín Sotuyo Dodero 6464f89e2b Merge branch 'pr-513' 2017-07-24 14:55:45 -03:00
Juan Martín Sotuyo Dodero f65fbb6204 Update changelog, refs #513 2017-07-24 14:54:57 -03:00
Bendegúz Nagy 9c8cbecc18 Java, typeres: fix for maximally specific method selection 2017-07-24 19:44:59 +02:00
Juan Martín Sotuyo Dodero 7df4d55273 Merge branch 'pr-512' 2017-07-24 14:41:35 -03:00
Juan Martín Sotuyo Dodero 713628a183 Update changelog, refs #512 2017-07-24 14:40:52 -03:00
Bendegúz Nagy 2146a077eb Java, typeres: add static method resolution 2017-07-24 19:38:08 +02:00
Bendegúz Nagy 4fb214cf64 Java, typeres: add static method access tests 2017-07-24 19:38:08 +02:00
Bendegúz Nagy 6b335b1a25 Java, typeres: split incorporation tests 2017-07-24 19:36:30 +02:00
Juan Martín Sotuyo Dodero 5eb47c4dd2 Make RuleSetReference immutable 2017-07-24 14:13:22 -03:00
Bendegúz Nagy db6dc4d5bc Java, typeres: add incorporation and tests 2017-07-24 18:31:49 +02:00
Juan Martín Sotuyo Dodero 19da55f1fe [core] Allow deep copying of RuleSets
- Copy constructor for RuleSets
 - Copy constructor for RuleSet
 - Copy method for Rules
 - I'm still sharing a few objects that are not strictly immutables, but
treated as them
2017-07-24 12:47:49 -03:00
Juan Martín Sotuyo Dodero 7918e782f3 Merge branch 'pr-506' 2017-07-24 12:43:00 -03:00
Juan Martín Sotuyo Dodero d182f5f5f4 Update changelog, refs #506 2017-07-24 12:42:38 -03:00
Bendegúz Nagy 3bec082a40 Merge branch 'master' into reduction 2017-07-24 16:54:22 +02:00
Bendegúz Nagy b38dc2cd02 Java, typeres: fix for PR 2017-07-24 16:37:32 +02:00
Juan Martín Sotuyo Dodero 7cfc44abf8 Add toString for typeres classes
- This will make debugging and error messages a little more clear
2017-07-24 11:24:51 -03:00
oowekyala 4c0bd26091 Implemented hashCode and equals in metric keys factory methods 2017-07-24 16:13:56 +02:00
oowekyala ac89e1420c Moved interfaces and renamed package
Prepare abstraction of metrics
2017-07-24 16:03:33 +02:00
Andreas Dangel 5727dabd38 [doc] Add build script for PMD documentation, disable old site build 2017-07-23 11:00:52 +02:00
Andreas Dangel ab6d88e286 [doc] Fix PMD Version in sidebar 2017-07-22 14:38:37 +02:00
Andreas Dangel c1fe2dfbd5 [doc] Fix edit me link, remove news link from top, add site.pmd.version var 2017-07-22 14:17:08 +02:00
Andreas Dangel 4370ff663e [doc] Fix links between pages 2017-07-22 12:03:16 +02:00
Andreas Dangel 6e59b0e103 [doc] Add remaining pages (FAQ, Releasing), add images 2017-07-22 11:37:13 +02:00
Andreas Dangel 81077e3ce0 [doc] Rename the files to remove boilerplate filename prefixes
The actual output filename is defined in the frontmatter
variable "permalink". And this is used in the sidebar to link
to this page.
2017-07-22 11:15:40 +02:00
Andreas Dangel b87d567525 [doc] Add remaining pages from old "usage" section 2017-07-22 11:06:01 +02:00
Andreas Dangel 80d99744ee [doc] Add pages from old "usage" section 2017-07-21 22:47:32 +02:00
Bendegúz Nagy 6fb3b99c2c Java, typeres: add reduce method tests 2017-07-21 21:02:10 +02:00
Juan Martín Sotuyo Dodero 0265a0c9f1 Merge branch 'pr-502' 2017-07-21 12:51:41 -03:00
Juan Martín Sotuyo Dodero 4929be55e1 Update changelog, refs #502 2017-07-21 12:50:52 -03:00
Juan Martín Sotuyo Dodero 98172a26fe Remove useless override 2017-07-21 12:47:53 -03:00
Andreas Dangel 58ea1c7d4f [doc] Add pages from the old "overview" section 2017-07-21 12:15:15 +02:00
Andreas Dangel 6d5f975464 [doc] remove the old release notes, we have them on the main page 2017-07-21 12:14:31 +02:00
Andreas Dangel a4890ad9cd [doc] add favicon 2017-07-21 11:45:25 +02:00
Andreas Dangel 2af006201f Merge branch 'master' into docs-ghpages 2017-07-21 11:31:33 +02:00
Andreas Dangel 48b7ec1aaf Revert "Change github edit button temporarily to point to adangel/pmd"
This reverts commit 7ee6284ec2.
2017-07-21 11:31:24 +02:00
Andreas Dangel 98bb301998 Merge branch 'pr-505' 2017-07-21 11:19:17 +02:00
Andreas Dangel a6f8107577 Update changelog, refs #505 2017-07-21 11:18:18 +02:00
Bendegúz Nagy b86750cc97 Java, typeres: add reduce methods for type inference 2017-07-21 09:51:41 +02:00
Bendegúz Nagy c2bb8e5f4b Java, typeres: fix double visitation 2017-07-21 00:31:54 +02:00
oowekyala 1ac1fabe38 Corrections for PR #505 2017-07-20 22:41:55 +02:00
oowekyala 85e529eeeb Added WMC description 2017-07-20 19:57:42 +02:00
oowekyala ad14f69b9b Index of metrics 2017-07-20 19:44:24 +02:00
oowekyala 99b3c5e12f Checkstyle fixes 2017-07-20 12:59:47 +02:00
Clément Fournier 0f313f9044 Merge branch 'master' into metrics 2017-07-20 12:48:54 +02:00
oowekyala 875a79f34f Last corrections 2017-07-20 12:26:10 +02:00
Bendegúz Nagy 60f6935f84 Java, typeres: refactor ClassTypeResolver::visit(ASTName, Object) 2017-07-19 21:25:51 +02:00
Bendegúz Nagy 800cfa6e48 Java, typeres: add static field resolution 2017-07-19 21:22:09 +02:00
Bendegúz Nagy 926fe63a11 Java, typeres: add failing static field access tests 2017-07-19 21:22:09 +02:00
Andreas Dangel 98670a736f [ci] increase timeout for site generation 2017-07-19 20:47:07 +02:00
Andreas Dangel c808ad1245 Merge branch 'pr-499' 2017-07-19 20:18:20 +02:00
Andreas Dangel b5316b48c4 Update changelog, refs #499 2017-07-19 20:07:14 +02:00
Andreas Dangel e4a42cdc9d Merge branch 'memoization-tests' of https://github.com/oowekyala/pmd into pr-499 2017-07-19 20:06:14 +02:00
oowekyala b41e674cbd Merge branch master from upstream 2017-07-18 00:42:33 +02:00
Andreas Dangel 1e3347d95b Merge branch 'pr-487' 2017-07-17 21:04:33 +02:00
Andreas Dangel 230994848a Update changelog, refs #487 2017-07-17 20:50:50 +02:00
Andreas Dangel ef246adf2a Merge branch 'fix-extends-object' of https://github.com/Monits/pmd into pr-487 2017-07-17 20:49:37 +02:00
Andreas Dangel dc90db14ba Merge branch 'pr-479' 2017-07-17 20:43:26 +02:00
Andreas Dangel d18b4f9948 Update changelog, refs #479 2017-07-17 20:23:07 +02:00
Andreas Dangel 16d1d80062 Merge branch 'typesafe-properties' of https://github.com/oowekyala/pmd into pr-479 2017-07-17 20:18:37 +02:00
oowekyala 026b03dfb2 Some documentation about Wmc and Cyclo 2017-07-17 14:54:16 +02:00
Juan Martín Sotuyo Dodero b259db6d59 Merge branch 'pr-503' 2017-07-16 17:22:45 -03:00
Andreas Dangel fba00843bb [apex] Disable logging of jorje apex lexer
Fixes #500
2017-07-16 21:17:05 +02:00
oowekyala 2a53d2e532 Added tests for Cyclo 2017-07-16 16:33:21 +02:00
oowekyala 1c1e97e7e4 Added factory methods for custom metric keys 2017-07-16 14:45:00 +02:00
oowekyala 516f9da10b Generified Metrics and keys 2017-07-16 14:22:11 +02:00
oowekyala 5e887b61d3 Fix bug with empty statements in the body of a class 2017-07-15 18:39:13 +02:00
oowekyala ca41c67371 Checkstyle fixes 2017-07-15 16:50:46 +02:00
oowekyala 31ed6fd565 Removed overloads of setProperty 2017-07-15 16:41:38 +02:00
oowekyala 35dee58bc8 Fix initialisation bug 2017-07-15 16:36:11 +02:00
oowekyala e270ff13f6 Merge branch memoization-tests 2017-07-14 16:38:56 +02:00
oowekyala f44a08d9d5 Fix memo tests 2017-07-14 16:32:02 +02:00
oowekyala 278e857bf6 Reworked factories 2017-07-14 02:15:50 +02:00
oowekyala 879a7d375c Modularized numeric and packaged properties 2017-07-13 21:43:18 +02:00
Juan Martín Sotuyo Dodero c408dc3ba9 Merge branch 'pr-501' 2017-07-13 15:42:52 -03:00
Juan Martín Sotuyo Dodero 4adfebffdf Update changelog, refs #501 2017-07-13 15:42:30 -03:00
oowekyala 282cf5bd66 Added PackagedPropertyDescriptor interface 2017-07-13 19:03:10 +02:00
oowekyala 8474131f5b Removed wrappers altogether 2017-07-13 16:53:26 +02:00
oowekyala 5e57af605c Removed need for wrappers 2017-07-13 16:46:05 +02:00
oowekyala e39cbba24a Added overloads of setProperty for multivalued properties 2017-07-13 14:54:05 +02:00
oowekyala 0164edf585 Corrections for #479 2017-07-13 14:17:30 +02:00
Bendegúz Nagy 976240ca48 Java, typeres: add choosing most specific vararg method 2017-07-13 10:54:45 +02:00
Bendegúz Nagy 12a16caf69 Java, typeres: add vararg most specific tests 2017-07-13 10:54:45 +02:00
oowekyala 9075cb005c Fix bug with empty value strings 2017-07-12 20:00:32 +02:00
oowekyala 9a2a91115b Deprecated PropertyDescriptorFactory 2017-07-12 19:04:09 +02:00
oowekyala 648e15122e Revert "Removed PropertyDescriptorFactory"
This reverts commit 72d435f2f6.
2017-07-12 18:39:13 +02:00
oowekyala 772875d13f More tests 2017-07-12 18:38:40 +02:00
oowekyala 72d435f2f6 Removed PropertyDescriptorFactory 2017-07-12 18:07:23 +02:00
oowekyala 1f0908388b Added some tests 2017-07-12 17:40:47 +02:00
oowekyala 7eac745cb5 Fix Ncss tests 2017-07-12 17:03:34 +02:00
oowekyala fb64e130f8 Memoization tests 2017-07-11 21:02:06 +02:00
Juan Martín Sotuyo Dodero 865f86599f Merge branch 'pr-492' 2017-07-11 15:57:21 -03:00
Juan Martín Sotuyo Dodero ac50d9a47f Update changelog, refs #492 2017-07-11 15:55:56 -03:00
oowekyala d92b7e5376 Added a version to Ncss 2017-07-11 17:04:01 +02:00
oowekyala 3061778587 Memoization tests 2017-07-11 17:02:52 +02:00
oowekyala 79fc51220c Merge branch 'typesafe-properties' of https://github.com/oowekyala/pmd into typesafe-properties 2017-07-11 16:06:23 +02:00
Clément Fournier 824f87995d Merge branch 'master' into typesafe-properties 2017-07-11 16:05:17 +02:00
oowekyala 341d66b694 Abstracted Metrics to use MetricKeys 2017-07-11 14:47:45 +02:00
oowekyala 65ef499433 Removed isRequired 2017-07-11 12:09:02 +02:00
oowekyala 707fd9bdd0 Removed choices from EnumeratedPropertyDescriptor 2017-07-11 12:02:20 +02:00
Bendegúz Nagy 4728eff5d6 Java, typeres: move method typeresolution methods into a helper class 2017-07-11 10:35:15 +02:00
oowekyala 1d5ec7f1b6 Cleaned OperationSignature 2017-07-10 21:05:39 +02:00
Andreas Dangel bea145d106 Changelog - fix typos 2017-07-10 20:57:02 +02:00
Andreas Dangel 301ad55688 Merge branch 'pr-482' 2017-07-10 20:54:46 +02:00
Andreas Dangel 3f24f64da7 Update changelog, refs #482 #495 2017-07-10 20:47:48 +02:00
Andreas Dangel 969c66d363 Merge branch 'metrics' of https://github.com/oowekyala/pmd into pr-482 2017-07-10 20:38:19 +02:00
oowekyala 8136053154 Update getter and setter detection 2017-07-10 19:52:51 +02:00
oowekyala 8b7745cf14 Update tests to reset correctly: depends on #495 2017-07-10 19:18:13 +02:00
oowekyala ea633ece0a Merge branch 'reinit-tests' into metrics 2017-07-10 18:16:42 +02:00
oowekyala 58401cecc8 Deleted MetricsForceHook 2017-07-10 18:16:28 +02:00
oowekyala f19428660e Custom rule reinitialization code 2017-07-10 17:18:59 +02:00
Bendegúz Nagy 2a7fbc1d43 Java, typeres: put links to JLS sections for method resolution 2017-07-09 22:48:26 +02:00
Bendegúz Nagy 979ef7c77c Java, typeres: fix checkstyle issues 2017-07-08 22:31:19 +02:00
Bendegúz Nagy 97f7f6a6de Java, typeres: add vararg method resolution 2017-07-08 22:31:19 +02:00
Bendegúz Nagy 176ccb4533 Java, typeres: add vararg tests for method resolution 2017-07-08 22:31:19 +02:00
Bendegúz Nagy 65be8c6afb Java, typeres: add ethod resolution second phase 2017-07-08 22:31:19 +02:00
Bendegúz Nagy 430486a761 Java, typeres: add second phase method resolution tests 2017-07-08 22:31:19 +02:00
Bendegúz Nagy 877f9d1b71 Java, typeres: add most specific method resolution 2017-07-08 22:31:19 +02:00
Bendegúz Nagy 1b52d46c26 Java, typeres: add first phase method overoad resolution 2017-07-08 22:31:19 +02:00
Bendegúz Nagy 5b53b73bb8 Java, typeres: add method first phase tests 2017-07-08 22:31:19 +02:00
Juan Martín Sotuyo Dodero e56bf2a407 Simplify solution 2017-07-08 17:10:56 -03:00
Juan Martín Sotuyo Dodero fdd2a6b637 Merge branch 'pr-486' 2017-07-08 16:25:46 -03:00
Juan Martín Sotuyo Dodero d8da47d9b9 Update changelog, refs #486 2017-07-08 16:23:17 -03:00
Andreas Dangel 6e084e7f27 Merge branch 'coveralls' 2017-07-08 20:46:41 +02:00
Andreas Dangel e32e6e08d9 Add coveralls badge 2017-07-08 20:42:58 +02:00
Andreas Dangel ce96da092a [doc] Remove jacoco report and surefire report for site generation 2017-07-08 20:33:02 +02:00
Andreas Dangel e8dcbda839 [ci] Add coveralls.io
Updated jacoco, add maven profile "coveralls"
2017-07-08 20:30:25 +02:00
Juan Martín Sotuyo Dodero f8c8c01c86 Avoid ArrayList instantiation 2017-07-08 15:12:35 -03:00
Andreas Dangel d669395bab [core] Missing screenshot on "How to write a rule" doc
Fixes #480
2017-07-08 20:00:43 +02:00
Andreas Dangel 68046a0064 Merge branch 'issue-412' 2017-07-08 19:43:34 +02:00
Andreas Dangel c6eeed6d48 Merge branch 'issue-412' of https://github.com/Monits/pmd into issue-412 2017-07-08 19:34:18 +02:00
Juan Martín Sotuyo Dodero 6f37c17565 Merge branch 'pr-490' 2017-07-08 13:59:08 -03:00
Andreas Dangel 8b109f9981 [ci] let's try the quiet option (-q) of maven
travis_wait_truncated doesn't work, since the pipes are buffered...
2017-07-08 13:10:32 +02:00
Andreas Dangel e9ac18427a [ci] add a truncated travis_wait function
Since travis_wait outputs the "Still running" indication into the
same stream as the command's output, we need to make sure, we
output these indications to avoid a build timeout.
But to workaround the log size limit, we shouldn't output everything.
travis_wait_truncated now outputs the head immediately, while
only outputting the tail of the log after the command is finished.
2017-07-08 12:48:43 +02:00
Andreas Dangel a3a1f1b30b [ci] add more logging during build-site.sh execution 2017-07-08 12:15:17 +02:00
Andreas Dangel 4efa375a06 Merge branch 'improve-travis' of https://github.com/Monits/pmd into pr-456 2017-07-08 11:49:25 +02:00
Andreas Dangel ead8d964c5 [cpp] Undo changes to String literals in grammar, it's not needed anymore
Such slightly illegal char escape sequences can still be parsed now.
2017-07-08 11:48:06 +02:00
Andreas Dangel 5bcf30a2a4 [cpp] Add unit test to assert begin/end of Tokens with continuation 2017-07-08 11:32:54 +02:00
Andreas Dangel ec631f3993 [cpp] Don't skip the continuation character in the grammar anymore
Since we now have a CppCharStream, we can remove the changes
introduced for #431
2017-07-07 23:11:27 +02:00
Andreas Dangel 9618481218 Update changelog, refs #448 2017-07-07 22:46:29 +02:00
Andreas Dangel dbc2d02895 [cpp] Add custom CppCharStream for line continuation support
Fixes #448
2017-07-07 22:46:21 +02:00
Juan Martín Sotuyo Dodero 37f4be1a35 Merge branch 'pr-488' 2017-07-07 15:04:35 -03:00
Juan Martín Sotuyo Dodero 134de93257 Update changelog, be more explicit on Apex CPD changes 2017-07-07 15:04:15 -03:00
Andreas Dangel c47866e474 [apex] Add test for Apex Lexer/Parser/Compiler
The compiler seems to have a problem with Soql expressions
See ApexCompilerSoqlTest
2017-07-07 10:54:52 +02:00
Andreas Dangel 2f69324a4a [apex] Upgrade Apex to use new jorje compiler v224
There are some AST changes:
* no DottedExpression anymore
* NewNameValueObjectExpression has been renamed to NewKeyValueObjectExpression
* no TestNode anymore
* new types: CastExpression, ConstructorPreamble, IllegalStoreExpression,
  MethodBlockStatement, Modifier, MultiStatement, NestedExpression,
  NestedSToreExpression, StatementExecuted
2017-07-07 10:54:23 +02:00
Andreas Dangel 02b2e3cf7a Update changelog, refs #488 2017-07-07 10:52:23 +02:00
Andreas Dangel 0f36c9ae2b [apex] CPD: Prepared option to switch on case sensitive check 2017-07-07 10:38:49 +02:00
Andreas Dangel e669b28341 [apex] Adjust CPD Tests with using ApexLexer
Note: comments are comments now and not compared anymore
2017-07-07 10:38:49 +02:00
Andreas Dangel c32cf3703a [apex] Use ApexLexer for CPD tokenizer 2017-07-07 10:38:49 +02:00
oowekyala 78edc46e48 Merge branch 'master' of https://github.com/pmd/pmd into metrics 2017-07-06 23:38:08 +02:00
oowekyala a0ed1aab06 Documentation on AbstractNode 2017-07-06 23:37:08 +02:00
Juan Martín Sotuyo Dodero 50a2e9fdcf Fix typeresolution for anonymous extending object
- This is really an edge case, with little or no real-world scenarios,
just fix it for completeness
2017-07-06 18:00:07 -03:00
oowekyala ff870e159e Small corrections 2017-07-06 14:48:38 +02:00
Bendegúz Nagy 0c483205da Java, typres: make MethodType immutable, remove getApplicableMethods overload 2017-07-05 21:19:45 +02:00
Bendegúz Nagy 2fd1c89ede Java, typeres: fix checkstyle and mvn tests 2017-07-05 19:49:29 +02:00
Bendegúz Nagy 4a16fbc9eb Java, typres: add more method tests 2017-07-05 18:46:23 +02:00
Bendegúz Nagy ed9b015c9f Java, typres: fix mvntest 2017-07-05 13:57:50 +02:00
oowekyala d90e2e75fb Fixed failing tests 2017-07-05 00:15:22 +02:00
Juan Martín Sotuyo Dodero 96003e31db Give more visibility to external contributors
- Acknowledge the amazing people behind each contribution
2017-07-04 12:15:15 -03:00
Juan Martín Sotuyo Dodero 02c3e0a6de Merge branch 'pr-484' 2017-07-04 12:11:49 -03:00
Juan Martín Sotuyo Dodero 087bf40fea Update changelog, refs #484 2017-07-04 12:11:10 -03:00
patriksevallius 111de11893 Changed linux usage to a more unix like path 2017-07-04 09:27:54 +02:00
Bendegúz Nagy 35597c9ef0 Java, typres: Add simple method type resolution 2017-07-04 00:06:32 +02:00
Bendegúz Nagy 0c2099ab98 Java, typeres: add method applicability tests 2017-07-03 19:48:45 +02:00
oowekyala 8fd95190b2 Removed AbstractSimpleJavaMetricsRule 2017-07-03 14:44:46 +02:00
oowekyala cd2f414ace Merge branch 'master' of https://github.com/pmd/pmd into metrics 2017-07-02 15:58:34 +02:00
Andreas Dangel 6652ec9545 [travis] fix release script for upload site 2017-07-01 20:01:19 +02:00
Andreas Dangel a271c49152 Merge branch 'pmd/5.8.x' 2017-07-01 19:27:43 +02:00
Andreas Dangel 7c9f438eaf Prepare next development version 2017-07-01 19:13:16 +02:00
Andreas Dangel 3ef33bc37e [maven-release-plugin] prepare for next development iteration 2017-07-01 19:08:17 +02:00
Andreas Dangel de28e518d4 [maven-release-plugin] prepare release pmd_releases/5.8.1 2017-07-01 19:08:08 +02:00
Andreas Dangel 92c325eb6a Prepare pmd release 5.8.1 2017-07-01 19:02:04 +02:00
Andreas Dangel b09ac82062 Update release script to take bug fix releases into account 2017-07-01 18:56:33 +02:00
Juan Martín Sotuyo Dodero 8954bb037d Update changelog, refs #478 2017-06-30 18:59:49 -03:00
Juan Martín Sotuyo Dodero f7f46dbe93 Fix anonymous class naming
- Properly handle nested anonymous classes
2017-06-30 18:56:18 -03:00
Juan Martín Sotuyo Dodero 4783c4e14f Add failing test for nested anonymous classes 2017-06-30 18:56:13 -03:00
oowekyala f65207639b Removed a change to CollectionUtil 2017-06-30 18:54:28 +02:00
oowekyala a30449d475 Enhanced wrappers 2017-06-30 16:25:14 +02:00
oowekyala 2b56f54824 Cleaned up abstract metric 2017-06-30 13:32:38 +02:00
Juan Martín Sotuyo Dodero deaa47ebb0 Fix anonymous classes directly from interfaces
- Fix the failing scenarios such as new Comaprator<String>() {...
2017-06-30 00:52:13 -03:00
Juan Martín Sotuyo Dodero 10aab46ba6 Better comments for edge cases 2017-06-29 21:19:43 -03:00
Juan Martín Sotuyo Dodero 08e8dbc08a Checkstyle fixes 2017-06-29 20:47:26 -03:00
Juan Martín Sotuyo Dodero 15ec10ff35 Updated changelog 2017-06-29 20:39:35 -03:00
Juan Martín Sotuyo Dodero b6482bb33b Fixes #477
- Allow for references to classes not in the classpath
2017-06-29 20:36:30 -03:00
Juan Martín Sotuyo Dodero 3bd69b15f1 Rework type resolution
- JavaTypeDefinition now lazily resolves generics, meaning less
overhead and avoiding access order problems (ie: class Foo extends <A
extends B, B>). These means you can no longer request the generics list
all at once... but you probably shouldn't anyway
 - I took the chance to move most type resolution code dealing with
Java's Type to the JavaTypeDefinition. This makes things a little
clearer and tidier
 - There are some minor API changes, but since 5.8.0 is recently out I
doubt these have any impact. Plus, there was no easy way to just patch
away the open issues in the old greedy algorithm
2017-06-29 20:16:23 -03:00
oowekyala 6a3b394aa0 Solve plugin errors 2017-06-28 23:59:22 +02:00
Andreas Dangel ecaa8cb24d Merge branch 'issue-471' into pmd/5.8.x 2017-06-28 21:18:19 +02:00
Andreas Dangel 3692eb0400 Update changelog, fixes #471 2017-06-28 21:11:20 +02:00
Andreas Dangel 6657d741ab Merge branch 'master' of https://github.com/WinterGrascph/pmd into issue-471 2017-06-28 21:06:53 +02:00
Andreas Dangel 11e973bf8f Set version to 5.8.1-SNAPSHOT 2017-06-28 20:59:29 +02:00
oowekyala b103d8f011 Specialised BasicPropertyDescriptorFactory 2017-06-28 17:48:11 +02:00
oowekyala c51cab446a Split interfaces 2017-06-27 15:45:33 +02:00
oowekyala 2fe8ded6bd Made properties final 2017-06-27 14:15:14 +02:00
oowekyala 40282e77ae Added NcssCountRule 2017-06-27 09:33:19 +02:00
oowekyala bc8637d23e Use ParameterizedMetricKeys again 2017-06-27 08:01:50 +02:00
oowekyala fbf72de7ca Rearranged code 2017-06-27 07:02:16 +02:00
oowekyala d5f69e5f81 Simplified getter and setter detection 2017-06-27 07:01:32 +02:00
oowekyala a4af2220ec Merge branch 'master' of https://github.com/pmd/pmd into metrics 2017-06-27 05:58:14 +02:00
oowekyala de1298f1fa Corrected multinumeric properties 2017-06-27 05:57:45 +02:00
oowekyala df59eb8977 Finally the enum transformation is complete 2017-06-27 05:55:17 +02:00
oowekyala e1b12da174 Some documentation 2017-06-27 05:01:15 +02:00
Bendegúz Nagy 39b3f62d33 Java, typeres: fix error with raw types
Issue was with determining the upper bounds of raw types when they had type parameters
with circular references, example: GenericClass<E extends Foo<E>>
2017-06-27 03:50:53 +02:00
oowekyala 68f869e81e Turned PropertyDescriptorFields into an enum
Fully commented multi valued properties
2017-06-26 23:51:50 +02:00
oowekyala 54f4a8647c Merge branch 'master' of https://github.com/pmd/pmd into typesafe-properties 2017-06-26 21:09:52 +02:00
oowekyala 1104b6cd49 Debugged tests 2017-06-26 21:08:53 +02:00
Juan Martín Sotuyo Dodero affd0f7134 Update changelog, refs #469 2017-06-26 15:09:34 -03:00
Juan Martín Sotuyo Dodero 3c6eed61fc [java] Detect more unnecessary finals
- Mark unnecessary finals in anonymous class methods.
 - Mark unnecessary finals in enum instance methods.
 - Fixes #412
2017-06-26 15:03:23 -03:00
Juan Martín Sotuyo Dodero d93c5ce676 Update changelog 2017-06-26 14:13:35 -03:00
Juan Martín Sotuyo Dodero 80f901187a Merge branch 'pr-379' 2017-06-26 14:11:35 -03:00
Juan Martín Sotuyo Dodero 4da86f2b8e Document API changes 2017-06-26 13:08:14 -03:00
Juan Martín Sotuyo Dodero df80e52788 Merge branch 'pr-420' 2017-06-26 13:04:53 -03:00
Juan Martín Sotuyo Dodero cd5ec52250 Update changelog, refs #420 2017-06-26 13:03:28 -03:00
oowekyala 739dccfcca Refactored AbstractPropertyTester and subclasses
Still fails test though
2017-06-26 16:03:35 +02:00
oowekyala bb8fe903ea Generified PropertyDescriptorFactory 2017-06-26 15:12:14 +02:00
oowekyala 785d663553 Finished refactoring properties 2017-06-26 14:22:10 +02:00
oowekyala b2673b38b5 POC on boolean and enumerated properties 2017-06-25 21:11:00 +02:00
oowekyala 578bbf8f7b Draft for the new API 2017-06-25 17:40:16 +02:00
Juan Martín Sotuyo Dodero 042672c8f5 Add missing tail 2017-06-24 17:31:58 -03:00
Andreas Dangel 7f1292b212 Update version to 6.0.0-SNAPSHOT 2017-06-24 22:29:36 +02:00
Juan Martín Sotuyo Dodero c9990a53cb Adopt feedback 2017-06-24 17:28:40 -03:00
Andreas Dangel c303a475d8 Prepare next development version 2017-06-24 22:28:05 +02:00
Andreas Dangel f3b9231b69 [maven-release-plugin] prepare for next development iteration 2017-06-24 22:26:42 +02:00
Andreas Dangel 6dd0bc8bfd [maven-release-plugin] prepare release pmd_releases/5.8.0 2017-06-24 22:26:34 +02:00
oowekyala 2346176fe5 Added tests for LOC 2017-06-24 22:25:30 +02:00
Andreas Dangel f296aabebc Prepare pmd release 5.8.0 2017-06-24 22:19:47 +02:00
Andreas Dangel a41fbf0ee2 Add releases/580.xml ruleset 2017-06-24 22:16:20 +02:00
oowekyala 3ecc9be86f Added tests for WMC 2017-06-24 22:09:00 +02:00
oowekyala ccb375d126 Merge branch 'master' of https://github.com/pmd/pmd into metrics 2017-06-24 22:01:31 +02:00
Juan Martín Sotuyo Dodero 8b27fe0bd7 Merge branch 'pr-444' 2017-06-24 15:43:59 -03:00
Juan Martín Sotuyo Dodero aa10a825eb Update changelog, refs #444 2017-06-24 15:32:01 -03:00
Juan Martín Sotuyo Dodero a0f8a106bd Add TODO for future self 2017-06-24 15:31:48 -03:00
oowekyala db2fd2f3a5 Consider annotation types 2017-06-24 18:54:53 +02:00
oowekyala 217b65ba5e Refactored CyclomaticComplexityRule into a MetricsRule 2017-06-24 18:09:32 +02:00
oowekyala 8e005f95a8 Deleted ParameterizedMetricKey 2017-06-24 17:32:51 +02:00
Andreas Dangel 556d845a34 Merge branch 'pr-466' 2017-06-24 11:08:26 +02:00
Andreas Dangel 0289fef501 Deprecate the three rules *CyclomaticComplexity (java-codesize)
Refs #445
2017-06-24 10:59:05 +02:00
Andreas Dangel 63f7fe264a Merge branch 'pr-451' 2017-06-24 10:53:13 +02:00
Andreas Dangel 6fff60bf1d Update changelog, refs #451 2017-06-24 10:52:55 +02:00
Andreas Dangel baf22b432b Merge branch 'metrics' of https://github.com/oowekyala/pmd into pr-451 2017-06-24 10:36:35 +02:00
oowekyala df68816b6d Signatures equals now checks identity 2017-06-24 00:12:43 +02:00
oowekyala 6ab9088759 Tests for NCSS + reduced visitor adapter 2017-06-23 23:55:16 +02:00
oowekyala 4ec86558a7 Added support for enums 2017-06-23 23:28:11 +02:00
Juan Martín Sotuyo Dodero 85092dba04 Update changelog 2017-06-23 15:48:39 -03:00
Juan Martín Sotuyo Dodero 556cc6da90 [java] Fix NPE in JUnitTestsShouldIncludeAssertRule
- Don't assume all anotations are marker annotations
 - Fixes #465
2017-06-23 15:45:58 -03:00
Bendegúz Nagy f1d315ff4c Java, typeres: Fix NPE with lambdas 2017-06-23 20:34:45 +02:00
oowekyala b302a9a6ba Added test for standard CYCLO 2017-06-23 18:25:49 +02:00
oowekyala 5304b7e2e6 Corrections for review #451 2017-06-23 15:28:58 +02:00
Andreas Dangel d9d820cc92 Merge branch 'pr-458' 2017-06-23 15:08:04 +02:00
Andreas Dangel abe0c2eab7 Merge branch 'pr-455' 2017-06-23 15:00:01 +02:00
Andreas Dangel 92f10342c7 Merge branch 'pr-454' 2017-06-23 14:56:21 +02:00
Andreas Dangel 8f8e7282e8 Merge branch 'pr-453' 2017-06-23 14:53:27 +02:00
Andreas Dangel 52dbeedd3a Merge branch 'pr-452' 2017-06-23 14:44:25 +02:00
Juan Martín Sotuyo Dodero dac5c8b04a Update changelog, refs #413 2017-06-21 23:59:51 -03:00
Juan Martín Sotuyo Dodero eda54ae86a [java] EmptyCatchBlock may ignore blocks based on exception name
- Allow the developer to setup a regular expression for exception names
to be ignored by the rule.
 - Fixes #413
2017-06-21 23:52:05 -03:00
Juan Martín Sotuyo Dodero 66bed6779c [ci] Improve Travis builds
- use travis_wait for long running tasks with no output
 - enable fast-finish to abort all builds if one fails
2017-06-21 21:25:38 -03:00
Juan Martín Sotuyo Dodero 52814a9ba9 Update changelog, refs #350 2017-06-21 17:53:31 -03:00
Juan Martín Sotuyo Dodero 15716ffd93 [java] SignatureDeclareThrowsException ignores @Override
- Avoid reporting on @Overrides, since we have no control of the
interface.
 - The original definition is still reported if it's part of our
application's code.
 - Fixes #350
2017-06-21 17:50:29 -03:00
Juan Martín Sotuyo Dodero 7ffa76e3e2 Update changelog, refs #432 2017-06-21 17:27:26 -03:00
Juan Martín Sotuyo Dodero 878f73158a [java] Allow try-with-resources to be empty
* Fixes #432
2017-06-21 17:20:11 -03:00
Juan Martín Sotuyo Dodero 60359ad1cc Update changelog, refs #365 2017-06-21 17:07:26 -03:00
Juan Martín Sotuyo Dodero cc4294b399 [java] Simplify handling of SLF4J log arguments
- Fixes #365
2017-06-21 17:04:41 -03:00
Juan Martín Sotuyo Dodero 263a7d57ab Update changelog, refs #311 2017-06-21 16:46:38 -03:00
Juan Martín Sotuyo Dodero e1f33504b9 [jsp] Update grammar to accept boolean attributes 2017-06-21 16:45:32 -03:00
oowekyala b1d903bb2f Made metrics final 2017-06-21 18:57:00 +02:00
oowekyala d2ede5784d Moved ResultOption handling to ClassStats 2017-06-20 16:20:45 +02:00
oowekyala 27f174969d Moved ResultOption handling to OperationMetric 2017-06-20 15:41:39 +02:00
oowekyala f6bebb660e Fix doc 2017-06-20 14:02:06 +02:00
oowekyala 471c31e16d Implemented metrics capability handling 2017-06-20 13:47:41 +02:00
oowekyala 851c63433a Fix checkstyle violations 2017-06-20 12:50:35 +02:00
oowekyala 0d9f287de0 Revert changes to the AST (getParametermap) 2017-06-20 12:49:48 +02:00
oowekyala 00b7e4f326 Documentation 2017-06-20 12:10:20 +02:00
oowekyala 86ccccb872 Changed ruleset description 2017-06-20 00:42:12 +02:00
Bendegúz Nagy 46daa878b0 Java, typeres: fix PR comments, optimize by caching single class JavaTypeDefinitions 2017-06-20 00:18:21 +02:00
Andreas Dangel bede603fb3 Merge branch 'pr-449' 2017-06-19 21:56:09 +02:00
oowekyala 70d136ecf0 Created the refactored CyclomaticComplexity rule + tests 2017-06-19 19:41:20 +02:00
Juan Martín Sotuyo Dodero 6ed0336971 Update changelog, refs #449 2017-06-19 11:19:52 -03:00
Juan Martín Sotuyo Dodero 2f0e12da6c [java] Fix false positive in UnusedImport
- When referencing static inner members of imports, false positives
would be reported.
 - Fixes #348
2017-06-19 11:07:12 -03:00
oowekyala 273c01a808 Added ResultOption 2017-06-19 14:41:29 +02:00
oowekyala 5f1f0e74f6 Better getter & setter detection + positive examples 2017-06-18 23:38:31 +02:00
oowekyala eb9b73e359 Added getParameterMap 2017-06-18 23:10:37 +02:00
oowekyala 6a6a798240 Documentation 2017-06-18 16:31:31 +02:00
oowekyala 4b3ee62abe Refactored CycloMetric according to #445 2017-06-18 15:57:07 +02:00
oowekyala a374fd308b Merge branch 'master' of https://github.com/pmd/pmd into metrics 2017-06-18 00:06:17 +02:00
oowekyala ae7c21b326 Refactored NcssMethodCountRule to use metrics 2017-06-18 00:01:55 +02:00
Juan Martín Sotuyo Dodero 5aa72289ce Merge branch 'pr-447' 2017-06-17 15:22:01 -03:00
Juan Martín Sotuyo Dodero 04831b20e0 Merge branch 'pr-446' 2017-06-17 15:14:44 -03:00
Andreas Dangel c8a0bc9b13 cpd: fix line number issue, add tests for apex cpd
Fixes #427
2017-06-17 19:42:07 +02:00
oowekyala 4f517f98fb Refactored NcssMethodCountRule 2017-06-17 13:15:55 +02:00
oowekyala edb3e42349 Moved keys out 2017-06-17 13:14:09 +02:00
Andreas Dangel 0f9a4a97c0 cpp: skip line continuation character in grammar
Fixes #431

Note: the tokens separate by such continuation characters are not
merged and appear as two separate tokens, which could lead to false
negatives in duplication detection.

ContinuationReader is deleted, since skipping characters in the stream
makes it difficult to provide accurate line numbers/positions.
2017-06-17 12:42:13 +02:00
Andreas Dangel 2c861a2f6c cpp: add missing "finally" token, move ID Token to beginning of file 2017-06-17 12:27:47 +02:00
Juan Martín Sotuyo Dodero 5a8054cfcc Merge branch 'pr-430' 2017-06-16 20:40:02 -03:00
Andreas Dangel afbb3eb600 Enhance ruleset schema validation test
refs #440
2017-06-16 21:10:57 +02:00
oowekyala 8f6d023685 Merge branch 'master' into metrics 2017-06-16 19:14:59 +02:00
oowekyala 6349ef27ab Pull corrections 2017-06-16 19:11:05 +02:00
Andreas Dangel ff9d1b47d4 Add simple test to check ruleset schema
refs #440
2017-06-16 19:03:41 +02:00
Andreas Dangel 7f7afc66e9 Merge branch 'pr-440' 2017-06-16 17:44:27 +02:00
Andreas Dangel c477eddfc0 Update changelog, refs #440 2017-06-16 17:44:15 +02:00
Andreas Dangel da310bee91 Merge branch 'ruleset-3.0.0' of https://github.com/oowekyala/pmd into pr-440 2017-06-16 17:42:10 +02:00
Andreas Dangel 64c1c976cd Merge branch 'pr-436' 2017-06-16 17:40:13 +02:00
Andreas Dangel ac5f37c99c Update changelog, refs #436 2017-06-16 17:32:36 +02:00
Andreas Dangel 135db3f4ce Merge branch 'metrics' of https://github.com/oowekyala/pmd into pr-436 2017-06-16 17:31:20 +02:00
oowekyala 2eb06ada55 Corrections from review #436 2017-06-16 14:21:15 +02:00
Andreas Dangel e9248b4124 Merge branch 'metrics' of https://github.com/oowekyala/pmd into pr-436 2017-06-16 09:47:26 +02:00
Bendegúz Nagy 4175460d35 Java, typeres: clean up code, add comments 2017-06-15 15:42:22 +02:00
Bendegúz Nagy bd187a3c63 Java, typeres: fix checkstyle and tests 2017-06-15 10:45:01 +02:00
Juan Martín Sotuyo Dodero c1e30b833b Merge branch 'pr-443' 2017-06-14 21:58:28 -03:00
Juan Martín Sotuyo Dodero 6fc280d479 Update changelof, refs #443 2017-06-14 21:58:12 -03:00
Bendegúz Nagy b8e1738f55 Java, typeres: clean up code 2017-06-15 02:48:15 +02:00
Bendegúz Nagy 68c8fabdf8 Merge branch 'genericFields' 2017-06-15 00:55:55 +02:00
Bendegúz Nagy 6c7ec75339 Java, typeres: optimize visit(ASTName) by skipping package and import declarations 2017-06-15 00:44:23 +02:00
Bendegúz Nagy 8cb053b7b7 Merge branch 'genericFields' into master 2017-06-15 00:42:22 +02:00
Bendegúz Nagy a0ede7e4c6 Java, typeres: optimize visit(ASTName) by skipping package and import declarations 2017-06-15 00:05:53 +02:00
oowekyala 52777e84e1 NCSS + LOC 2017-06-15 00:00:08 +02:00
Juan Martín Sotuyo Dodero f57d05d2b3 Merge branch 'pr-423' 2017-06-14 17:41:52 -03:00
Juan Martín Sotuyo Dodero 9517884137 Update changelog, refs #423 2017-06-14 17:40:44 -03:00
Bendegúz Nagy 41ed666d48 Java, typeres: add field visibility test, fix tests 2017-06-14 18:11:20 +02:00
Bendegúz Nagy 2291dd2a38 Java, typeres: cleanup non-generic field tests 2017-06-14 14:56:01 +02:00
oowekyala ddba34b9b7 Merge branch 'metrics' into metrics-cyclo 2017-06-14 12:28:12 +02:00
oowekyala 03033bd1fa Simple options, without generics 2017-06-14 12:26:40 +02:00
Bendegúz Nagy 3544c8f5ec Java, typeres: resolve generic field type in not Name[..] cases 2017-06-14 02:06:20 +02:00
oowekyala 64a6dd19ee Created ruleset schema 3.0.0 2017-06-13 18:17:44 +02:00
Bendegúz Nagy 18e243447b Java, typeres: clean up generic field tests 2017-06-13 17:15:30 +02:00
oowekyala 371aba37b1 Use EnumSet for NodeType 2017-06-13 15:12:26 +02:00
Bendegúz Nagy af284f28b5 Java, typeres: make JavaTypeDefinition immutable 2017-06-13 02:39:30 +02:00
Juan Martín Sotuyo Dodero d53c0c2fe6 Merge branch 'pr-435' 2017-06-12 19:21:05 -03:00
Juan Martín Sotuyo Dodero 53687afeb8 Update changelog, include changed rules info 2017-06-12 19:20:07 -03:00
Juan Martín Sotuyo Dodero 435373faf7 Prefer multicatch for brevity 2017-06-12 19:11:15 -03:00
Juan Martín Sotuyo Dodero 6d86d85479 Merge branch 'pr-425' 2017-06-12 19:04:20 -03:00
Juan Martín Sotuyo Dodero c9d20c8964 Update changelog, refs #425 2017-06-12 19:04:01 -03:00
dreniers 38447ca3ee PR18522: [java] Fixed false positive for PreserveStackTraceRule when using builder pattern. 2017-06-12 19:00:15 -03:00
Juan Martín Sotuyo Dodero 0553073208 Merge branch 'pr-426' 2017-06-12 18:11:09 -03:00
Juan Martín Sotuyo Dodero 0776ef8dac Update changelog, refs #426 2017-06-12 18:09:10 -03:00
Juan Martín Sotuyo Dodero 7c3e96e02d Update message and description for UnnecessaryFinalModifier 2017-06-12 18:08:26 -03:00
Bendegúz Nagy b6439685de Java, typeres: add TypeDefinition interface 2017-06-12 22:08:11 +02:00
Bendegúz Nagy ba2041a9d0 Java, typeresolution: rename TypeWrapper to TypeDefinition 2017-06-12 21:58:24 +02:00
Bendegúz Nagy 692fc3acae Java: fix generic type parameter upper bound bug 2017-06-12 21:51:56 +02:00
oowekyala 04f72c1509 Added nested class test case 2017-06-12 20:54:58 +02:00
oowekyala f9095f4480 Use stack in MetricsVisitor 2017-06-12 20:50:14 +02:00
Bendegúz Nagy fccbf294ac Java: add TypeWrapper to TypeNode interface 2017-06-12 15:36:26 +02:00
oowekyala 2df67c5092 Checkstyle passes but the XML schema does not know metrics yet 2017-06-12 02:29:59 +02:00
oowekyala 310ed26053 Implemented CYCLO metrics 2017-06-12 02:12:53 +02:00
Juan Martín Sotuyo Dodero 494040fe92 Merge pull request #434 from adangel/issue-410
[java] ImmutableField: False positive with lombok (fixes #410)
2017-06-11 23:11:47 +02:00
Bendegúz Nagy 18bca7459a Java: resolve type or wildcards and lower bounds 2017-06-11 18:09:12 +02:00
oowekyala 8e495cb5e1 Checkstyle fixes 2017-06-11 16:41:07 +02:00
oowekyala 8e9313791f Completed tests for signatures 2017-06-11 15:51:33 +02:00
Bendegúz Nagy f4e6a1716c Java: resolve raw generic types 2017-06-11 15:44:34 +02:00
Andreas Dangel cb5452fcbb Revert "travis: use travis_wait"
This reverts commit cd39cd6fa8.
2017-06-11 10:50:42 +02:00
Andreas Dangel a3004395ab Revert "travis: let bash read its .bashrc file"
This reverts commit 929afd8318.
2017-06-11 10:50:39 +02:00
Andreas Dangel 929afd8318 travis: let bash read its .bashrc file 2017-06-11 10:46:07 +02:00
Andreas Dangel 0fc9ac185a [java] PMD requires public modifier on JUnit 5 test (fixes #428) 2017-06-11 10:18:12 +02:00
Andreas Dangel cd39cd6fa8 travis: use travis_wait 2017-06-11 09:26:35 +02:00
Andreas Dangel 6bb044b517 vf: Update shortname of VisualForce
Looks nicer in the Designer menu than just "vf".
2017-06-11 09:21:02 +02:00
Andreas Dangel 8af4d71940 [java] ImmutableField: False positive with lombok (fixes #410) 2017-06-11 09:07:13 +02:00
Bendegúz Nagy 2be5b987be Java: resolve type of inherited generic fields 2017-06-10 22:39:52 +02:00
oowekyala a052550130 Reorganised and finished memoization 2017-06-10 19:14:11 +02:00
Bendegúz Nagy 7c04542861 Java: resolve type of field dependant on generic type argument 2017-06-10 15:45:13 +02:00
oowekyala 9eda3d7f96 Visitor tests 2017-06-10 14:51:04 +02:00
oowekyala 919b04166e Untested memoization routines 2017-06-10 02:10:25 +02:00
oowekyala 7fde2478bc Object pooling for Signatures 2017-06-10 01:16:48 +02:00
oowekyala 57c6aadd88 Documentation 2017-06-09 18:40:00 +02:00
oowekyala 0b84366a30 Parse qualified names from string 2017-06-09 17:25:23 +02:00
Juan Martín Sotuyo Dodero 777e1cfbd2 Merge pull request #433 from adangel/issue-429
Fixes #429 [core] Error when running PMD from folder with space
2017-06-09 15:54:09 +02:00
snap252 9b7f2747a3 [java] UnnecessaryFinalModifier final in private method #421
moved from UnnecessaryModifier to UnnecessaryFinalModifier
2017-06-09 15:14:43 +02:00
oowekyala bfbecd23c6 MetricsVisitor doesn't need a ClassLoader 2017-06-09 14:33:36 +02:00
Andreas Dangel 6975130af6 Fix unused imports 2017-06-09 12:21:27 +02:00
Andreas Dangel b964698768 Update changelog, fixes #380 2017-06-09 12:10:14 +02:00
Andreas Dangel 2b0769a1da Add warnings if ruleset name or description is missing 2017-06-09 12:08:43 +02:00
Andreas Dangel 45b7e7615b Fixes #429 [core] Error when running PMD from folder with space 2017-06-09 11:52:39 +02:00
oowekyala 2b3d12242e Moved toplevel packagestats into metrics 2017-06-09 10:32:01 +02:00
oowekyala b44b6ab5f6 Made tests for Signature and Sigmask 2017-06-09 10:10:00 +02:00
Bendegúz Nagy d17fb883bb Java: add support for some generic field access 2017-06-08 18:54:39 +02:00
Andreas Dangel e1aa6cf6ec Fix unit test 2017-06-07 21:57:40 +02:00
Andreas Dangel c3888ace4d RuleSetBuilder: add validation for name and description when building a ruleset 2017-06-07 21:52:59 +02:00
Andreas Dangel badbef6fdc RuleSet: Add validation for name and description, when setting in builder 2017-06-06 21:31:55 +02:00
snap252 106c9e4e8b [java] UnnecessaryFinalModifier final in private method #421
tried to fix checkstyle - not sure because this works just on linux
machines I think
2017-06-06 16:00:01 +02:00
Git Guru 28c610d68c [java] UnnecessaryFinalModifier final in private method #421 2017-06-06 15:47:37 +02:00
oowekyala af328f3e5e Documentation and formatting 2017-06-05 03:53:20 +02:00
oowekyala a4f3885fcb Implemented hasMatchingSig 2017-06-05 03:35:28 +02:00
Bendegúz Nagy c8763bef13 Java: fix typeresolution breaking rules and checkstyle 2017-06-04 00:28:38 +02:00
Bendegúz Nagy 13025f875d Java: add field access type tests, non-generic is complete 2017-06-04 00:28:38 +02:00
Bendegúz Nagy 039d4429f9 Java: clear up field access tests 2017-06-04 00:28:38 +02:00
Bendegúz Nagy f4ec163385 Java: add field access type resolution, no support for generics 2017-06-04 00:28:38 +02:00
Andreas Dangel 31ad613552 travis: run site upload in background job to mitigate no-output problem 2017-06-03 10:23:59 +02:00
oowekyala 745f2c1d7b Merge branch 'master' into metrics 2017-06-02 23:20:28 +02:00
Juan Martín Sotuyo Dodero de72522642 Merge branch 'type-resolution' 2017-06-02 17:55:39 -03:00
Juan Martín Sotuyo Dodero 70d6b6b012 Update changelog, refs #418 2017-06-02 17:54:50 -03:00
Bendegúz Nagy 1b910587f3 Java: add more tests to this and super expressions 2017-06-02 21:34:24 +02:00
oowekyala 916282be4a Added method to check if QName points to class or op 2017-06-02 11:01:17 +02:00
Andreas Dangel 161070396c Merge branch 'pr-409' 2017-06-02 09:43:29 +02:00
Andreas Dangel 5c8ac2499e Update changelog, refs #409 2017-06-02 09:36:22 +02:00
Andreas Dangel ca59d3665e Merge branch 'metrics-prework' of https://github.com/oowekyala/pmd into pr-409 2017-06-02 09:33:47 +02:00
Andreas Dangel e6e0483659 travis: fix path for $HOME/.m2 2017-06-02 09:29:08 +02:00
Juan Martín Sotuyo Dodero a239b6c78a Merge branch 'pr-416' 2017-06-01 12:04:53 -03:00
Juan Martín Sotuyo Dodero 2e869d4c6e Update changelog, refs #416 2017-06-01 12:02:32 -03:00
Juan Martín Sotuyo Dodero 0822218574 Simplify expressions 2017-06-01 11:56:48 -03:00
snap252 2460402ea8 test case & adapted grammar for annotated generic return type
public static <T> @Nullable T getNullableEnum() {
		return null;
	}
2017-06-01 15:00:20 +02:00
Git Guru b8d435235f fixed/removed unneeded change
@@ -1488,7 +1488,7 @@ void MethodDeclaration(int modifiers) :
 {jjtThis.setModifiers(modifiers);}
 {
   [ TypeParameters() ]
-  ResultType() MethodDeclarator() [ "throws" NameList() ]
+  [(Annotation() {checkForBadTypeAnnotations();})+] ResultType()
MethodDeclarator() [ "throws" NameList() ]
2017-06-01 10:13:29 +02:00
oowekyala 0568de5daf Use name() in place of description in NodeType 2017-06-01 03:34:19 +02:00
oowekyala fc1c0e5c4b Checkstyle fix 2017-05-31 23:00:07 +02:00
oowekyala 7af9c2344b Fixed #408 - UR anomaly in assert statements 2017-05-31 22:55:18 +02:00
oowekyala d27e899933 Made CurrentPath iterable 2017-05-31 22:30:27 +02:00
oowekyala f82294ca5d Factored logging messages 2017-05-31 22:15:00 +02:00
oowekyala daa54876ea Checkstyle fixes 2017-05-31 21:49:29 +02:00
oowekyala 3c1162b393 Removed ids 2017-05-31 21:30:08 +02:00
oowekyala 435f6ce16e Changed NodeType to an enum 2017-05-31 21:27:44 +02:00
Bendegúz Nagy d40e80742c Java: fix checkstyle issues 2017-05-31 15:59:48 +02:00
oowekyala 455e42bf3b Merge branch 'master' of https://github.com/pmd/pmd into metrics-prework 2017-05-31 11:38:41 +02:00
oowekyala 255dfd04a8 Changed benchmark name 2017-05-31 00:40:23 +02:00
Bendegúz Nagy 0ec1e44b13 Java: resolve 'super' expression's type 2017-05-30 20:23:11 +02:00
Bendegúz Nagy babe32a16c Java: resolve qualified 'this' expression's type 2017-05-30 17:37:47 +02:00
snap252 1a6be9190b + beautified method signature 2017-05-30 16:09:17 +02:00
oowekyala 0aff989862 Checkstyle fix 2017-05-30 15:36:39 +02:00
oowekyala 9ee19ac7ac Remove ALL fields in enums 2017-05-30 15:29:25 +02:00
snap252 a4754e9fc9 I hear voices ... and they tell me to like multi dimensional arrays
private static void testMultiDimArrayWithAnnotations() {
		// ever used a 2D-Array in java??
		Object x = new Object @NonNull[2] @Nullable[1] @NonNull[3];
	}
2017-05-30 15:15:44 +02:00
oowekyala c543cef8b1 Big refactor of qname
The creation methods now mostly take the node to describe as parameter. That way, the implementation of the class is less exposed, the creation methods can be overloaded and simplified in the AST nodes' classes.

Only nested class do not do that. That is to keep the recursive call to getQualifiedName which would be much more complicated if it was called from QualifiedName rather than the AST node.
2017-05-30 15:15:10 +02:00
snap252 3e75ddc188 + should have tried first :( 2017-05-30 14:59:53 +02:00
snap252 5120b0985c fixed bad void return 2017-05-30 14:58:09 +02:00
snap252 7997297e0b test case for
public void createNonNullArray() {
		return new MetaColumn @NonNull [value];
	}
2017-05-30 14:13:38 +02:00
snap252 b5474cdcf8 test case and fix for
public static <T extends @NonNull Enum<T>> getEnum() {
		return null;
	}
2017-05-30 14:05:29 +02:00
oowekyala 9ad46fbf88 Documented usesMetrics and usesTypeRes 2017-05-30 13:39:41 +02:00
oowekyala 02bac9ab71 Moved QualifiedName into standalone class 2017-05-30 13:34:48 +02:00
snap252 0660c7298a + simplified 2017-05-30 12:31:03 +02:00
snap252 d314a2c301 test case for
private byte @Nullable [] getBytes(){
		return null;
	}
2017-05-30 12:20:26 +02:00
Git Guru 7a4766e8a6 [java] Parsing Problem with Annotation for Array Member Types #417 2017-05-30 10:52:09 +02:00
Git Guru 68ab7048cb *[java]* Java 8 parsing problem with annotations for wildcards #414 2017-05-29 18:20:12 +02:00
Bendegúz Nagy 6fb5681734 Resolve 'this' keyword in Java 2017-05-29 02:47:21 +02:00
Bendegúz Nagy e75cf1b55c Add test for Java 'this' keyword typeresolution 2017-05-29 02:29:13 +02:00
oowekyala da4897f2b3 Fix misplaced benchmark 2017-05-28 18:14:10 +02:00
oowekyala 4be7616c15 Fixed formatter chaos 2017-05-28 18:13:19 +02:00
Andreas Dangel 872718a0dd Update changelog, closes #407 2017-05-27 20:37:12 +02:00
Andreas Dangel cee7d2a046 release script: use English locale (refs #407) 2017-05-27 20:33:03 +02:00
Juan Martín Sotuyo Dodero fdf497e4a6 Merge branch 'pr-406' 2017-05-26 14:28:10 -03:00
Juan Martín Sotuyo Dodero dde5e416b4 Update changelog, refs #406 2017-05-26 14:27:44 -03:00
Juan Martín Sotuyo Dodero 7ef9b93b90 Add method reference test case 2017-05-26 14:24:24 -03:00
oowekyala e1f02acf87 Checkstyle fix 2017-05-26 17:56:09 +02:00
oowekyala 6fbcb431fc Checkstyle fixes 2017-05-26 17:45:21 +02:00
oowekyala ad51c61f33 Revert dumb move with gitignore 2017-05-26 15:27:48 +02:00
oowekyala acff55e151 Deleted local file 2017-05-26 15:19:12 +02:00
oowekyala 0847f24068 Fix capabilities nonsense 2017-05-26 15:13:03 +02:00
oowekyala 5b918ba53d Revert "Canonical type of arguments in method Qname" until TypeRes is ok 2017-05-26 14:59:46 +02:00
oowekyala b09cde6d03 Canonical type of arguments in method Qname\n That doesn't work for now because of Typeres. Be sure to edit the tests 2017-05-26 14:56:49 +02:00
oowekyala 909bb60043 Inlined canonical separators for qualified names 2017-05-26 14:45:17 +02:00
oowekyala 1673e8306a Use Qname for memoized result retrieval 2017-05-26 14:25:00 +02:00
oowekyala 117da90e72 Fix benchmark 2017-05-26 14:23:24 +02:00
Dennie Reniers 43c13b4c8c Merge branch 'master' into PR18700 2017-05-26 10:26:19 +02:00
oowekyala a6185327b5 Qualified names memoization 2017-05-25 20:08:43 +02:00
Andreas Dangel 6a27ac55a7 Rename pages so the "Edit me" link is working 2017-05-25 13:13:25 +02:00
Andreas Dangel 97bfcf49fc Add folder properties, so that "Edit me" link works correctly 2017-05-25 13:04:24 +02:00
Andreas Dangel 4c41e1e8a4 Add "--rm=true" flag for running docker 2017-05-25 12:39:40 +02:00
Andreas Dangel 7ee6284ec2 Change github edit button temporarily to point to adangel/pmd 2017-05-25 12:37:55 +02:00
Andreas Dangel ae7be0539c Add more release notes 2017-05-25 12:35:02 +02:00
Andreas Dangel 70ab4f2468 Restructure pages: product is now "pmd", sidebar new, pages moved
Removed the samples mydoc, product1, product2
2017-05-25 12:16:23 +02:00
Andreas Dangel 624705bd70 Info about using docker 2017-05-25 11:12:17 +02:00
Andreas Dangel f0df36517e Update sidebar structure 2017-05-25 11:12:08 +02:00
Andreas Dangel b14da68b5a Update theme from https://github.com/tomjohnson1492/documentation-theme-jekyll 2017-05-25 10:22:39 +02:00
Andreas Dangel b193bb28d8 Add 'docs/' from commit '106142b25c9387ffd002437027ced1b04f494205'
git-subtree-dir: docs
git-subtree-mainline: 23545aa7ea
git-subtree-split: 106142b25c
2017-05-25 10:01:42 +02:00
oowekyala 5f426f90b7 Removed probably useless methods from QualifiedName 2017-05-23 22:10:44 +02:00
oowekyala def31ec49c Documentation 2017-05-23 22:09:28 +02:00
oowekyala 5b622e6cf5 hashCode and equals for Signatures 2017-05-23 21:36:04 +02:00
oowekyala f83ee39c65 Visitor with classContext 2017-05-23 21:25:31 +02:00
oowekyala c35e513598 Static building method for FieldSignature 2017-05-23 21:24:52 +02:00
oowekyala a50a1b5795 Revert "FieldDeclaration implements QualifiableNode"
This reverts commit ded6dc670b.
2017-05-23 21:20:05 +02:00
oowekyala ded6dc670b FieldDeclaration implements QualifiableNode 2017-05-23 21:18:20 +02:00
oowekyala a99f0c276d Added modification methods for ClassStats 2017-05-23 20:49:00 +02:00
oowekyala e4392fc751 createIfNotFound for PackageStats methods 2017-05-23 20:29:54 +02:00
oowekyala 1dacfd1b96 Update untracked 2017-05-23 18:28:24 +02:00
oowekyala 5607456f2f Simplified existing metrics 2017-05-23 17:59:22 +02:00
oowekyala ab14dbb47c Added LOC metric 2017-05-23 17:55:38 +02:00
oowekyala 167d5ec63c MethodOrConstructorDeclaration extends Node 2017-05-23 17:51:15 +02:00
oowekyala a6f41f1bff Minor doc changes 2017-05-23 17:41:25 +02:00
oowekyala 3ad3df3a70 Implemented some navigation and modification methods on PackageStats 2017-05-23 17:29:03 +02:00
oowekyala 583e350da0 Finished visitor facade 2017-05-23 17:28:16 +02:00
oowekyala 44a4aecf85 Added utility methods for qualified names 2017-05-23 16:56:04 +02:00
oowekyala 4891592a57 Merge branch 'metrics-prework' of https://github.com/oowekyala/pmd into metrics-prework 2017-05-23 16:14:58 +02:00
oowekyala 8c0863a070 Added test for QualifiedName 2017-05-23 16:08:47 +02:00
oowekyala 996a08fbd6 Created QualifiedName class 2017-05-23 14:56:05 +02:00
dreniers 4f826d2e08 Fix for PR 18700: False positive Design8 (lambda expression containing function call).
Fixed it by having ASTLambdaExpression.isFindBoundary() return true, analogous to ASTClassOrInterfaceBodyDeclaration.isFindBoundary().
2017-05-23 09:54:39 +02:00
oowekyala c013f11ad0 Implemented qualified names 2017-05-22 22:59:12 +02:00
oowekyala ed736dabb5 Implemented qualified names 2017-05-22 22:33:33 +02:00
oowekyala c767953ff5 Solve dependency problem to pmd-core 2017-05-22 20:27:29 +02:00
oowekyala a97997bb1e Checkstyle fixes 2017-05-22 20:19:42 +02:00
oowekyala a8cb6eced7 Resolve merge conflicts with prework 2017-05-22 19:55:55 +02:00
oowekyala 42e0a9f8e8 Added the visitor 2017-05-22 19:50:41 +02:00
oowekyala 2cb92a005e Adapted RuleTstTest 2017-05-22 19:49:45 +02:00
oowekyala ea2523489a Checkstyle fixes 2017-05-22 19:27:36 +02:00
oowekyala cad0697798 Added a Benchmark for Metrics 2017-05-22 18:57:53 +02:00
oowekyala 0be4a2c09a SourceCodeProcessor should now start MetricsVisitorFacade 2017-05-22 18:53:40 +02:00
oowekyala fffa63ad63 Rulesets are aware of useMetrics 2017-05-22 18:52:53 +02:00
oowekyala 52a7707681 Added umbrella interface for Constructor and Methods 2017-05-21 20:47:20 +02:00
oowekyala dc83eb1720 Introduced metrics attribute in xml rule element 2017-05-21 20:37:59 +02:00
oowekyala c0b020e066 Added usesMetrics to Rule interface 2017-05-21 20:33:39 +02:00
oowekyala 8bc1173ce5 Implemented usesMetrics field in Rules 2017-05-21 20:25:44 +02:00
oowekyala cdd8737df4 Added OO metrics to Rule interface 2017-05-21 20:20:18 +02:00
oowekyala 9ec2388bb3 Merge branch 'master' of https://github.com/oowekyala/pmd into metrics-prework 2017-05-21 14:59:21 +02:00
Andreas Dangel 23545aa7ea travis build - run only specific parts of release.sh script 2017-05-20 23:53:28 +02:00
Andreas Dangel 6aa77ce3e4 travis: run install before building site docu 2017-05-20 23:02:22 +02:00
Andreas Dangel e63e352573 Prepare next development version 2017-05-20 22:39:36 +02:00
Andreas Dangel 1e64c0d864 [maven-release-plugin] prepare for next development iteration 2017-05-20 22:35:55 +02:00
Andreas Dangel 9b70c1a0d1 [maven-release-plugin] prepare release pmd_releases/5.7.0 2017-05-20 22:35:46 +02:00
Andreas Dangel ac8ede1897 Prepare pmd release 5.7.0 2017-05-20 22:29:23 +02:00
Andreas Dangel 3d6aab783b Adjust do-release.sh script 2017-05-20 22:21:55 +02:00
Andreas Dangel 0434f9bd22 Fix javadoc 2017-05-20 21:51:31 +02:00
Andreas Dangel 80dcc67002 Merge branch 'issue-378' 2017-05-20 21:37:50 +02:00
Andreas Dangel 4e72eef495 [java] Parser Error for empty statements
Fixes #378
2017-05-20 21:28:39 +02:00
Andreas Dangel 362fa0e19e Merge branch 'issue-358' 2017-05-20 20:56:54 +02:00
Andreas Dangel 1cac757f66 Update changelog, refs #358 #395 2017-05-20 20:56:45 +02:00
Andreas Dangel 92d2e68396 Merge branch 'master' of https://github.com/fsherstobitov/pmd into issue-358 2017-05-20 20:54:06 +02:00
Andreas Dangel cd625c3086 Merge branch 'pr-392' 2017-05-20 20:46:30 +02:00
Andreas Dangel 073c001b1b Update changelog, refs #392 2017-05-20 20:46:10 +02:00
Andreas Dangel 6d768485dd Merge branch 'master' of https://github.com/alwa/pmd into pr-392 2017-05-20 20:46:00 +02:00
Andreas Dangel 55bb251887 Merge branch 'pr-391' 2017-05-20 20:39:03 +02:00
Andreas Dangel 3e4a9a3999 Update changelog, refs #391 2017-05-20 20:38:56 +02:00
Andreas Dangel ba4dbee410 Merge branch 'fix-apex-doc-typo' of https://github.com/KThompso/pmd into pr-391 2017-05-20 20:38:05 +02:00
Andreas Dangel 8d787333f6 Merge branch 'pr-390' 2017-05-20 20:37:14 +02:00
Andreas Dangel f4b4966f41 Update changelog, refs #390 2017-05-20 20:37:04 +02:00
Andreas Dangel fb471281b0 Merge branch 'trailingwhitespace' of https://github.com/vanniktech/pmd into pr-390 2017-05-20 20:36:21 +02:00
Andreas Dangel daa66f5bbb Merge branch 'empty_renderer' of https://github.com/ryan-gustafson/pmd 2017-05-20 20:27:28 +02:00
Andreas Dangel 0589941b38 Merge branch 'issue-369' 2017-05-20 20:20:38 +02:00
Andreas Dangel 5bcdf5c513 Update changelog, refs #369 #383 2017-05-20 20:20:07 +02:00
Andreas Dangel c825fb6f58 Merge branch 'issue369' of https://github.com/oowekyala/pmd into issue-369 2017-05-20 20:17:34 +02:00
Andreas Dangel 71a1926e81 Merge branch 'issue-334' 2017-05-20 20:04:47 +02:00
Andreas Dangel ff67aa0799 Update changelog, refs #334 #382 2017-05-20 20:04:38 +02:00
Andreas Dangel 9ed962ac62 Merge branch 'issue334' of https://github.com/oowekyala/pmd into issue-334 2017-05-20 20:01:10 +02:00
Andreas Dangel fb56643590 Fix travis build for releases (refs #376) 2017-05-20 11:17:35 +02:00
Andreas Dangel 050e659c68 Fix travis build, part 5 (refs #376) 2017-05-20 11:09:54 +02:00
Andreas Dangel eb0ddfcf2b Fix travis build, part 4 (refs #376)
Now, a push is a push
2017-05-20 10:43:14 +02:00
Andreas Dangel 120c7cc1ff Fix travis build, add more info during build (refs #376) 2017-05-20 10:30:57 +02:00
Andreas Dangel 64eac02bbd Fix travis build, part 3 (refs #376) 2017-05-20 09:59:30 +02:00
Andreas Dangel 8ef25e839c Fix travis build, part 2 (refs #376) 2017-05-20 09:55:09 +02:00
Andreas Dangel e5b38f7937 Fix travis build script, refs #376 2017-05-20 09:51:37 +02:00
Andreas Dangel 5e9a0e4e89 Merge branch 'issue-376' 2017-05-20 09:22:07 +02:00
Andreas Dangel 13e788edcf Update changelog, refs #376 2017-05-20 09:21:44 +02:00
Fedor Sherstobitov b82228d8df Fixes #358 Mockito verify method is not taken into account in JUnitTestsShouldIncludeAssert rule - treat Mockito's verify and Mockito.verify as assert statements 2017-05-17 11:27:04 +05:00
Andreas Dangel adced2dd26 Restructure travis build scripts, so that we have 3 steps, that can
run in parallel:
* build-deploy.sh
* build-site.sh
* build-sonar.sh
2017-05-15 21:11:43 +02:00
oowekyala 0193aa8f23 Outer memo infrastructure 2017-05-15 00:48:46 +02:00
oowekyala 3c3648151c References to class hierarchy 2017-05-14 23:43:54 +02:00
Alix Warnke 207cbf9c91 False positive for Law Of Demeter: https://sourceforge.net/p/pmd/bugs/1427/ 2017-05-10 23:56:34 +02:00
Kyle Thompson-Bass 4f96cabe82 [apex] Fix documentation typo 2017-05-10 12:33:57 -04:00
oowekyala e297f7c48b Removed copypaste suggestion 2017-05-10 11:35:09 +02:00
Niklas Baudy d076264813 Remove trailing whitespaces in design.xml 2017-05-09 10:32:50 +02:00
Andreas Dangel abaeea12a5 Merge branch 'pr-381' 2017-05-08 20:50:21 +02:00
Andreas Dangel 8ec4e2acb2 Update changelog, refs #381 2017-05-08 20:50:04 +02:00
Andreas Dangel d61a18fe62 Merge branch 'site-doc-fix' of https://github.com/oowekyala/pmd into pr-381 2017-05-08 20:48:03 +02:00
Andreas Dangel 1554fb91bc Merge branch 'issue-389' 2017-05-08 20:36:11 +02:00
Andreas Dangel a1492bb2cc Update changelog, refs #389 2017-05-08 20:36:03 +02:00
Andreas Dangel 4a03cd7eb7 Fixes #389 RuleSetCompatibility - old ruleset name was unusedcode 2017-05-08 20:35:13 +02:00
Ryan Gustafson 354e592540 Add the 'empty' Renderer which writes nothing.
Use with '-f empty' on the command line.
2017-05-07 22:30:54 -05:00
Oowekyala 16a878b6d6 Cleanup 2017-05-07 01:35:49 +02:00
Oowekyala 01164e2de5 Use a permalink 2017-05-07 01:04:16 +02:00
Oowekyala 9c1e8bb4e8 Changed package structure 2017-05-06 16:33:16 +02:00
Oowekyala cb0a30b2e1 Documentation 2017-05-06 16:29:44 +02:00
Oowekyala a8ff116fb3 Changed header template 2017-05-06 15:55:11 +02:00
Oowekyala 3b7c956596 Fixed unrecognised headers 2017-05-06 02:56:10 +02:00
Oowekyala fdff9bb964 Added documentation details 2017-05-06 02:14:05 +02:00
Oowekyala c8b6a4d9d9 Fix broken link 2017-05-06 01:41:10 +02:00
Oowekyala 8af2b6c118 Methods and constructors are treated the same 2017-05-05 19:35:38 +02:00
Oowekyala 6a0cd33e28 Simplified capability check 2017-05-05 19:23:53 +02:00
Oowekyala 5d308a5312 Introduced marker interface for AST method and constructor nodes 2017-05-05 17:33:59 +02:00
Oowekyala 5d9434b623 Merge branch 'master' into metrics-prework 2017-05-05 14:52:39 +02:00
Andreas Dangel 39eb79f58e Fix build determining current version
Only take the last line of the output. Current maven wrapper
will output the current directy, later versions of the wrapper
will output the wrapper version.
2017-05-05 12:22:55 +02:00
Andreas Dangel 051bee9192 Fixes #1513 [java] Remove deprecated rule UseSingleton 2017-05-05 11:52:12 +02:00
Andreas Dangel bbb6757e10 Update changelog, closes #377 2017-05-05 11:37:56 +02:00
Andreas Dangel 767eea8b4e travis release script - fix missing escape for backslash, refs #324 2017-05-05 11:37:56 +02:00
Andreas Dangel aba44a8824 Make travis to use maven wrapper, too
refs #377
2017-05-05 11:37:51 +02:00
Andreas Dangel 88a8d44f97 Add maven wrapper, use maven 3.5.0
refs #377
2017-05-05 11:37:41 +02:00
Andreas Dangel 1ed34de15c Use latest maven-pmd-plugin 3.8
refs #361
2017-05-05 10:49:15 +02:00
Andreas Dangel 7c3bce0546 Improve changelog 2017-05-01 19:36:04 +02:00
Andreas Dangel 00fcbd7375 Trying to speed up travis build: run the build only once... 2017-05-01 19:34:45 +02:00
Andreas Dangel 440b228757 Merge branch 'issue-345' 2017-05-01 17:42:48 +02:00
Andreas Dangel b4c5128a64 Update changelog, refs #345 2017-05-01 17:42:38 +02:00
Andreas Dangel 44bb2826f1 [java] FieldDeclarationsShouldBeAtStartOfClass: Add unit test
for new "ignoreInterfaceDeclarations" property
Fixes #345
2017-05-01 17:38:14 +02:00
Andreas Dangel f60419c966 Merge branch 'patch-1' of https://github.com/SUPERCILEX/pmd into issue-345 2017-05-01 17:27:10 +02:00
Andreas Dangel 72dc0ab232 Merge branch 'pr-372' 2017-05-01 17:26:27 +02:00
Andreas Dangel 853e07b368 Update changelog, refs #372 2017-05-01 17:19:51 +02:00
Andreas Dangel c5ae33a683 [core] HTMLRenderer: Add test for HTML escaping 2017-05-01 17:19:40 +02:00
Andreas Dangel a99c39fd24 Merge branch 'XSSInHTMLRenderer' of https://github.com/sgorbaty/pmd into pr-372 2017-05-01 16:58:15 +02:00
Andreas Dangel ec4952d4eb Merge branch 'pr-368' 2017-05-01 16:51:26 +02:00
Andreas Dangel 6ac8455346 Update changelog, refs #368 2017-05-01 16:51:07 +02:00
Andreas Dangel bfd18f5126 Merge branch 'NOTImprovement' of https://github.com/sgorbaty/pmd into pr-368 2017-05-01 16:44:21 +02:00
Alex Saveau fa1e54f87f Add property to ignore interfaces in FieldDeclarationsShouldBeAtStartOfClassRule 2017-04-30 09:47:09 -07:00
Andreas Dangel 98e1cc128b Merge branch 'pmd/5.5.x' 2017-04-29 22:12:11 +02:00
Andreas Dangel 3794f8ffff Prepare next development version 2017-04-29 21:49:31 +02:00
Andreas Dangel 67fae36167 [maven-release-plugin] prepare for next development iteration 2017-04-29 21:47:05 +02:00
Andreas Dangel fdf162382b [maven-release-plugin] prepare release pmd_releases/5.5.7 2017-04-29 21:46:53 +02:00
Andreas Dangel ecf5bcb48b Prepare pmd release 5.5.7 2017-04-29 21:40:54 +02:00
Andreas Dangel 25e840cd68 Disable caching for URLConnections
Fixes #364, refs #337

(cherry picked from commit 9fae304b6f)
2017-04-29 21:30:07 +02:00
Andreas Dangel 0d0134b4fd Change version to 5.7.0-SNAPSHOT 2017-04-29 20:27:03 +02:00
Andreas Dangel d1e2a4775f Prepare next development version 2017-04-29 20:22:28 +02:00
Andreas Dangel 7373b040c9 [maven-release-plugin] prepare for next development iteration 2017-04-29 20:20:16 +02:00
Andreas Dangel 65a18787e9 [maven-release-plugin] prepare release pmd_releases/5.6.1 2017-04-29 20:20:07 +02:00
Andreas Dangel 1b3f2dfcaf Prepare pmd release 5.6.1 2017-04-29 20:08:56 +02:00
Andreas Dangel b1784d41af Fixes #373 - Add more helper methods in RuleSetFactory.
Note: This is not ideal and merely helps to get the eclipse
plugin out of the door. Dealing directly in such a way with RuleSets
probably breaks incremental analysis. It also leads to shared
Rule instances, which might lead to concurrency issues.
2017-04-28 20:49:15 +02:00
Sergey daeb9e6c1e Using Lang 3 2017-04-28 10:54:09 -07:00
Sergey 985299b490 Fix XSS in HTML renderer 2017-04-28 10:38:48 -07:00
Sergey 74199a0d9b Additional test case 2017-04-26 15:39:42 -07:00
Sergey 0386d712b3 Adding AST Negation expression 2017-04-26 15:35:53 -07:00
Andreas Dangel 9fae304b6f Disable caching for URLConnections
Fixes #364, refs #337
2017-04-25 22:46:08 +02:00
Andreas Dangel 9653ee8025 Revert "Synchronize the loading/parsing of a ruleset"
This reverts commit b2150bbeb6.
2017-04-25 22:10:02 +02:00
Andreas Dangel b2150bbeb6 Synchronize the loading/parsing of a ruleset
Fixes #364
2017-04-24 21:59:51 +02:00
Andreas Dangel 95f33d8cbe Update changelog, refs #363 2017-04-24 20:38:59 +02:00
Andreas Dangel 379f8bc5ec Fix artifact name for pmd-build-tools-plugin
Fixes #363
2017-04-24 20:15:40 +02:00
Robert Sösemann b97462fa24 Make Time to fix property work for XPath rules 2017-04-24 12:22:23 +02:00
Robert Sösemann b3046de6ee Fix Checkstyle issues 2017-04-24 11:54:10 +02:00
Andreas Dangel b53566c0dc Prepare next development version 2017-04-22 13:24:13 +02:00
Andreas Dangel d4edeefa63 [maven-release-plugin] prepare for next development iteration 2017-04-22 13:20:12 +02:00
Andreas Dangel 38fb34dc17 [maven-release-plugin] prepare release pmd_releases/5.6.0 2017-04-22 13:20:03 +02:00
Andreas Dangel e54be031a9 Prepare pmd release 5.6.0 2017-04-22 13:13:18 +02:00
Andreas Dangel 3771f9fbd6 Fix artifact id for pmd-build-tools-plugin 2017-04-22 11:49:14 +02:00
Andreas Dangel 1553c9cd3f Use release pmd-build-tools 1.0.1 2017-04-22 11:38:48 +02:00
Andreas Dangel a3dbc074c3 Merge branch 'pr-344' 2017-04-22 11:17:03 +02:00
Andreas Dangel 4485f77a53 Update changelog, refs #344 2017-04-22 11:16:45 +02:00
Andreas Dangel 81892a58fe Merge branch 'CRUDClassCastExceptionFix' of https://github.com/sgorbaty/pmd into pr-344 2017-04-22 11:11:29 +02:00
Andreas Dangel d60fdf7656 Merge branch 'issue-310' 2017-04-22 11:08:13 +02:00
Andreas Dangel ece6d81163 java UnnecessaryLocalBeforeReturn: Update property description 2017-04-22 10:58:45 +02:00
Andreas Dangel b6aae557b4 Update changelog, refs #310 refs #240 2017-04-22 10:56:53 +02:00
Andreas Dangel 05308ef730 java UnnecessaryLocalBeforeReturn: add property "statementOrderMatters"
Fixes #310
2017-04-22 10:53:08 +02:00
Andreas Dangel c3aaf60132 Merge branch 'issue-330' 2017-04-21 18:07:45 +02:00
Andreas Dangel 2f98c5e679 Merge branch 'issue-330' of https://github.com/Monits/pmd into issue-330 2017-04-21 18:07:07 +02:00
Andreas Dangel 180846a6b0 Merge branch 'issue-352' 2017-04-21 17:58:52 +02:00
Andreas Dangel d5718e4624 Merge branch 'issue-352' of https://github.com/Monits/pmd into issue-352 2017-04-21 17:48:08 +02:00
Robert Sösemann 0096700a66 https://github.com/pmd/pmd/pull/329#discussion_r112703324 2017-04-21 17:17:44 +02:00
Robert Sösemann a575910cdd Made CODACY_TIME_TO_FIX property static final 2017-04-21 11:26:20 +02:00
Robert Sösemann 9d0c4d2c8e Define new Codacy.com specific property for Apex rulesets 2017-04-20 11:46:40 +02:00
Andreas Dangel 3103c4a001 Merge branch 'pmd/5.5.x' 2017-04-19 22:36:41 +02:00
Andreas Dangel 9c3bd5ef91 Prepare next development version 2017-04-19 22:09:56 +02:00
Andreas Dangel 06e81a5167 [maven-release-plugin] prepare for next development iteration 2017-04-19 22:06:38 +02:00
Andreas Dangel 7ac48f14a2 [maven-release-plugin] prepare release pmd_releases/5.5.6 2017-04-19 22:06:31 +02:00
Andreas Dangel 87b743ea67 Prepare pmd release 5.5.6 2017-04-19 21:59:38 +02:00
Andreas Dangel 0de7313b8b Fix additional potential resource leaks
refs #337 refs #349

(cherry picked from commit 23ed813954)
2017-04-19 21:45:03 +02:00
Andreas Dangel bf3d543734 Update changelog, refs #337 refs #349
(cherry picked from commit 4d3976dac3)
2017-04-19 21:43:35 +02:00
Andreas Dangel 13e0d6e287 https://github.com/pmd/pmd/issues/337
Modify ResourceLoader to close underlying JarFile if using
JarURLConnection to avoid open file leaks. Clarify on JavaDoc that
caller must close the returned InputStream.

Minor test usage cleanups.

(cherry picked from commit effe71ed54)
2017-04-19 21:42:33 +02:00
Sergey 31a42121e8 Adding proper handling of array types 2017-04-18 10:03:52 -07:00
Juan Martín Sotuyo Dodero 6a3b509feb [java] Fix NPE in JUnitTestsShouldIncludeAssert
- Fixes #330
2017-04-15 10:40:13 -03:00
Juan Martín Sotuyo Dodero 98b4b96c4c [java] Fix ClassCastException in AccessorClassGeneration
- Fixes #352
2017-04-15 10:09:26 -03:00
Juan Martín Sotuyo Dodero 24a648e032 Merge branch 'pr-351' 2017-04-14 18:37:26 -03:00
Juan Martín Sotuyo Dodero af795ef12b Update changelog, refs #351 2017-04-14 18:37:15 -03:00
Juan Martín Sotuyo Dodero 8414649d58 Improve changelog 2017-04-14 18:30:58 -03:00
Juan Martín Sotuyo Dodero 464eec3477 [doc] Improve documentation on using type resolution 2017-04-14 18:09:16 -03:00
Sergey 95d1a68ebc Fixing regression 2017-04-14 13:51:15 -07:00
Juan Martín Sotuyo Dodero 63ea1906af Revert "Merge branch 'pr-287'"
This reverts commit 2d322882d3, reversing
changes made to e58422bf7e.
2017-04-14 17:41:50 -03:00
Juan Martín Sotuyo Dodero c26891a091 Merge branch 'pr-343' 2017-04-14 17:31:58 -03:00
Juan Martín Sotuyo Dodero 89399dcbf6 Update changelog, refs #343 2017-04-14 17:31:27 -03:00
Juan Martín Sotuyo Dodero a345e1585a Merge branch 'pr-340' 2017-04-14 17:21:51 -03:00
Juan Martín Sotuyo Dodero 9937a270d9 Update changelog, refs #340 2017-04-14 17:21:08 -03:00
Sergey 5c8d324230 Removing comment AST nodes for cleaner tree 2017-04-14 10:39:03 -07:00
Andreas Dangel 23ed813954 Fix additional potential resource leaks
refs #337 refs #349
2017-04-14 12:34:06 +02:00
Andreas Dangel 4784787afe travis build: fix escaping of double quotes
closes #324

Cherry-picked 536280bb98
2017-04-14 11:52:26 +02:00
Andreas Dangel b37f42d355 Merge branch 'issue-324' 2017-04-14 11:50:47 +02:00
Andreas Dangel 536280bb98 travis build: fix escaping of double quotes
closes #324
2017-04-14 11:50:37 +02:00
Andreas Dangel aab2ff60e7 Merge branch 'issue-337' 2017-04-14 11:40:50 +02:00
Andreas Dangel 4d3976dac3 Update changelog, refs #337 refs #349 2017-04-14 11:40:02 +02:00
Andreas Dangel fac78b0e8d Merge branch 'issue-337' of https://github.com/ryan-gustafson/pmd into issue-337 2017-04-14 11:37:02 +02:00
Andreas Dangel 97031a7eab Merge branch 'pr-333' 2017-04-14 11:27:42 +02:00
Andreas Dangel 8bba026974 Merge branch 'faster-symboltable' of https://github.com/Monits/pmd into pr-333 2017-04-14 11:27:11 +02:00
Andreas Dangel 0ef0382651 Merge branch 'issue-315' 2017-04-14 11:13:43 +02:00
Andreas Dangel cc14b103e8 Update changelog, refs #315 2017-04-14 11:13:17 +02:00
Andreas Dangel 741c26d7c6 Merge branch 'issue-315' of https://github.com/Monits/pmd into issue-315 2017-04-14 11:11:27 +02:00
Ryan Gustafson effe71ed54 https://github.com/pmd/pmd/issues/337
Modify ResourceLoader to close underlying JarFile if using
JarURLConnection to avoid open file leaks. Clarify on JavaDoc that
caller must close the returned InputStream.

Minor test usage cleanups.
2017-04-14 01:16:18 -05:00
Juan Martín Sotuyo Dodero 852c4ccf18 Merge branch 'pr-341' 2017-04-13 21:34:02 -03:00
Juan Martín Sotuyo Dodero e9fb96fca3 Update changelog, refs #341 2017-04-13 21:33:29 -03:00
Sergey 6fcda61319 Bug fix 2017-04-13 16:41:39 -07:00
Sergey 71b8638283 Style 2017-04-13 16:37:08 -07:00
Sergey 0c83920bb4 Adding support for ternary operator 2017-04-13 16:34:56 -07:00
Sergey 3ab3bad8a2 Detection of safe IDs, Integers, and Booleans in a query 2017-04-13 15:47:50 -07:00
Sergey 7a9ccb70df JS encoded and parsed JSON is safe 2017-04-12 15:53:24 -07:00
Sergey f2683c6cb4 Quoted EL in JSON.parse is safe 2017-04-12 15:43:37 -07:00
Sergey e6966c7ca4 Json.parse is a safe evaluation 2017-04-12 15:32:42 -07:00
Sergey e7bcf6fdfa NOT(..) is a safe evaluation 2017-04-12 15:08:21 -07:00
Sergey ee0558a07c Missed a file 2017-04-12 13:17:27 -07:00
Andreas Dangel d2f6e1506d Merge branch 'pr-299' 2017-04-12 21:41:59 +02:00
Andreas Dangel 79ffafac13 Update changelog, refs #299 2017-04-12 21:41:46 +02:00
Andreas Dangel 271e059c04 Merge branch 'rename-unusedmodifier' of https://github.com/Monits/pmd into pr-299 2017-04-12 21:38:00 +02:00
Sergey 2aa1d9e98e Style fix 2017-04-12 10:56:30 -07:00
Sergey 019b65b6a2 Revert of debugging 2017-04-12 10:54:42 -07:00
Sergey d18b3a0bf8 Adding comment support for quoted attributes 2017-04-12 09:42:35 -07:00
Sergey 5d1d4031e6 Adding inner comment support for scripts 2017-04-11 16:34:01 -07:00
Sergey 071c58dbee Removing styles and a few bug fixes 2017-04-11 13:42:06 -07:00
Juan Martín Sotuyo Dodero 523495750f Merge branch 'pr-332' 2017-04-11 12:37:52 -03:00
Juan Martín Sotuyo Dodero 7b8472855e Update changelog, refs #332 2017-04-11 12:36:28 -03:00
Michael Pellegrini b78ed9d1a4 Enhance to allow on-demand imports of inner classes
- Allow for import java.lang.ProcessBuilder.*
- Update test cases to test for above scenario
2017-04-10 22:32:52 -04:00
Juan Martín Sotuyo Dodero 1a8432be77 pdate changelog, update performance meassurements 2017-04-09 16:27:30 -03:00
Juan Martín Sotuyo Dodero 5929e57b23 [java] Avoid recomputing qualified types
- This method is called millions of times, to help resolve variable and
argument types. Memoization of the result can reduce symboltable
analysis times by up to 50%
2017-04-09 13:57:34 -03:00
Michael Pellegrini f3612139da Merge remote-tracking branch 'origin/master' into feature/import_java.lang.invoke 2017-04-07 18:40:20 -04:00
Michael Pellegrini 0e5160e488 Updating code to make more future proof 2017-04-07 18:29:40 -04:00
Juan Martín Sotuyo Dodero 7d2b8f69af Merge branch 'pr-327' 2017-04-07 15:20:09 -03:00
Juan Martín Sotuyo Dodero 0df5d740dc Update changelog, refs #327 2017-04-07 14:35:31 -03:00
Juan Martín Sotuyo Dodero 0aa723736f Merge branch 'pr-326' 2017-04-07 14:23:12 -03:00
Juan Martín Sotuyo Dodero 2ecc1c582a Update changelog, refs 326 2017-04-07 14:22:34 -03:00
Michael Pellegrini 2fe1271788 Allow java.lang.invoke. imports in the DontImportJavaLangRule 2017-04-07 07:09:18 -07:00
Juan Martín Sotuyo Dodero 3b48da676e Merge branch 'pr-331' 2017-04-06 22:33:41 -03:00
Juan Martín Sotuyo Dodero 30d230183a Update changelog, refs #331 2017-04-06 22:33:29 -03:00
Clément Fournier 2c79299ecb Added test case 2017-04-06 23:47:17 +02:00
Clément Fournier 4b45d1a7e6 Rules handles AllocationExpressions 2017-04-06 23:38:51 +02:00
Robert Sösemann cc9edda049 Add custom rule property for Codacy.com plus minor adjustments 2017-04-06 15:27:02 +02:00
Clément Fournier ebafeff4a4 Merge branch 'master' into metrics-prework 2017-04-05 22:45:33 +02:00
Sergey c9bf13d5e0 Fixed bug in detection of SOQL injection 2017-04-05 11:34:52 -07:00
Sergey 0e3b8fdc5f Fixing quote detection and argument detection 2017-04-05 10:36:38 -07:00
Juan Martín Sotuyo Dodero d1a6dc1130 Merge branch 'pr-317' 2017-04-03 17:52:22 -03:00
Juan Martín Sotuyo Dodero 806a93086e Update changelog, refs #317 2017-04-03 17:44:00 -03:00
Juan Martín Sotuyo Dodero 20c81bc968 Merge branch 'pr-316' 2017-04-03 17:38:55 -03:00
Juan Martín Sotuyo Dodero df5a09230b Update changelog, refs #316 2017-04-03 17:24:55 -03:00
Juan Martín Sotuyo Dodero 6090422291 [apex] Fix syntax of sample code
- Make the syntax actually valid
 - Fixes #315
2017-04-03 17:04:41 -03:00
Anand 4e0dd619b6 Remove dependency from pmd test 2017-04-03 00:17:48 -07:00
Anand 9aa8bfaa41 Add rule preventing the use of non existent annotations in apex 2017-04-03 00:16:04 -07:00
Anand fe5f0daef9 merge 2017-04-01 19:48:00 -07:00
Anand cd10daba18 Merge remote-tracking branch 'Up2Go/master' 2017-04-01 17:38:48 -07:00
Clément Fournier 6e6559cb0c Merge branch 'metrics-prework' of https://github.com/Oowekyala/pmd into metrics-prework 2017-04-01 13:57:49 +02:00
Clément Fournier 1ad748764d Support for constructors 2017-04-01 13:57:07 +02:00
Clément Fournier 4b671f5d12 Abstracted signatures 2017-04-01 13:57:07 +02:00
Clément Fournier 7a5894c856 Implemented signatures 2017-04-01 13:57:07 +02:00
Clément Fournier 92568e3174 Started holder impl 2017-04-01 13:57:06 +02:00
Clément Fournier b922bcd04c Started holder impl 2017-04-01 13:57:06 +02:00
Clément Fournier af650cc987 Double enum selection 2017-04-01 13:57:06 +02:00
Clément Fournier 9fedb69d42 Simple Key enum selection 2017-04-01 13:57:06 +02:00
Sergey dc94c16873 Style fixes 2017-03-31 10:10:11 -07:00
Sergey c7e5a37b66 Safe ID assignment 2017-03-30 16:20:22 -07:00
Sergey 1bd1ef0e80 Improving detection of batch classes, Queueable, and install scripts 2017-03-30 14:14:02 -07:00
Juan Martín Sotuyo Dodero 895a10eaa4 Merge branch 'pr-314' 2017-03-29 19:32:19 -03:00
Juan Martín Sotuyo Dodero 0a4123e025 Update changelog, refs #314 2017-03-29 19:31:50 -03:00
Sergey 16b7cbcb4e Bug fixes for incorrect detection of id's 2017-03-29 14:41:45 -07:00
Juan Martín Sotuyo Dodero 6ab58da6af Merge branch 'pr-313' 2017-03-28 16:34:30 -03:00
Juan Martín Sotuyo Dodero a25dab52dc Update changelog, refs #313 2017-03-28 16:34:14 -03:00
Juan Martín Sotuyo Dodero ce1707d92a Add more tests to cover all added scenarios 2017-03-28 16:33:13 -03:00
Sergey 60a838c39f Bug fix 2017-03-28 09:27:50 -07:00
Andreas Dangel 6202f46718 Merge branch 'pmd/5.5.x' 2017-03-27 22:45:13 +02:00
Andreas Dangel dc67a67fa6 Prepare next development version 2017-03-27 22:38:18 +02:00
Andreas Dangel 5d55f43d70 [maven-release-plugin] prepare for next development iteration 2017-03-27 22:34:45 +02:00
Andreas Dangel 8477966aad [maven-release-plugin] prepare release pmd_releases/5.5.5 2017-03-27 22:34:37 +02:00
Andreas Dangel 826e75166b Prepare pmd release 5.5.5 2017-03-27 22:28:22 +02:00
Andreas Dangel 350152e795 Merge branch 'pmd/5.4.x' into pmd/5.5.x 2017-03-27 22:17:14 +02:00
Andreas Dangel d1d9a2e2e2 Prepare next development version 2017-03-27 22:09:14 +02:00
Andreas Dangel 998fac4d55 [maven-release-plugin] prepare for next development iteration 2017-03-27 22:07:10 +02:00
Andreas Dangel d9675bbc6f [maven-release-plugin] prepare release pmd_releases/5.4.6 2017-03-27 22:07:00 +02:00
Andreas Dangel 19ee0cd37b InefficientEmptyStringCheck: Fix NPE 2017-03-27 21:55:38 +02:00
Andreas Dangel 076a108ee0 Prepare pmd release 5.4.6 2017-03-27 21:44:08 +02:00
Andreas Dangel f8077851b6 Merge branch 'issue-309' into pmd/5.4.x 2017-03-27 21:33:23 +02:00
Andreas Dangel aaf9419344 Merge branch 'issue-309' 2017-03-27 21:21:38 +02:00
Andreas Dangel 23ac01aa90 Merge branch 'issue-309' into pmd/5.5.x 2017-03-27 21:14:56 +02:00
Andreas Dangel abe2e8561c Fixes #309: [java] Parse error on method reference 2017-03-27 21:07:28 +02:00
Clément Fournier 8ff272a505 Support for constructors 2017-03-27 20:25:25 +02:00
Clément Fournier e569941a06 Abstracted signatures 2017-03-27 20:22:41 +02:00
Clément Fournier 7544aa47c7 Implemented signatures 2017-03-27 19:00:42 +02:00
Clément Fournier f61455440c Started holder impl 2017-03-27 06:11:31 +02:00
Clément Fournier 3a942aad07 Started holder impl 2017-03-27 06:11:20 +02:00
Juan Martín Sotuyo Dodero 9a32e4c796 Merge branch 'issue285' of https://github.com/Oowekyala/pmd 2017-03-27 00:28:04 -03:00
Juan Martín Sotuyo Dodero 9f0bffbd38 Merge branch 'pr-308' 2017-03-27 00:18:50 -03:00
Juan Martín Sotuyo Dodero 0c3a72fa9e Merge branch 'pr-308' into pmd/5.5.x 2017-03-26 23:58:19 -03:00
Juan Martín Sotuyo Dodero 88763bf58d Merge branch 'pr-308' into pmd/5.4.x 2017-03-26 23:51:18 -03:00
Juan Martín Sotuyo Dodero c32f12e09f Update changelog, refs #308 2017-03-26 23:41:36 -03:00
Juan Martín Sotuyo Dodero 6458883a61 Improve test, cover cases whith no rule / assert 2017-03-26 23:38:26 -03:00
Clément Fournier 493e289200 Added test case 2017-03-26 23:38:26 -03:00
Clément Fournier 80a469c4c7 Removed debug outputs 2017-03-26 23:38:25 -03:00
Clément Fournier 0a25010869 Cleaned up 2017-03-26 23:38:25 -03:00
Clément Fournier d2642920ec Added original test case 2017-03-26 23:38:25 -03:00
Clément Fournier b9bb0ca373 Completed bug fix 2017-03-26 23:38:25 -03:00
Clément Fournier b74e205663 Added test case 2017-03-26 23:38:25 -03:00
Clément Fournier 746f7c0682 Get the @Rule annotated ExpectedExceptions fields 2017-03-26 23:38:25 -03:00
Clément Fournier 38d3f4f67f Cleaned up one method 2017-03-26 23:38:22 -03:00
Clément Fournier 08b6b560cb Double enum selection 2017-03-27 00:07:29 +02:00
Clément Fournier e26b71585a Simple Key enum selection 2017-03-26 23:51:39 +02:00
Clément Fournier 31ddc898ee Added test case 2017-03-26 22:45:59 +02:00
Clément Fournier b59c8690fd Removed debug outputs 2017-03-26 22:12:01 +02:00
Clément Fournier bfaba6a7a0 Cleaned up 2017-03-23 22:45:48 +01:00
Clément Fournier baf6bde0e2 Added original test case 2017-03-23 22:27:17 +01:00
Clément Fournier 69f2921bb7 Completed bug fix 2017-03-23 22:25:43 +01:00
Clément Fournier dcd0363ae4 Added test case 2017-03-23 21:42:32 +01:00
Clément Fournier 369a7f7784 Get the @Rule annotated ExpectedExceptions fields 2017-03-23 21:03:12 +01:00
Clément Fournier 93b50f5c9d Cleaned up one method 2017-03-23 18:34:39 +01:00
Juan Martín Sotuyo Dodero b90c8e4d2d Merge branch 'master' of https://github.com/Oowekyala/pmd 2017-03-23 13:28:31 -03:00
Juan Martín Sotuyo Dodero ff580ffe84 Merge branch 'pr-307' 2017-03-23 13:28:09 -03:00
Juan Martín Sotuyo Dodero 74b6c71025 Merge branch 'pr-307' into pmd/5.5.x 2017-03-23 13:15:52 -03:00
Juan Martín Sotuyo Dodero abea414e57 Merge branch 'pr-307' into pmd/5.4.x 2017-03-23 13:14:28 -03:00
Juan Martín Sotuyo Dodero f644aa5744 Update changelog, refs #307 2017-03-23 13:14:02 -03:00
Clément Fournier a07b8c7fd0 Separated test cases 2017-03-23 13:02:08 -03:00
Clément Fournier beac88cef6 Optimised conditionals 2017-03-23 13:01:58 -03:00
Clément Fournier 94e3e25c03 Cleaned up 2017-03-23 13:01:50 -03:00
Clément Fournier c63d8f3191 Fixed bug with inverted ternary expression 2017-03-23 13:01:45 -03:00
Clément Fournier 016e18f153 Separated test cases 2017-03-23 13:20:06 +01:00
Juan Martín Sotuyo Dodero e0e1aaa34f Merge branch 'issue-305' of https://github.com/adangel/pmd 2017-03-22 20:37:37 -03:00
Juan Martín Sotuyo Dodero 7e702614f1 Merge branch 'pr-306' 2017-03-22 20:36:43 -03:00
Juan Martín Sotuyo Dodero 1c065a56ae Merge branch 'pr-306' into pmd/5.5.x 2017-03-22 20:35:16 -03:00
Juan Martín Sotuyo Dodero b7a311a110 Merge branch 'pr-306' into pmd/5.4.x 2017-03-22 20:32:18 -03:00
Juan Martín Sotuyo Dodero f0a7ab1ff4 Update changelog, refs #306 2017-03-22 20:29:29 -03:00
Andreas Dangel 8f1901f128 PMD run script:
*   fixes #305
*   consider also "MINGW*" as cygwin
*   do not convert empty paths to avoid warnings
2017-03-22 20:27:23 -03:00
Clément Fournier 98c3b6f97f Optimised conditionals 2017-03-22 23:10:03 +01:00
Clément Fournier d7555debd5 Cleaned up 2017-03-22 22:50:14 +01:00
Clément Fournier be2f001c8c Fixed bug with inverted ternary expression 2017-03-22 22:46:38 +01:00
Andreas Dangel c996afdf86 PMD run script:
*   fixes #305
*   consider also "MINGW*" as cygwin
*   do not convert empty paths to avoid warnings
2017-03-22 22:35:07 +01:00
Juan Martín Sotuyo Dodero 606f7e3c87 Merge branch 'master' of https://github.com/Oowekyala/pmd 2017-03-22 15:57:06 -03:00
Juan Martín Sotuyo Dodero 11fa26ebef Merge branch 'pr-303' 2017-03-22 15:56:13 -03:00
Juan Martín Sotuyo Dodero e261b71258 Merge branch 'pr-303' into pmd/5.5.x 2017-03-22 15:40:43 -03:00
Juan Martín Sotuyo Dodero 0dafee632b Merge branch 'pr-303' into pmd/5.4.x 2017-03-22 15:39:39 -03:00
Juan Martín Sotuyo Dodero 133f3d99df Update changelog 2017-03-22 15:38:57 -03:00
Clément Fournier c62ad45cf6 Specialized condition 2017-03-22 15:14:09 -03:00
Clément Fournier 3454c6eb4e Removed test class 2017-03-22 15:13:59 -03:00
Clément Fournier 6bf8138aaf Added violation case for InefficientEmptyStringCheckRule
String.trim().isEmpty() now triggers a violation.

Fixed checkstyle
2017-03-22 15:13:41 -03:00
Clément Fournier ddf49c4f17 Specialized condition 2017-03-22 18:50:30 +01:00
Clément Fournier 22139c14b4 Removed test class 2017-03-22 17:29:37 +01:00
Clément Fournier adef0e6e8c Added violation case for InefficientEmptyStringCheckRule
String.trim().isEmpty() now triggers a violation.

Fixed checkstyle
2017-03-22 11:07:48 +01:00
Juan Martín Sotuyo Dodero d0ef852a06 [java] Rename unusedcode/UnusedModifier to unnecessary/UnnecessaryModifier 2017-03-18 19:24:57 -03:00
Andreas Dangel 7b6213d88f formatting 2017-03-18 16:22:55 +01:00
Andreas Dangel 060a14c367 formatting 2017-03-18 15:31:48 +01:00
Andreas Dangel 7364492720 New update site for pmd-eclipse-plugin 2017-03-18 15:21:09 +01:00
Andreas Dangel 54efbaa106 Merge branch 'feature-295' 2017-03-18 11:57:42 +01:00
Andreas Dangel c3aa405c3c Add unit test for CPD --filelist option
*   unify implementation of PMD/CPD for the file list option
*   references #295
2017-03-18 11:57:20 +01:00
Andreas Dangel 14684c23fb Update changelog
*   references #297
*   references #295
2017-03-18 11:29:05 +01:00
Andreas Dangel 12058b7699 Merge branch 'add--filelist' of https://github.com/impmihai/pmd into feature-295 2017-03-18 11:14:25 +01:00
Andreas Dangel f7e1eba7a8 Merge branch 'issue-282' of https://github.com/Monits/pmd 2017-03-18 11:05:20 +01:00
Andreas Dangel 42741e3b48 Merge branch 'issue-282' 2017-03-18 11:05:06 +01:00
Andreas Dangel f70690b511 Merge branch 'issue-282' into pmd/5.5.x 2017-03-18 10:59:20 +01:00
Andreas Dangel bdd6f208c9 Update changelog, references #282 2017-03-18 10:58:57 +01:00
Juan Martín Sotuyo Dodero 8e9f9388d4 [java] Fix FP on UnnecessaryLocalBeforeReturn
- If the local is initialized using another variable that is later
used, don't consider it a violation. Assume the later use is destructive
and the order is important.
 - Fixes #282
2017-03-18 10:58:57 +01:00
Andreas Dangel e1922d7bb7 Merge branch 'issue-291' of https://github.com/Monits/pmd 2017-03-18 10:48:17 +01:00
Andreas Dangel e53079ac4d Merge branch 'issue-291' 2017-03-18 10:48:03 +01:00
Andreas Dangel 0e9aab43e7 Merge branch 'issue-291' into pmd/5.5.x 2017-03-18 10:39:09 +01:00
Andreas Dangel fc8f835093 Update changelog, references #291 2017-03-18 10:38:51 +01:00
Juan Martín Sotuyo Dodero b05d42de48 [java] Revamp AccessorClassGeneration
- Fixes #291
 - Complete rewrite. Simpler and faster, using the RuleChain and SymbolTable.
2017-03-18 10:38:19 +01:00
Juan Martín Sotuyo Dodero 7bd26fac68 Merge branch 'SimpleBugFixXSS' of https://github.com/sgorbaty/pmd 2017-03-17 22:51:26 -03:00
Juan Martín Sotuyo Dodero eb34e57f4b Merge branch 'pr-296' 2017-03-17 22:51:12 -03:00
Juan Martín Sotuyo Dodero 89c131fe3b Merge branch 'pr-296' into pmd/5.5.x 2017-03-17 22:30:12 -03:00
Juan Martín Sotuyo Dodero ccd926db05 Update changelog, refs #296 2017-03-17 22:29:28 -03:00
Sergey 31b2a950cb Unit test 2017-03-17 22:13:21 -03:00
Sergey 47c1178fec Bug fix for IsNotBlank 2017-03-17 22:13:12 -03:00
Juan Martín Sotuyo Dodero cca17fc3b5 Update changelog, refs #289 2017-03-17 18:46:45 -03:00
Juan Martín Sotuyo Dodero 2f998aa817 Update changelog, refs #289 2017-03-17 18:45:11 -03:00
Juan Martín Sotuyo Dodero 8c88adc8da Merge branch 'pr-289' into pmd/5.5.x 2017-03-17 18:34:13 -03:00
Juan Martín Sotuyo Dodero 11c3fafc2c Merge branch 'CrudComplexSOQL' of https://github.com/sgorbaty/pmd 2017-03-17 18:33:40 -03:00
Juan Martín Sotuyo Dodero 9b3f05e64d Merge branch 'pr-289' 2017-03-17 18:33:01 -03:00
Sergey 16e5831a19 CRUD bug fixes 2017-03-17 18:21:02 -03:00
Andreas Dangel ee1780e83e Add integration test for CPD 2017-03-17 11:54:40 +01:00
Lupea Mihai-Ionut 029ed7c7a8 Adding the --filelist option from pmd to cpd.
Now you can provide files through a CSV file instead of putting them in command arguments.
Closes https://github.com/pmd/pmd/issues/295
2017-03-15 21:43:26 +02:00
Juan Martín Sotuyo Dodero 2d488b2285 Fix VisualForce CPD config 2017-03-14 23:11:24 -03:00
Sergey fc12f0b9eb Unit test 2017-03-14 15:58:59 -07:00
Sergey 9d7486d04f Bug fix for IsNotBlank 2017-03-14 15:56:35 -07:00
Juan Martín Sotuyo Dodero 0171b9fca6 [java] Fix FP on UnnecessaryLocalBeforeReturn
- If the local is initialized using another variable that is later
used, don't consider it a violation. Assume the later use is destructive
and the order is important.
 - Fixes #282
2017-03-13 18:06:41 -03:00
Juan Martín Sotuyo Dodero 076e0becf0 Merge branch 'master' of https://github.com/Up2Go/pmd 2017-03-13 16:32:28 -03:00
Juan Martín Sotuyo Dodero 2d322882d3 Merge branch 'pr-287' 2017-03-13 16:13:35 -03:00
Juan Martín Sotuyo Dodero a8b285b206 Update changelog and docs, refs #287 2017-03-13 15:47:28 -03:00
Juan Martín Sotuyo Dodero 1a90958664 Fix checkstyle warnings 2017-03-13 15:19:41 -03:00
Robert Sösemann 48e4efea4b All tests run 2017-03-13 14:29:03 -03:00
Robert Sösemann 44ee615cf2 Only 4 test failures remaining 2017-03-13 14:29:03 -03:00
Robert Sösemann bc06c2c8af Few improvements 2017-03-13 14:29:03 -03:00
Robert Sösemann 1446e2cd07 Add supress warnings - first step 2017-03-13 14:29:03 -03:00
Juan Martín Sotuyo Dodero 6ccd252070 [java] Revamp AccessorClassGeneration
- Fixes #291
 - Complete rewrite. Simpler and faster, using the RuleChain and SymbolTable.
2017-03-12 23:51:38 -03:00
Andreas Dangel e58422bf7e Merge branch 'pr-288' 2017-03-11 16:05:31 +01:00
Andreas Dangel 3cece6492e Update changelog, references #288 2017-03-11 16:05:23 +01:00
Andreas Dangel c7756bdc8a Merge branch 'VfParserTabSize' of https://github.com/sgorbaty/pmd into pr-288 2017-03-11 16:02:48 +01:00
Sergey a5910bc33c CRUD bug fixes 2017-03-08 10:42:44 -08:00
Juan Martín Sotuyo Dodero 33f08f4e90 Merge branch 'pr-284' 2017-03-07 16:34:26 -03:00
Juan Martín Sotuyo Dodero dcb763a958 Update changelog, refs #284 2017-03-07 16:28:39 -03:00
Juan Martín Sotuyo Dodero 4338c71ac1 Update changelog, refs #279 2017-03-07 16:07:00 -03:00
Juan Martín Sotuyo Dodero a9b938c76d Merge branch 'pr-283' 2017-03-07 16:04:17 -03:00
Juan Martín Sotuyo Dodero 3b71d75e3a Update changelog, refs #283 2017-03-07 16:03:53 -03:00
Sergey e32b6df6b7 Setting the tab size to 4 for VF 2017-03-06 13:31:35 -08:00
Robert Sösemann 3c5c177d95 All tests run 2017-03-06 12:40:55 +01:00
Robert Sösemann 4834af3089 Only 4 test failures remaining 2017-03-06 11:53:06 +01:00
Robert Sösemann e14cd8dd17 Few improvements 2017-03-05 21:19:25 +01:00
Robert Sösemann c3b97105f1 Add supress warnings - first step 2017-03-04 21:37:52 +01:00
Sergey 8ebd82b72b Small change 2017-03-03 13:00:13 -08:00
Sergey 8ba0218d09 Merge branch 'CSRFInVisualForce' of github.com:sgorbaty/pmd into CSRFInVisualForce 2017-03-03 12:56:58 -08:00
Sergey Gorbaty 3b873cee5e Positive test cases
Adding positive test cases to the rule
2017-03-03 12:54:29 -08:00
Sergey Gorbaty d14f33e628 Update security.xml
Version # change
2017-03-03 12:53:20 -08:00
Sergey 229a4d7269 Review fixes 2017-03-03 12:46:14 -08:00
Juan Martín Sotuyo Dodero b3992a6799 Merge branch 'master' into CSRFInVisualForce 2017-03-03 16:02:41 -03:00
Andreas Dangel 67224dc910 Merge remote-tracking branch 'origin/master' 2017-03-03 20:01:07 +01:00
Andreas Dangel b1eff522f4 Merge branch 'pr-281' 2017-03-03 19:52:31 +01:00
Andreas Dangel a739257daa Update changelog, adding the new braces ruleset for apex
Closes #272
2017-03-03 19:49:48 +01:00
Juan Martín Sotuyo Dodero 57a3cdd4a2 Fix since in VF Security rules 2017-03-03 15:32:26 -03:00
Andreas Dangel 6738537dda Merge branch 'master' of https://github.com/Up2Go/pmd into pr-281 2017-03-03 19:30:24 +01:00
Andreas Dangel b068808385 Merge branch 'issue-275' of https://github.com/Monits/pmd 2017-03-03 19:20:38 +01:00
Andreas Dangel 2d4da66072 Merge branch 'issue-275' 2017-03-03 19:20:26 +01:00
Andreas Dangel 16f2094401 Merge branch 'issue-275' into pmd/5.5.x 2017-03-03 19:12:51 +01:00
Andreas Dangel 2b74a25f09 Merge branch 'issue-275' into pmd/5.4.x 2017-03-03 19:05:23 +01:00
Andreas Dangel 59de7a1460 Update changelog, fixes #275 2017-03-03 19:05:15 +01:00
Juan Martín Sotuyo Dodero 19114a7030 Simplify XPath expression 2017-03-03 19:03:26 +01:00
Juan Martín Sotuyo Dodero fb405fef08 [java] fields in annotations are public static
- Fixes #275
2017-03-03 19:03:26 +01:00
Andreas Dangel 903a8cfa21 Merge branch 'issue-274' of https://github.com/Monits/pmd 2017-03-03 18:53:13 +01:00
Andreas Dangel f4ddb98130 Merge branch 'issue-274' 2017-03-03 18:52:57 +01:00
Andreas Dangel 2efd877999 Merge branch 'issue-274' into pmd/5.5.x 2017-03-03 18:44:16 +01:00
Andreas Dangel 44120bb882 Update changelog, fixes #274 2017-03-03 18:44:06 +01:00
Juan Martín Sotuyo Dodero 7a1eb4f26e [java] Fix class scopes for anon inner classes
- A new ClassScope was being created for each annon inner class method / field,
    which is incorrect.
 - I reworked the AccessorMethodGeneration to compare scopes directly, since
    I was missing anonymous classes completely.
 - Fixes #274
2017-03-03 18:42:36 +01:00
Andreas Dangel 6fed4df636 Make javadoc quiet, upgrade pmd used for maven-pmd-plugin 2017-03-03 18:32:45 +01:00
Sergey 309d2d1011 Style fix 2017-03-03 09:13:55 -08:00
Andreas Dangel 5e16c5f75e Remove .travis-toolchains.xml since it has been moved to .travis/ 2017-03-03 15:45:06 +01:00
Andreas Dangel 8503bbb3a3 Merge branch 'travis-automated-releases' 2017-03-03 15:44:45 +01:00
Andreas Dangel 9291125bd0 Remove .travis-toolchains.xml - since it has been moved to .travis/ 2017-03-03 15:44:21 +01:00
Andreas Dangel 00992bf593 Merge branch 'travis-automated-releases' into pmd/5.5.x 2017-03-03 15:43:45 +01:00
Andreas Dangel d45466646f Merge branch 'travis-automated-releases' into pmd/5.4.x 2017-03-03 15:42:36 +01:00
Andreas Dangel 14428ed3bf Improve release notes upload to github 2017-03-03 15:42:10 +01:00
Andreas Dangel 158e1501ea Update github oauth token 2017-03-03 15:41:23 +01:00
Andreas Dangel 7f31d0262c [doc] Update release process documentation 2017-03-03 15:41:23 +01:00
Andreas Dangel a55e88c413 Use sparse checkout for pmd.github.io 2017-03-03 15:41:23 +01:00
Sergey d12c1f7fe4 Iterative DotExpression evaluation instead of checking the first one 2017-03-02 17:47:56 -08:00
Sergey caf27adbc2 deleted unused file 2017-03-02 17:36:33 -08:00
Sergey b38642ab1a Merged 2017-03-02 17:31:05 -08:00
Sergey 81c67a5df2 Fallback for JS arrays and defs 2017-03-02 17:28:54 -08:00
Sergey 1942e94cec Bug fix 2017-03-02 15:57:26 -08:00
Sergey 6137baf615 More test coverage 2017-03-02 15:51:57 -08:00
Sergey 32762c48d1 fix for unbalanced quotes 2017-03-02 15:47:47 -08:00
Sergey b7946ba4d1 fix for special tags 2017-03-02 15:44:05 -08:00
Sergey 799614ee8e CSRF in VF controller pages 2017-03-02 08:50:20 -08:00
Robert Sösemann 1947784ccb Fix failing test (Made ApexXPath rules CodeClimate rules) 2017-03-02 14:44:50 +01:00
Robert Sösemann e98c1eb96f Make Apex XPath rules CodeClimate rules (doesn't fix failing test :-( 2017-03-02 14:23:22 +01:00
Robert Sösemann 6f92c2cbb9 Fix https://github.com/pmd/pmd/issues/272 2017-03-02 10:37:15 +01:00
Sergey c4497d54e2 Logic bug fix 2017-03-01 15:54:22 -08:00
Sergey 2106e99dac Revert quoted context 2017-03-01 15:44:55 -08:00
Sergey a987c77805 Added support for quoted context 2017-03-01 13:51:07 -08:00
Sergey 34b707225c Script EL support added 2017-03-01 13:09:35 -08:00
Sergey 2e073a196a Initial 2017-03-01 10:54:35 -08:00
Juan Martín Sotuyo Dodero ac6c68aed7 Merge branch 'CrudAggregateResult' of https://github.com/sgorbaty/pmd 2017-03-01 12:53:27 -03:00
Juan Martín Sotuyo Dodero 00ccd9370c Merge branch 'pr-280' 2017-03-01 12:53:22 -03:00
Juan Martín Sotuyo Dodero b8d034cb87 Merge branch 'pr-280' into pmd/5.5.x 2017-03-01 12:28:58 -03:00
Juan Martín Sotuyo Dodero b183caeec1 Update changelog 2017-03-01 12:28:27 -03:00
Sergey 865130aeab Moving Pattern to static constant 2017-03-01 12:27:18 -03:00
Sergey fdb0d21127 Improving CRUD detection for Aggregate Results 2017-03-01 12:19:34 -03:00
Juan Martín Sotuyo Dodero b709154370 Merge branch 'VFSupport' of https://github.com/sgorbaty/pmd 2017-03-01 01:16:02 -03:00
Juan Martín Sotuyo Dodero 6e1bfe4027 Minor adjustments 2017-03-01 01:13:14 -03:00
Juan Martín Sotuyo Dodero b1cd6689b5 Update changelog, visualforce support added 2017-03-01 01:13:14 -03:00
Sergey 2a41668101 Improving detection of safe resources 2017-03-01 01:13:14 -03:00
Sergey 24d84fe57c Renamed Escaping 2017-03-01 01:13:14 -03:00
Sergey 51058cccfa Moving Pattern to final static 2017-03-01 01:13:14 -03:00
Sergey 4c748d961f Using EnumSet 2017-03-01 01:13:14 -03:00
Sergey eb3fe1ed08 Adding a unit test and bug fix 2017-03-01 01:13:14 -03:00
Sergey 595f398525 Small refactoring 2017-03-01 01:13:14 -03:00
Sergey 18a2480dc9 Whitelisting ObjectType 2017-03-01 01:13:14 -03:00
Sergey f3c6d15561 Literal starting with http 2017-03-01 01:13:14 -03:00
Sergey eba729c953 Whitelisting Labels 2017-03-01 01:13:14 -03:00
Sergey 8db5464583 any case http 2017-03-01 01:13:14 -03:00
Sergey 0a8870a169 Whitelisting of http 2017-03-01 01:13:14 -03:00
Sergey 9abb780da7 Additional negative test 2017-03-01 01:13:14 -03:00
Sergey 382c8ca928 Typo fix and tests 2017-03-01 01:13:14 -03:00
Sergey a33ac0acaf Reordering 2017-03-01 01:13:14 -03:00
Sergey 135c4ff9f3 Adding VF to the list of supported languages 2017-03-01 01:13:14 -03:00
Sergey 49b2fb2e6a Refactoring 2017-03-01 01:13:14 -03:00
Sergey c6cebde365 Fixing tests 2017-03-01 01:13:14 -03:00
Sergey ddeb7cadea space 2017-03-01 01:13:14 -03:00
Sergey 758a131454 Parser fix for EL in no quote context 2017-03-01 01:13:14 -03:00
Sergey a29e77fe29 Fixing unit test order 2017-03-01 01:13:14 -03:00
Sergey bbcb4684b1 Reduced FPs with id and size 2017-03-01 01:13:14 -03:00
Sergey 3d110b9634 small comment 2017-03-01 01:13:14 -03:00
Sergey f093132e4e Reducing FPs with URLFor 2017-03-01 01:13:14 -03:00
Sergey 84f5c6a723 Proper node reporting 2017-03-01 01:13:14 -03:00
Sergey 0e52b1542e Style check fixes 2017-03-01 01:13:14 -03:00
Sergey 93f82fbd20 Context aware escaping 2017-03-01 01:13:14 -03:00
Sergey 18d9c12467 Style fixes 2017-03-01 01:13:14 -03:00
Sergey 59429b7124 Support for optional args in EL 2017-03-01 01:13:14 -03:00
Sergey 83294540af Support for EL with no quotes 2017-03-01 01:13:14 -03:00
Sergey 6ab090d798 Improved dot notation and empty EL 2017-03-01 01:13:14 -03:00
Sergey d3b284805d Revert 2017-03-01 01:13:14 -03:00
Sergey a3898ad707 Cleanup 2017-03-01 01:13:14 -03:00
Sergey 5b3172aa28 Fixed floats support 2017-03-01 01:13:14 -03:00
Sergey 2a078e8c48 Small renaming 2017-03-01 01:13:14 -03:00
Sergey 6a3cb82b83 Adding support for Content 2017-03-01 01:13:14 -03:00
Sergey dc0e2e3bb3 Improved the rule to catch escaped values 2017-03-01 01:13:14 -03:00
Sergey 7d9cd70e55 Added support for DotExpression and Arguments list 2017-03-01 01:13:14 -03:00
Sergey 72122470c7 Small fixes 2017-03-01 01:13:14 -03:00
Sergey a942459225 Grammar with support for VFEL methods 2017-03-01 01:13:14 -03:00
Sergey f5d382951d Get rid of last reference to #$ 2017-03-01 01:13:14 -03:00
Sergey 31ad724404 Fixed BOM and random spacing 2017-03-01 01:13:14 -03:00
Sergey cdf29e8b86 Adding support for html style tag 2017-03-01 01:13:14 -03:00
Sergey c345b67f0f Cleanup 2017-03-01 01:13:14 -03:00
Sergey 8a6f8c2110 One more unit test 2017-03-01 01:13:14 -03:00
Sergey fc5c440190 Code style cleanup 2017-03-01 01:13:14 -03:00
Sergey 61389b028d Adding VF project 2017-03-01 01:13:14 -03:00
Sergey f799cf2e5b Renaming rules to security, fixing leading whitespaces 2017-03-01 01:12:42 -03:00
Sergey 1218cd5c5b Fixed up parser unit tests 2017-03-01 01:12:42 -03:00
Sergey b7974d0486 XSS in apex:outputText 2017-03-01 01:12:42 -03:00
Sergey 63f6e618f9 Support for mixed merge fields 2017-03-01 01:12:42 -03:00
Sergey 2f396cf44e Cleanup 2017-03-01 01:12:42 -03:00
Sergey a0b1ca00b9 First rule 2017-03-01 01:12:42 -03:00
Sergey ea083c60ce Fixed script tag and removed unneeded content AST node 2017-03-01 01:12:42 -03:00
Sergey dfa6da7f6c Fixed CompilationUnit not getting called 2017-03-01 01:12:42 -03:00
Sergey d73bc4e15f Initial commit 2017-03-01 01:12:42 -03:00
Sergey 2af071ab86 Improving detection of safe resources 2017-02-28 16:04:19 -08:00
Sergey ea0fcb63f5 Renamed Escaping 2017-02-28 14:13:06 -08:00
Sergey 64bd577362 Moving Pattern to final static 2017-02-28 14:11:49 -08:00
Sergey a700612552 Using EnumSet 2017-02-28 14:08:25 -08:00
Sergey 329e51c718 Adding a unit test and bug fix 2017-02-28 13:56:05 -08:00
Sergey 5ebf17e423 Small refactoring 2017-02-28 13:46:21 -08:00
Sergey 02e544045a Whitelisting ObjectType 2017-02-28 13:36:33 -08:00
Sergey 3bbd5ca1b5 Literal starting with http 2017-02-28 13:32:50 -08:00
Sergey e2a695687d Whitelisting Labels 2017-02-28 13:28:24 -08:00
Sergey b0a1cfb3ef any case http 2017-02-28 13:18:37 -08:00
Sergey 6bafe94b94 Whitelisting of http 2017-02-28 13:17:54 -08:00
Sergey 4609fc3f00 Moving Pattern to static constant 2017-02-28 12:51:11 -08:00
Sergey 13ab94deff Improving CRUD detection for Aggregate Results 2017-02-28 12:48:56 -08:00
Sergey a4f77dfe25 Additional negative test 2017-02-28 09:47:27 -08:00
Sergey a7cf5319c3 Typo fix and tests 2017-02-28 09:45:11 -08:00
Sergey 452bb8e6ed Reordering 2017-02-28 09:39:55 -08:00
Sergey 5c30890516 Adding VF to the list of supported languages 2017-02-27 15:27:57 -08:00
Sergey 3969644e85 Refactoring 2017-02-27 13:44:26 -08:00
Sergey 1a20e2c6c8 Fixing tests 2017-02-27 13:38:34 -08:00
Sergey d61bef2c2e space 2017-02-27 13:33:22 -08:00
Sergey cd2eb5dcf1 Parser fix for EL in no quote context 2017-02-27 13:33:00 -08:00
Sergey 76dda01512 Merge remote-tracking branch 'origin/master' into VFSupport 2017-02-27 12:54:00 -08:00
Juan Martín Sotuyo Dodero 6cde78cb0f Simplify XPath expression 2017-02-27 17:46:14 -03:00
Juan Martín Sotuyo Dodero a139e1cb23 [java] fields in annotations are public static
- Fixes #275
2017-02-27 17:46:14 -03:00
Juan Martín Sotuyo Dodero c67e3b550d [java] Fix class scopes for anon inner classes
- A new ClassScope was being created for each annon inner class method / field,
    which is incorrect.
 - I reworked the AccessorMethodGeneration to compare scopes directly, since
    I was missing anonymous classes completely.
 - Fixes #274
2017-02-27 17:46:02 -03:00
Andreas Dangel 8b1c2c2afa Merge branch 'travis-fixes' 2017-02-27 20:48:42 +01:00
Andreas Dangel 2dc0937350 Merge branch 'travis-fixes' into pmd/5.5.x 2017-02-27 20:48:37 +01:00
Andreas Dangel 07366b1f8b Merge branch 'travis-fixes' into pmd/5.4.x 2017-02-27 20:43:47 +01:00
Andreas Dangel 9388ce551e Travis - redirect output of sonar build into file 2017-02-27 20:43:37 +01:00
Andreas Dangel d8a367187c Travis - only run "mvn deploy", when it should be run 2017-02-27 20:43:37 +01:00
Andreas Dangel a39561df5f Setup the secrets only for non-pull-request builds when we have the
secure environment variables
2017-02-27 20:43:37 +01:00
Sergey a99b45e7aa Fixing unit test order 2017-02-27 11:33:16 -08:00
Sergey 35c70127a6 Reduced FPs with id and size 2017-02-27 11:23:29 -08:00
Andreas Dangel 22f5b75024 Merge branch 'travis-release-ghpages' 2017-02-25 21:39:14 +01:00
Andreas Dangel bbd8360cb3 Merge branch 'travis-release-ghpages' into pmd/5.5.x 2017-02-25 21:39:02 +01:00
Andreas Dangel 81f5b0d174 Merge branch 'travis-release-ghpages' into pmd/5.4.x 2017-02-25 21:38:55 +01:00
Andreas Dangel 2196924b7d Specify branch name when pushing, make commit quiet 2017-02-25 21:38:42 +01:00
Andreas Dangel be2103dc94 Merge branch 'travis-release-fix2' 2017-02-25 21:30:16 +01:00
Andreas Dangel ea3c109274 Merge branch 'travis-release-fix2' into pmd/5.5.x 2017-02-25 21:30:08 +01:00
Andreas Dangel 61df693ab4 Merge branch 'travis-release-fix2' into pmd/5.4.x 2017-02-25 21:30:00 +01:00
Andreas Dangel 6e4a5aef0e Fix condition for when to upload the binaries to sourceforge
Travis builds each commit during the release process: this means,
the commit on the branch, which changes the version to a non-
SNAPSHOT version, is also built. And after that, the tag is built.
Therefore, we upload, when we build SNAPSHOTS or when we build from a
tag.
2017-02-25 21:29:45 +01:00
Andreas Dangel fe22f04377 Merge branch 'travis-release' 2017-02-25 21:12:51 +01:00
Andreas Dangel 96b358dc84 Merge branch 'travis-release' into pmd/5.5.x 2017-02-25 21:12:46 +01:00
Andreas Dangel 34b210c47e Merge branch 'travis-release' into pmd/5.4.x 2017-02-25 21:12:34 +01:00
Andreas Dangel fcc515902c Add json request in output in case of error
Fix release script
2017-02-25 21:12:18 +01:00
Andreas Dangel 9e77578408 Merge branch 'pmd/5.5.x' 2017-02-25 20:59:21 +01:00
Andreas Dangel a7ba0b47a6 Prepare next development version 2017-02-25 20:46:30 +01:00
Andreas Dangel 12fb1c2d7f [maven-release-plugin] prepare for next development iteration 2017-02-25 20:44:32 +01:00
Andreas Dangel 765a542604 [maven-release-plugin] prepare release pmd_releases/5.5.4 2017-02-25 20:44:24 +01:00
Andreas Dangel 88bdb85976 Prepare pmd release 5.5.4 2017-02-25 20:38:42 +01:00
Andreas Dangel e5a126c9d6 Merge branch 'pmd/5.4.x' into pmd/5.5.x 2017-02-25 20:31:17 +01:00
Andreas Dangel 3d4e17b2cf Merge branch 'travis-automated-release' into pmd/5.4.x 2017-02-25 20:09:27 +01:00
Andreas Dangel ab578e8ad7 Set autoReleaseAfterClose to true 2017-02-25 20:09:07 +01:00
Andreas Dangel 38173659b3 Update release script, most steps are automatic now 2017-02-25 20:07:37 +01:00
Andreas Dangel d8ee6717ee Travis Build fixes
* Do only perform a release, if building from tag
* Add missing git config
* Output github releases request in case of error
2017-02-25 20:06:30 +01:00
Andreas Dangel d29ab78bd7 Prepare next development version 2017-02-25 19:08:00 +01:00
Andreas Dangel 4c7774ebf0 [maven-release-plugin] prepare for next development iteration 2017-02-25 19:03:45 +01:00
Andreas Dangel 0eec906467 [maven-release-plugin] prepare release pmd_releases/5.4.5 2017-02-25 19:03:37 +01:00
Andreas Dangel c292c10ab1 Prepare pmd release 5.4.5 2017-02-25 18:57:14 +01:00
Andreas Dangel 87b1dc404b Merge branch 'shade-jackson' of https://github.com/rtfpessoa/pmd 2017-02-25 18:39:16 +01:00
Andreas Dangel b6031f1c7f Merge branch 'pr-273' 2017-02-25 18:38:53 +01:00
Andreas Dangel 847f5710b6 Merge branch 'pr-273' into pmd/5.5.x 2017-02-25 18:37:30 +01:00
Andreas Dangel e151ee9e77 Update changelog, references #273 2017-02-25 18:30:06 +01:00
Rodrigo Fernandes 5ffcdd7903 Shade jackson on apex 2017-02-25 18:29:23 +01:00
Andreas Dangel c05c0e0d62 Delete temporary file after test 2017-02-25 17:41:18 +01:00
Andreas Dangel 8eeb0f25c7 Update github release data after deploy step with name + changelog 2017-02-25 17:38:05 +01:00
Andreas Dangel 03b39acd0b travis: add files and repo configuration for releases, upload pmd.github.io 2017-02-25 16:24:31 +01:00
Andreas Dangel b17f93085f Add web.sourceforge.net to ssh_known_hosts 2017-02-25 11:55:21 +01:00
Andreas Dangel 4d16c8d2d2 Log output of site building into file, to avoid travis log file limit
See also http://stackoverflow.com/questions/26082444/how-to-work-around-travis-cis-4mb-output-limit/26082445#26082445
2017-02-25 11:31:09 +01:00
Andreas Dangel dea5babb94 Another approach to get the current version that is being built 2017-02-25 10:57:41 +01:00
Andreas Dangel 209c36e02c Move maven installation and configuration into separate script for travis 2017-02-25 10:57:14 +01:00
Andreas Dangel 4c33ac21f7 echo out the current version being built by travis 2017-02-25 10:07:12 +01:00
Andreas Dangel d5d485f47a Fix javadoc. Since jdk8u121 no <script> tags are allowed by default.
See Release Notes of jdk8u121:
> tools/javadoc(tool)
> New --allow-script-in-comments option for javadoc
> The javadoc tool will now reject any occurrences of JavaScript code in
> the javadoc documentation comments and command-line options, unless the
> command-line option, --allow-script-in-comments is specified.
>
> With the --allow-script-in-comments option, the javadoc tool will
> preserve JavaScript code in documentation comments and command-line
> options. An error will be given by the javadoc tool if JavaScript
> code is found and the command-line option is not set.
> JDK-8138725 (not public)
2017-02-25 09:59:16 +01:00
Rodrigo Fernandes 434d9e0d99 Shade jackson on apex 2017-02-25 00:52:54 +00:00
Andreas Dangel cce475d382 Exclude secrets from src distribution 2017-02-24 23:13:45 +01:00
Andreas Dangel 2a416c8165 Update java and maven in travis build 2017-02-24 22:51:40 +01:00
Andreas Dangel 6613a79429 Only rsync the snapshot site from master branch 2017-02-24 22:01:20 +01:00
Andreas Dangel 57049e0c15 Remove travis plugin to enable toolchain.
Remove duplicated server entry in settings.xml
2017-02-24 21:32:19 +01:00
Andreas Dangel 97dd84a374 Use gpg instead of gpg2 2017-02-24 20:41:52 +01:00
Andreas Dangel f8f96e886e change directory back 2017-02-24 20:40:19 +01:00
Andreas Dangel d8065f231d Merge branch 'travis-automated-release' into pmd/5.4.x 2017-02-24 20:36:59 +01:00
Andreas Dangel b6bd4c3c47 Use tar archive, since travis supports only one encrypted file 2017-02-24 20:36:45 +01:00
Andreas Dangel a481aebb3d Merge branch 'travis-automated-release' into pmd/5.4.x 2017-02-24 20:30:26 +01:00
Andreas Dangel 597f598237 Reencrypt files for travis 2017-02-24 20:29:37 +01:00
Andreas Dangel 4b26b692ed Merge branch 'travis-automated-release' into pmd/5.4.x 2017-02-24 20:17:29 +01:00
Andreas Dangel aa4b641f3b Remove unneded before_script section 2017-02-24 20:16:38 +01:00
Andreas Dangel bafe0f451a Add missing secret keys for travis 2017-02-24 20:10:52 +01:00
Andreas Dangel a0fe5222ad New travis build scripts
*   one for pull requests
*   one for pushes
*   one for releases
2017-02-24 20:10:22 +01:00
Andreas Dangel a37381e756 Prepare travis environment:
*   configure maven
*   configure ssh key
*   configure gpg key
2017-02-24 20:10:22 +01:00
Andreas Dangel 32a56fd155 Use nexus staging profile, don't use oss-parent anymore 2017-02-24 20:10:22 +01:00
Andreas Dangel 76a7d28d80 Be explicit about the travis steps 2017-02-24 20:09:38 +01:00
Andreas Dangel 4a73f1d4f1 Move travis specific files into own subdirectory .travis 2017-02-24 20:09:38 +01:00
Juan Martín Sotuyo Dodero cedf1888cf First step to Travis automatic release 2017-02-24 20:07:30 +01:00
Andreas Dangel aad1e9a5a0 Merge branch 'language-sorting' 2017-02-24 15:16:35 +01:00
Andreas Dangel 0b8fe7b290 Merge branch 'language-sorting' into pmd/5.5.x 2017-02-24 15:10:02 +01:00
Andreas Dangel d3ac23b57c Merge branch 'language-sorting' into pmd/5.4.x 2017-02-24 15:01:10 +01:00
Andreas Dangel 40ed158204 Sort languages by terse name 2017-02-24 15:00:52 +01:00
Andreas Dangel f628962844 Update integration test 2017-02-24 14:40:40 +01:00
Andreas Dangel 00540a8e45 Sort supported languages by name by default, so that we have
a consistent order.
2017-02-24 14:40:31 +01:00
Juan Martín Sotuyo Dodero 1bd4b0e319 Merge branch 'broken-usage-link' 2017-02-23 08:40:11 -03:00
Juan Martín Sotuyo Dodero ecb5ff570f Merge branch 'broken-usage-link' into pmd/5.5.x 2017-02-23 08:39:51 -03:00
Juan Martín Sotuyo Dodero f677427ae8 Merge branch 'broken-usage-link' into pmd/5.4.x 2017-02-23 08:39:23 -03:00
Juan Martín Sotuyo Dodero 94c931d7ee Ruleset config was moved from usage to customizing 2017-02-23 08:38:59 -03:00
Juan Martín Sotuyo Dodero 5ddb829e0d Merge branch 'broken-links' 2017-02-22 19:31:34 -03:00
Juan Martín Sotuyo Dodero d9e5d07e98 Merge branch 'broken-links' into pmd/5.5.x 2017-02-22 19:31:20 -03:00
Juan Martín Sotuyo Dodero ced8802c91 Merge branch 'broken-links' into pmd/5.4.x 2017-02-22 19:31:00 -03:00
Juan Martín Sotuyo Dodero c6094b945c Actually fix broken links 2017-02-22 19:30:43 -03:00
Juan Martín Sotuyo Dodero 40da9d41de Merge branch 'broken-links' 2017-02-22 19:24:03 -03:00
Juan Martín Sotuyo Dodero 8029e572e1 Merge branch 'broken-links' into pmd/5.5.x 2017-02-22 19:23:45 -03:00
Juan Martín Sotuyo Dodero d93bbcf0f4 Merge branch 'broken-links' into pmd/5.4.x 2017-02-22 19:23:19 -03:00
Juan Martín Sotuyo Dodero d94168a891 Fix broken links in best practices page 2017-02-22 19:22:49 -03:00
Sergey 58fc65e38a small comment 2017-02-22 13:01:32 -08:00
Sergey 78232a9b34 Reducing FPs with URLFor 2017-02-22 12:59:12 -08:00
Sergey 553c82baab Proper node reporting 2017-02-22 12:48:38 -08:00
Sergey 646865973d Style check fixes 2017-02-22 11:50:19 -08:00
Sergey ec456fefa0 Context aware escaping 2017-02-22 11:47:25 -08:00
Sergey be7329e22f Style fixes 2017-02-22 10:25:16 -08:00
Sergey 21355be85d Support for optional args in EL 2017-02-22 10:02:10 -08:00
Sergey f5a59207af Support for EL with no quotes 2017-02-22 09:47:07 -08:00
Juan Martín Sotuyo Dodero 1a91787b37 Merge branch 'master' of https://github.com/wje600/pmd 2017-02-21 23:34:48 -03:00
Juan Martín Sotuyo Dodero a35959341c Merge branch 'pr-266' 2017-02-21 23:27:17 -03:00
Juan Martín Sotuyo Dodero 58b863e204 Merge branch 'pr-266' into pmd/5.5.x 2017-02-21 23:20:08 -03:00
Juan Martín Sotuyo Dodero 1bc60dc612 Merge branch 'pr-266' into pmd/5.4.x 2017-02-21 23:18:31 -03:00
Juan Martín Sotuyo Dodero 4d3c09a6e7 Update changelog, refs PR #266 2017-02-21 23:17:49 -03:00
Wayne Earl 227060e5f8 corrected invalid reporting of LoD violation 2017-02-21 23:07:51 -03:00
Juan Martín Sotuyo Dodero a4cdcfe29f Merge branch 'Issue264' of https://github.com/sgorbaty/pmd 2017-02-21 22:13:31 -03:00
Juan Martín Sotuyo Dodero a69e681240 Merge branch 'pr-268' 2017-02-21 22:12:29 -03:00
Juan Martín Sotuyo Dodero 8a909cd619 Merge branch 'pr-268' into pmd/5.5.x 2017-02-21 22:08:27 -03:00
Juan Martín Sotuyo Dodero 5933147366 Update changelog refs #268 2017-02-21 22:00:59 -03:00
Sergey Gorbaty 44ff394f85 Safe escaping via String method 2017-02-21 21:53:14 -03:00
Sergey c14ef0e70e Improved dot notation and empty EL 2017-02-21 16:50:34 -08:00
Sergey 7ba708f42c Revert 2017-02-21 16:33:17 -08:00
Sergey 442c7e2b11 Cleanup 2017-02-21 16:32:38 -08:00
Sergey e40aa19176 Fixed floats support 2017-02-21 16:29:45 -08:00
Sergey 276954d4db Small renaming 2017-02-21 16:01:49 -08:00
Sergey 1863bfbf1f Adding support for Content 2017-02-21 15:57:57 -08:00
Juan Martín Sotuyo Dodero 0ef234b463 Merge branch 'integration-test' of https://github.com/adangel/pmd 2017-02-21 20:48:45 -03:00
Juan Martín Sotuyo Dodero 02861f9a7c Merge branch 'pr-267' 2017-02-21 20:48:37 -03:00
Sergey b5235ba722 Improved the rule to catch escaped values 2017-02-21 15:08:40 -08:00
Juan Martín Sotuyo Dodero 50a18a649e Merge branch 'pr-267' into pmd/5.5.x 2017-02-21 20:00:09 -03:00
Juan Martín Sotuyo Dodero c065b5ce64 Apex and pom are not part of PMD 5.4.x 2017-02-21 19:54:53 -03:00
Sergey 83dc8d6272 Added support for DotExpression and Arguments list 2017-02-21 14:45:10 -08:00
Juan Martín Sotuyo Dodero 689bee4641 Merge branch 'pr-267' into pmd/5.4.x 2017-02-21 18:44:59 -03:00
Andreas Dangel acd891175d Verify the supported languages 2017-02-21 18:42:59 -03:00
Andreas Dangel 6a719e193d Add missing project.reporting.outputEncoding property 2017-02-21 18:42:49 -03:00
Andreas Dangel 52965a90b3 Rename integration tests, so that they are actually executed by failsafe
rather than by surefire
2017-02-21 18:42:42 -03:00
Andreas Dangel d2665bd870 Execute PMD and verify output
Uses apache commons-compress to extract the ZIP file.
2017-02-21 18:42:36 -03:00
Andreas Dangel 9351f13cf2 Add simple test to check zip file content of binary distribution 2017-02-21 18:42:30 -03:00
Andreas Dangel 5a8ddef03b Add failsafe plugin and basic test, to verify the binary
distribution zip file has been created.
2017-02-21 18:42:22 -03:00
Sergey 8af50fb169 Small fixes 2017-02-21 13:00:34 -08:00
Sergey 90af66962f Grammar with support for VFEL methods 2017-02-21 12:59:52 -08:00
Andreas Dangel 7fdc7de29c Merge branch 'issue-256' of https://github.com/Monits/pmd 2017-02-21 19:50:35 +01:00
Andreas Dangel 8930383ce3 Merge branch 'issue-256' 2017-02-21 19:50:23 +01:00
Andreas Dangel 9a75c1e9b1 Merge branch 'issue-256' into pmd/5.5.x 2017-02-21 19:43:06 +01:00
Andreas Dangel f9a0b343a3 Merge branch 'issue-256' into pmd/5.4.x 2017-02-21 19:36:44 +01:00
Andreas Dangel 3dff515de4 Update changelog, fixes #256 2017-02-21 19:36:12 +01:00
Juan Martín Sotuyo Dodero 08075e4171 [core] Fix shortname computation for reltive paths
- Fixes #256
 - When using relative paths, both the file's path and the inputFileName
    are relative, so we can safely compare them directly.
2017-02-21 19:34:56 +01:00
Sergey Gorbaty bd5b209c12 Safe escaping via String method 2017-02-20 14:19:15 -08:00
Andreas Dangel 32abbe0cc1 Verify the supported languages 2017-02-20 18:38:24 +01:00
Andreas Dangel f4bb91eaa5 Add missing project.reporting.outputEncoding property 2017-02-20 18:04:32 +01:00
Andreas Dangel 1bf8089dfc Rename integration tests, so that they are actually executed by failsafe
rather than by surefire
2017-02-20 18:02:52 +01:00
Andreas Dangel 544630d67a Execute PMD and verify output
Uses apache commons-compress to extract the ZIP file.
2017-02-20 17:51:19 +01:00
Andreas Dangel 6a12fcdf63 Add simple test to check zip file content of binary distribution 2017-02-20 16:21:39 +01:00
Andreas Dangel c1666094f7 Add failsafe plugin and basic test, to verify the binary
distribution zip file has been created.
2017-02-20 16:21:39 +01:00
Andreas Dangel 7cfeb0b872 Merge branch 'issue-257' of https://github.com/Monits/pmd 2017-02-20 16:13:55 +01:00
Andreas Dangel 5cd0f2e928 Merge branch 'issue-257' 2017-02-20 16:13:37 +01:00
Andreas Dangel a1299c5b9b Merge branch 'issue-257' into pmd/5.5.x 2017-02-20 16:06:26 +01:00
Andreas Dangel 023f27dcf5 Merge branch 'issue-257' into pmd/5.4.x 2017-02-20 16:02:03 +01:00
Andreas Dangel 1fc7df7f0d Update changelog, fixes #257 2017-02-20 16:01:54 +01:00
Juan Martín Sotuyo Dodero 8f22e69560 Ugly workaround that don't need to change AST 2017-02-20 16:00:39 +01:00
Juan Martín Sotuyo Dodero 907972f0ca [java] Improve grammar for CastExpression
- Provide a definite fix for casts. This allowed to remove a bunch of hacks.
 - I had to change the grammar a bit... `(int)` is now a cast with a
    PrimitiveType as child, not a Type with a nested PrimitiveType. This is due
    to JavaCC completely ignoring whatever you place in the LOOKAHEAD in favor
    of just looking the follow-up expression completely.
 - Removing the hacks raised an issue with expression orders, caused also by JavaCC's
    disregard to LOOKAHEAD contents
2017-02-20 16:00:39 +01:00
Andreas Dangel e6374970d7 Merge branch 'fix-innerclass-method-st' of https://github.com/Monits/pmd 2017-02-20 15:50:35 +01:00
Andreas Dangel 6d50709fc1 Merge branch 'pr-258' 2017-02-20 15:50:21 +01:00
Andreas Dangel 820ab22f3b Merge branch 'pr-258' into pmd/5.5.x 2017-02-20 15:42:31 +01:00
Juan Martín Sotuyo Dodero a5089b27da [java] syboltable resolves inner class methods
- This fixes the last known false negative for `AccessorMethodGeneration`
2017-02-20 15:42:10 +01:00
Andreas Dangel 60af4c8f5c Merge branch 'pr-255' 2017-02-20 15:34:31 +01:00
Andreas Dangel fe73d907ca Merge branch 'analysis-cache-phase2' of https://github.com/Monits/pmd into pr-255 2017-02-20 15:32:42 +01:00
Wayne Earl 60afb23d4d corrected invalid reporting of LoD violation 2017-02-19 22:11:15 -07:00
Juan Martín Sotuyo Dodero 0ab1f7dd3d Merge branch 'changelog' 2017-02-19 19:25:10 -03:00
Juan Martín Sotuyo Dodero 714712ec91 Merge branch 'changelog' into pmd/5.5.x 2017-02-19 19:22:59 -03:00
Juan Martín Sotuyo Dodero 3e4a84ad4f Merge branch 'changelog-modifier' 2017-02-19 19:21:39 -03:00
Juan Martín Sotuyo Dodero 83b98ae4bf Merge branch 'changelog-modifier' into pmd/5.5.x 2017-02-19 19:19:27 -03:00
Juan Martín Sotuyo Dodero 151f796043 Merge branch 'changelog-modifier' into pmd/5.4.x 2017-02-19 19:16:26 -03:00
Juan Martín Sotuyo Dodero 912df6aa0e Add severely modified rules to changelog 2017-02-19 19:15:42 -03:00
Juan Martín Sotuyo Dodero 465478feee Add greatly modified rules to changelog 2017-02-19 19:13:59 -03:00
Juan Martín Sotuyo Dodero b9c02f0561 Improve changelog 2017-02-19 18:58:13 -03:00
Andreas Dangel 2b05a5f0b3 Merge branch 'issue-251' of https://github.com/Monits/pmd 2017-02-19 10:28:52 +01:00
Andreas Dangel 04289a3bb9 Merge branch 'issue-251' 2017-02-19 10:28:39 +01:00
Andreas Dangel cdbb6c6893 Merge branch 'issue-251' into pmd/5.5.x 2017-02-19 10:22:01 +01:00
Andreas Dangel 6459aaaa2c Update changelog, fixes #251 2017-02-19 10:21:51 +01:00
Juan Martín Sotuyo Dodero 76d10bfb1d [apex] Fix chained method line count for types
- Fixes #251
 - The abstract parent class was already handling it properly, no need
    to override to visit to a method call.
2017-02-19 10:20:31 +01:00
Andreas Dangel 6213656fef Merge branch 'pr-250' 2017-02-19 10:10:49 +01:00
Andreas Dangel 51e7e368a5 Update changelog, references #250 2017-02-19 10:10:36 +01:00
Andreas Dangel 452b785223 Merge branch 'cpd-suppress-comments-java' of https://github.com/Monits/pmd into pr-250 2017-02-19 10:04:09 +01:00
Juan Martín Sotuyo Dodero 6dbd8d4141 Merge branch 'issue-933' of https://github.com/adangel/pmd 2017-02-17 16:08:42 -03:00
Juan Martín Sotuyo Dodero e680e45357 Merge branch 'pr-262' 2017-02-17 16:08:24 -03:00
Juan Martín Sotuyo Dodero 9264fda777 Merge branch 'pr-262' into pmd/5.5.x 2017-02-17 15:54:39 -03:00
Andreas Dangel 282a803a83 Allow annotations for UnnecessaryLocalBeforeReturnRule
- Fixes #933
2017-02-17 15:54:08 -03:00
Sergey 475dd471aa Get rid of last reference to #$ 2017-02-16 15:34:38 -08:00
Sergey 86ba85f129 Fixed BOM and random spacing 2017-02-16 15:30:35 -08:00
Sergey 53446c851d Adding support for html style tag 2017-02-16 14:32:36 -08:00
Sergey f194fcd7ad Cleanup 2017-02-16 13:58:24 -08:00
Sergey b5203316c5 One more unit test 2017-02-16 13:57:05 -08:00
Sergey e619c28f21 Code style cleanup 2017-02-16 13:42:01 -08:00
Sergey 6974d5349b Adding VF project 2017-02-16 13:09:50 -08:00
Sergey e8b8b5ef50 Renaming rules to security, fixing leading whitespaces 2017-02-16 13:08:52 -08:00
Andreas Dangel 65314b18af Allow annotations for UnnecessaryLocalBeforeReturnRule
Fixes #933
2017-02-16 20:15:35 +01:00
Sergey 47b29dfaa7 Fixed up parser unit tests 2017-02-15 15:36:31 -08:00
Juan Martín Sotuyo Dodero a3c6316f7e [core] Fix shortname computation for reltive paths
- Fixes #256
 - When using relative paths, both the file's path and the inputFileName
    are relative, so we can safely compare them directly.
2017-02-15 20:14:46 -03:00
Sergey 5c91394619 XSS in apex:outputText 2017-02-15 14:53:22 -08:00
Sergey 3a2b8c7d2d Support for mixed merge fields 2017-02-15 11:53:31 -08:00
Sergey 5370ffc096 Cleanup 2017-02-15 11:48:08 -08:00
Andreas Dangel 670cc75af9 Merge branch 'unusedmodifier-revamp' of https://github.com/Monits/pmd 2017-02-15 20:14:17 +01:00
Andreas Dangel 09025c2315 Merge branch 'pr-249' 2017-02-15 20:07:23 +01:00
Andreas Dangel a92adc4bdf Merge branch 'pr-249' into pmd/5.5.x 2017-02-15 19:58:14 +01:00
Andreas Dangel 654749d18d Merge branch 'pr-249' into pmd/5.4.x 2017-02-15 19:54:06 +01:00
Andreas Dangel d9e867964c Update changelog
fixes #246
fixes #247
fixes #248
2017-02-15 19:49:40 +01:00
Juan Martín Sotuyo Dodero 756e9a713a Update docs to reflect on changes 2017-02-15 19:47:08 +01:00
Juan Martín Sotuyo Dodero b4d05e5f14 Checkstyle fixes 2017-02-15 19:47:08 +01:00
Juan Martín Sotuyo Dodero 1fb05d995f [java] Revamp UnusedModifier
- This covers a ton of missing cases
 - Fixes #246
 - Fixes #247
 - Fixes #248
 - Notice `isNested` has been improved on `ASTClassOrInterfaceDeclaration`
    to cover being nested in an annotation definition
2017-02-15 19:47:08 +01:00
Sergey b55b54695c First rule 2017-02-14 16:23:14 -08:00
Sergey d7e89d2498 Fixed script tag and removed unneeded content AST node 2017-02-14 15:49:54 -08:00
Sergey 9bf6c4d3cc Fixed CompilationUnit not getting called 2017-02-14 15:03:10 -08:00
Sergey 3dd69e562d Initial commit 2017-02-14 14:31:07 -08:00
Andreas Dangel 6509e3a63a Merge branch 'issue-240' of https://github.com/Monits/pmd 2017-02-14 22:06:33 +01:00
Andreas Dangel 05237bf323 Merge branch 'issue-240' 2017-02-14 22:06:18 +01:00
Andreas Dangel 71884a40c4 Merge branch 'issue-240' into pmd/5.5.x 2017-02-14 21:59:19 +01:00
Andreas Dangel 805846a07c Update changelog, fixes #240 2017-02-14 21:59:04 +01:00
Juan Martín Sotuyo Dodero 4137df4309 [java] UnnecessaryLocalBeforeReturn checks usages
- We now check symbol table usages to detect violations.
 - We drop the consecutive lines requirement.
 - Resolves #240
2017-02-14 21:57:47 +01:00
Juan Martín Sotuyo Dodero 0eb12e2572 Ugly workaround that don't need to change AST 2017-02-14 03:00:39 -03:00
Juan Martín Sotuyo Dodero f28d8e7e47 [java] Improve grammar for CastExpression
- Provide a definite fix for casts. This allowed to remove a bunch of hacks.
 - I had to change the grammar a bit... `(int)` is now a cast with a
    PrimitiveType as child, not a Type with a nested PrimitiveType. This is due
    to JavaCC completely ignoring whatever you place in the LOOKAHEAD in favor
    of just looking the follow-up expression completely.
 - Removing the hacks raised an issue with expression orders, caused also by JavaCC's
    disregard to LOOKAHEAD contents
2017-02-14 02:25:18 -03:00
Juan Martín Sotuyo Dodero a34e7a06a7 [java] syboltable resolves inner class methods
- This fixes the last known false negative for `AccessorMethodGeneration`
2017-02-13 18:21:12 -03:00
Andreas Dangel b9bd308d2d Merge branch 'accessor-method-rule' of https://github.com/Monits/pmd 2017-02-13 21:15:15 +01:00
Andreas Dangel 4e04e62374 Merge branch 'feature-1496' 2017-02-13 21:13:56 +01:00
Andreas Dangel e3abbcbdd5 Merge branch 'feature-1496' into pmd/5.5.x 2017-02-13 21:04:33 +01:00
Andreas Dangel 983a0dc9b8 Remove the to be ignored test from the regressionTests 2017-02-13 21:04:12 +01:00
Andreas Dangel 070011c3ae Update changelog with new rule "AccessorMethodGeneration"
References #244
2017-02-13 20:02:21 +01:00
Juan Martín Sotuyo Dodero e027871f2a [java] Add AccessorMethodGeneration rule
- This resolves #1496
 - There is still an outstanding false negative, which is down to a bug in
    symbol table analysis, I'm leaving that out for the moment, and address it
    on a separate PR.
2017-02-13 19:54:20 +01:00
Andreas Dangel e864ad2740 Merge branch 'classscope-self-declaration' of https://github.com/Monits/pmd 2017-02-13 19:30:21 +01:00
Andreas Dangel e588f772c0 Merge branch 'pr-242' 2017-02-13 19:30:13 +01:00
Andreas Dangel d426ed7093 Merge branch 'pr-242' into pmd/5.5.x 2017-02-13 19:21:12 +01:00
Juan Martín Sotuyo Dodero 4ee4f5983e [java] Fix classscope references
- A bunch of closely related issues fixed:
   - References to `this`, `super` and `Classname` were very badly resolved
      (pointed to variables, methods, or nothing at all on empty classes)
   - Annotations would not be registered by their parent scopes.
2017-02-13 19:20:31 +01:00
Andreas Dangel 98c2d8e1c9 Merge branch 'better-logging-docs' of https://github.com/Monits/pmd 2017-02-12 11:13:38 +01:00
Andreas Dangel 45ef7f7926 Merge branch 'pr-239' 2017-02-12 11:04:01 +01:00
Andreas Dangel dc07816387 Merge branch 'pr-239' into pmd/5.5.x 2017-02-12 11:03:52 +01:00
Juan Martín Sotuyo Dodero 04a4145b1c [doc] Improve docs on InvalidSlf4jMessageFormatRule 2017-02-12 11:03:36 +01:00
Andreas Dangel ac4bf2020a Merge branch 'issue-232' of https://github.com/Monits/pmd 2017-02-12 09:50:06 +01:00
Andreas Dangel c5cf7e78e3 Merge branch 'issue-232' 2017-02-12 09:49:34 +01:00
Andreas Dangel 294dd3e6af Merge branch 'issue-232' into pmd/5.5.x 2017-02-12 09:42:26 +01:00
Andreas Dangel e16ee448da Merge branch 'issue-232' into pmd/5.4.x 2017-02-12 09:37:31 +01:00
Andreas Dangel fc1e90b7d3 Update changelog, fixes #232 2017-02-12 09:37:19 +01:00
Juan Martín Sotuyo Dodero ed7714391a [java] Fix FP in SimplifiedTernary with null value
- Fixes #232
 - Alo improve the docs formatting, it's getting garbled on the web..
2017-02-12 09:35:08 +01:00
Juan Martín Sotuyo Dodero 33bad0b95f Reduce cache size
- Don't store file name over and over for each violation
2017-02-11 18:01:31 -03:00
Andreas Dangel fb34541ab5 Merge branch 'issue-234' of https://github.com/Monits/pmd 2017-02-11 18:03:09 +01:00
Andreas Dangel aee07829b5 References #234, #235: Remove classloader closing code of PMD Ant Task
Got lost, when #235 was rebased onto pmd/5.4.x
2017-02-11 18:02:26 +01:00
Andreas Dangel 86d73ca268 Merge branch 'issue-234' 2017-02-11 18:02:10 +01:00
Andreas Dangel cc03dc7c46 References #234, #235: Remove classloader closing code of PMD Ant Task
Got lost, when #235 was rebased onto pmd/5.4.x
2017-02-11 17:53:50 +01:00
Andreas Dangel 92b18e78dc Merge branch 'issue-234' into pmd/5.5.x 2017-02-11 17:50:32 +01:00
Andreas Dangel 49c0b20362 Merge branch 'issue-234' into pmd/5.4.x 2017-02-11 17:44:32 +01:00
Andreas Dangel df23b76442 Update changelog, fixes #234 2017-02-11 17:44:20 +01:00
Juan Martín Sotuyo Dodero dd103aae56 [core] Fix IOException loading rulesets under concurrency
- Fixes #234
 - When a single JVM runs multiple PMD instances under different threads,
    connections to PMD jars (and streams opened to read standard rulesets)
    are shared, causing race conditions where one thread may cause the other
    to close it's streams. This in tun produces IOExceptions.
 - This happens in Gradle when enabling parallel builds. I believe it can happen
    under Maven with -T1C too, but has not been able to reproduce it.
 - I take the chance to clean up classloader closing code, making it more concise
    and standard accross CLI and Ant.
2017-02-11 17:40:38 +01:00
Andreas Dangel 032660d142 Merge branch 'tidy-up-classscope' of https://github.com/Monits/pmd 2017-02-11 15:36:14 +01:00
Andreas Dangel 94c552d225 Merge branch 'pr-230' 2017-02-11 15:35:50 +01:00
Andreas Dangel 067c2e9a22 Merge branch 'pr-230' into pmd/5.5.x 2017-02-11 15:29:46 +01:00
Andreas Dangel 88c2557f15 Merge branch 'pr-230' into pmd/5.4.x 2017-02-11 15:25:44 +01:00
Juan Martín Sotuyo Dodero c5d4951728 [java] Tidy up ClassScope code
- Sibling node search cn be easier
 - Remove dead code in generic resolution
 - Make sure generics resolution goes up through nested classes
2017-02-11 15:25:26 +01:00
Andreas Dangel 357cfb5917 Merge branch 'fix-default-package-import' of https://github.com/Monits/pmd 2017-02-11 15:15:33 +01:00
Andreas Dangel 8efca91c29 Merge branch 'pr-226' 2017-02-11 15:15:14 +01:00
Andreas Dangel 030c34d071 Merge branch 'pr-226' into pmd/5.5.x 2017-02-11 15:07:34 +01:00
Juan Martín Sotuyo Dodero 357b10952d [java] Fix same package import from default package
- If the package was passed as an empty string rather than a `null`, we
    would attempt to load classes such as `.Foo` rather than `Foo`.
2017-02-11 15:07:18 +01:00
Andreas Dangel 419073b251 Merge branch 'qualify-inner-class-of-import' of https://github.com/Monits/pmd 2017-02-11 10:35:22 +01:00
Andreas Dangel 38861a6a0c Merge branch 'pr-225' 2017-02-11 10:20:26 +01:00
Andreas Dangel e25844fb01 Merge branch 'pr-225' into pmd/5.5.x 2017-02-11 10:12:41 +01:00
Juan Martín Sotuyo Dodero ac2eedf4dd [java] Qualify references to inner classes of imports
- Given an import on `a.Foo`, references to `Foo.Inner` should be qualified
    as `a.Foo.Inner`.
 - This fixes a couple of wrong missing classes.
 - The test also brought to light another issue with resolvers that would fail
    to resolve even a qualified inner class if not explicitly imported under
    certain circumstances.
2017-02-11 10:12:13 +01:00
Juan Martín Sotuyo Dodero d5a9ba949f [core] Cache rule violations
- This allows to completely ignore unmodified files, even if they had violations
2017-02-11 01:04:02 -03:00
Andreas Dangel 854bde0189 Merge branch 'narrower-symbol-table' of https://github.com/Monits/pmd 2017-02-10 23:59:25 +01:00
Andreas Dangel 1b7a2b82cd Merge branch 'pr-224' 2017-02-10 23:59:08 +01:00
Andreas Dangel ac03b2e9d6 Merge branch 'pr-224' into pmd/5.5.x 2017-02-10 23:49:34 +01:00
Juan Martín Sotuyo Dodero 2e64907776 [java] Restrict type searches for inner classes
- There are certain cases where we know exactly what to look for, not needing
    to brute force our way to inner classes. For those, use a direct approach.
2017-02-10 23:49:21 +01:00
Andreas Dangel 8bfcc3b51b Merge branch 'pr-193' 2017-02-10 23:33:22 +01:00
Andreas Dangel 38c19bbd4f Update changelog, references #193 2017-02-10 23:33:04 +01:00
Andreas Dangel 0c63f46a65 Merge branch 'thread-safe-listeners' of https://github.com/Monits/pmd into pr-193 2017-02-10 23:26:35 +01:00
Juan Martín Sotuyo Dodero c7dc019335 [apex] Fix chained method line count for types
- Fixes #251
 - The abstract parent class was already handling it properly, no need
    to override to visit to a method call.
2017-02-09 17:23:29 -03:00
Juan Martín Sotuyo Dodero 4d7938d821 [java] Allow CPD suppression through comments 2017-02-08 17:07:20 -03:00
Juan Martín Sotuyo Dodero 4730007574 Update docs to reflect on changes 2017-02-08 16:04:28 -03:00
Juan Martín Sotuyo Dodero eb6b1074c0 Checkstyle fixes 2017-02-08 15:47:54 -03:00
Juan Martín Sotuyo Dodero 160522129f [java] Revamp UnusedModifier
- This covers a ton of missing cases
 - Fixes #246
 - Fixes #247
 - Fixes #248
 - Notice `isNested` has been improved on `ASTClassOrInterfaceDeclaration`
    to cover being nested in an annotation definition
2017-02-08 14:55:00 -03:00
Juan Martín Sotuyo Dodero 9eb2a06663 [java] UnnecessaryLocalBeforeReturn checks usages
- We now check symbol table usages to detect violations.
 - We drop the consecutive lines requirement.
 - Resolves #240
2017-02-08 12:01:59 -03:00
Juan Martín Sotuyo Dodero 04e62715a4 [java] Add AccessorMethodGeneration rule
- This resolves #1496
 - There is still an outstanding false negative, which is down to a bug in
    symbol table analysis, I'm leaving that out for the moment, and address it
    on a separate PR.
2017-02-08 11:30:46 -03:00
Juan Martín Sotuyo Dodero fad515fb72 [java] Fix classscope references
- A bunch of closely related issues fixed:
   - References to `this`, `super` and `Classname` were very badly resolved
      (pointed to variables, methods, or nothing at all on empty classes)
   - Annotations would not be registered by their parent scopes.
2017-02-06 18:02:25 -03:00
Andreas Dangel 3797f7263f Merge branch 'issue-216' of https://github.com/Monits/pmd 2017-02-06 20:16:32 +01:00
Andreas Dangel 970624dab1 Merge branch 'issue-216' 2017-02-06 20:16:09 +01:00
Andreas Dangel cc6cc2c6bc Merge branch 'issue-216' into pmd/5.5.x 2017-02-06 20:13:43 +01:00
Andreas Dangel 50271f2112 Merge branch 'issue-216' into pmd/5.4.x 2017-02-06 20:13:34 +01:00
Andreas Dangel 4d97df19c9 Update changelog, fixes #216 2017-02-06 20:13:25 +01:00
Juan Martín Sotuyo Dodero 03306df325 [doc] [java] Improve docs on NonThreadSafeSingleton 2017-02-06 20:11:30 +01:00
Andreas Dangel 2f350728e1 Merge branch 'issue-219' of https://github.com/Monits/pmd 2017-02-06 20:09:24 +01:00
Andreas Dangel 42a07c808a Merge branch 'issue-219' 2017-02-06 20:09:09 +01:00
Andreas Dangel 53b4884dc0 Merge branch 'issue-219' into pmd/5.5.x 2017-02-06 20:02:10 +01:00
Andreas Dangel e45c10431f Merge branch 'issue-219' into pmd/5.4.x 2017-02-06 19:54:46 +01:00
Andreas Dangel 6c75c9160d Update changelog, fixes #219 2017-02-06 19:54:36 +01:00
Juan Martín Sotuyo Dodero 1950aeb001 [java] Fix ClassCastException in UnnecessaryLocalBeforeReturn
- This fixes #219
2017-02-06 19:52:41 +01:00
Juan Martín Sotuyo Dodero 4ff112ad13 [doc] Improve docs on InvalidSlf4jMessageFormatRule 2017-02-06 12:18:49 -03:00
Andreas Dangel 5ec16e1cfd Update javadoc plugin and source plugin.
This allows to build PMD with java9.
2017-02-05 19:35:48 +01:00
Andreas Dangel 40ad3462b7 Merge branch 'issue-215' of https://github.com/Monits/pmd 2017-02-05 18:04:27 +01:00
Andreas Dangel c4298c6b3c Merge branch 'issue-215' 2017-02-05 18:00:14 +01:00
Andreas Dangel 8ba4335080 Merge branch 'issue-215' into pmd/5.5.x 2017-02-05 17:51:08 +01:00
Andreas Dangel 37cf7d345a Merge branch 'issue-215' into pmd/5.4.x 2017-02-05 17:50:57 +01:00
Andreas Dangel 898dbf0fe3 Update changelog, fixes #215 2017-02-05 17:46:22 +01:00
Juan Martín Sotuyo Dodero 630b92b64e [java] Treat annotation members as public static final
- This fixes #215
 - I created a new method so we didn't change public APIs
2017-02-05 17:44:55 +01:00
Juan Martín Sotuyo Dodero 2ace67a162 Add badge with latest version from maven central 2017-02-03 16:27:38 -03:00
Juan Martín Sotuyo Dodero bf92ae9af4 Change EOLs 2017-02-03 12:39:15 -03:00
Andreas Dangel e8ff737aad Merge branch 'site-integrations' 2017-02-03 09:27:34 +01:00
Andreas Dangel 9716f66df3 Merge branch 'site-integrations' into pmd/5.5.x 2017-02-03 09:27:29 +01:00
Andreas Dangel 4b6196a8f5 Merge branch 'site-integrations' into pmd/5.4.x 2017-02-03 09:27:20 +01:00
Andreas Dangel 9baf411235 site: integrations - add gradle 2017-02-03 09:26:33 +01:00
Andreas Dangel e00e974a0a site: sort integrations alphabetically 2017-02-03 09:26:33 +01:00
Juan Martín Sotuyo Dodero bfe0723a28 [core] Fix IOException loading rulesets under concurrency
- Fixes #234
 - When a single JVM runs multiple PMD instances under different threads,
    connections to PMD jars (and streams opened to read standard rulesets)
    are shared, causing race conditions where one thread may cause the other
    to close it's streams. This in tun produces IOExceptions.
 - This happens in Gradle when enabling parallel builds. I believe it can happen
    under Maven with -T1C too, but has not been able to reproduce it.
 - I take the chance to clean up classloader closing code, making it more concise
    and standard accross CLI and Ant.
2017-02-03 00:35:24 -03:00
Juan Martín Sotuyo Dodero fbd9d215dc [java] Fix FP in SimplifiedTernary with null value
- Fixes #232
 - Alo improve the docs formatting, it's getting garbled on the web..
2017-02-02 20:38:54 -03:00
Andreas Dangel f6b519365d Merge branch 'pr-217' 2017-02-02 21:03:56 +01:00
Andreas Dangel d00f2bf699 Update changelog 2017-02-02 20:54:53 +01:00
Andreas Dangel 09b2644688 Merge branch 'master' of https://github.com/kdaemonv/pmd into pr-217 2017-02-02 20:53:49 +01:00
Andreas Dangel d92688a07d Introduce end-of-line normalization
References pmd/build-tools#2
2017-02-02 20:52:08 +01:00
Juan Martín Sotuyo Dodero daf560a0bd Fix javadocs
- There seems to have been  merge conflict in the docs never resolved
2017-02-02 16:41:09 -03:00
Juan Martín Sotuyo Dodero ffb00b86e1 Merge branch 'CRUDwithFields' of https://github.com/sgorbaty/pmd 2017-02-02 13:27:18 -03:00
Juan Martín Sotuyo Dodero ed3d63972f Merge branch 'pr-231' 2017-02-02 13:22:03 -03:00
Juan Martín Sotuyo Dodero a8c18d99c0 Merge branch 'pr-231' into pmd/5.5.x 2017-02-02 13:13:44 -03:00
Juan Martín Sotuyo Dodero 9118c7ab6a Update changelog 2017-02-02 13:13:19 -03:00
Sergey Gorbaty d348264170 Removing printing 2017-02-02 13:12:43 -03:00
Sergey Gorbaty e87fe64a48 Add support for fields 2017-02-02 13:12:33 -03:00
Juan Martín Sotuyo Dodero 7eadad2a7a Merge branch 'SOQLInjectionInteger' of https://github.com/sgorbaty/pmd 2017-02-02 12:45:37 -03:00
Juan Martín Sotuyo Dodero a53cc81edb Merge branch 'pr-229' 2017-02-02 12:45:31 -03:00
Juan Martín Sotuyo Dodero cb1556bb41 Merge branch 'pr-229' into pmd/5.5.x 2017-02-02 12:32:44 -03:00
Juan Martín Sotuyo Dodero 27b2f9f547 Update changelog 2017-02-02 12:32:30 -03:00
Sergey 103a745083 Integers won't count as SOQL injection 2017-02-02 12:31:53 -03:00
Juan Martín Sotuyo Dodero 0beba6fd4e Merge branch 'ExcludeCount' of https://github.com/sgorbaty/pmd 2017-02-02 12:28:02 -03:00
Juan Martín Sotuyo Dodero c854eba869 Merge branch 'pr-228' 2017-02-02 12:26:54 -03:00
Juan Martín Sotuyo Dodero 8d420d0387 Merge branch 'pr-228' into pmd/5.5.x 2017-02-02 12:13:48 -03:00
Juan Martín Sotuyo Dodero 467a23cec1 Update changelog 2017-02-02 12:13:24 -03:00
Sergey 52651c0c3f Excluding count from CRUD/FLS checks 2017-02-02 12:12:21 -03:00
Juan Martín Sotuyo Dodero 3a19e2774c Merge branch 'GetterWithoutParams' of https://github.com/sgorbaty/pmd 2017-02-02 11:52:42 -03:00
Juan Martín Sotuyo Dodero 23e2590b05 Merge branch 'pr-227' 2017-02-02 11:49:26 -03:00
Juan Martín Sotuyo Dodero f9f53db17f Merge branch 'pr-227' into pmd/5.5.x 2017-02-02 11:10:22 -03:00
Juan Martín Sotuyo Dodero 80dcc922f1 Update changelog 2017-02-02 11:10:02 -03:00
Sergey 9240237754 Improving detection of getters 2017-02-02 10:54:27 -03:00
Sergey Gorbaty fdfdbd891a Removing printing 2017-02-01 13:28:25 -08:00
Sergey Gorbaty 0df432a73c Add support for fields 2017-02-01 13:24:44 -08:00
Juan Martín Sotuyo Dodero c44542cd72 [java] Tidy up ClassScope code
- Sibling node search cn be easier
 - Remove dead code in generic resolution
 - Make sure generics resolution goes up through nested classes
2017-02-01 15:46:03 -03:00
Sergey 07100bc15d Integers won't count as SOQL injection 2017-01-31 16:00:53 -08:00
Sergey 568fe66ba0 Excluding count from CRUD/FLS checks 2017-01-31 15:41:39 -08:00
Sergey 45da1a267f Improving detection of getters 2017-01-31 15:18:25 -08:00
Juan Martín Sotuyo Dodero fbfde13d6e [java] Fix same package import from default package
- If the package was passed as an empty string rather than a `null`, we
    would attempt to load classes such as `.Foo` rather than `Foo`.
2017-01-31 01:44:59 -03:00
Juan Martín Sotuyo Dodero 8f8d4bee75 [java] Qualify references to inner classes of imports
- Given an import on `a.Foo`, references to `Foo.Inner` should be qualified
    as `a.Foo.Inner`.
 - This fixes a couple of wrong missing classes.
 - The test also brought to light another issue with resolvers that would fail
    to resolve even a qualified inner class if not explicitly imported under
    certain circumstances.
2017-01-31 01:40:07 -03:00
Juan Martín Sotuyo Dodero 399a2ede64 [java] Restrict type searches for inner classes
- There are certain cases where we know exactly what to look for, not needing
    to brute force our way to inner classes. For those, use a direct approach.
2017-01-30 22:11:17 -03:00
Juan Martín Sotuyo Dodero 86b214da99 Deprecate the old listener and SynchronizedReportListener
- Breaking change to public API to retrieve listeners.
2017-01-30 16:56:30 -03:00
Juan Martín Sotuyo Dodero cd731e2a05 [doc] [java] Improve docs on NonThreadSafeSingleton 2017-01-30 16:20:27 -03:00
Juan Martín Sotuyo Dodero e07c51ee8e [java] Fix ClassCastException in UnnecessaryLocalBeforeReturn
- This fixes #219
2017-01-30 15:21:10 -03:00
Juan Martín Sotuyo Dodero 486f2153ea [java] Treat annotation members as public static final
- This fixes #215
 - I created a new method so we didn't change public APIs
2017-01-30 13:05:04 -03:00
Dmitry Kurelchuk 769935ad4c Use OS independant line separator (PMD.EOL) in EcmascriptTokenizerTest 2017-01-29 13:24:28 +02:00
Dmitry Kurelchuk e01951a63d Use OS independant path separator in checkstyle suppressions 2017-01-29 13:23:22 +02:00
Andreas Dangel 77bc558f68 Merge branch 'pmd/5.5.x' 2017-01-28 16:01:26 +01:00
Andreas Dangel 65f159cbc0 Prepare next development version 2017-01-28 15:42:21 +01:00
Andreas Dangel 4dc0699788 [maven-release-plugin] prepare for next development iteration 2017-01-28 14:43:17 +01:00
Andreas Dangel 847ea1c084 [maven-release-plugin] prepare release pmd_releases/5.5.3 2017-01-28 14:43:17 +01:00
Andreas Dangel 9ef035e5eb Prepare pmd release 5.5.3 2017-01-28 14:36:02 +01:00
Andreas Dangel c74cb3dc33 Merge branch 'pmd/5.4.x' into pmd/5.5.x 2017-01-28 14:25:46 +01:00
Andreas Dangel ef327a7836 Fix release script 2017-01-28 14:16:51 +01:00
Andreas Dangel a7fc141ee7 Prepare next development version 2017-01-28 14:01:14 +01:00
Andreas Dangel e9149551b7 [maven-release-plugin] prepare for next development iteration 2017-01-28 13:15:11 +01:00
Andreas Dangel 12758ef777 [maven-release-plugin] prepare release pmd_releases/5.4.4 2017-01-28 13:15:10 +01:00
Andreas Dangel 3648ca7545 Prepare pmd release 5.4.4 2017-01-28 13:07:35 +01:00
Andreas Dangel ea0e687140 Update release script to automatically set the default download for sf 2017-01-28 12:57:01 +01:00
Andreas Dangel c8b62ed651 Merge branch 'issue-1495' 2017-01-28 12:04:14 +01:00
Andreas Dangel c402c0b970 Merge branch 'issue-1495' into pmd/5.5.x 2017-01-28 11:50:43 +01:00
Andreas Dangel 2cce2cc206 Merge branch 'issue-1495' into pmd/5.4.x 2017-01-28 11:46:09 +01:00
Andreas Dangel 6899c63597 Fixes #1495 [java] UnnecessaryLocalBeforeReturn with assert 2017-01-28 11:45:59 +01:00
Andreas Dangel a5e85b8069 Merge branch 'issue-1448' 2017-01-28 10:55:14 +01:00
Andreas Dangel ebf088693a Merge branch 'issue-1448' into pmd/5.5.x 2017-01-28 10:48:21 +01:00
Andreas Dangel 25f62ae558 Merge branch 'issue-1448' into pmd/5.4.x 2017-01-28 10:43:35 +01:00
Andreas Dangel 7fbb304c8f java: ImmutableFieldRule - use enum 2017-01-28 10:43:17 +01:00
Andreas Dangel fa3a9b0d66 java: ImmutableFieldRule - take usages inside lambdas into account
Fixes #1448 ImmutableField Rule: Private field in inner class gives false positive[java] ImmutableField: Private field in inner class gives false positive with lambdas
2017-01-28 10:38:49 +01:00
Andreas Dangel 9028ea5f03 Merge branch 'pr-214'
Closes #214 (rebased onto pmd/5.5.x)
2017-01-28 10:07:54 +01:00
Andreas Dangel d03239a6cc Merge branch 'pr-214' into pmd/5.5.x
Closes #214 (rebased onto pmd/5.5.x)
2017-01-28 09:48:38 +01:00
Andreas Dangel 40ba746b95 Update changelog, references #214 2017-01-28 09:47:20 +01:00
Sergey 0c351b1917 Caching of results 2017-01-28 09:47:20 +01:00
Sergey 6fa51ec364 Reporting modifier 2017-01-28 09:47:20 +01:00
Juan Martín Sotuyo Dodero 8223689fdd Merge branch 'update-pom-desc' 2017-01-27 18:21:19 -03:00
Juan Martín Sotuyo Dodero 4144174172 Merge branch 'update-pom-desc' into pmd/5.5.x 2017-01-27 18:21:05 -03:00
Juan Martín Sotuyo Dodero 3486f84a49 Merge branch 'update-pom-desc' into pmd/5.4.x 2017-01-27 18:20:36 -03:00
Juan Martín Sotuyo Dodero 2fb2a2529b Update pom
- Simplify / update project description. No HTML, since it's not rendered anywhere.
 - Use my personal email as contact info
2017-01-27 18:19:27 -03:00
Andreas Dangel b71f56831c Merge branch 'update-pom' 2017-01-27 20:49:59 +01:00
Andreas Dangel 46079f19c0 Merge branch 'update-pom' into pmd/5.5.x 2017-01-27 20:39:39 +01:00
Andreas Dangel d7ae6bb245 Merge branch 'update-pom' into pmd/5.4.x 2017-01-27 20:33:54 +01:00
Andreas Dangel d32d81f078 Update URLs to issue manager, organization, ci build, mailing lists 2017-01-27 20:33:18 +01:00
Andreas Dangel 1b4cd381b4 Add Juan Martín Sotuyo Dodero as developer 2017-01-27 20:32:11 +01:00
Andreas Dangel 0ef09b2c0a Merge branch 'issue-208'
Closes #211 (rebased onto pmd/5.4.x)
2017-01-27 20:11:49 +01:00
Andreas Dangel ca3e31fc21 Merge branch 'issue-208' into pmd/5.5.x
Closes #211 (rebased onto pmd/5.4.x)
2017-01-27 20:04:51 +01:00
Andreas Dangel 4032e9ba51 Merge branch 'issue-208' into pmd/5.4.x
Closes #211 (rebased onto pmd/5.4.x)
2017-01-27 20:00:53 +01:00
Andreas Dangel 5081c89763 Update changelog, references #208 2017-01-27 20:00:44 +01:00
Juan Martín Sotuyo Dodero c53e1790e1 [java] Allow more than 1 annotation in local classes
- This fixes #208
2017-01-27 20:00:08 +01:00
Andreas Dangel bbc9abd4e2 Merge branch 'issue-206'
Closes #210 (rebased onto pmd/5.4.x)
2017-01-27 19:50:50 +01:00
Andreas Dangel 640fad0872 Merge branch 'issue-206' into pmd/5.5.x
Closes #210 (rebased onto pmd/5.4.x)
2017-01-27 19:44:32 +01:00
Andreas Dangel 926d1c3fbc Merge branch 'issue-206' into pmd/5.4.x
Closes #210 (rebased onto pmd/5.4.x)
2017-01-27 19:39:47 +01:00
Andreas Dangel 904223c2e3 Update changelog, references #206 2017-01-27 19:39:39 +01:00
Juan Martín Sotuyo Dodero 455b1c4ded Fix grammar for annotation members
- The lookahead (3 tokens) was too small, and without reaching the opening
    parenthesis assumed it was parsing a method and not a field.
 - Using a larger lookahead solves the issue.
 - Fixes #206
2017-01-27 19:38:48 +01:00
Andreas Dangel 5c1a0a7abe Merge branch 'issue-207'
Closes #209 (rebased onto pmd/5.4.x)
2017-01-27 19:26:56 +01:00
Andreas Dangel f179eeab5d Merge branch 'issue-207' into pmd/5.5.x
Closes #209 (rebased onto pmd/5.4.x)
2017-01-27 19:20:16 +01:00
Andreas Dangel aff9fc90ef Merge branch 'issue-207' into pmd/5.4.x
Closes #209 (rebased onto pmd/5.4.x)
2017-01-27 19:12:03 +01:00
Andreas Dangel 78e31f7cbf Update changelog, references #207 2017-01-27 19:11:53 +01:00
Juan Martín Sotuyo Dodero 33fd84d521 [java] Support generics in method references
- Fixes #207
 - Extend the Java grammar to support generics in
    method references: `Type::<Generic>method`
2017-01-27 19:10:42 +01:00
Andreas Dangel 29d76da3b0 Merge branch 'issue-202'
Closes #205 (rebased onto pmd/5.4.x)
2017-01-27 17:43:59 +01:00
Andreas Dangel e0ecc2f27c Merge branch 'issue-202' into pmd/5.5.x
Closes #205 (rebased onto pmd/5.4.x)
2017-01-27 17:37:55 +01:00
Andreas Dangel c63347508e Merge branch 'issue-202' into pmd/5.4.x
Closes #205 (rebased onto pmd/5.4.x)
2017-01-27 17:31:53 +01:00
Andreas Dangel e45da2b427 Update changelog 2017-01-27 17:31:18 +01:00
Juan Martín Sotuyo Dodero 47137e3789 Improve docs on ConsecutiveAppendsShouldReuse
- This should help with people having doubts for this rule such as #202
    and http://stackoverflow.com/questions/37672785/how-can-i-improve-performance-if-append-is-called-on-stringbuffer-or-stringb
 - Fixes #202
2017-01-27 17:30:13 +01:00
Andreas Dangel 4808cb089f Merge branch 'issue-199'
Closes #203 (rebased onto pmd/5.4.x)
2017-01-27 17:10:56 +01:00
Andreas Dangel fbb305bd17 Merge branch 'issue-199' into pmd/5.5.x
Closes #203 (rebased onto pmd/5.4.x)
2017-01-27 17:00:33 +01:00
Andreas Dangel 07887ede1d Merge branch 'issue-199' into pmd/5.4.x
Closes #203 (rebased onto pmd/5.4.x)
2017-01-27 16:45:28 +01:00
Andreas Dangel 6b1d00639a Update changelog 2017-01-27 16:44:12 +01:00
Juan Martín Sotuyo Dodero 420c6d45a3 Fixes #199 - False positives with ternary operator
- I deected a couple of extra related issues with ternary operators which are now fixed.
2017-01-27 16:42:24 +01:00
Andreas Dangel ae42081159 Merge branch 'issue-213'
Fixes #213
Closes #198 (rebased onto pmd/5.4.x)
2017-01-27 12:19:46 +01:00
Andreas Dangel dcf5841e15 Merge branch 'issue-213' into pmd/5.5.x
Fixes #213
Closes #198 (rebased onto pmd/5.4.x)
2017-01-27 12:10:53 +01:00
Andreas Dangel 470bbb3c65 Merge branch 'issue-213' into pmd/5.4.x
Fixes #213
Closes #198 (rebased onto pmd/5.4.x)
2017-01-27 12:04:18 +01:00
Andreas Dangel 472e9a9f55 Update changelog 2017-01-27 12:03:24 +01:00
Juan Martín Sotuyo Dodero c2d22a1bdf Make Mark's code snippet lazy
- This greatly reduces the memory footprint during analysis,
    addressing part of the issues raised ay #185
 - Rendering is still done to a single String which is then either printed
    to STDOUT or a file, this stiill needs refactoring.
2017-01-27 12:01:46 +01:00
Andreas Dangel 137b76a561 Merge branch 'issue-185'
Closes #196 (rebased onto pmd/5.5.x)
2017-01-27 11:42:38 +01:00
Andreas Dangel ac17e2d491 Merge branch 'issue-185' into pmd/5.5.x
Closes #196 (rebased onto pmd/5.5.x)
2017-01-27 11:33:09 +01:00
Andreas Dangel f08639a931 Update changelog 2017-01-27 11:32:51 +01:00
Juan Martín Sotuyo Dodero 36fcdd252c Fix NPE error in CPD reported under #185 2017-01-27 11:26:51 +01:00
Juan Martín Sotuyo Dodero cd8b6657af Fix casing of tag in template 2017-01-26 19:41:03 -03:00
Juan Martín Sotuyo Dodero 9758378367 Fix casing of tag in template 2017-01-26 19:40:39 -03:00
Juan Martín Sotuyo Dodero e9bc54255e Merge branch 'BugFixSharing' of https://github.com/sgorbaty/pmd 2017-01-24 14:40:42 -03:00
Juan Martín Sotuyo Dodero aa50127868 Merge branch 'pr-204' 2017-01-24 14:35:03 -03:00
Juan Martín Sotuyo Dodero 6267822b6a Merge branch 'pr-204' into pmd/5.5.x 2017-01-24 14:34:33 -03:00
Juan Martín Sotuyo Dodero 58b8ad0eae Update changelog 2017-01-24 14:28:06 -03:00
Sergey Gorbaty e95d1ef372 Adding a test 2017-01-24 14:27:35 -03:00
Sergey Gorbaty 3079ce26a8 Bug fix 2017-01-24 14:27:29 -03:00
Sergey Gorbaty 847821c7c5 Adding a test 2017-01-24 08:49:12 -08:00
Sergey Gorbaty 4c324ca6bd Bug fix 2017-01-24 08:46:26 -08:00
Andreas Dangel 1defa8bc80 Merge branch 'pr-190' into pmd/5.5.x
Closes #190 (rebased onto pmd/5.4.x)
2017-01-22 19:50:03 +01:00
Andreas Dangel 61792f792f Merge branch 'pr-190'
Closes #190 (rebased onto pmd/5.4.x)
2017-01-22 19:49:48 +01:00
Andreas Dangel 9d0a6b7f4b Merge branch 'pr-190' into pmd/5.4.x
Closes #190 (rebased onto pmd/5.4.x)
2017-01-22 19:24:59 +01:00
Andreas Dangel 8201ba0a06 Update changelog 2017-01-22 19:24:48 +01:00
Juan Martín Sotuyo Dodero 3caa71b94b Resolve #180 - refactor pmd processors
- SourceCodeProcessor now consistently calls rule sets start / end
    if cache is not up to date
 - Both Mono and MultiThread Processors rely on PmdRunnable, just using
    different execution strategies
 - This also fixes https://sourceforge.net/p/pmd/bugs/1511/
2017-01-22 19:19:21 +01:00
Andreas Dangel de6d3f5b61 Merge remote-tracking branch 'origin/master' 2017-01-21 15:46:17 +01:00
Andreas Dangel fa58ea5111 Merge remote-tracking branch 'origin/pmd/5.5.x' into pmd/5.5.x 2017-01-21 15:40:24 +01:00
Andreas Dangel c4ce057709 Merge remote-tracking branch 'origin/pmd/5.4.x' into pmd/5.4.x 2017-01-21 15:35:37 +01:00
Andreas Dangel 756c2f6774 Fix build 2017-01-21 14:46:35 +01:00
Andreas Dangel 2efe75fac5 Merge branch 'unit-test-for-pr-170' 2017-01-21 13:53:57 +01:00
Andreas Dangel 12f2431bb4 Fix build 2017-01-21 13:43:04 +01:00
Andreas Dangel 620fed2732 Merge branch 'unit-test-for-pr-170' into pmd/5.5.x 2017-01-21 12:13:47 +01:00
Andreas Dangel 96a4b7dc4e Merge branch 'unit-test-for-pr-170' into pmd/5.4.x 2017-01-21 11:59:21 +01:00
Andreas Dangel ba260e753c Adjust unit test to verify console encoding of XML formatter 2017-01-21 11:58:59 +01:00
Andreas Dangel 4c1890d56c Add unit test to verify encoding of XML formatter 2017-01-21 11:58:59 +01:00
Juan Martín Sotuyo Dodero c7d4eddf80 Update changelog 2017-01-20 09:54:46 -03:00
Juan Martín Sotuyo Dodero 40abb62df5 Update changelog 2017-01-20 09:54:10 -03:00
Juan Martín Sotuyo Dodero cc5ce5cdf9 Update changelog 2017-01-20 09:53:08 -03:00
Juan Martín Sotuyo Dodero 0efaf2d0c0 Merge branch 'templatestrings-fix' of https://github.com/tiobe/pmd 2017-01-20 09:45:18 -03:00
Juan Martín Sotuyo Dodero 1f9256a013 Merge branch 'pr-200' 2017-01-20 09:35:28 -03:00
Juan Martín Sotuyo Dodero 2065d36bc2 Merge branch 'pr-200' into pmd/5.5.x 2017-01-20 09:19:55 -03:00
Juan Martín Sotuyo Dodero 216e10637f Merge branch 'pr-200' into pmd/5.4.x 2017-01-20 09:16:54 -03:00
Juan Martín Sotuyo Dodero 525542c9fa Checkstyle fixes 2017-01-20 09:12:22 -03:00
Maikel Steneker 1681b05222 Added test case for template strings in Ecmascript. 2017-01-20 09:11:45 -03:00
Bram Stappers f801b30e70 Added template string token to EcmaScript 5 language definition. 2017-01-20 09:11:36 -03:00
Andreas Dangel 3fd3c97071 Update changelog with ruleset changes 2017-01-20 11:11:12 +01:00
Andreas Dangel 750b51f20a Merge branch 'changelog-for-1556' 2017-01-20 11:03:10 +01:00
Andreas Dangel 98b9a47ec6 Merge branch 'changelog-for-1556' into pmd/5.5.x 2017-01-20 11:03:02 +01:00
Andreas Dangel ea19f8acee Merge branch 'changelog-for-1556' into pmd/5.4.x 2017-01-20 11:02:52 +01:00
Andreas Dangel f669c6c253 Update changelog 2017-01-20 11:01:32 +01:00
Juan Martín Sotuyo Dodero 6115370125 Allow for thread-safe report listeners
- This follows discussion on https://github.com/pmd/pmd/pull/125#discussion_r87666694
 - We add a marker interface for thread-safe listeners, and implement it were appropriate.
 - Breaking change: `getSynchronizedListeners` and `addSynchronizedListeners` now handle
    `List<ThreadSafeReportListener>`.
 - We may mark the non-thread-safe methods and interfaces as deprecated and force everyone
    to handle synchronization on their own for future releases.
2017-01-16 21:47:27 -03:00
Juan Martín Sotuyo Dodero 2cc7490f26 Merge branch 'DeadCode' of https://github.com/sgorbaty/pmd 2017-01-16 18:34:49 -03:00
Juan Martín Sotuyo Dodero e41aede31e Merge branch 'pr-192' 2017-01-16 18:34:41 -03:00
Juan Martín Sotuyo Dodero 92f7d35bed Merge branch 'pr-192' into pmd/5.5.x 2017-01-16 18:26:24 -03:00
Juan Martín Sotuyo Dodero 291698cdbc Update changelog 2017-01-16 18:26:10 -03:00
Sergey ba325eb8a2 Dead code removal 2017-01-16 18:25:33 -03:00
Juan Martín Sotuyo Dodero 9fcfbc1fec Merge branch 'ImproveSharingToDetectDatabaseMethods' of https://github.com/sgorbaty/pmd 2017-01-16 18:12:35 -03:00
Juan Martín Sotuyo Dodero 03c38a16cb Merge branch 'pr-191' 2017-01-16 18:11:45 -03:00
Juan Martín Sotuyo Dodero 78fab2e826 Merge branch 'pr-191' into pmd/5.5.x 2017-01-16 17:38:03 -03:00
Juan Martín Sotuyo Dodero 549274f852 Update changelog 2017-01-16 17:36:59 -03:00
Sergey 1bbd10f01b Detection of sharing violation when Database. methods are used 2017-01-16 17:36:20 -03:00
Sergey c276e5cccb Comment format 2017-01-16 11:37:22 -08:00
Sergey 3107fd1656 Dead code removal 2017-01-16 11:35:49 -08:00
Sergey 23b82bbcd8 Detection of sharing violation when Database. methods are used 2017-01-16 11:30:20 -08:00
Juan Martín Sotuyo Dodero 2217341d05 Update changelog 2017-01-16 15:38:25 -03:00
Juan Martín Sotuyo Dodero efeb6d508b Update changelog 2017-01-16 15:37:49 -03:00
Juan Martín Sotuyo Dodero 80153665de Merge branch 'OpenRedirectVarConcat' of https://github.com/sgorbaty/pmd 2017-01-16 15:36:58 -03:00
Juan Martín Sotuyo Dodero f970069c9f Merge branch 'pr-189' 2017-01-16 15:36:47 -03:00
Juan Martín Sotuyo Dodero 741e11d80f Merge branch 'pr-189' into pmd/5.5.x 2017-01-16 15:23:51 -03:00
Sergey fb25329e0d Bug fix to improve detection of concatenated vars 2017-01-16 15:23:26 -03:00
Sergey 7e83147a61 Unit test bug 2017-01-16 15:02:43 -03:00
Juan Martín Sotuyo Dodero a5c02a6f04 Merge branch 'groovy-typo' 2017-01-16 14:50:02 -03:00
Juan Martín Sotuyo Dodero 9631680e80 Merge branch 'groovy-typo' into pmd/5.5.x 2017-01-16 14:49:38 -03:00
Juan Martín Sotuyo Dodero 15336017ef Fix typo in PMD-Groovy's pom 2017-01-16 14:49:18 -03:00
Andreas Dangel 074b606645 Merge branch 'pr-188'
Closes #188 (rebased onto pmd/5.5.x)
2017-01-15 19:49:43 +01:00
Andreas Dangel a21510ecf3 Merge branch 'pr-188' into pmd/5.5.x
Closes #188 (rebased onto pmd/5.5.x)
2017-01-15 19:40:57 +01:00
Andreas Dangel 2fdfa26e4c Update changelog 2017-01-15 19:24:02 +01:00
Juan Martín Sotuyo Dodero 80b2792db5 Fix #183 - Count whole expressions as 1 line
- This is consistent with how we count "lines" in other languages.
 - Notice we are not actually counting lines, so multiline expressions are
    counted as 1.
 - Having multiple variable declarations together is still counting 1 per variable.
2017-01-15 18:33:06 +01:00
Sergey cd31c84f5b Unit test bug 2017-01-13 14:06:27 -08:00
Sergey 2bb1c6b8ff Bug fix to improve detection of concatenated vars 2017-01-13 14:06:08 -08:00
Juan Martín Sotuyo Dodero 08e5feeb6d Merge branch 'OpenRedirectImprovement' of https://github.com/sgorbaty/pmd 2017-01-13 00:28:16 -03:00
Juan Martín Sotuyo Dodero 8177f4bab6 Update changelog 2017-01-12 22:42:12 -03:00
Juan Martín Sotuyo Dodero 4d57503e1a Merge branch 'pr-184' 2017-01-12 22:41:48 -03:00
Juan Martín Sotuyo Dodero 4055a79e4c Update changelog 2017-01-12 22:35:09 -03:00
Juan Martín Sotuyo Dodero 16b9d566f3 Merge branch 'pr-184' into pmd/5.5.x 2017-01-12 22:35:05 -03:00
Sergey 79121c42cc Comment to warn future folks to check Apex compiler implementation first 2017-01-12 22:28:45 -03:00
Sergey Gorbaty edabb22f37 Improving detection for assignment operator 2017-01-12 22:28:45 -03:00
Sergey Gorbaty a38526544a Improving open redirect detection for static fields 2017-01-12 22:28:45 -03:00
Juan Martín Sotuyo Dodero 8cab2c9f50 Merge branch 'ControlFlowBasedCRUDCheck' of https://github.com/sgorbaty/pmd 2017-01-12 22:04:09 -03:00
Juan Martín Sotuyo Dodero 174ffa9461 Update changelog 2017-01-12 22:03:34 -03:00
Juan Martín Sotuyo Dodero ea53d913a0 Update changelog 2017-01-12 22:03:15 -03:00
Juan Martín Sotuyo Dodero ac0b873f08 Merge branch 'pr-181' 2017-01-12 22:02:26 -03:00
Juan Martín Sotuyo Dodero 9b0839a46c Merge branch 'pr-181' into pmd/5.5.x 2017-01-12 21:38:21 -03:00
Sergey 608c9139be Bug fix #3 for else statements 2017-01-12 21:32:07 -03:00
Sergey 9db4b2503d Bug fixes part 2 2017-01-12 21:32:07 -03:00
Sergey 9d384f404c Bug fixes 2017-01-12 21:32:07 -03:00
Sergey Gorbaty 7a3ab3d7a1 Accessibility checks improved with CF 2017-01-12 21:31:31 -03:00
Sergey Gorbaty 9baf99f19d CF based CRUD rule checking 2017-01-12 21:31:31 -03:00
Sergey ed0b133cdc Comment to warn future folks to check Apex compiler implementation first 2017-01-12 14:44:59 -08:00
Sergey b45569c704 Bug fix #3 for else statements 2017-01-12 14:37:43 -08:00
Sergey 505f458f25 Bug fixes part 2 2017-01-12 14:31:20 -08:00
Sergey 593b7843db Bug fixes 2017-01-12 12:11:01 -08:00
Sergey Gorbaty 289505e426 Improving detection for assignment operator 2017-01-10 13:11:56 -08:00
Sergey Gorbaty 448ce2074a Improving open redirect detection for static fields 2017-01-10 10:50:14 -08:00
Sergey Gorbaty 204ab6d83c Accessibility checks improved with CF 2017-01-10 09:46:10 -08:00
Juan Martín Sotuyo Dodero e4c353ff83 Merge branch 'formatter-docs' 2017-01-10 11:10:36 -03:00
Juan Martín Sotuyo Dodero 64f8fbcf26 Merge branch 'formatter-docs' into pmd/5.5.x 2017-01-10 11:09:14 -03:00
Juan Martín Sotuyo Dodero ad32501f36 Merge branch 'formatter-docs' into pmd/5.4.x 2017-01-10 11:07:57 -03:00
Juan Martín Sotuyo Dodero c8b38c83ca Update changelog 2017-01-10 11:07:32 -03:00
Juan Martín Sotuyo Dodero bbba3aa608 Add documentation on formatter encoding 2017-01-10 10:50:14 -03:00
Juan Martín Sotuyo Dodero eae56033bd Merge branch 'patch-1' of https://github.com/pyxide/pmd 2017-01-10 10:21:10 -03:00
Juan Martín Sotuyo Dodero 552bb7eabf Merge branch 'pr-170' 2017-01-10 10:20:10 -03:00
Juan Martín Sotuyo Dodero 1cfbdc9268 Merge branch 'pr-170' into pmd/5.5.x 2017-01-10 10:06:37 -03:00
Juan Martín Sotuyo Dodero 60c329b07a Merge branch 'pr-170' into pmd/5.4.x 2017-01-10 10:05:23 -03:00
pyxide 43a38d3144 Console encoding only when interactive 2017-01-10 09:54:44 -03:00
pyxide d7c503bee4 checkstyle fixes 2017-01-10 09:54:44 -03:00
pyxide 958f8df5f5 Reflection detection code for console encoding
Note: calling the static native method `String Console.encoding()` returns the current console encoding, even if `System.console()` is null because the console is not interactive (pipe or redirection).
2017-01-10 09:54:44 -03:00
pyxide 89600bfcc4 checkstyle fixes 2017-01-10 09:54:44 -03:00
pyxide abf65acb63 Bug fix and enhanced console output encoding
- due to some rewriting without testing, the encoding property was not added to the renderer properties.
- better console encoding: use system property `sun.stdout.encoding` in interactive console, and `file.encoding` in piped or redirected output
2017-01-10 09:54:44 -03:00
pyxide 4c71b0da4a checkstyle fixes 2017-01-10 09:54:44 -03:00
pyxide 368313fd8f Update Formatter.java 2017-01-10 09:54:44 -03:00
pyxide 74583d003a Ant Task Formatter encoding issue with XMLRenderer
Hi,

The writers in the Ant task's formatter uses the default platform's encoding (for instance cp1252 on Western Windows) and the XMLRenderer sets the default XML encoding to UTF-8. This may lead to incorrect XML encoding, detected for instance when the XML file is sent to a XSLT task.
This goes undetected as long as the characters in the XML file are in the ASCII subset, which is frequently the case with code, usually in plain Latin language. In my case, the issue was raised because of the localized formatting of some line numbers greater than 999, due to localized thousand separator 0xA0, which is out of the ASCII subset.

I modified the Formatter class to always use a charset for writers. When no encoding is specified, UTF-8 is used instead of the default platform's encoding.

I strongly recommend to *always set the encoding parameter* of the formatter element. It should be reflected as so in the Ant Task documentation.

```xml
<pmd encoding="cp1252"> <!-- source encoding -->
  <formatter type="xml" toFile="pmd.xml">
    <param name="encoding" value="UTF-8" /> <!-- report encoding -->
  </formatter>
  <fileset dir="src/main/java">
    <include name="**/*.java"/>
  </fileset>
</pmd>
```
Note: when digging into sourceforge issues for similar bugs, I found [Bug 877: Output with encoding CP1252](https://sourceforge.net/p/pmd/bugs/877/) . Not the same task, but the same symptoms, probably the same cause ?
2017-01-10 09:54:44 -03:00
Sergey Gorbaty dfbd332e66 CF based CRUD rule checking 2017-01-09 14:37:02 -08:00
pyxide 185df84fa4 Console encoding only when interactive 2017-01-09 18:07:17 +01:00
pyxide b5d931f1c9 checkstyle fixes 2017-01-09 17:29:11 +01:00
pyxide 2643f5a3d0 Reflection detection code for console encoding
Note: calling the static native method `String Console.encoding()` returns the current console encoding, even if `System.console()` is null because the console is not interactive (pipe or redirection).
2017-01-09 17:12:41 +01:00
Andreas Dangel 056554c4e3 Merge branch 'bug-1556' 2017-01-08 14:03:37 +01:00
Andreas Dangel 923aab8065 Merge branch 'bug-1556' into pmd/5.5.x 2017-01-08 13:58:13 +01:00
Andreas Dangel b9e5901b12 Merge branch 'bug-1556' into pmd/5.4.x 2017-01-08 13:52:25 +01:00
Andreas Dangel c0e1c3e731 Slightly improve performance of XPath Rule UseLocaleWithCaseConversions 2017-01-08 13:51:44 +01:00
Andreas Dangel af3ad2bc02 Fixes #1556 [java] UseLocaleWithCaseConversions does not works with ResultSet (false negative) 2017-01-08 12:12:56 +01:00
Juan Martín Sotuyo Dodero cdcc42087e Add github templates 2017-01-08 02:29:47 -03:00
Juan Martín Sotuyo Dodero 237a213393 Merge branch 'FixTestDetection' of https://github.com/sgorbaty/pmd 2017-01-07 22:28:39 -03:00
Juan Martín Sotuyo Dodero e1ff00561b Update changelog 2017-01-07 22:26:43 -03:00
Sergey a08b478f09 Legacy test class declaration 2017-01-07 22:26:31 -03:00
Juan Martín Sotuyo Dodero 6f6d37b2a1 Update changelog 2017-01-07 22:22:07 -03:00
Sergey 03a5aa2519 Legacy test class declaration 2017-01-07 22:21:33 -03:00
Juan Martín Sotuyo Dodero a782caa9b9 Merge branch 'ImproveOpenRedirectFP' of https://github.com/sgorbaty/pmd 2017-01-07 22:02:18 -03:00
Juan Martín Sotuyo Dodero fb6344c893 Update changelog 2017-01-07 22:01:50 -03:00
Sergey a84a0abbc2 Improving open redirect detection for strings prefixed with / 2017-01-07 22:01:45 -03:00
Juan Martín Sotuyo Dodero 0be5a1554c Update changelog 2017-01-07 22:01:28 -03:00
Sergey 9c85a78884 Improving open redirect detection for strings prefixed with / 2017-01-07 22:00:48 -03:00
Andreas Dangel c3077a99b8 Add doclint check during release 2017-01-07 18:50:17 +01:00
Andreas Dangel 55eff12d36 Remove javadoc / doclint run from travis 2017-01-07 18:48:55 +01:00
Andreas Dangel 5b3142433b Merge branch 'doclint' 2017-01-07 17:06:05 +01:00
Andreas Dangel b36ee0ebf3 Update travis build to run doclint check for all modules
References #1516 [build] doclint error during build
2017-01-07 17:05:21 +01:00
Andreas Dangel e1d12dd4f8 Further Javadoc doclint fixes
References #1516 [build] doclint error during build
2017-01-07 17:05:03 +01:00
Andreas Dangel 79847dd3e9 Remove -Xdoclint:none workarounds
References #1516 [build] doclint error during build
2017-01-07 16:26:49 +01:00
pyxide 7cbb06f6e3 checkstyle fixes 2017-01-07 04:15:27 +01:00
pyxide 36afd5dfc6 Bug fix and enhanced console output encoding
- due to some rewriting without testing, the encoding property was not added to the renderer properties.
- better console encoding: use system property `sun.stdout.encoding` in interactive console, and `file.encoding` in piped or redirected output
2017-01-07 03:11:59 +01:00
Andreas Dangel 62e33b8e03 Merge branch 'bug-177'
Fixes #177
2017-01-06 10:42:21 +01:00
Andreas Dangel c9514e563a Merge branch 'bug-177' into pmd/5.5.x
Fixes #177
2017-01-06 10:35:45 +01:00
Andreas Dangel f825cdb1db Merge branch 'bug-177' into pmd/5.4.x
Fixes #177
2017-01-06 10:17:34 +01:00
Andreas Dangel af9d78c01a Update changelog 2017-01-06 10:16:45 +01:00
Andreas Dangel 767c9aae79 Bugfix singular field + lambda 2017-01-06 10:07:19 +01:00
Sergey 64d461cd84 Legacy test class declaration 2017-01-05 14:50:43 -08:00
Andreas Dangel a041ea3eba [vm] Javadoc doclint fixes
References #1516 [build] doclint error during build
2017-01-05 22:55:00 +01:00
Andreas Dangel 7dd7dd3512 [plsql] Javadoc doclint fixes
References #1516 [build] doclint error during build
2017-01-05 22:37:18 +01:00
Andreas Dangel 2dfd580e93 [jsp] Javadoc doclint fixes
References #1516 [build] doclint error during build
2017-01-05 22:01:17 +01:00
Andreas Dangel c9d3bd3e9c [java] Javadoc doclint fixes
References #1516 [build] doclint error during build
2017-01-05 21:54:48 +01:00
Andreas Dangel 30952ca876 [test] Javadoc doclint fixes
References #1516 [build] doclint error during build
2017-01-05 20:26:00 +01:00
Andreas Dangel 3277febd88 [core] Javadoc doclint fixes
References #1516 [build] doclint error during build
2017-01-05 20:20:54 +01:00
Andreas Dangel a1825c4114 Javadoc doclint fixes
References #1516 [build] doclint error during build
2017-01-05 18:31:06 +01:00
Andreas Dangel f21ef81998 site: Fix links to intellij plugins 2017-01-05 12:05:41 +01:00
Andreas Dangel b2a9cbe097 Add Codacy
See pmd/pmd.github.io#2
2017-01-05 11:41:26 +01:00
Andreas Dangel 8179d74150 Add CONTRIBUTING.md, BUILDING.md. Update README.md 2017-01-05 11:31:49 +01:00
Sergey c5089f756c Improving open redirect detection for strings prefixed with / 2017-01-04 13:33:06 -08:00
Andreas Dangel d12920eb72 Merge branch 'pr-175'
Closes #175 (rebased onto pmd/5.5.x)
2017-01-04 20:26:43 +01:00
Andreas Dangel c794d952b1 Merge branch 'pr-175' into pmd/5.5.x
Closes #175 (rebased onto pmd/5.5.x)
2017-01-04 20:18:40 +01:00
Andreas Dangel 04cefcbe06 GC and thread safety changes
(Re-applied from 10e3bc172b)
2017-01-04 20:18:21 +01:00
Andreas Dangel 2566bbaf2e apex: Take over rule descriptions from changelog for security ruleset 2017-01-04 20:06:36 +01:00
Sergey 6ea28811f4 Small edits to release notes 2017-01-04 19:56:25 +01:00
Andreas Dangel 2b8f1c559b Update changelog 2017-01-04 19:54:41 +01:00
Sergey 5e07095f0c Bug fix for missing casting methods 2017-01-04 19:52:06 +01:00
Andreas Dangel 2c714e1fbc Merge branch 'pr-164'
Closes #164 (rebased onto pmd/5.5.x)
2017-01-03 12:19:45 +01:00
Andreas Dangel dfc0467524 Merge branch 'pr-164' into pmd/5.5.x
Closes #164 (rebased onto pmd/5.5.x)
2017-01-03 12:17:34 +01:00
Andreas Dangel a499711990 Fix compile error 2017-01-03 12:12:11 +01:00
Juan Martín Sotuyo Dodero 932ad7dd2b Reduce memory allocations during symbol table 2017-01-03 12:07:30 +01:00
Andreas Dangel 79d7869782 Merge branch 'pr-162'
Closes #162 (rebased onto pmd/5.4.x)
2017-01-03 11:54:26 +01:00
Andreas Dangel 992e5547bb Merge branch 'pr-162' into pmd/5.5.x
Closes #162 (rebased onto pmd/5.4.x)
2017-01-03 11:45:47 +01:00
Andreas Dangel ba7a7a2f8d Merge branch 'pr-162' into pmd/5.4.x
Closes #162 (rebased onto pmd/5.4.x)
2017-01-03 11:45:28 +01:00
Juan Martín Sotuyo Dodero 6283316e51 Avoid redundant method calls and improve codebase
- Avoid making calls within for loops, specially costly ones
    such as `getQualifiedTypeNames`
 - Don't create lists when they are empty.
 - Create lists of proper size to avoid resizing / oversizing
 - I'm seeing a ~5% improvement. We are reaching the point were noise
    makes it hard to detect improvements. We should attack GC cycles soon.
2017-01-03 11:41:33 +01:00
Andreas Dangel c9ada390db Merge branch 'pr-161'
Closes #161 (rebased onto pmd/5.5.x)
2017-01-03 11:33:24 +01:00
Andreas Dangel 72af8a8ee5 Merge branch 'pr-161' into pmd/5.5.x
Closes #161 (rebased onto pmd/5.5.x)
2017-01-03 11:28:31 +01:00
Juan Martín Sotuyo Dodero b950929b7c Improve symboltable codebase
- Move shared code to pmd-core
 - Allow search methods to stop searching when they want to
 - If we are looking for a variable declaration, just search among those and not all name declarations
 - This is roughtly another 10% improvement on symbol table performance
2017-01-03 11:22:42 +01:00
Juan Martín Sotuyo Dodero b6bc06d3d2 Avoid comparing strings all time 2017-01-03 11:21:13 +01:00
Andreas Dangel 5d9010672d Merge branch 'pr-159'
Closes #159 (rebased onto pmd/5.4.x)
2017-01-03 10:34:42 +01:00
Andreas Dangel 55b4d81fbf Merge branch 'pr-159' into pmd/5.5.x
Closes #159 (rebased onto pmd/5.4.x)
2017-01-03 10:27:39 +01:00
Andreas Dangel e5dbeb800b Merge branch 'pr-159' into pmd/5.4.x
Closes #159 (rebased onto pmd/5.4.x)
2017-01-03 10:21:50 +01:00
Andreas Dangel c6afa6ca26 Update changelog 2017-01-03 10:21:33 +01:00
Juan Martín Sotuyo Dodero 54db0ffbd9 [java] UnnecessaryFullyQualifiedNameRule handles same file class conflicts
- This resolves [#1555](https://sourceforge.net/p/pmd/bugs/1555/)
 - If a class is defined in the same file that conflicts with an import,
    it's not considered a violation
2017-01-03 10:18:29 +01:00
Andreas Dangel ba5827b46e Merge branch 'pr-157' 2017-01-03 10:10:56 +01:00
Andreas Dangel 68fd556c9c Merge branch 'add-clone-test' of https://github.com/Monits/pmd into pr-157 2017-01-03 10:09:02 +01:00
Andreas Dangel d9cc0658ae Merge branch 'pr-156' 2017-01-03 10:07:48 +01:00
Andreas Dangel 946b566c76 Update changelog 2017-01-03 10:01:37 +01:00
Andreas Dangel d6ef39f4d4 Recycle the test cases of AvoidConstantsInInterface 2017-01-03 09:59:29 +01:00
Andreas Dangel 7a46613043 Merge branch 'issue-1512' of https://github.com/Monits/pmd into pr-156 2017-01-03 09:29:56 +01:00
Juan Martín Sotuyo Dodero 6579959d93 Merge branch 'SuggestUsingNamedCredential' of https://github.com/sgorbaty/pmd 2017-01-02 15:41:32 -03:00
Juan Martín Sotuyo Dodero fac6fc1bc0 Update changelog 2017-01-02 15:41:17 -03:00
Juan Martín Sotuyo Dodero 729b843254 Merge branch 'pr-173' 2017-01-02 15:41:11 -03:00
Juan Martín Sotuyo Dodero 1a10813126 Update changelog 2017-01-02 15:39:58 -03:00
Juan Martín Sotuyo Dodero 56324071a9 Merge branch 'pr-173' into pmd/5.5.x 2017-01-02 15:28:28 -03:00
Juan Martín Sotuyo Dodero b937ebd80f Add new rule to release 2017-01-02 15:28:11 -03:00
Sergey 9aae5a191b New rule suggests using named credentials 2017-01-02 15:14:05 -03:00
Juan Martín Sotuyo Dodero b38c420754 Merge branch 'OpenRedirectEnhancement' of https://github.com/sgorbaty/pmd 2017-01-02 14:54:25 -03:00
Juan Martín Sotuyo Dodero 1515a9b5cb Update changelog 2017-01-02 14:47:13 -03:00
Juan Martín Sotuyo Dodero 1a73260b6b Merge branch 'pr-172' 2017-01-02 14:47:08 -03:00
Juan Martín Sotuyo Dodero 1f569c49f9 Update changelog 2017-01-02 14:46:47 -03:00
Juan Martín Sotuyo Dodero 4bffb8b856 Merge branch 'pr-172' into pmd/5.5.x 2017-01-02 14:44:19 -03:00
Sergey 7d691e6c69 Adding support for property 2017-01-02 14:29:12 -03:00
Andreas Dangel dad2eb3433 Update changelog. Mention removal of XPathCLI 2016-12-23 18:41:03 +01:00
Andreas Dangel 32bfabb4f0 Merge branch 'pr-145' 2016-12-23 18:36:56 +01:00
Andreas Dangel 77b2e399ca Update changelog 2016-12-23 18:36:31 +01:00
Andreas Dangel feb79d5213 Fix checkstyle 2016-12-23 18:24:32 +01:00
Andreas Dangel 544d22f9b8 Merge branch 'checksum-aware' of https://github.com/Monits/pmd into pr-145 2016-12-23 18:21:50 +01:00
Juan Martín Sotuyo Dodero 954e46b3e2 Merge branch 'CrudNewExpression' of https://github.com/sgorbaty/pmd 2016-12-21 08:54:24 -03:00
Juan Martín Sotuyo Dodero c83f252bef Update changelog 2016-12-21 08:54:11 -03:00
Juan Martín Sotuyo Dodero 5862d5b3e6 Merge branch 'pr-169' 2016-12-21 08:54:01 -03:00
Juan Martín Sotuyo Dodero 1c2a7f70ce Update changelog 2016-12-21 08:53:26 -03:00
Juan Martín Sotuyo Dodero ac0dcf235e Merge branch 'pr-169' into pmd/5.5.x 2016-12-21 08:52:56 -03:00
Juan Martín Sotuyo Dodero 5c6f808a45 Rename variable to match Checkstyle config 2016-12-21 08:52:18 -03:00
Sergey 01bb78b974 Improving detection for DML with inline new object 2016-12-21 08:40:00 -03:00
Sergey b995493d72 Adding support for property 2016-12-19 15:22:40 -08:00
Sergey 9cda4d4090 New rule suggests using named credentials 2016-12-19 15:16:18 -08:00
pyxide 10fd174b29 checkstyle fixes 2016-12-17 22:05:03 +01:00
pyxide 6c2f61bb97 Update Formatter.java 2016-12-17 21:38:45 +01:00
pyxide c853e8caa9 Ant Task Formatter encoding issue with XMLRenderer
Hi,

The writers in the Ant task's formatter uses the default platform's encoding (for instance cp1252 on Western Windows) and the XMLRenderer sets the default XML encoding to UTF-8. This may lead to incorrect XML encoding, detected for instance when the XML file is sent to a XSLT task.
This goes undetected as long as the characters in the XML file are in the ASCII subset, which is frequently the case with code, usually in plain Latin language. In my case, the issue was raised because of the localized formatting of some line numbers greater than 999, due to localized thousand separator 0xA0, which is out of the ASCII subset.

I modified the Formatter class to always use a charset for writers. When no encoding is specified, UTF-8 is used instead of the default platform's encoding.

I strongly recommend to *always set the encoding parameter* of the formatter element. It should be reflected as so in the Ant Task documentation.

```xml
<pmd encoding="cp1252"> <!-- source encoding -->
  <formatter type="xml" toFile="pmd.xml">
    <param name="encoding" value="UTF-8" /> <!-- report encoding -->
  </formatter>
  <fileset dir="src/main/java">
    <include name="**/*.java"/>
  </fileset>
</pmd>
```
Note: when digging into sourceforge issues for similar bugs, I found [Bug 877: Output with encoding CP1252](https://sourceforge.net/p/pmd/bugs/877/) . Not the same task, but the same symptoms, probably the same cause ?
2016-12-17 00:34:12 +01:00
Sergey 3a12584821 Improving detection for DML with inline new object 2016-12-16 15:04:37 -08:00
Sergey cebf74a15b Small edits to release notes 2016-12-16 16:48:21 -03:00
Juan Martín Sotuyo Dodero 7bc8b4ec00 Merge branch 'GCImprovements' of https://github.com/sgorbaty/pmd 2016-12-16 16:40:31 -03:00
Juan Martín Sotuyo Dodero ad22f8b4ef Update changelog 2016-12-16 16:40:21 -03:00
Juan Martín Sotuyo Dodero d9fdc428ab Merge branch 'pr-167' 2016-12-16 16:40:13 -03:00
Juan Martín Sotuyo Dodero b409729028 Update changelog 2016-12-16 16:39:16 -03:00
Juan Martín Sotuyo Dodero fa15016e5d Merge branch 'pr-167' into pmd/5.5.x 2016-12-16 16:38:43 -03:00
Sergey 6bf31ece84 GC and thread safety changes 2016-12-16 16:24:33 -03:00
Juan Martín Sotuyo Dodero fa14c86393 Merge branch 'AvoidRedirectRuleInTests' of https://github.com/sgorbaty/pmd 2016-12-16 16:15:10 -03:00
Juan Martín Sotuyo Dodero e735aaa88d Update changelog 2016-12-16 16:00:08 -03:00
Juan Martín Sotuyo Dodero 6d3d78f4ea Merge branch 'pr-165' 2016-12-16 15:58:40 -03:00
Juan Martín Sotuyo Dodero 06733400d2 Update changelog 2016-12-16 15:57:51 -03:00
Juan Martín Sotuyo Dodero e9a40fbe43 Merge branch 'pr-165' into pmd/5.5.x 2016-12-16 15:55:23 -03:00
Sergey Gorbaty 5e2db6c42b Removing static 2016-12-16 15:46:22 -03:00
Sergey Gorbaty 5f908a306d Clearing data collection 2016-12-16 15:46:12 -03:00
Sergey Gorbaty 64e193fcb6 Bug fix - contd 2016-12-16 15:46:04 -03:00
Sergey Gorbaty 27936a5e04 Improving open redirect rule to avoid test classes/methods 2016-12-16 15:45:53 -03:00
Sergey 10e3bc172b GC and thread safety changes 2016-12-16 10:33:27 -08:00
Andreas Dangel d7da960a45 Merge branch 'checkstyle' 2016-12-16 16:37:22 +01:00
Andreas Dangel 3cb9a423c9 pmd-apex, pmd-javascript, pmd-plsql, pmd-vm: Checkstyle fixes 2016-12-16 16:10:04 +01:00
Andreas Dangel e280151987 pmd-cpp/pmd-java: checkstyle fixes 2016-12-16 15:48:53 +01:00
Andreas Dangel eb2d942ed4 pmd-core: checkstyle fixes 2016-12-16 12:32:18 +01:00
Sergey Gorbaty de807adc3c Removing static 2016-12-14 14:38:02 -08:00
Juan Martín Sotuyo Dodero e6663dc9ce Merge branch 'fix-pr-163' 2016-12-14 18:14:05 -03:00
Juan Martín Sotuyo Dodero a70ad2ad90 Merge branch 'fix-pr-163' into pmd/5.5.x 2016-12-14 18:13:46 -03:00
Juan Martín Sotuyo Dodero 6c8f3489f8 Avoid shared rule state 2016-12-14 18:13:24 -03:00
Sergey Gorbaty 20af5b82ac Clearing data collection 2016-12-14 12:45:03 -08:00
Juan Martín Sotuyo Dodero a06f8b9715 Merge branch 'LoggingSensitiveInfo' of https://github.com/sgorbaty/pmd 2016-12-14 17:39:13 -03:00
Juan Martín Sotuyo Dodero 578df1b37a Update changelog 2016-12-14 17:38:44 -03:00
Juan Martín Sotuyo Dodero 3705ac3368 Merge branch 'pr-163' 2016-12-14 17:38:37 -03:00
Juan Martín Sotuyo Dodero 265730d548 Update changelog 2016-12-14 17:38:11 -03:00
Juan Martín Sotuyo Dodero 5c5050e198 Merge branch 'pr-163' into pmd/5.5.x 2016-12-14 17:36:05 -03:00
Sergey Gorbaty 251a4254c7 Clearing collection after detection 2016-12-14 17:32:58 -03:00
Sergey f2eb813419 Finetuning of regex 2016-12-14 17:32:52 -03:00
Sergey 1d5e0e5304 Flagging of System.debug 2016-12-14 17:32:46 -03:00
Sergey Gorbaty 250e457f76 Clearing collection after detection 2016-12-14 12:09:47 -08:00
Sergey Gorbaty e66e4fb4b1 Bug fix - contd 2016-12-14 10:53:27 -08:00
Sergey Gorbaty b6945d7a6b Improving open redirect rule to avoid test classes/methods 2016-12-14 10:34:02 -08:00
Sergey cf84ff4b80 Finetuning of regex 2016-12-13 14:05:11 -08:00
Sergey 719608d42d Flagging of System.debug 2016-12-13 13:34:02 -08:00
Juan Martín Sotuyo Dodero a9f4db6935 Revamp changelog 2016-12-13 13:38:59 -03:00
Juan Martín Sotuyo Dodero 94a42c9c16 Merge branch 'changelog-5.5.x' into pmd/5.5.x 2016-12-13 13:37:03 -03:00
Juan Martín Sotuyo Dodero e36ebe90ae Revamp changelog 2016-12-13 13:36:28 -03:00
Juan Martín Sotuyo Dodero 66b6b8df19 Merge branch 'changelog' into pmd/5.4.x 2016-12-13 13:26:42 -03:00
Juan Martín Sotuyo Dodero 454fddb09d Revamp changelog format
- Make it a little more marketing friendly
2016-12-13 13:25:01 -03:00
Juan Martín Sotuyo Dodero 9beb8923fb Merge branch 'DangerousMethodCalls' of https://github.com/sgorbaty/pmd 2016-12-13 10:20:06 -03:00
Juan Martín Sotuyo Dodero 9e9d133af4 Merge branch 'pr-160' 2016-12-13 10:13:20 -03:00
Juan Martín Sotuyo Dodero 5946d609e3 Merge branch 'pr-160' into pmd/5.5.x 2016-12-13 10:05:26 -03:00
Juan Martín Sotuyo Dodero 2aacbca341 Add ApexDangerousMethods to releases/553.xml 2016-12-13 10:04:33 -03:00
Juan Martín Sotuyo Dodero 98d24e6d44 Update changelog 2016-12-13 10:02:59 -03:00
Sergey 8864936c1b Adding to the rule chain 2016-12-13 10:01:33 -03:00
Sergey d1acba8fc9 Code style changes 2016-12-13 10:01:24 -03:00
Sergey 19bdf1419f Rule check-in 2016-12-13 10:01:16 -03:00
Sergey 5417c88889 Adding to the rule chain 2016-12-12 13:30:50 -08:00
Sergey 9ffe650a96 Code style changes 2016-12-12 13:24:44 -08:00
Sergey f02ec3ec55 Rule check-in 2016-12-12 09:50:45 -08:00
Juan Martín Sotuyo Dodero 79e3a1dea6 Merge branch 'ReduceFPSForSOQLGetters' of https://github.com/sgorbaty/pmd 2016-12-10 18:25:20 -03:00
Juan Martín Sotuyo Dodero 0936dc0be2 Merge branch 'pr-158' 2016-12-10 18:22:46 -03:00
Juan Martín Sotuyo Dodero 2378e6f8d2 Merge branch 'pr-158' into pmd/5.5.x 2016-12-10 18:18:24 -03:00
Juan Martín Sotuyo Dodero a201427727 Update changelog 2016-12-10 18:17:58 -03:00
Sergey Gorbaty 5f79c56bc5 Moving Pattern 2016-12-10 18:11:48 -03:00
Sergey Gorbaty f9882bec87 Improving getter detection 2016-12-10 18:11:41 -03:00
Andreas Dangel 774f3608d7 Merge branch 'pr-144' 2016-12-10 10:48:22 +01:00
Andreas Dangel 59744d5d8c Update changelog 2016-12-10 10:40:59 +01:00
Andreas Dangel bc8cadc847 Merge branch 'cache-dir-creation' of https://github.com/Monits/pmd into pr-144 2016-12-10 10:39:48 +01:00
Andreas Dangel 083c736eba Merge branch 'pr-143' 2016-12-10 10:38:46 +01:00
Andreas Dangel 1a173c19cd Update changelog 2016-12-10 10:38:39 +01:00
Andreas Dangel afe7967421 Merge branch 'cache-doc' of https://github.com/Monits/pmd into pr-143 2016-12-10 10:37:39 +01:00
Andreas Dangel 36c34eee81 Merge branch 'pr-141'
Closes #141 (rebased for pmd/5.4.x)
2016-12-10 10:29:56 +01:00
Andreas Dangel 5ded17c5b5 Merge branch 'pr-141' into pmd/5.5.x
Closes #141 (rebased for pmd/5.4.x)
2016-12-10 10:20:39 +01:00
Andreas Dangel a7b89a8c47 Merge branch 'pr-141' into pmd/5.4.x
Closes #141 (rebased for pmd/5.4.x)
2016-12-10 10:15:45 +01:00
Andreas Dangel 48e803392a Update changelog 2016-12-10 10:14:00 +01:00
Juan Martín Sotuyo Dodero 28a24dec2a [java] Speedup PreserveStackTrace by over 7X
- By avoiding to look at all variable declarators we can greatly improve
    analysis speed without loosing accurancy
2016-12-10 10:13:37 +01:00
Sergey Gorbaty 7939b7f114 Moving Pattern 2016-12-09 10:22:50 +01:00
Sergey Gorbaty cf5b2b6ab8 Improving getter detection 2016-12-09 10:08:38 +01:00
Andreas Dangel 21a012484d Merge branch 'pr-140'
Closes #140 (rebased onto pmd/5.4.x)
2016-12-09 09:59:06 +01:00
Andreas Dangel bb8b604152 Merge branch 'pr-140' into pmd/5.5.x
Closes #140 (rebased onto pmd/5.4.x)
2016-12-09 09:50:36 +01:00
Andreas Dangel 637b82bce9 Merge branch 'pr-140' into pmd/5.4.x
Closes #140 (rebased onto pmd/5.4.x)
2016-12-09 09:49:17 +01:00
Andreas Dangel a250974b29 Update changelog 2016-12-09 09:45:25 +01:00
Juan Martín Sotuyo Dodero f4e727d274 [java] Make CloneMethodMustImplementCloneable over 500x faster
- This was an excruciatingly slow rule, the slowest by far of all PMD
 - We speed it up by:
    * checking early if we are analyzing a `clone()` method to cut the AST tree
    * making better use of type information available
    * only performing additional checks when we know we can't rely on
       available type information
2016-12-09 09:44:23 +01:00
Andreas Dangel 28ef1dc1fc Merge branch 'pr-139' 2016-12-09 09:37:32 +01:00
Andreas Dangel 329cb009f7 Update changelog 2016-12-09 09:37:22 +01:00
Andreas Dangel b5b9ed7bc7 Merge branch 'symboltable-tidyup' of https://github.com/Monits/pmd into pr-139 2016-12-09 09:29:55 +01:00
Juan Martín Sotuyo Dodero 2d9e9537be Merge branch 'XSSRulesImprovements' of https://github.com/sgorbaty/pmd 2016-12-08 19:47:34 -03:00
Juan Martín Sotuyo Dodero d9cdd9229a Merge branch 'pr-155' 2016-12-08 19:45:14 -03:00
Juan Martín Sotuyo Dodero 76738d6d8f Merge branch 'pr-155' into pmd/5.5.x 2016-12-08 19:26:27 -03:00
Juan Martín Sotuyo Dodero a854dae229 Fix checkstyle violations 2016-12-08 19:25:38 -03:00
Sergey Gorbaty 920a58a043 Code style fixes 2016-12-08 19:17:08 -03:00
Sergey Gorbaty f9f4a7f1a1 Refactoring other rules for FQvariableName 2016-12-08 19:16:31 -03:00
Sergey Gorbaty 06ef5abf9e Refactoring of variable name collection 2016-12-08 19:12:32 -03:00
Sergey Gorbaty 2d10c55e3f Bug fix that addresses recognition of object member variable as a variable of class 2016-12-08 19:10:59 -03:00
Juan Martín Sotuyo Dodero df0b52fa62 Uncomment the test scenario for issue 681
- This asserts the issue has actually been fixed and makes sure it won't return
2016-12-08 18:37:29 -03:00
Juan Martín Sotuyo Dodero efebb1ef6b Unify AvoidConstantsInterface and ConstantsInInterface
- We stick to ConstantsInInterface since it covers all scenarios the other one did,
    and allows greater configuration.
 - The existing test cases were already covered, so we can safely drop them.
2016-12-08 18:04:37 -03:00
Sergey Gorbaty 367e285171 Code style fixes 2016-12-08 17:49:01 +01:00
Sergey Gorbaty c5579ea4aa Refactoring other rules for FQvariableName 2016-12-08 16:53:12 +01:00
Sergey Gorbaty 433fb91d7d Refactoring of variable name collection 2016-12-08 16:48:34 +01:00
Sergey Gorbaty 5a615d576c Bug fix that addresses recognition of object member variable as a variable of class 2016-12-08 16:45:09 +01:00
Juan Martín Sotuyo Dodero 5a7c17f997 Merge branch 'issue-1547' of https://github.com/sratz/pmd 2016-12-07 14:34:50 -03:00
Juan Martín Sotuyo Dodero a9a6859b34 Merge branch 'pr-154' 2016-12-07 14:34:07 -03:00
Juan Martín Sotuyo Dodero aa7a1f42f5 Merge branch 'pr-154' into pmd/5.5.x 2016-12-07 14:32:30 -03:00
Juan Martín Sotuyo Dodero 795d437cd4 Merge branch 'pr-154' into pmd/5.4.x 2016-12-07 14:28:06 -03:00
Juan Martín Sotuyo Dodero 2fbe0b977a Update changelog 2016-12-07 14:26:58 -03:00
Sebastian Ratz 61e0fc5875 [java] Fix #1547: UnusedImports: Adjust regex to support underscores 2016-12-07 14:14:07 -03:00
Juan Martín Sotuyo Dodero 7a74774d55 Merge branch 'pr-152' 2016-12-07 13:29:28 -03:00
Juan Martín Sotuyo Dodero f20a90bc3f Merge branch 'pr-152' into pmd/5.5.x 2016-12-07 13:27:10 -03:00
Juan Martín Sotuyo Dodero 68546d1907 Merge branch 'pr-152' into pmd/5.4.x 2016-12-07 13:24:21 -03:00
Juan Martín Sotuyo Dodero 6096bb9c98 Update changelog 2016-12-07 13:17:59 -03:00
Felix Otto 9f1f63ffe6 fixes #1552 [java] continue does not require break
Similar to RETURN after a CONTINUE statement break is not required in a
case section
2016-12-07 13:10:23 -03:00
Sebastian Ratz 01900a3b13 [java] Fix #1547: UnusedImports: Adjust regex to support underscores 2016-12-06 16:22:30 +01:00
Felix Otto 2ab57e339a fixes #1552 [java] continue does not require break
Similar to RETURN after a CONTINUE statement break is not required in a
case section
2016-12-05 12:51:26 +01:00
Andreas Dangel f10a1ecab7 Merge branch 'pmd/5.5.x'
# Conflicts:
#	pmd-core/src/main/java/net/sourceforge/pmd/util/ClasspathClassLoader.java
2016-12-03 19:09:56 +01:00
Andreas Dangel 220a1f98a8 Update releases/553.xml ruleset 2016-12-03 19:08:34 +01:00
Andreas Dangel e9ba846b86 Merge branch 'pr-138' into pmd/5.5.x 2016-12-03 19:06:17 +01:00
Andreas Dangel 9199e46b93 Update changelog 2016-12-03 19:00:38 +01:00
Juan Martín Sotuyo Dodero c296560921 Make ClasspathClassLoader parallel capable
- It's just a bunch of static methods with no state on a URLClassLoader
 - We should probably review if this class makes sense at all, or should
    be replaced with helper methods on top of PMDASMClassLoader
2016-12-03 19:00:32 +01:00
Andreas Dangel d61986d1f8 Merge branch 'pr-138' 2016-12-03 18:54:07 +01:00
Andreas Dangel 0d72228d26 Checkstyle fixes 2016-12-03 18:47:09 +01:00
Andreas Dangel 47a33b441c Update changelog 2016-12-03 18:44:16 +01:00
Andreas Dangel ae593c934b Merge branch 'parallel-classloader' of https://github.com/Monits/pmd into pr-138 2016-12-03 18:43:14 +01:00
Andreas Dangel 1c3a247163 Merge branch 'issue-1551' 2016-12-03 18:20:44 +01:00
Andreas Dangel d231e1e407 Merge branch 'issue-1551' into pmd/5.5.x 2016-12-03 18:13:21 +01:00
Andreas Dangel 4c5daadca7 Fixes #1551 [java] InvalidSlf4jMessageFormat: fails with NPE 2016-12-03 18:13:13 +01:00
Andreas Dangel cc065baaf9 Merge branch 'issue-1541' 2016-12-03 17:58:15 +01:00
Andreas Dangel 412bf2a748 Merge branch 'issue-1541' into pmd/5.5.x 2016-12-03 17:52:22 +01:00
Andreas Dangel 9afebbea18 Fixes #1541 [java] InvalidSlf4jMessageFormat: False positive with placeholder and exception 2016-12-03 17:52:10 +01:00
Andreas Dangel a1d49aff6d Merge branch 'codestyle' 2016-12-03 12:04:28 +01:00
Andreas Dangel 5282b79a7c Merge remote-tracking branch 'origin/master' into codestyle
# Conflicts:
#	pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexSOQLInjectionRule.java
#	pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexXSSFromURLParamRule.java
2016-12-03 11:55:28 +01:00
Andreas Dangel 0635cd32ec Checkstyle fixes / formatting 2016-12-03 11:45:43 +01:00
Andreas Dangel d2bc0f3739 Checkstyle fixes 2016-12-03 11:31:01 +01:00
Juan Martín Sotuyo Dodero ee59e4d668 Merge branch 'SOQLInjectionEnhancement' of https://github.com/sgorbaty/pmd 2016-12-02 17:20:50 -03:00
Juan Martín Sotuyo Dodero 31497e11e6 Merge branch 'pr-148' 2016-12-02 17:17:52 -03:00
Juan Martín Sotuyo Dodero 048fc32aa0 Merge branch 'pr-148' into pmd/5.5.x 2016-12-02 17:15:01 -03:00
Juan Martín Sotuyo Dodero 41cc401cd0 Update changelog 2016-12-02 17:13:35 -03:00
Sergey Gorbaty 4edc552692 Improving detection of SOQL injection with variables flowing into Database.query 2016-12-02 17:12:05 -03:00
Juan Martín Sotuyo Dodero 471ebb5293 Merge branch 'WhitelistingAMethod' of https://github.com/sgorbaty/pmd 2016-12-02 16:58:15 -03:00
Juan Martín Sotuyo Dodero 3809f6bdf5 Merge branch 'pr-149' 2016-12-02 16:53:44 -03:00
Juan Martín Sotuyo Dodero 70a02275fd Merge branch 'pr-149' into pmd/5.5.x 2016-12-02 16:49:36 -03:00
Juan Martín Sotuyo Dodero 2260c01410 Update changelog 2016-12-02 16:49:18 -03:00
Sergey Gorbaty 8719fbdd0e Whitelisting String.isEmpty
Improved detection of casting and additional test cases
Typo fix
2016-12-02 16:43:48 -03:00
Sergey Gorbaty ce1817b971 Typo fix 2016-12-02 10:11:17 -08:00
Sergey Gorbaty e5325e4651 Revert of error 2016-12-02 10:11:05 -08:00
Sergey Gorbaty d7fddd6ff9 Typo fix 2016-12-02 10:08:49 -08:00
Sergey Gorbaty 004fa91b45 Improved detection of casting and additional test cases 2016-12-02 10:04:32 -08:00
Andreas Dangel 617c6c622c Merge remote-tracking branch 'origin/master' into codestyle
# Conflicts:
#	pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java
#	pmd-core/src/main/java/net/sourceforge/pmd/RuleSetFactory.java
#	pmd-core/src/main/java/net/sourceforge/pmd/RuleSets.java
#	pmd-core/src/main/java/net/sourceforge/pmd/RulesetsFactoryUtils.java
#	pmd-core/src/main/java/net/sourceforge/pmd/SourceCodeProcessor.java
#	pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/SourceCodePositioner.java
#	pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/xpath/AttributeAxisIterator.java
#	pmd-core/src/main/java/net/sourceforge/pmd/lang/symboltable/AbstractScope.java
#	pmd-core/src/main/java/net/sourceforge/pmd/processor/MonoThreadProcessor.java
#	pmd-core/src/main/java/net/sourceforge/pmd/processor/MultiThreadProcessor.java
#	pmd-core/src/test/java/net/sourceforge/pmd/ConfigurationTest.java
#	pmd-core/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java
#	pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/imports/UnnecessaryFullyQualifiedNameRule.java
#	pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symboltable/TypeSet.java
#	pmd-java/src/test/java/net/sourceforge/pmd/lang/java/symboltable/ClassScopeTest.java
#	pmd-java/src/test/java/net/sourceforge/pmd/lang/java/symboltable/STBBaseTst.java
#	pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/rule/AbstractPLSQLRule.java
#	pmd-xml/src/test/java/net/sourceforge/pmd/lang/xml/XmlParserTest.java
2016-12-02 15:42:31 +01:00
Andreas Dangel 1602c1a0ba Add code style info to README 2016-12-02 15:13:45 +01:00
Andreas Dangel 62bb803810 checkstye: remove old configuration files 2016-12-02 15:13:32 +01:00
Andreas Dangel 68144d25fb pmd-java8: checkstyle / formatting 2016-12-02 15:06:49 +01:00
Andreas Dangel f3b362b359 pmd-scala: checkstyle / formatting 2016-12-02 15:05:25 +01:00
Andreas Dangel d55cf8afd8 pmd-apex: checkstyle / formatting 2016-12-02 15:00:19 +01:00
Andreas Dangel 344d14f676 pmd-xml: checkstyle / formatting 2016-12-02 14:54:02 +01:00
Andreas Dangel 2bb4da53d5 pmd-vm: checkstyle / formatting 2016-12-02 14:48:47 +01:00
Andreas Dangel fbb262d380 pmd-swift: checkstyle / formatting 2016-12-02 14:36:22 +01:00
Andreas Dangel 4d94b71ffe pmd-ruby: checkstyle / formatting 2016-12-02 14:33:57 +01:00
Andreas Dangel 1a01f3757b pmd-python: checkstyle / formatting 2016-12-02 14:29:55 +01:00
Andreas Dangel 735330be9d pmd-plsql: checkstyle fixes 2016-12-02 14:27:47 +01:00
Andreas Dangel 2682bf18b8 pmd-plsql: checkstyle / formatting 2016-12-02 14:13:59 +01:00
Andreas Dangel b771a3788c pmd-php: checkstyle / formatting 2016-12-02 14:08:36 +01:00
Andreas Dangel dc7b0e2f00 pmd-objectivec: checkstyle / formatting 2016-12-02 14:07:12 +01:00
Andreas Dangel cd90c3df96 pmd-perl: checkstyle / formatting 2016-12-02 14:06:02 +01:00
Andreas Dangel 2aad642cc6 pmd-matlab: checkstyle / formatting 2016-12-02 14:04:37 +01:00
Andreas Dangel e3fd103aeb pmd-jsp: checkstyle / formatting 2016-12-02 14:03:21 +01:00
Andreas Dangel 6370b13f01 pmd-javascript: checkstyle / formatting 2016-12-02 12:49:40 +01:00
Andreas Dangel 9e2bade8c2 pmd-java: checkstyle fixes 2016-12-02 12:42:06 +01:00
Andreas Dangel 2680c33d84 pmd-java: checkstyle fixes 2016-12-02 11:32:06 +01:00
Andreas Dangel c2349d4cfb pmd-java: external sample code of JDKVersionTest 2016-12-02 10:21:50 +01:00
Andreas Dangel 0ebcac0705 pmd-java: checkstyle / formatting 2016-12-02 10:21:27 +01:00
Andreas Dangel e3e87694bd pmd-groovy: checkstyle / formatting 2016-12-02 09:31:39 +01:00
Andreas Dangel cab1980bbd pmd-go: checkstyle / formatting 2016-12-02 09:30:09 +01:00
Andreas Dangel 2d314fde90 pmd-fortran: externalize test source file 2016-12-02 09:29:14 +01:00
Andreas Dangel c2467b683f pmd-fortran: checkstyle / formatting 2016-12-02 09:25:17 +01:00
Andreas Dangel ead29c2350 pmd-cs: checkstyle / formatting 2016-12-02 09:23:15 +01:00
Andreas Dangel edcd4e5ccb pmd-cpp: checkstyle, formatting 2016-12-02 09:18:02 +01:00
Andreas Dangel 9a39c3ec02 pmd-core: checkstyle - use module specific suppressions file 2016-12-02 09:13:50 +01:00
Sergey Gorbaty 52d3aae035 Whitelisting String.isEmpty 2016-12-01 15:50:11 -08:00
Sergey Gorbaty 2a924d2734 NPE fix 2 2016-12-01 15:15:04 -08:00
Sergey Gorbaty 3edcfd3022 NPE fix 2016-12-01 15:13:03 -08:00
Sergey Gorbaty bd44a18861 Improving detection of SOQL injection with variables flowing into Database.query 2016-12-01 14:51:59 -08:00
Juan Martín Sotuyo Dodero fe1cc1604c Merge branch 'XSSReturnSink' of https://github.com/sgorbaty/pmd 2016-12-01 19:50:51 -03:00
Juan Martín Sotuyo Dodero 7896574cb3 Merge branch 'pr-147' 2016-12-01 19:46:07 -03:00
Juan Martín Sotuyo Dodero 315ebb9502 Merge branch 'pr-147' into pmd/5.5.x 2016-12-01 19:40:57 -03:00
Juan Martín Sotuyo Dodero 04346b6240 Update changelog 2016-12-01 19:40:40 -03:00
Sergey 7112e0530e NPE bug fix 2016-12-01 19:35:54 -03:00
Sergey ba1222083d Adding detection nested binary expressions 2016-12-01 19:35:47 -03:00
Sergey 863b2ff40e Detection of XSS in method return statement 2016-12-01 19:35:39 -03:00
Juan Martín Sotuyo Dodero 5215b2a9b0 Merge branch 'ApexCRUDViolation' of https://github.com/sgorbaty/pmd 2016-12-01 19:27:28 -03:00
Juan Martín Sotuyo Dodero 3a59399c2e Merge branch 'pr-146' 2016-12-01 19:22:08 -03:00
Juan Martín Sotuyo Dodero 0df1273a2c Merge branch 'pr-146' into pmd/5.5.x 2016-12-01 19:04:41 -03:00
Juan Martín Sotuyo Dodero 1b63611f22 Update changelog 2016-12-01 19:03:18 -03:00
Sergey 82986620e4 Adding proper list support to SOQL queries 2016-12-01 18:54:55 -03:00
Sergey d3edce7718 Updating description of the finding 2016-12-01 18:54:45 -03:00
Sergey 7f63914846 Bug fix 2016-12-01 18:53:48 -03:00
Sergey 1e5cbb8d25 Adding support for accessibility detection, fixing bugs with detection of fall-through checks 2016-12-01 18:53:33 -03:00
Sergey 074bab99b8 Adding CRUD to codeclimate ruleset 2016-12-01 18:53:25 -03:00
Sergey 20c2fa19f5 Adding support for properties and additional methods 2016-12-01 18:49:03 -03:00
Sergey 79737224b0 Adding Apex CRUD violations 2016-12-01 18:48:51 -03:00
Sergey 3ee8fb71c2 NPE bug fix 2016-11-30 16:18:09 -08:00
Sergey f6d250e041 Adding detection nested binary expressions 2016-11-30 16:11:19 -08:00
Sergey 2a6c8c7362 Detection of XSS in method return statement 2016-11-30 15:51:20 -08:00
Sergey 247c14db94 Adding proper list support to SOQL queries 2016-11-30 10:44:10 -08:00
Juan Martín Sotuyo Dodero 1d6c9327a0 Refactor RuleSet creation
- RuleSet is now immutable
 - RuleSets are created through a RuleSetBuilder
 - RuleSetBuilder is accessed solely from RuleSetFactory
 - RuleSetFactory can now either parse XMLs for rule set creation,
    or create single rule rulesets
2016-11-30 15:25:19 -03:00
Bram Stappers 53bfc8a061 Added template string token to EcmaScript 5 language definition. 2016-11-30 10:20:56 +01:00
Maikel Steneker caefe656e6 Added test case for template strings in Ecmascript. 2016-11-30 10:18:06 +01:00
Sergey 2bdff3c2e3 Updating description of the finding 2016-11-29 16:48:41 -08:00
Sergey 793224cab8 Merging upstream 2016-11-29 16:26:19 -08:00
Sergey 8690eb9796 Bug fix 2016-11-29 16:18:41 -08:00
Juan Martín Sotuyo Dodero 1c387e3515 [core] Create missing intermediate directories for cache
If the cache location points to a file within a non-existing directory
   make sure to create it for storage to succeed.
2016-11-29 16:55:11 -03:00
Sergey 48c12a97b0 Adding support for accessibility detection, fixing bugs with detection of fall-through checks 2016-11-29 11:14:25 -08:00
Juan Martín Sotuyo Dodero 66ef85b4dd [core] Add documentation on analysis cache usage
- Now both command line and ant pages have proper documentation on the newly available option
2016-11-29 15:56:06 -03:00
Juan Martín Sotuyo Dodero 555266b1b1 Merge branch 'master' of https://github.com/Up2Go/pmd 2016-11-29 15:22:25 -03:00
Juan Martín Sotuyo Dodero 1e6e49200a Merge branch 'pr-137' 2016-11-29 15:14:48 -03:00
Juan Martín Sotuyo Dodero 08c0e99e1c Merge branch 'pr-137' into pmd/5.5.x 2016-11-29 15:09:24 -03:00
Juan Martín Sotuyo Dodero fab752ebe2 Update changelog 2016-11-29 15:06:07 -03:00
Robert Sösemann b7cd4b6533 Adjusted remediation points 2016-11-29 15:01:19 -03:00
Sergey 846a396d25 Adding CRUD to codeclimate ruleset 2016-11-28 13:08:16 -08:00
Sergey 852831acdf Adding support for properties and additional methods 2016-11-28 13:01:02 -08:00
Juan Martín Sotuyo Dodero 52ee5e9b0b Tiny improvements and code tidy up 2016-11-28 02:23:24 -03:00
Juan Martín Sotuyo Dodero 896233c2b5 Make ClasspathClassLoader parallel capable
- It's just a bunch of static methods with no state on a URLClassLoader
 - We should probably review if this class makes sense at all, or should
    be replaced with helper methods on top of PMDASMClassLoader
2016-11-28 02:15:50 -03:00
Andreas Dangel a6e3a20d19 Merge branch 'issue-1545'
Closes #134
PR has been rebased for 5.5.x
2016-11-26 20:03:55 +01:00
Andreas Dangel dcd0cfb3db Merge branch 'issue-1545' into pmd/5.5.x 2016-11-26 20:01:38 +01:00
Juan Martín Sotuyo Dodero 2b14242f6b Update changelog 2016-11-26 19:54:52 +01:00
Juan Martín Sotuyo Dodero 268c62e772 Symbol table can now handle inner classes
- Types are now attempted to be resolved as inner classes if public attempt fails
 - ClassScope offers a `resolveType` method that qualifies the name as per local rules
    before resolution
2016-11-26 19:53:53 +01:00
Andreas Dangel 70cd1e816d Merge branch 'issue-1546'
Closes #133
PR has been rebased for 5.4.x/5.5.x/master
2016-11-26 18:27:45 +01:00
Andreas Dangel ef98657965 Merge branch 'issue-1546' into pmd/5.5.x 2016-11-26 18:20:43 +01:00
Andreas Dangel 6a75353da3 Merge branch 'issue-1546' into pmd/5.4.x 2016-11-26 18:16:04 +01:00
Juan Martín Sotuyo Dodero 9460758e69 Update changelog 2016-11-26 18:14:27 +01:00
Juan Martín Sotuyo Dodero 7e3546c130 UnnecessaryFullyQualifiedName can detect conflicts
- Fixes https://sourceforge.net/p/pmd/bugs/1546/
2016-11-26 18:13:10 +01:00
Andreas Dangel 9e26497bd1 Update changelog 2016-11-26 18:11:56 +01:00
Andreas Dangel 7dae0b67a1 Merge branch 'pr-131' 2016-11-26 17:51:46 +01:00
Andreas Dangel f02a009f24 Merge branch 'thread-safe-rsfactory' of https://github.com/Monits/pmd into pr-131 2016-11-26 17:51:33 +01:00
Andreas Dangel 5cc351f15b Merge branch 'pr-130'
Closes #130
Rebased for merging into 5.4.x/5.5.x/master
2016-11-26 17:23:47 +01:00
Andreas Dangel 987ba1931c Merge branch 'pr-130' into pmd/5.5.x 2016-11-26 17:15:58 +01:00
Andreas Dangel a5d7df9929 Merge branch 'pr-130' into pmd/5.4.x 2016-11-26 17:08:05 +01:00
Juan Martín Sotuyo Dodero 1b5135f360 Update changelog 2016-11-26 17:07:31 +01:00
Juan Martín Sotuyo Dodero eca1f7c8ef Remove synchronization from RuleContext 2016-11-26 17:07:05 +01:00
Juan Martín Sotuyo Dodero 87f26e57e7 Use a LRU cache in SaxonXPathRuleQuery 2016-11-26 17:07:05 +01:00
Juan Martín Sotuyo Dodero 49e3de4a06 Allow concurrency in AttributeAxisIterator 2016-11-26 17:03:32 +01:00
Andreas Dangel adcd402dd9 Merge branch 'pr-128'
Closes #128
Note, PR has been rebased for pmd/5.4.x, pmd/5.5.x and master
2016-11-26 11:17:21 +01:00
Andreas Dangel 390cbd1ffc Merge branch 'pr-128' into pmd/5.5.x 2016-11-26 11:10:13 +01:00
Andreas Dangel 68b41d3bc9 Merge branch 'pr-128' into pmd/5.4.x 2016-11-26 11:06:02 +01:00
Juan Martín Sotuyo Dodero b5ca7baa9a Ensure className is never null 2016-11-26 11:04:29 +01:00
Juan Martín Sotuyo Dodero 810760e3a6 Update changelog 2016-11-26 11:04:29 +01:00
Juan Martín Sotuyo Dodero 19a8d0d060 Minor optimizations to type resolution 2016-11-26 11:04:00 +01:00
Andreas Dangel 8ff9773945 Merge branch 'pr-127'
Closes #127

Cherry-Picked the commits
2016-11-26 10:41:50 +01:00
Andreas Dangel 1f467a9165 Merge branch 'pr-127' into pmd/5.5.x 2016-11-26 10:35:12 +01:00
Andreas Dangel d395ddca53 Merge branch 'pr-127' into pmd/5.4.x 2016-11-26 10:30:35 +01:00
Andreas Dangel 716b628062 Update changelog 2016-11-26 10:30:01 +01:00
Juan Martín Sotuyo Dodero 95101fddaf Don't look twice for the same variables
- This reduces calls to all scope resolution methods
2016-11-26 10:29:02 +01:00
Andreas Dangel 6db64064b7 Merge branch 'pr-125' 2016-11-25 18:34:10 +01:00
Andreas Dangel 6261706b2e Merge branch 'incremental-analysis' of https://github.com/Monits/pmd into pr-125 2016-11-25 17:52:45 +01:00
Sergey 8ed7481416 Adding Apex CRUD violations 2016-11-23 13:46:01 -08:00
Robert Sösemann 3923a185d8 Adjusted remediation points 2016-11-22 23:58:10 +01:00
Juan Martín Sotuyo Dodero 323bbbbca0 Merge branch 'master' of https://github.com/xuthus/pmd 2016-11-22 14:12:20 -03:00
Juan Martín Sotuyo Dodero a280d00cce Merge branch 'pr-129' 2016-11-22 14:12:11 -03:00
Juan Martín Sotuyo Dodero 9348d86eeb Merge branch 'pr-129' into pmd/5.5.x 2016-11-22 14:05:03 -03:00
Juan Martín Sotuyo Dodero cd5dcd335d Merge branch 'pr-129' into pmd/5.4.x 2016-11-22 14:03:38 -03:00
Juan Martín Sotuyo Dodero c88c1a02d4 Update changelog 2016-11-22 14:02:58 -03:00
sergey 5cf9a4d665 [plsql] fixed multiline SELECT parse
fixed multiline SELECT parse. Parsing skips SELECT statements to the ';'
delimiter or end of line. If statement terminated by the end of line,
next line starting from the middle of SELECT statement will fail to
parse. For example,
SELECT 1
INTO V
FROM DUAL;
will fail.
2016-11-22 13:49:35 -03:00
sergey ec13ff1662 missing change in PLSQLParserVisitorAdapter
missing change in PLSQLParserVisitorAdapter
2016-11-22 13:49:22 -03:00
sergey 90862cc993 Added correct parse of IS [NOT] NULL
fixed crash of parsing following code (from unittest):
IF V_BUF IS NULL THEN
null;
end if;
2016-11-22 13:49:16 -03:00
Andreas Dangel c2cd2fb4bd Add the new apex rules to the releases ruleset for 5.5.3 2016-11-21 21:30:52 +01:00
Andreas Dangel f3c919bf6e Add the new apex rules to the releases ruleset for 5.5.3 2016-11-21 21:24:24 +01:00
Juan Martín Sotuyo Dodero 250296c872 Update changelog 2016-11-21 15:30:04 -03:00
Juan Martín Sotuyo Dodero a048d39196 Fix since and rule links 2016-11-21 15:29:18 -03:00
Juan Martín Sotuyo Dodero e1d93971aa Minor improvements
- Don't need thread safety for local vars, drop StringBuffer in favor of StringBuilder
 - Make sure Helpers are non-instantiable
2016-11-21 15:29:18 -03:00
Sergey 8e0500945e New rules for Apex security 2016-11-21 15:28:07 -03:00
Juan Martín Sotuyo Dodero 103efbbc90 Merge branch 'pr-135' into pmd/5.5.x 2016-11-21 14:56:34 -03:00
Juan Martín Sotuyo Dodero 2d0bbd4e17 Update changelog 2016-11-21 14:55:08 -03:00
Juan Martín Sotuyo Dodero 815d141d64 Fix since and rule links 2016-11-21 14:55:08 -03:00
Juan Martín Sotuyo Dodero 5b83aa1bcf Minor improvements
- Don't need thread safety for local vars, drop StringBuffer in favor of StringBuilder
 - Make sure Helpers are non-instantiable
2016-11-21 14:55:08 -03:00
Sergey 4187acf422 [apex] New security ruleset 2016-11-21 14:54:57 -03:00
Andreas Dangel ad568de262 Merge branch 'faster-type-qualify' of https://github.com/Monits/pmd 2016-11-20 18:47:43 +01:00
Andreas Dangel 524f31d0af Update version in changelog 2016-11-20 18:46:44 +01:00
Andreas Dangel 80976706b8 Merge branch 'pr-126' 2016-11-20 18:40:04 +01:00
Andreas Dangel a7b74d1eff Merge branch 'pr-126' into pmd/5.5.x 2016-11-20 18:33:34 +01:00
Andreas Dangel 87c460bb55 Merge branch 'pr-126' into pmd/5.4.x 2016-11-20 18:28:20 +01:00
Andreas Dangel 051f50e932 Update changelog 2016-11-20 18:27:45 +01:00
Juan Martín Sotuyo Dodero 28e2f11003 Avoid creating a new String to qualify types
- This is now slightly faster, which for a method that gets called
    over 1 million times on large projects is significant.
 - We should still look for ways to reduce the number of calls to this
    method.
2016-11-20 18:27:06 +01:00
Andreas Dangel 8522bdaa78 Merge branch 'bug-1518' 2016-11-20 18:13:32 +01:00
Andreas Dangel 8e0effd917 Merge branch 'bug-1518' into pmd/5.5.x 2016-11-20 18:04:48 +01:00
Andreas Dangel 8b9431b43a Merge branch 'bug-1518' into pmd/5.4.x 2016-11-20 18:00:08 +01:00
Andreas Dangel 4d8dcf3443 Fixes #1518 [xml] Error while processing xml file with ".webapp" in the file or directory name 2016-11-20 17:55:35 +01:00
Andreas Dangel 228872e171 pmd-test: formatting, checkstyle fixes 2016-11-20 15:09:53 +01:00
Andreas Dangel 712f7ae06b Checkstyle fixes / enable suppressions 2016-11-20 15:05:15 +01:00
Andreas Dangel 4149d25018 Remove package/class name clash DBType 2016-11-20 12:16:47 +01:00
Andreas Dangel 93ad242e4b Fix checkstyle: ModifiedControlVariable 2016-11-20 12:05:56 +01:00
Andreas Dangel 3eb62600f3 Only consider own source code for checkstyle 2016-11-20 11:52:39 +01:00
Andreas Dangel 46a7908885 pmd-core: Further code formatting, clean-up 2016-11-20 11:52:17 +01:00
Andreas Dangel f1d795a260 pmd-core: Code formatting 2016-11-20 10:23:04 +01:00
Andreas Dangel 3a476825b3 Activate new checkstyle configuration 2016-11-14 20:59:52 +01:00
Andreas Dangel d731dd0b0a Merge branch 'cpd-npe' of https://github.com/Monits/pmd 2016-11-14 20:14:25 +01:00
Juan Martín Sotuyo Dodero f3bda99275 Update changelog 2016-11-14 20:07:03 +01:00
Juan Martín Sotuyo Dodero e4dc70c5d5 [java] Properly handle enums with ignore identifiers
- Right now it throws an NPE
 - Having fixed the NPE, it threw an ArrayIndexOutOfBounds
 - Finally, it was just not working as expected
 - Fixes https://sourceforge.net/p/pmd/bugs/1542/
2016-11-14 20:06:41 +01:00
sergey 63bd594510 [plsql] fixed multiline SELECT parse
fixed multiline SELECT parse. Parsing skips SELECT statements to the ';'
delimiter or end of line. If statement terminated by the end of line,
next line starting from the middle of SELECT statement will fail to
parse. For example,
SELECT 1
INTO V
FROM DUAL;
will fail.
2016-11-14 10:03:06 +03:00
Juan Martín Sotuyo Dodero 57256ec685 Update changelog 2016-11-14 01:11:19 -03:00
Juan Martín Sotuyo Dodero 0abeb8d07e Make RuleSetFactory immutable
- By being thread-safe, we can stop synchronizing on all methods
2016-11-14 00:48:58 -03:00
sergey 3b4063138c missing change in PLSQLParserVisitorAdapter
missing change in PLSQLParserVisitorAdapter
2016-11-12 22:11:17 +03:00
sergey 4179368a0e Added correct parse of IS [NOT] NULL
fixed crash of parsing following code (from unittest):
IF V_BUF IS NULL THEN
null;
end if;
2016-11-12 22:00:29 +03:00
Juan Martín Sotuyo Dodero 0d684d2565 Update changelog 2016-11-11 20:42:41 -03:00
Juan Martín Sotuyo Dodero 2deb07f312 Final touches & license
- indentation fixes, missing licenses, some javadoc, complete some TODOs
2016-11-11 20:39:15 -03:00
Juan Martín Sotuyo Dodero 8d29af42b3 Improve PMDConfiguration and javadocs 2016-11-11 20:39:15 -03:00
Juan Martín Sotuyo Dodero 4dad69c9de Tidy up final test cases 2016-11-11 20:39:15 -03:00
Juan Martín Sotuyo Dodero bd574644d0 Remove FileAnalysisCache factory method
- A simple constructor will work just fine.
 - Plus, this makes it even more obvious that no exceptions / null values
    are to be expected when loading a cache from file, even when it's invalid
    or badly configured.
2016-11-11 20:39:15 -03:00
Juan Martín Sotuyo Dodero 0c9e7e7269 Order is important to checksum computation
- Make sure the `ruleSet` collection has a consistent access order.
2016-11-11 20:39:15 -03:00
Juan Martín Sotuyo Dodero c0250a678b Refactor FileAnalysisCache
- Split the generic cache implementation from the file-backing persistence
    strategy. This could probably work better as a composition rather than
    inheritance, but we will take it one step at a time.
 - Took the chance to improve error messages produces by FileAnalysisCache
2016-11-11 20:39:15 -03:00
Juan Martín Sotuyo Dodero 71df067a0d Consider classpath and ruleset for cache invalidation
- Not completely convinced by this implementation, but is simple enough
    and it's working.
2016-11-11 20:39:15 -03:00
Juan Martín Sotuyo Dodero cbb3d39e33 Basic analysis cache implementation
- Only invalidated by PMD version change.
 - Hooked to CLI and ANT.
 - A NOOP and a File based implementations available.
 - Unit tested where possible.
 - Still several TODOs to handle.
2016-11-11 20:39:15 -03:00
Juan Martín Sotuyo Dodero 3a97d94cf1 Update changelog 2016-11-11 20:37:53 -03:00
Juan Martín Sotuyo Dodero 8d216cec2b Avoid creating a new String to qualify types
- This is now slightly faster, which for a method that gets called
    over 1 million times on large projects is significant.
 - We should still look for ways to reduce the number of calls to this
    method.
2016-11-11 20:07:22 -03:00
Juan Martín Sotuyo Dodero ebb3363134 Update changelog 2016-11-10 10:43:21 -03:00
Juan Martín Sotuyo Dodero a7b46723c8 [java] Properly handle enums with ignore identifiers
- Right now it throws an NPE
 - Having fixed the NPE, it threw an ArrayIndexOutOfBounds
 - Finally, it was just not working as expected
 - Fixes https://sourceforge.net/p/pmd/bugs/1542/
2016-11-10 10:41:50 -03:00
Juan Martín Sotuyo Dodero 938092cd14 Update changelog 2016-11-10 10:07:13 -03:00
Juan Martín Sotuyo Dodero f3dcc26bc9 [apex] Add failing sample for issue #1543 2016-11-10 10:07:13 -03:00
Juan Martín Sotuyo Dodero a09f9dfcbf Merge branch 'pr-123' into pmd/5.5.x 2016-11-10 10:02:50 -03:00
Juan Martín Sotuyo Dodero c664b6c0a8 Update changelog 2016-11-10 09:52:37 -03:00
Jerome Russ bf2460c16d Changing methods to lowercase so casing doesn't matter
Apex is case-insensitive so removing casing from the check for asserts.
2016-11-10 09:47:40 -03:00
Juan Martín Sotuyo Dodero 89674fa007 [apex] Add failing sample for issue #1543 2016-11-10 09:46:35 -03:00
Jerome Russ 966d8f94f8 Changing methods to lowercase so casing doesn't matter
Apex is case-insensitive so removing casing from the check for asserts.
2016-11-08 16:27:27 -06:00
Andreas Dangel 35605a5801 Change version to 5.6.0-SNAPSHOT on master 2016-11-06 17:38:37 +01:00
Andreas Dangel e9d9bbf597 Upgrade maven-pmd-plugin to 3.7 2016-11-05 12:44:16 +01:00
Andreas Dangel e8b5aaa2be Prepare next development version 2016-11-05 12:04:23 +01:00
Andreas Dangel 5f13cc20e9 [maven-release-plugin] prepare for next development iteration 2016-11-05 11:02:08 +01:00
Andreas Dangel 96fffcaadd [maven-release-plugin] prepare release pmd_releases/5.5.2 2016-11-05 11:02:08 +01:00
Andreas Dangel 93aec5d064 Prepare pmd release 5.5.2 2016-11-05 10:55:17 +01:00
Andreas Dangel 37156724aa Merge branch 'pmd/5.4.x' 2016-11-05 10:43:02 +01:00
Andreas Dangel ed07ff259c Prepare next development version 2016-11-04 21:58:29 +01:00
Andreas Dangel e78f80416a [maven-release-plugin] prepare for next development iteration 2016-11-04 21:01:18 +01:00
Andreas Dangel 5019eb11e4 [maven-release-plugin] prepare release pmd_releases/5.4.3 2016-11-04 21:01:18 +01:00
Andreas Dangel 194167e3c0 Prepare pmd release 5.4.3 2016-11-04 20:53:46 +01:00
Andreas Dangel aa19957cee Merge branch 'pmd/5.3.x' into pmd/5.4.x 2016-11-04 20:31:53 +01:00
Andreas Dangel 253d35a926 Update release script 2016-11-04 20:24:51 +01:00
Andreas Dangel 6007840346 Prepare next development version 2016-11-04 19:58:50 +01:00
Andreas Dangel dcb4ecc674 [maven-release-plugin] prepare for next development iteration 2016-11-04 19:02:30 +01:00
Andreas Dangel 14cdf0b550 [maven-release-plugin] prepare release pmd_releases/5.3.8 2016-11-04 19:02:30 +01:00
Andreas Dangel 40ed778e43 Prepare pmd release 5.3.8 2016-11-04 18:37:25 +01:00
Andreas Dangel 92153696d8 Merge branch 'bug-1520' 2016-11-04 16:28:44 +01:00
Andreas Dangel 33e1850d6b Merge branch 'bug-1520' into pmd/5.4.x 2016-11-04 16:24:55 +01:00
Andreas Dangel 3a46e9bab2 Merge branch 'bug-1520' into pmd/5.3.x 2016-11-04 16:24:48 +01:00
Andreas Dangel d7b8bae1c9 plsql: adjust code samples, since "ONLY" is now a keyword 2016-11-04 16:21:25 +01:00
Andreas Dangel 4ab1d0cbee Fixes #1520 [plsql] Missing PL/SQL language constructs in parser: Is Of Type, Using 2016-11-04 16:10:07 +01:00
Andreas Dangel 52a8758262 Merge branch 'bug-1532' 2016-11-04 12:49:26 +01:00
Andreas Dangel 7bfc1b9545 Merge branch 'bug-1532' into pmd/5.4.x 2016-11-04 12:47:21 +01:00
Andreas Dangel 8444b2fea6 Merge branch 'bug-1532' into pmd/5.3.x 2016-11-04 12:46:05 +01:00
Andreas Dangel a9d0de9450 Fixes #1532 [java] CloneMethodMustImplementCloneable: Implemented Interface extends Cloneable 2016-11-04 12:41:57 +01:00
Andreas Dangel 2c7f2ec0df Merge branch 'feature-1539' 2016-11-04 11:20:11 +01:00
Andreas Dangel cec3e1a2ad plsql: add new rule "MisplacedPragma"
#1539 [plsql] Create new rule for strict syntax checking: MisplacedPragma
2016-11-04 11:19:52 +01:00
Andreas Dangel 176eda21fe Merge branch 'bug-1527' 2016-11-04 10:34:39 +01:00
Andreas Dangel 276cff02f8 Merge branch 'bug-1527' into pmd/5.4.x 2016-11-04 10:30:46 +01:00
Andreas Dangel 08b7959557 Merge branch 'bug-1527' into pmd/5.3.x 2016-11-04 10:23:33 +01:00
Andreas Dangel 495dcb5ea9 Fixes #1527 [plsql] PRAGMA AUTONOMOUS_TRANSACTION gives processing errors 2016-11-04 10:19:24 +01:00
Andreas Dangel 6810b9c54a Merge branch 'bug-1521' 2016-11-04 09:45:27 +01:00
Andreas Dangel 9f9124b8fb Fixes #1521 [apex] ApexUnitTestClassShouldHaveAsserts: Parsing error on APEX class: expected one element but was: <BlockStatement, BlockStatement> 2016-11-04 09:44:23 +01:00
Andreas Dangel 6dcf301e4d Merge branch 'bug-1490' 2016-11-04 08:55:45 +01:00
Andreas Dangel 8c89ce0d9d Merge branch 'bug-1490' into pmd/5.4.x 2016-11-04 08:49:59 +01:00
Andreas Dangel 15ff7ca944 Fixes #1490 [java] PMD Error while processing - NullPointerException 2016-11-04 08:46:00 +01:00
Andreas Dangel ba50b3183e Refactor out AbstractLombokAwareRule 2016-11-02 20:34:50 +01:00
Andreas Dangel e611dc8412 Merge branch 'bug-1494' 2016-11-02 20:27:22 +01:00
Andreas Dangel 4ac34af067 Merge branch 'bug-1494' into pmd/5.4.x 2016-11-02 20:22:53 +01:00
Andreas Dangel 0c75e5123c Fixes #1494 [java] SingularField: lombok.Data false positive 2016-11-02 20:22:15 +01:00
Andreas Dangel cc94ed4c33 Add missing sites for sub modules (java8, test, ui)
Add missing sub module site menu (groovy, java8, perl, swift, test, ui)
2016-11-02 19:51:43 +01:00
Andreas Dangel 9be65ef2eb Add unit test for #1537 Implement strict ruleset parsing 2016-11-01 18:30:39 +01:00
Andreas Dangel 67ddaafe44 Merge branch 'fix1531' of https://github.com/fjalvingh/pmd 2016-10-30 19:23:11 +01:00
Andreas Dangel db26052236 Merge branch 'pr-119' 2016-10-30 19:22:53 +01:00
Andreas Dangel 5827acb93e Merge branch 'pr-119' into pmd/5.4.x 2016-10-30 19:17:26 +01:00
Andreas Dangel 7339227e9c Merge branch 'pr-119' into pmd/5.3.x 2016-10-30 19:16:52 +01:00
Andreas Dangel 2cc91732ec Update changelog 2016-10-30 19:11:54 +01:00
Frits Jalvingh 4310b36344 Fix PMD issue 1531- endless loop followed by OOM while parsing (PL)SQL 2016-10-30 19:09:11 +01:00
Andreas Dangel 575a5b6547 Add unit test for #1531 [plsql] OOM/Endless loop while parsing (PL)SQL 2016-10-30 19:08:00 +01:00
Andreas Dangel 1f046cd7e9 Update credits 2016-10-30 19:01:47 +01:00
Andreas Dangel 5937e89d4f Merge branch 'pr-118' 2016-10-30 18:59:10 +01:00
Andreas Dangel 7791a87c23 Update changelog 2016-10-30 18:52:17 +01:00
Andreas Dangel 2158a792ff Merge branch 'simplify-variable-declarator-id-parsing' of https://github.com/Monits/pmd into pr-118
# Conflicts:
#	pmd-java/etc/grammar/Java.jjt
2016-10-30 18:51:44 +01:00
Andreas Dangel 2f498d1130 Merge branch 'pr-117' 2016-10-30 18:48:53 +01:00
Andreas Dangel 0ba362c4c0 Update changelog 2016-10-30 18:38:52 +01:00
Andreas Dangel 2f5a7058cb Merge branch 'faster-symbol' of https://github.com/Monits/pmd into pr-117 2016-10-30 18:38:08 +01:00
Andreas Dangel b2a66fef01 Merge branch 'pr-116' 2016-10-30 18:32:44 +01:00
Andreas Dangel fa9485b41e Update changelog 2016-10-30 18:26:10 +01:00
Andreas Dangel c6680e2f66 Merge branch 'better-collections' of https://github.com/Monits/pmd into pr-116 2016-10-30 18:25:35 +01:00
Andreas Dangel 5db46d6ad1 Merge branch 'pr-115' 2016-10-30 18:22:00 +01:00
Andreas Dangel 4cf22bed16 Update changelog 2016-10-30 18:14:59 +01:00
Andreas Dangel 15b36498f3 More test cases for lambda parsing 2016-10-30 18:14:23 +01:00
Andreas Dangel 10e4cc7290 Merge branch 'faster-parse' of https://github.com/Monits/pmd into pr-115
# Conflicts:
#	pmd-java/etc/grammar/Java.jjt
2016-10-30 18:12:54 +01:00
Andreas Dangel 949470013a Merge branch 'pr-114' 2016-10-30 17:51:43 +01:00
Andreas Dangel bdde3533dc Update changelog 2016-10-30 17:44:56 +01:00
Andreas Dangel bdb408507b Merge branch 'remove-dead-code' of https://github.com/Monits/pmd into pr-114 2016-10-30 17:39:48 +01:00
Andreas Dangel 6fb962c326 Merge branch 'sdte-java8-compat' of https://github.com/Monits/pmd 2016-10-30 17:32:08 +01:00
Andreas Dangel 2d1337b300 Merge branch 'pr-113' 2016-10-30 17:31:50 +01:00
Andreas Dangel 315ea28d4c Merge branch 'pr-113' into pmd/5.4.x 2016-10-30 17:25:47 +01:00
Andreas Dangel 45dfd29a46 Merge branch 'pr-113' into pmd/5.3.x 2016-10-30 17:25:14 +01:00
Andreas Dangel f8f0afb5b4 Update changelog 2016-10-30 17:21:18 +01:00
Juan Martín Sotuyo Dodero f8d1162886 Fix ClassCastException on SignatureDeclareThrowsException
- Java 8 code allows for things such as
   `class UnmodifiableList<T> implements @Readonly List<@Readonly T> {}`
    where not all token in the ASTImplementsList are ASTClassOrInterfaceType
2016-10-30 17:19:16 +01:00
Andreas Dangel 020170bd76 Add test for #1535 [java] SignatureDeclareThrowsException: ClassCastException with Annotation 2016-10-30 17:18:31 +01:00
Andreas Dangel cb304c9ae7 Merge branch 'cmmic-java8-compat' of https://github.com/Monits/pmd 2016-10-29 18:34:43 +02:00
Andreas Dangel 646a4b0650 Merge branch 'pr-112' 2016-10-29 18:34:00 +02:00
Andreas Dangel b0fb0cadc1 Merge branch 'pr-112' into pmd/5.4.x 2016-10-29 18:28:36 +02:00
Andreas Dangel 5c80473108 Merge branch 'pr-112' into pmd/5.3.x 2016-10-29 18:27:56 +02:00
Andreas Dangel 9de0727e43 Update changelog 2016-10-29 18:21:55 +02:00
Andreas Dangel 127a2be871 whitespaces 2016-10-29 18:19:59 +02:00
Juan Martín Sotuyo Dodero 238f6b721b Fix ClassCastException on CloneMethodMustImplementCloneable
- Java 8 code allows for things such as
    `class UnmodifiableList<T> implements @Readonly List<@Readonly T> {}`
    where not all token in the ASTImplementsList are ASTClassOrInterfaceType
2016-10-29 18:19:00 +02:00
Andreas Dangel f4f2402661 Add test for #1534 [java] CloneMethodMustImplementCloneable: ClassCastException with Annotation (java8) 2016-10-29 18:17:59 +02:00
Andreas Dangel 75c9cce071 Merge branch 'birule-java8-compat' of https://github.com/Monits/pmd 2016-10-29 17:25:02 +02:00
Andreas Dangel 04257e657d Merge branch 'pr-111' 2016-10-29 17:24:40 +02:00
Andreas Dangel b2c59bcbdb Merge branch 'pr-111' into pmd/5.4.x 2016-10-29 17:20:32 +02:00
Andreas Dangel c95051e97d Merge branch 'pr-111' into pmd/5.3.x 2016-10-29 17:19:47 +02:00
Andreas Dangel 7d5be34cd2 Update changelog 2016-10-29 17:16:01 +02:00
Juan Martín Sotuyo Dodero 1e5c1c05ca In Java 8, annotations may appear as first child
- For instance `Object o = new @Interned MyObject();` would fail with a ClassCastException
 - The current code deals with it gracefully
2016-10-29 17:13:33 +02:00
Andreas Dangel 5d11e77208 Add test for #1533 [java] BooleanInstantiation: ClassCastException with Annotation 2016-10-29 17:12:20 +02:00
Frits Jalvingh 42d5a402c7 Fix PMD issue 1531- endless loop followed by OOM while parsing (PL)SQL 2016-10-18 17:41:08 +02:00
Andreas Dangel e7a68f4492 Merge branch 'pr-110' 2016-10-16 14:15:04 +02:00
Andreas Dangel f88e86cdb1 Merge branch 'bug-1530' 2016-10-16 14:14:30 +02:00
Andreas Dangel 578d854632 Merge branch 'bug-1530' into pmd/5.4.x 2016-10-16 14:08:13 +02:00
Andreas Dangel 1bc409119c Update changelog, fixes #1530 [java] Parser exception on Java code 2016-10-16 14:07:56 +02:00
Juan Martín Sotuyo Dodero 283dc00a43 Replace syntactic lookahead with semantic one
- They are the same, but JavaCC seems to handle this one better.
2016-10-16 14:01:26 +02:00
Juan Martín Sotuyo Dodero e9f14e4496 Add failing test scenario 2016-10-16 13:59:17 +02:00
Juan Martín Sotuyo Dodero 9b7372eec0 Minor improvements
- Typos, extra whitespace, a missing static, clearer loops..
2016-10-15 02:55:02 -03:00
Juan Martín Sotuyo Dodero 8c82dae34c Fully implemente couldResolve 2016-10-14 19:35:32 -03:00
Juan Martín Sotuyo Dodero 565a9aa0d8 Add a cache to ImplicitImportResolver
- Classes in java.lang.* aren't that many, yet they hit a lot (String,
    all boxed primitives, Math, etc.), so it makes sense to cache them
2016-10-14 18:59:52 -03:00
Juan Martín Sotuyo Dodero d350bcb49e Make explicit imports orders of times faster
- We can tell if a name can be resolved or not, and we can do so in
    constant time.
2016-10-14 16:06:28 -03:00
Juan Martín Sotuyo Dodero 567be45b8c Simplify VariableDeclaratorId parsing
- Don't look for arrays where there can be none
2016-10-14 10:06:29 -03:00
Juan Martín Sotuyo Dodero 478ed3463c Simplify lambda pursing even further
- Remove a redundant case
 - Restrict grammar according to spec with a simpler scenario
2016-10-14 09:24:06 -03:00
Juan Martín Sotuyo Dodero 09ac963709 Improve SymbolTable times further
- Expand hashCode calculation for `MethodNameDeclaration` to avoid collisions
    when overloading.
 - Also make sure `builtInMethodDeclaration` provides a complete syntax tree to avoid NPE
    when calling `hashCode` or `equals`
2016-10-13 20:40:46 -03:00
Juan Martín Sotuyo Dodero d8344b0672 Simplify varargs detection
- Make use of our Java knowledge when analyzing Java code
2016-10-13 18:03:51 -03:00
Juan Martín Sotuyo Dodero 382699b766 Improve type resolution
- Notice the `couldResolve` doesn't guarantee a positive resolution, but still
     manages to kill early some resolver checks
 - `PrimiiveTypeResolver.resolve()` and `VoidTypeResolver.resolve()`
     were the 2nd and 5th most time consuming methods on several profiles
     I ran. This change fixes it.
2016-10-13 18:03:31 -03:00
Juan Martín Sotuyo Dodero be83d154d0 Don't assume the List supports random access 2016-10-13 17:17:43 -03:00
Juan Martín Sotuyo Dodero 42277d7b8d Simplify collection expressions 2016-10-13 17:17:17 -03:00
Juan Martín Sotuyo Dodero a046b8f93d Simplify lambda parsing
- Handle less scenarios
 - Have scenarios be defined more broadly (ie: allow more than 3 params)
 - This improves parsing performance by roughly ~10%
2016-10-13 14:53:51 -03:00
Juan Martín Sotuyo Dodero df9893099f No PMD version supports running on JRE5 anymore
- Remove dead code to guard against JRE5 issues
2016-10-13 01:59:19 -03:00
Juan Martín Sotuyo Dodero 61b55bd7e5 Minor improvements
- Use `Deque` and `ArrayDeque` instead of `Stack`
 - Use presized `ArrayList` instead of a dynamic `LinkedList` when possible
 - Don't create empty `HashSet` when `Collections.emptySet()` suffices
 - User `Collections.singletonList()` were apropriate
2016-10-13 01:53:47 -03:00
Juan Martín Sotuyo Dodero 8f62f6cae9 In Java 8, annotations may appear as first child
- For instance `Object o = new @Interned MyObject();` would fail with a ClassCastException
 - The current code deals with it gracefully
2016-10-12 21:20:48 -03:00
Juan Martín Sotuyo Dodero ca2ccb4a80 Fix ClassCastException on SignatureDeclareThrowsException
- Java 8 code allows for things such as
   `class UnmodifiableList<T> implements @Readonly List<@Readonly T> {}`
    where not all token in the ASTImplementsList are ASTClassOrInterfaceType
2016-10-12 18:06:52 -03:00
Juan Martín Sotuyo Dodero 3774a22878 Fix ClassCastException on CloneMethodMustImplementCloneable
- Java 8 code allows for things such as
    `class UnmodifiableList<T> implements @Readonly List<@Readonly T> {}`
    where not all token in the ASTImplementsList are ASTClassOrInterfaceType
2016-10-12 18:01:03 -03:00
Juan Martín Sotuyo Dodero a10f98e0c4 Replace syntactic lookahead with semantic one
- They are the same, but JavaCC seems to handle this one better.
2016-10-12 16:58:33 -03:00
Juan Martín Sotuyo Dodero a50c781d0a Add failing test scenario 2016-10-12 14:18:29 -03:00
Juan Martín Sotuyo Dodero fccd26b2d0 Dont use synchronized structures onnon-shared data
- AFAIK ScopeAndDeclarationFinder is only used as a local,
    used as alocal by SymbolFacade, used as a local by SourceCodeProcessor.
    Synchronizing is needless.
2016-10-11 17:48:39 -03:00
Andreas Dangel b773da1441 Merge branch 'bug-1529' 2016-10-01 17:58:53 +02:00
Andreas Dangel 1b52e0192a Merge branch 'bug-1529' into pmd/5.4.x 2016-10-01 17:54:11 +02:00
Andreas Dangel 461365f543 Merge branch 'bug-1529' into pmd/5.3.x 2016-10-01 17:49:33 +02:00
Andreas Dangel 8667aea076 Fixes #1529 [java] UnusedImports: The created rule violation has no class name 2016-10-01 17:45:47 +02:00
Andreas Dangel aec40ec20c groovy: fix GroovyLanguage not in src/main 2016-09-26 20:10:11 +02:00
Andreas Dangel 82cc8b1d50 groovy: Add groovy to pmd-dist 2016-09-26 20:10:08 +02:00
Andreas Dangel f9deb34809 Merge branch 'bug-1522' 2016-09-25 18:42:51 +02:00
Andreas Dangel 354b9a9cbc Merge branch 'bug-1522' into pmd/5.4.x 2016-09-25 18:37:38 +02:00
Andreas Dangel b07c2f4409 Merge branch 'bug-1522' into pmd/5.3.x 2016-09-25 18:36:47 +02:00
Andreas Dangel db44bc4745 Fixes #1522 [java] CommentRequired: false positive 2016-09-25 18:32:26 +02:00
Andreas Dangel b67ac6ff2b Merge branch 'pr-107' 2016-09-25 17:01:46 +02:00
Andreas Dangel ccc09c5d4f Update changelog 2016-09-25 16:58:55 +02:00
Andreas Dangel 108e302bb1 Merge branch 'cpd-groovy' of https://github.com/Monits/pmd into pr-107 2016-09-25 16:51:10 +02:00
JosephAllen 106142b25c Update index.md 2016-09-12 16:46:12 -04:00
Juan Martín Sotuyo Dodero f01cc473d2 Initial support for CPD Groovy 2016-09-11 14:12:17 -03:00
JosephAllen e88c2bde90 Updated Favicon 2016-09-10 18:33:44 -04:00
JosephAllen b48228044d uploaded favicon.ico 2016-09-10 18:29:55 -04:00
JosephAllen 120eca7224 Removed favicon 2016-09-10 18:26:31 -04:00
JosephAllen d20d5e3615 Adding Favicon 2016-09-10 18:25:29 -04:00
JosephAllen ecf75728fa Minor text updates 2016-09-10 17:15:09 -04:00
JosephAllen 423e032a86 Udpated How it works page 2016-09-10 17:13:43 -04:00
JosephAllen b2a3725a8f Changed Index page label on Sidebar 2016-09-10 17:06:01 -04:00
JosephAllen 1c2727166c Udpated Sidebar 2016-09-10 16:30:29 -04:00
JosephAllen d3b5c22433 Added How it works to Sidbar 2016-09-10 16:28:00 -04:00
JosephAllen 19b15cb37a Formatting Updates 2016-09-10 00:27:22 -04:00
JosephAllen 0ff3645f71 Major Documentation Updates 2016-09-10 00:07:47 -04:00
JosephAllen 713a9e091e Added Customizing Pages 2016-09-09 20:27:54 -04:00
JosephAllen a729ab11b5 Updated Relase Notes 2016-09-09 17:11:22 -04:00
JosephAllen 0cfe784b63 Update README.md 2016-09-07 22:26:46 -04:00
JosephAllen f55a1ddf06 Update for image handling 2016-09-07 22:24:55 -04:00
JosephAllen e77e8bf65f Many Updates 2016-09-07 22:17:39 -04:00
JosephAllen d69b9f8ad0 Notes Update 2016-09-07 21:12:28 -04:00
JosephAllen f06290e348 5.4.0 Release Notes 2016-09-07 21:09:55 -04:00
JosephAllen 52109dda2c New Release Note 2016-09-07 21:06:21 -04:00
JosephAllen 3e47866b9e Deleted Deprecated Pages 2016-09-07 20:56:30 -04:00
JosephAllen de0e9cce62 Sidebar Update 2016-09-07 20:54:28 -04:00
JosephAllen 33a385ce1e Updated Release Notes 2016-09-07 20:52:34 -04:00
JosephAllen 63b59fbe67 Update README.md 2016-09-07 20:45:41 -04:00
JosephAllen a8517daf85 Update README.md 2016-09-07 20:45:17 -04:00
JosephAllen 5783e262f8 Release Notes Update 2016-09-07 20:41:14 -04:00
JosephAllen a007e89659 Release Notes as Blog Posts 2016-09-07 20:29:11 -04:00
JosephAllen bba201d44e Sidebar Update 2016-09-07 20:24:18 -04:00
JosephAllen 323a3e5943 New Release Notes Path 2016-09-07 20:22:40 -04:00
JosephAllen 5be5088b4e Removed Deprecated Pages 2016-09-07 20:12:09 -04:00
JosephAllen 53730a6713 Sidebar udpate 2016-09-07 20:10:22 -04:00
JosephAllen 08dfa205db Release Notes 2016-09-07 20:09:35 -04:00
JosephAllen df382d4425 Release Notes 2016-09-07 20:08:44 -04:00
JosephAllen 7aaab9c276 5.4.1 release notes 2016-09-07 20:07:27 -04:00
JosephAllen cdb0daa2f8 Updates 2016-09-07 20:03:00 -04:00
JosephAllen 8db0d07e54 Release Notes 2016-09-07 20:01:53 -04:00
JosephAllen f4ed395924 Added 5.4.2 Release notes 2016-09-07 20:00:50 -04:00
JosephAllen db73069a3b Updates for the release notes path 2016-09-07 19:55:16 -04:00
JosephAllen b7542f559f Udpates to Support Custom Tags 2016-09-07 19:32:46 -04:00
JosephAllen 9c43cb3d08 Create new Tag page 2016-09-07 19:24:26 -04:00
JosephAllen c4800b8369 Again 2016-09-07 19:21:40 -04:00
JosephAllen 889978dfed Changelog 2016-09-07 19:18:03 -04:00
JosephAllen 5c084d453a More 2016-09-07 19:15:21 -04:00
JosephAllen 0a010fc548 More 2016-09-07 19:12:54 -04:00
JosephAllen 7f55f4aedc MOre Udpates 2016-09-07 19:11:47 -04:00
JosephAllen 1d41c98808 Updated Release Notes 2016-09-07 19:10:38 -04:00
JosephAllen 0806e645bc Updated Release Notes 2016-09-07 19:07:45 -04:00
JosephAllen 1b08556aec Updated Sidebar 2016-09-07 18:54:46 -04:00
JosephAllen 4e2ca2b898 More condif Updates 2016-09-07 18:52:38 -04:00
JosephAllen f73ada0698 More Udpates 2016-09-07 18:49:48 -04:00
JosephAllen a98a96307f Updated Config 2016-09-07 18:48:38 -04:00
JosephAllen 25043414d4 Index Update 2016-09-07 18:33:08 -04:00
JosephAllen c8d4ee8fae Updating Theme 2016-09-07 18:23:55 -04:00
JosephAllen af06642705 Updated mydoc_introduction.md 2016-09-07 18:13:46 -04:00
JosephAllen e947459280 Updated intro 2016-09-07 17:41:23 -04:00
JosephAllen 15eb11732d Updated GemLock 2016-09-07 17:33:21 -04:00
JosephAllen 150e143dd4 Moved Site file back 2016-09-07 17:29:50 -04:00
JosephAllen 327192d2a5 Moved Read.md 2016-09-07 17:21:58 -04:00
JosephAllen e41a3c0f2c Removed Unneeded file 2016-09-07 17:21:00 -04:00
JosephAllen 4007247f11 Moved to Site folder to Match Current Site 2016-09-07 17:20:24 -04:00
JosephAllen 73e79c67dc Test 2016-09-07 17:19:09 -04:00
JosephAllen 62ede752c5 Setup 2016-09-07 17:18:31 -04:00
JosephAllen a902912b59 Update mydoc_introduction.md 2016-09-07 16:45:47 -04:00
JosephAllen 6fe7eab7ac Update mydoc_introduction.md 2016-09-07 16:45:19 -04:00
Joseph Allen 24eaf59199 3rd Committ 2016-09-07 16:43:10 -04:00
Joseph Allen 4af5170365 2nd Commit 2016-09-07 16:39:23 -04:00
Joseph Allen c0fee28409 1st Committ 2016-09-07 16:10:48 -04:00
JosephAllen 91058640f0 Initial commit 2016-09-07 14:32:22 -04:00
Andreas Dangel 2fc01fedb5 Add readme 2016-09-06 21:10:56 +02:00
Andreas Dangel 522d0ea311 Verify #1519 [java] UselessParenthesis: False Positive: "Prohibits the use of useless parentheses" when more than one line 2016-09-02 18:22:43 +02:00
Andreas Dangel 093a813c0f Merge branch 'pr-106' 2016-09-02 18:11:49 +02:00
Andreas Dangel a99c506342 Update changelog 2016-09-02 18:06:00 +02:00
Andreas Dangel 1693692f80 Merge branch 'cpd-no-ignore-constructor' of https://github.com/Monits/pmd into pr-106 2016-09-02 18:04:39 +02:00
Andreas Dangel 2245a644f4 example toolchains.xml - add examples for macosx and windows 2016-09-02 17:32:11 +02:00
Juan Martín Sotuyo Dodero 579853385d Keep constructor names under ignoreIdentifiers
- Unrelated classes that just happen to have matching constructor types
    (maybe sibling classes extening the same base class, and simply
    calling super on all constructors) should not be reported as copy-paste
 - If you copied a whole class, CPD should still match it due to other
    member methods / fields, only case it would no longer catch is that of
    a class exclusively containing constructors, but that should probably be
    a PMD rule, and not catched by CPD itself
2016-09-01 16:57:24 -03:00
Andreas Dangel c8a9f43ee0 Refactor InvalidSlf4jMessageFormatRule 2016-08-07 11:59:36 +02:00
Andreas Dangel cd9a8186db reformat, whitespaces 2016-08-07 11:52:50 +02:00
Andreas Dangel 3bb9d90de8 Merge branch 'bug-1506' 2016-08-07 11:16:05 +02:00
Andreas Dangel d294a91ad8 Merge branch 'bug-1506' into pmd/5.4.x 2016-08-07 11:08:22 +02:00
Andreas Dangel 7421f28414 Merge branch 'bug-1506' into pmd/5.3.x 2016-08-07 10:53:32 +02:00
Andreas Dangel cf4938a65b Fixes #1506 [core] When runing any RuleTst, start/end methods not called 2016-08-07 10:44:44 +02:00
Andreas Dangel 6aee2dd232 Merge branch 'bug-1500' 2016-08-05 11:16:32 +02:00
Andreas Dangel a74105faa4 Fixes #1500 [java] InvalidSlf4jMessageFormat: doesn't ignore exception param 2016-08-05 11:08:36 +02:00
Andreas Dangel 869ee8569e verify #1505 [java] ConstantsInInterface false negative 2016-08-03 20:06:02 +02:00
Andreas Dangel 8a6ac1f156 Merge branch 'bug-1509' 2016-08-03 19:56:59 +02:00
Andreas Dangel a6acf7ca81 Fixes #1509 [java] InvalidSlf4jMessageFormat NPE 2016-08-03 19:43:10 +02:00
Andreas Dangel 4bb02531c7 Use new pmd for m-pmd-plugin 2016-07-28 20:12:38 +02:00
Andreas Dangel 0a2ebc2186 Formatting, license header 2016-07-28 19:44:16 +02:00
Andreas Dangel 3e43fd8eb1 Update (old) changelog for new rules with PMD 5.5.1 2016-07-28 19:44:04 +02:00
Andreas Dangel 5207d48bb2 Prepare next development version 2016-07-27 22:03:51 +02:00
Andreas Dangel 6746b7522c [maven-release-plugin] prepare for next development iteration 2016-07-27 20:40:56 +02:00
Andreas Dangel 5b6580448e #1508 - Only close the classloader if its ours 2016-07-27 19:43:31 +02:00
Andreas Dangel 7578875cbd #1508 - Only close the classloader if its ours 2016-07-26 21:49:33 +02:00
Andreas Dangel 42a5c6a537 Merge branch 'bug-1508' into pmd/5.4.x 2016-07-26 21:42:55 +02:00
Andreas Dangel 229fc57073 Merge branch 'bug-1508' into pmd/5.3.x 2016-07-26 21:39:17 +02:00
Andreas Dangel 9240f98cce Merge branch 'pr-103' into pmd/5.4.x 2016-07-07 22:35:26 +02:00
Andreas Dangel 4adbeb04f1 Merge branch 'pr-103' into pmd/5.3.x 2016-07-07 22:34:30 +02:00
Andreas Dangel e25bd5e9c1 Merge branch 'bug-1499' into pmd/5.4.x 2016-07-02 16:54:50 +02:00
Andreas Dangel c041f756c2 Merge branch 'bug-1499' into pmd/5.3.x 2016-07-02 16:49:19 +02:00
Andreas Dangel c92820eaae Merge branch 'pr-35' into pmd/5.4.x 2016-06-12 18:51:09 +02:00
Andreas Dangel 6efabd6909 Merge branch 'pr-35' into pmd/5.3.x 2016-06-12 18:50:07 +02:00
4493 changed files with 309161 additions and 145066 deletions

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
* text=auto
*.java text
*.xml text
*.jjt text
*.jj text
*.g4 text
*.md text
*.sh text eol=lf
*.bat text eol=crlf
mvnw.cmd text eol=crlf
*.png -text
*.jpg -text
*.svgz -text
*.jar -text
+20
View File
@@ -0,0 +1,20 @@
<!-- Please, prefix the report title with the language it applies to within brackets, such as [java] or [apex].
If not specific to a language, you can use [core]. -->
<!-- NB: issues about the rule designer should be opened at https://github.com/pmd/pmd-designer/issues -->
**Affects PMD Version:**
**Rule:**
**Description:**
**Code Sample demonstrating the issue:**
```
```
**Running PMD through:** *[CLI | Ant | Maven | Gradle | Designer | Other]*
<!-- If relevant, also include your JDK and OS information, e.g. for ClassNotFoundException, LinkageError, reflection failures, etc. -->
+10
View File
@@ -0,0 +1,10 @@
<!--
Please, prefix the PR title with the language it applies to within brackets, such as *[java]* or *[apex]*. If not specific to a language, you can use *[core]*
-->
Before submitting a PR, please check that:
- [ ] The PR is submitted against `master`. The PMD team will merge back to support branches as needed.
- [ ] `./mvnw clean verify` passes. This will [build](https://github.com/pmd/pmd/blob/master/BUILDING.md) and test PMD, execute PMD and checkstyle rules. [Check this for more info](https://github.com/pmd/pmd/blob/master/CONTRIBUTING.md#code-style)
**PR Description:**
+6
View File
@@ -10,3 +10,9 @@ bin/
.idea
*.patch
*/src/site/site.xml
pmd-core/dependency-reduced-pom.xml
.bundle
vendor
# rule docs are generated
docs/pages/pmd/rules
+117
View File
@@ -0,0 +1,117 @@
/*
* Copyright 2007-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
BIN
View File
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
-21
View File
@@ -1,21 +0,0 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
<mirrors/>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>
-34
View File
@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<!-- place this file in ${user.home}/.m2/toolchains.xml -->
<!-- see: https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_java/templates/ubuntu/jdk_switcher.sh.erb -->
<toolchain>
<type>jdk</type>
<provides>
<version>1.6</version>
</provides>
<configuration>
<jdkHome>/usr/lib/jvm/java-6-openjdk-amd64</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>1.7</version>
</provides>
<configuration>
<jdkHome>/usr/lib/jvm/java-7-openjdk-amd64</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>1.8</version>
</provides>
<configuration>
<jdkHome>/usr/lib/jvm/java-8-oracle</jdkHome>
</configuration>
</toolchain>
</toolchains>
+90 -22
View File
@@ -1,32 +1,100 @@
language: java
jdk: oraclejdk8
os: linux
env:
global:
- secure: "KBEuB6U1p5RQXSYe157AwydFr/zpXQPA0IChVCgZV+X1mMyy9ZtrjH1J1AXuviseDDXDbaT25sRnsvpl82rfRw2xOkMGXHy4N95/ylTSr8DjHxTao71BhXsvFycNobFva5y2EGNWqDvpS8I2oSZo7Qk4la3yep3rcJQvcy6RDbbhpDTbL1QMFyadunIBm0WtqbunrMqtjSqaoPsXz8TiQuxHvX4vEXzVbaxV1QQt79Vi+daa6wAV3mRQAugnx+UffsC8JqMxgm06usWeJgCJzxgm8E7clZCLmf53B2TL8dK6bIYbqyvOY3uFxitsTG0d8Z0GOJwXBgZNgbniTRO8ZJSty5eZP8LBybbjVLSL25DNTWtCjADUL/uySnXIEidlMt2N/3QmH7zrGAfAk/tIwKpdRca2GLLydeXf6PSkiahnPEkIY/QupcsOLELhdifpdOjb8QW1OenA+vUbNM9dccLwKnX6Fj9cu4VQG601AcYDr2eyhq8WYkr3wYdw/6KdUa3hmplowTBs+qguppP+eOSgGuEsy38KLtqnvm6WlHy6tcLmcVYKG3DmR1b7TWXsOXC6/VMH8BHBkvsF1QdRg9+Cgx07vX3Hw7roPiYzmaO9Ajs20ATsUfRskMuWCTeTSK5pN8X27veRCZlhFjeKQMDdmfVwzpAfRgKsl3TEn1I="
- secure: "U1DfAv6acUUWe+dao/ZSDUX64JRadNJY16rITsdrM4ZNAJSuXpEY3p/LWcYjN7D49YmyutbXH9+L3KKQUQGrGXj9QTarfYvd8ZsKt4FK8yv7AFy+RQNIbAjNEHBzHx15p+srMheTaetl7aLwY0qhF+D/RtGapxHKyY4dBHrb0lp8VGyiCiL7Aop8GGskosi1mtirPBp/BStPZ2bEyxG0QzU5SsVWkJWwV9aWLPVAR/n7Xgx/6Gjl6Fed2c/WSrWi4vchm3Ny8pfTweOax3PGYYjBVxIfuX0mqmwuJsY7gNfXCfN3dPiPKGJPFy1pC+LGyGkklO5ReKFLd4O1ME6fU0dlIGfD6n+Q4H6/w9FHXegcKTfWIJm/MFa6vA/tJM5R6zJQuiTQJboHm/UmS/iQj76z0p6sK15Xp5vFId+/dHKqa8xY+Bt6HiXy6z401HOc8QcYBAf7TqhqUt/ZE7HN4be46uR90KmzIrWz6wEoDW7HfwQ9ZMbs55zoOXrvekyE9/gXskypO0p2JT3Y0vlvO27KQvIrSwI480kOVOrlyrYA+LZqlcKaayOuCuZh4lITQUYinUoZZict5joYthH+Cyh2zovoBpxsntDJdMnaZNLtSC7hlhpbMBYaT2y1O6vZH5Yix0mxuDvs/x6ogP5CNBeUYlXhaL+g4GnwKyr0ZA0="
- secure: "gxI7W4V4fUPQLMCvecXXdet1/mCh6m0RIQMtErVVOnwxEEjeDmko/3rHSl+wk6IeFaaQKcmHJJSJEj+e5TgWRH1uuzCnbFHZhuH28ce/H0EqLJ3GTXeDEgFLzhh//T3ySOZChZELgJ67cKxZJNFMhBVOR2/QIGjZjdzvl36ugsu80Ak3XJb8HCm8D2P8Vuezz/OlCkSOGXaiqZXfflV/cuaLWuueGfQGW9x/UyDTNsuBdB7YnEcxOWt8RgB4JrcPGV7/etxLHXTw9IMEeUhQ/RsxLZHKNYt9cx/QOZkpXemhdT9L2pAIi77eO98x+yAfB1qV6T6IeDd/OiABUzfb7asNBwE+bYRuVkCiWLo3x3hs8FcgsPe4L10guxfRMJPxax9E7uYb9TFxtvc42dDWNyp1BVCtEtmjErO4CJeW97ukhgkUkPhzUZgQ2Gj5Tn4VRjQOQyzh/S/YsHyfxoAQrscc/3bq5PBmtdowyGQd5dsvShdpE6glf+HnBZ8TCw5BaxQuTjapQWjsGuJVCVsrNDtwOFy5UTfxK9OeTUsjwfO5JjkoIeqGyLHPnTMWyZ6EYa//nWPOU1KgVE6Hrzfr3zxEzL1nN/TYahzhKOxXE701W9YhTmhCVljMlSYioTUfTaXHgGLpojvSWlhsTbc3r0gj4NglqakIy7MKgQLgES8="
- secure: "otZkFNhApMofp2Jl2baZdpNEPcTa79Xc9wyOw1gl1+ubCLtOGr32FDUSr0HQWKrGXcYZR4bc0A80hx0/ykZ/twJaRAabcNYtjwRMDKKrp3plvp8RTZlB1QW85nsdmk3qmHACzc94wKnmcaDohM5FPxnWspZG5Y4ejYX4HEK6r1fwL4FjMPSLd5QW8yCaAc7dpBSm2UyIXuuDjkekXblJFe8ydbf9aF97WKJMCwqIs9Zo5oJa2pnWCw47ixwjVdkaH5x5727I+YmFqn5rjdEideUFEAlggqMaxuOtfYhuG/8k5W3Q/+WX+G7rEPTcemjmaosbbpoOUE0YUHV3Wi3R5D66NuWIpQwX6kw4rTwL0YIh//0aNb8jv4Z8KwkiTMrYuj0we5tXzARp3yYn56P0JBAm6BihNhfEBv06655Tg5LUsWqUTZCl3KJhwtO1N+OuOkE5qoZm59knq6DeZOsYWAVb3MpzklP06kXGYTjb44PVMUc6ynuuZjgPJDv/0906feA3REHBJVxd3PvJp1c8VvQSeW3ndghEz0akJHY/jxV1rJZAZC1ZeshYUpBNmh0sFDty/UE43IvIB4EInypQHyTtQvMc6LuLjTeu2E5ZMsA3udj66EMrYm4Y2eheJycSfttDqzhsKXIVJ4LmA/xtDR01cp1jsqbbZBhVI67rA40="
- secure: "mmHRnK/8CHfgtwaTN3MgjFD1R8EVQhIb/a0Aag3gPaHWW52Ex6xWG7GsF4kRcdzHdIdrQxHZTiDa2oVMWbnQ16CAu4dZJadwTxhBW4JmE1tsi2C6i+uwMBPvnKBXHwt+QOAqNB0L/ByYwWLkucSLoyRs6qU0i7sJ3ZC/EPCuLI8VfBlFUVegSbp2WmclmFnxOi5MKr15Zwd8BGgyWUsvd1OHxhvO3Xr/ZPO4R+1kIgyojloTMu6oGM/shYgsrUXgmI/WvZRTq+25SRCjUmATJtuDXXgVeJtYabi/+Zju5Z7K06oaKvFYM+BgZWPmGQkVCxKVjSlug0rx6+qgRKIf/B/cPxmQDS0ZZVDmDcbxeibBL9JhRqIDwDb0XS9t1qBXvIJ5E4ZmdX/XuvLCnC4xJptu/vHyKl1wbRM3dcXEBk8J0knJc4JvY2yupF3LS32sfEHftLwzr63U3/0dOQvsCSJRBy5zgI8ieABUZAeZmmaQ6RCGOTEYrGO2G4CCF2uVq4YdrCOsfmrb0DzH8llNMkXKzXlITRvmkuBlTRRKxGnPzS3vf0iicdAkmTiU5u7lArFFc7IKcW4ypO+RKDTUpq74K+UZBI9eBjV7Po368EO8epJ5aIx32a2kyS/hYWkS/dZh7I0fNZa2qBUceZO/KZGRjH4dQFW9t0J9Q7LLXJY="
- secure: "B2quYqla3mqu3QHqeRGMde66IFAluUHhzY87q/giPvONm/V7xmIcxzC6JNQ7X4pHotC7MUbsMf7vdcL1tyuPP5nqyfaxk0nnGnVoJZIQhMaBQ6Lkyt2Ac5u5/QBeHujrj8gqGjT7vzgPIYMYiSLV09VcPgMaYS6WxCrFmXOEJOeVGOGjG9J2wApAmlf6m/hBogLEbdbzRheqJwX5gMxppKX5XRaiqvKGR7hHFiW5HBaAiQ6caQEw6DZL9GnjMsqd5VMVL7DmbETncNE1utLVDO7mFwDMbkeonmwjsmQsJAo5Be+WFl/a/yRQLrqhhTFwag+V7g7RjcBKAdJ5IZJkN0EC9GjY0ZGOjE2cmcrX03U1g1voO7oreH6+25VqPTTGWHv5K8wDWM5QnhBJGtH2yH76p5XYK8iNOXPTqvjubN9sG3INsnTjxBHuQw+aY2vgwBGCvW+Asqe73BV8SDrmqcCqgmm/BUy0kZRd8mhaQdFL0SAO3suV7uf+fzIsmRtndFx24J5Cm6LE6NnTmtbhHhs4mUEqfngMq0XZBXj5z4LDhzOH4g3rf/Y7jHBjAAa6sKeh1sINdHrMdB843dDfNQPp/7g3hfKi31U9ZMczndsr2QYqm2OC/3lPiRHC+8Grj5PxXmiBplzTppyhl+1pjZWy5SCoQi6ulBOyaZcwfYM="
- secure: "Kmh31kozw9NBbwtkucpf+QslinJIclB7rcktHz4RokVS5xiMD7njWvD8ptZhXqZG/tNcNiXkWskgM9EV/OvLTTavJToHE1gMhJel5ODxKM0b5QZDy6tkW/wI0Kdl0lck90EAJ7bmsOmF+oGczGsauiLPSlBOZV0tn1zdeJKwwmg46C9UyIhTDcFqUD1ehxExkDHnbOk6HmEPGCsZQCGNXY2t++dO7fRodIgjZAKcyTwgrh6WEZDfQDjvC51yQlVzL2mrcFqHi8qYAx3OHnuidRoMZ4huaoxLimw/1bGii/txTZwJ/pQdF90kGqSqLpRiO2lHLq5l8WAd4Z1XPSs1ZzbKUEhWO8VGgfR0Cp+Bkkd6P/vcuTq7bdhpvdnZn9FRUI/bfgZi827Skj/WoUh0RR7ns6RuDfQ5uGD9NiWDsbfoKLbvvYjyQycQlQTKglYQVcU/pWsuqVlx+27vM6JltR0Pct4uAJxAN+EFA4sTT/u4HiZ0NQyZWisZauu7CyMRN29fkKVVyYHHCr6QcNMUpvp1vvKYaUN7GeykGNVfoHB7CWAKcc6banh33c+QqG5DSTE++ZNa712gxEizQnO5MmLECUxNDpOGZnLsTlgbABwDxxe4PxFxXvBLm9pkJftq5cp9T9Syzz/yyT7z5weSGvRes94eUtSt0agoeX2MKsE="
- secure: "VezxV+VdmbmtrQYT8AZIyg41WBROxuxpumerkcubADF7V4wV6lwx9Rd2G6yAr0VuHCNUUhS4m+gPFIsuiQbAhyupiEkwhzUYqk1tF+LITlLLPegLypjiLmhJMwGUNuDSSsih1Icmg9FzrP4VyzgGn9pBjoG9QYj1civBZeGwg++e/XDYlHMXrpd/UEfMKVB71JwB0tle4fKJZSvblIqP62yvbBaKHx6A4+ZWzJV5Vps0DoIeNtKCNmNNloKZVHfjbsvqSjnMYUJzkOzyPkM822q41N/D+3IAufO16+jH/W0vAZeN0e4GXiN5W+CVkr2Gbh0FwkVQcI3bekaOIn45XLUMLKdf+JsWDPKz9RraHelR9YxL5GoJ7ntwvmucxw0p8EVyJ/xLk/pBCP8iHq0Jb8//js25XHgxzzAWI37MErPAAGgTKZAVdAN0mGXbe63tWmwaBlEbK8h2A8di6abW5x6YHTkTo2BRlHUSTU8dE3VqTnpSkne5n1SlEa4g1Bci3J45M0/pLmHV6yCxCM5BrVXS5ByaB61py/umSbpmdIBFV6TM1MaKK3lAucQrR+8To/vCbm8XqPyujJdOR+ENIuuDgEU/Yh5Hv5SAODekUYaCp4pjfGzFADHQWVNDxIOXrwBN4OfSiAvRc1x6HXndOmNI4QtOxheuCRFFthq8VZI="
jobs:
fast_finish: true
include:
- stage: build
name: "linux - mvn deploy"
os: linux
dist: bionic
env: BUILD=deploy
- name: "linux - build documentation"
os: linux
dist: bionic
env: BUILD=doc
- name: "linux - run sonar"
os: linux
dist: bionic
env: BUILD=sonar
if: "type = push && repo = pmd/pmd && fork = false"
- name: "linux - run coveralls"
os: linux
dist: bionic
env: BUILD=coveralls
if: "type = push && repo = pmd/pmd && fork = false"
- name: "macosx - mvn verify"
os: osx
env: BUILD=deploy
- name: "windows - mvn verify"
os: windows
env: BUILD=deploy
language: shell
- stage: publish
name: "Release Build - Publish"
os: linux
dist: bionic
if: "type = push && repo = pmd/pmd && fork = false && tag is present"
env: BUILD=publish
before_install:
- echo "MAVEN_OPTS='-Xms1g -Xmx1g'" > "$HOME/.mavenrc"
- mkdir -p "$HOME/.m2"
- cp .travis-toolchains.xml "$HOME/.m2/toolchains.xml"
before_script:
- SHOULD_DEPLOY=no
- '[ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] && SHOULD_DEPLOY=yes || ( [ "${SHOULD_DEPLOY}" != "yes" ] && echo "Skipping Deploy" )'
- export SHOULD_DEPLOY
script:
- '[ "${SHOULD_DEPLOY}" = "yes" ] && mvn test deploy --settings .travis-settings.xml || ( [ "${SHOULD_DEPLOY}" != "yes" ] && echo "Skipping Deploy" )'
- '[ "${SHOULD_DEPLOY}" = "yes" ] || mvn test'
- '[ "${SHOULD_DEPLOY}" = "yes" ] && mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=${SONAR_TOKEN} || ( [ "${SHOULD_DEPLOY}" != "yes" ] && echo "Skipping Sonar" )'
branches:
except:
- /^pmd_releases\/\d/
- bash .travis/before_install.sh "11.0.6+10"
- source ${HOME}/java.env
install: true
before_script: true
script: source .travis/build-$BUILD.sh
after_success: true
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/0e6dd310db54b96c2653
- https://webhooks.gitter.im/e/65efc1ea65175ad23ab6
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
email:
recipients:
- adangel@users.sourceforge.net
on_success: always
- andreas.dangel@adangel.org
on_success: change
on_failure: always
cache:
directories:
- "$HOME/.m2"
env:
global:
- secure: KBEuB6U1p5RQXSYe157AwydFr/zpXQPA0IChVCgZV+X1mMyy9ZtrjH1J1AXuviseDDXDbaT25sRnsvpl82rfRw2xOkMGXHy4N95/ylTSr8DjHxTao71BhXsvFycNobFva5y2EGNWqDvpS8I2oSZo7Qk4la3yep3rcJQvcy6RDbbhpDTbL1QMFyadunIBm0WtqbunrMqtjSqaoPsXz8TiQuxHvX4vEXzVbaxV1QQt79Vi+daa6wAV3mRQAugnx+UffsC8JqMxgm06usWeJgCJzxgm8E7clZCLmf53B2TL8dK6bIYbqyvOY3uFxitsTG0d8Z0GOJwXBgZNgbniTRO8ZJSty5eZP8LBybbjVLSL25DNTWtCjADUL/uySnXIEidlMt2N/3QmH7zrGAfAk/tIwKpdRca2GLLydeXf6PSkiahnPEkIY/QupcsOLELhdifpdOjb8QW1OenA+vUbNM9dccLwKnX6Fj9cu4VQG601AcYDr2eyhq8WYkr3wYdw/6KdUa3hmplowTBs+qguppP+eOSgGuEsy38KLtqnvm6WlHy6tcLmcVYKG3DmR1b7TWXsOXC6/VMH8BHBkvsF1QdRg9+Cgx07vX3Hw7roPiYzmaO9Ajs20ATsUfRskMuWCTeTSK5pN8X27veRCZlhFjeKQMDdmfVwzpAfRgKsl3TEn1I=
- secure: U1DfAv6acUUWe+dao/ZSDUX64JRadNJY16rITsdrM4ZNAJSuXpEY3p/LWcYjN7D49YmyutbXH9+L3KKQUQGrGXj9QTarfYvd8ZsKt4FK8yv7AFy+RQNIbAjNEHBzHx15p+srMheTaetl7aLwY0qhF+D/RtGapxHKyY4dBHrb0lp8VGyiCiL7Aop8GGskosi1mtirPBp/BStPZ2bEyxG0QzU5SsVWkJWwV9aWLPVAR/n7Xgx/6Gjl6Fed2c/WSrWi4vchm3Ny8pfTweOax3PGYYjBVxIfuX0mqmwuJsY7gNfXCfN3dPiPKGJPFy1pC+LGyGkklO5ReKFLd4O1ME6fU0dlIGfD6n+Q4H6/w9FHXegcKTfWIJm/MFa6vA/tJM5R6zJQuiTQJboHm/UmS/iQj76z0p6sK15Xp5vFId+/dHKqa8xY+Bt6HiXy6z401HOc8QcYBAf7TqhqUt/ZE7HN4be46uR90KmzIrWz6wEoDW7HfwQ9ZMbs55zoOXrvekyE9/gXskypO0p2JT3Y0vlvO27KQvIrSwI480kOVOrlyrYA+LZqlcKaayOuCuZh4lITQUYinUoZZict5joYthH+Cyh2zovoBpxsntDJdMnaZNLtSC7hlhpbMBYaT2y1O6vZH5Yix0mxuDvs/x6ogP5CNBeUYlXhaL+g4GnwKyr0ZA0=
- secure: "ElWjttpoMwqezP2zyHkx7CiPON/mRLUW7SsSlEqdlTUYRIaSaL7sShUORJUzj58U/Nnfi/eY4Rweo0CtVu20sG16s9B4adnmPS44LAitztybPR/co93gN9qb8jiIl41nVcOJq+Rut2Z4nr8AGRhVCG9Drg4+DreCqQ4DE5ZD6J99GN0IFGrREt59HQUlBlT9jD0AndK/1GQ6kWAenuSREE2P5ih59rf6FrrfddQO5iqyFFoaHek3JiOmpaLK+z7i4EvMKsAJEooFNuGhHVuyaJJRRZHAncGiQ+uW/yL7G5rY51G6YSNJczzEtfrRg+YrIUbokUPmifSIbnXO/AIZRAq1dMhA8exRc5n+75RB1X164qm4a+yggdybFBh0L59xu606PJQJAuWy+x10nled7FAVXiotxbB0r2bhlVmWFEN+FWPqXg2rVkHvw6+5PM67rG5g1LCgjKzb9I6JWPiVI+EMn8Pw8gryL2Sdqtl08Da0Ypbl2ZK/afU4CEPEKnrDc9ecXKjacehTYwGS48V213XvArcmoEpsyZDRSMTrvK3/e29GEaxoK/ZzWJylpeOtsICEEFYEBEiDsiIW4C50MIUPT2xHV6MaPQzhkuwrbQ6QFYzHzihBaiQuMmXUQ4DMb3fOPkNZAQHQo8CgJ78IcbCABAoGv9mu/fo2KoLo11U="
- "$HOME/.cache"
- vendor/bundle
- "$HOME/.rvm/"
# Secure Keys, that need to be set for snapshot builds
#
# CI_DEPLOY_USERNAME - the user which can upload net.sourceforge.pmd:* to https://oss.sonatype.org/
# CI_DEPLOY_PASSWORD
#
# SONAR_TOKEN - the token used to update https://sonarqube.com/dashboard/?id=393826
#
# PMD_SF_USER - the sourceforge user, which is used to upload created binaries to sf files section. Note: an ssh key is
# required. See "before_install".
#
# Secure Keys, that need to be set for releases:
#
# PMD_SF_APIKEY - used to make the new release the default file in the files section. See https://sourceforge.net/auth/preferences/
# under "Release API Key"
#
# CI_SIGN_KEYNAME
# CI_SIGN_PASSPHRASE
# add the encrypted GPG keyring file to repo (https://docs.travis-ci.com/user/encrypting-files/#Automated-Encryption), decrypt it and install it at the beginning of .travis-deploy.sh
#
# GITHUB_OAUTH_TOKEN - the token used to upload the binaries to github releases
#
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<ruleset name="All Java Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>Every java rule in PMD which is used for the regression tests with pmdtester</description>
<rule ref="category/java/bestpractices.xml" />
<rule ref="category/java/codestyle.xml" />
<rule ref="category/java/design.xml" />
<rule ref="category/java/documentation.xml" />
<rule ref="category/java/errorprone.xml" />
<rule ref="category/java/multithreading.xml" />
<rule ref="category/java/performance.xml" />
<rule ref="category/java/security.xml" />
</ruleset>
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -e
source .travis/logger.sh
source .travis/common-functions.sh
travis_debug
OPENJDK_VERSION=$1
bash .travis/setup-secrets.sh
bash .travis/configure-maven.sh
bash .travis/install-openjdk.sh $OPENJDK_VERSION
if travis_isLinux; then
gem install bundler
bundle install --with=release_notes_preprocessing --path=vendor/bundle
else
log_info "Not setting up ruby for ${TRAVIS_OS_NAME}."
exit 0
fi
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
set -e
source .travis/logger.sh
source .travis/common-functions.sh
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec)
log_info "Building PMD Coveralls.io report ${VERSION} on branch ${TRAVIS_BRANCH}"
if ! travis_isPush; then
echo "Not proceeding, since this is not a push!"
exit 0
fi
(
# disable fast fail, exit immediately, in this subshell
set +e
./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
./mvnw package jacoco:report coveralls:report -Pcoveralls -B -V
if [ $? -ne 0 ]; then
log_error "Error creating coveralls report"
else
log_success "New coveralls result: https://coveralls.io/github/pmd/pmd"
fi
true
)
+78
View File
@@ -0,0 +1,78 @@
#!/bin/bash
set -e
source .travis/logger.sh
source .travis/common-functions.sh
source .travis/github-releases-api.sh
source .travis/sourceforge-api.sh
source .travis/regression-tester.sh
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec)
log_info "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
MVN_BUILD_FLAGS="-B -V"
if travis_isOSX; then
log_info "The build is running on OSX"
./mvnw verify $MVN_BUILD_FLAGS
elif travis_isWindows; then
log_info "The build is running on Windows"
./mvnw verify $MVN_BUILD_FLAGS
elif travis_isPullRequest; then
log_info "This is a pull-request build"
./mvnw verify $MVN_BUILD_FLAGS
regression-tester_executeDanger
elif travis_isPush; then
if [[ "${VERSION}" != *-SNAPSHOT && "${TRAVIS_TAG}" != "" ]]; then
echo -e "\n\n"
log_info "This is a release build for tag ${TRAVIS_TAG}"
echo -e "\n\n"
# create a draft github release
gh_releases_createDraftRelease "${TRAVIS_TAG}" "$(git rev-list -n 1 ${TRAVIS_TAG})"
GH_RELEASE="$RESULT"
# Build and deploy to ossrh / maven-central
./mvnw deploy -Possrh,sign,pmd-release $MVN_BUILD_FLAGS
echo -e "\n\n"
# Deploy to github releases
gh_release_uploadAsset "$GH_RELEASE" "pmd-dist/target/pmd-bin-${VERSION}.zip"
gh_release_uploadAsset "$GH_RELEASE" "pmd-dist/target/pmd-src-${VERSION}.zip"
# Deploy to sourceforge files
sourceforge_uploadFile "${VERSION}" "pmd-dist/target/pmd-bin-${VERSION}.zip"
sourceforge_uploadFile "${VERSION}" "pmd-dist/target/pmd-src-${VERSION}.zip"
regression-tester_uploadBaseline
elif [[ "${VERSION}" == *-SNAPSHOT ]]; then
log_info "This is a snapshot build"
./mvnw deploy -Possrh,sign $MVN_BUILD_FLAGS
# Deploy to sourceforge files
sourceforge_uploadFile "${VERSION}" "pmd-dist/target/pmd-bin-${VERSION}.zip"
sourceforge_uploadFile "${VERSION}" "pmd-dist/target/pmd-src-${VERSION}.zip"
regression-tester_uploadBaseline
else
# other build. Can happen during release: the commit with a non snapshot version is built, but not from the tag.
log_info "This is some other build, probably during release: commit with a non-snapshot version on branch master..."
./mvnw verify $MVN_BUILD_FLAGS
# we stop here - no need to execute further steps
exit 0
fi
else
log_info "This is neither a pull request nor a push. Not executing any build."
exit 1
fi
+170
View File
@@ -0,0 +1,170 @@
#!/bin/bash
set -e
source .travis/logger.sh
source .travis/common-functions.sh
source .travis/github-releases-api.sh
source .travis/sourceforge-api.sh
function main() {
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec)
log_info "Building PMD Documentation ${VERSION} on branch ${TRAVIS_BRANCH}"
#
# First step: build pmd with profile "generate-rule-docs"
# The docs should appear under "docs/pages/rules/..." for each language
# With this profile, also the checks are executed (e.g. DeadLinksChecker).
#
./mvnw clean verify -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -P generate-rule-docs
if ! travis_isPush; then
log_info "Not publishing site, since this is not a push!"
exit 0
fi
#
# For pushes, we'll update the online documentation
#
generate_jekyll_doc
create_pmd-doc_archive
# Deploy to sourceforge files
sourceforge_uploadFile "${VERSION}" "docs/pmd-doc-${VERSION}.zip"
if [[ "${VERSION}" == *-SNAPSHOT && "${TRAVIS_BRANCH}" == "master" ]]; then
# only for snapshot builds from branch master
# update github pages https://pmd.github.io/pmd/
publish_to_github_pages
# rsync site to https://pmd.sourceforge.io/snapshot
sourceforge_rsyncSnapshotDocumentation "${VERSION}" "snapshot"
fi
if [[ "${VERSION}" != *-SNAPSHOT && "${TRAVIS_TAG}" != "" ]]; then
log_info "This is a release documentation build for pmd ${VERSION}"
# Deploy to github releases
gh_releases_getLatestDraftRelease
GH_RELEASE="$RESULT"
gh_release_uploadAsset "$GH_RELEASE" "docs/pmd-doc-${VERSION}.zip"
# updating github release text
# renders, and skips the first 6 lines - the Jekyll front-matter
RENDERED_RELEASE_NOTES=$(bundle exec .travis/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
RELEASE_NAME="PMD ${VERSION} ($(date -u +%d-%B-%Y))"
gh_release_updateRelease "$GH_RELEASE" "$RELEASE_NAME" "$RENDERED_RELEASE_NOTES"
sourceforge_uploadReleaseNotes "${VERSION}" "${RENDERED_RELEASE_NOTES}"
publish_release_documentation_github
sourceforge_rsyncSnapshotDocumentation "${VERSION}" "pmd-${VERSION}"
fi
}
#
# Executes jekyll and generates the documentation
# The documentation will be generated in the directory "docs/_site".
#
function generate_jekyll_doc() {
pushd docs
echo -e "\n\n"
log_info "Building documentation using jekyll..."
bundle install
bundle exec jekyll build
popd
}
#
# Creates the pmd-doc.zip archive. It will be placed in "docs/".
#
function create_pmd-doc_archive() {
pushd docs
echo -e "\n\n"
log_info "Creating pmd-doc archive..."
mv _site pmd-doc-${VERSION}
zip -qr pmd-doc-${VERSION}.zip pmd-doc-${VERSION}/
log_success "Successfully created pmd-doc-${VERSION}.zip"
popd
}
#
# Publishes the site to https://pmd.github.io/pmd-${VERSION} and
# https://pmd.github.io/latest/
#
function publish_release_documentation_github() {
echo -e "\n\n"
log_info "Adding the new doc to pmd.github.io..."
# clone pmd.github.io. Note: This uses the ssh key setup earlier
# In order to speed things up, we use a sparse checkout - no need to checkout all directories here
mkdir pmd.github.io
(
cd pmd.github.io
git init
git config user.name "Travis CI (pmd-bot)"
git config user.email "andreas.dangel+pmd-bot@adangel.org"
git config core.sparsecheckout true
git remote add origin git@github.com:pmd/pmd.github.io.git
echo "/latest/" > .git/info/sparse-checkout
echo "/sitemap.xml" >> .git/info/sparse-checkout
git pull --depth=1 origin master
log_info "Copying documentation from ../docs/pmd-doc-${VERSION}/ to pmd-${VERSION}/ ..."
rsync -ah --stats ../docs/pmd-doc-${VERSION}/ pmd-${VERSION}/
git status
echo "Executing: git add pmd-${VERSION}"
git add pmd-${VERSION}
echo "Executing: git commit..."
git commit -q -m "Added pmd-${VERSION}"
log_info "Copying pmd-${VERSION} to latest ..."
git rm -qr latest
cp -a pmd-${VERSION} latest
echo "Executing: git add latest"
git add latest
echo "Executing: git commit..."
git commit -q -m "Copying pmd-${VERSION} to latest"
log_info "Generating sitemap.xml"
../.travis/sitemap_generator.sh > sitemap.xml
echo "Executing: git add sitemap.xml"
git add sitemap.xml
echo "Executing: git commit..."
git commit -q -m "Generated sitemap.xml"
echo "Executing: git push origin master"
git push origin master
)
}
#
# Updates github pages of the main repository,
# so that https://pmd.github.io/pmd/ has the latest (snapshot) content
#
function publish_to_github_pages() {
echo -e "\n\n"
log_info "Pushing the new site to github pages..."
git clone --branch gh-pages --depth 1 git@github.com:pmd/pmd.git pmd-gh-pages
# clear the files first
rm -rf pmd-gh-pages/*
# copy the new site
cp -a docs/pmd-doc-${VERSION}/* pmd-gh-pages/
(
cd pmd-gh-pages
git config user.name "Travis CI (pmd-bot)"
git config user.email "andreas.dangel+pmd-bot@adangel.org"
git add -A
MSG="Update documentation
TRAVIS_JOB_NUMBER=${TRAVIS_JOB_NUMBER}
TRAVIS_COMMIT_RANGE=${TRAVIS_COMMIT_RANGE}"
git commit -q -m "$MSG"
git push git@github.com:pmd/pmd.git HEAD:gh-pages
log_success "Successfully pushed site to https://pmd.github.io/pmd/"
)
}
main
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
set -e
source .travis/logger.sh
source .travis/common-functions.sh
source .travis/github-releases-api.sh
source .travis/sourceforge-api.sh
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec)
log_info "PMD Release ${VERSION}"
if ! travis_isPush; then
log_info "Not publishing release, since this is not a push!"
exit 0
fi
if [[ "${VERSION}" == *-SNAPSHOT || "${TRAVIS_TAG}" == "" ]]; then
log_info "Not publishing release, since this is not a release!"
exit 0
fi
# Publish github release
gh_releases_getLatestDraftRelease
GH_RELEASE="$RESULT"
gh_release_publishRelease "$GH_RELEASE"
sourceforge_selectDefault "${VERSION}"
+33
View File
@@ -0,0 +1,33 @@
#!/bin/bash
set -e
source .travis/logger.sh
source .travis/common-functions.sh
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec)
log_info "Building PMD Sonar ${VERSION} on branch ${TRAVIS_BRANCH}"
if ! travis_isPush; then
echo "Not updating sonar, since this is not a push!"
exit 0
fi
(
# for sonar, we need to use java10, until sonarjava 5.8.0 is released (Sept. 2018)
JAVA_HOME=$(bash ./install-jdk.sh -F 10 -L GPL -W $HOME/jdk --emit-java-home | tail --lines 1)
export JAVA_HOME
export PATH=${JAVA_HOME}/bin:$PATH
# disable fast fail, exit immediately, in this subshell
set +e
# Run the build
./mvnw clean package sonar:sonar -Dsonar.login=${SONAR_TOKEN} -Psonar -B -V
if [ $? -ne 0 ]; then
log_error "Error updating sonar..."
else
log_success "New sonar results: https://sonarcloud.io/dashboard?id=net.sourceforge.pmd%3Apmd"
fi
true
)
+55
View File
@@ -0,0 +1,55 @@
#!/bin/bash
set -e
function travis_debug() {
echo "TRAVIS_REPO_SLUG: ${TRAVIS_REPO_SLUG}"
echo "TRAVIS_PULL_REQUEST_SLUG: ${TRAVIS_PULL_REQUEST_SLUG}"
echo "TRAVIS_PULL_REQUEST_BRANCH: ${TRAVIS_PULL_REQUEST_BRANCH}"
echo "TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST}"
echo "TRAVIS_SECURE_ENV_VARS: ${TRAVIS_SECURE_ENV_VARS}"
echo "TRAVIS_BRANCH: ${TRAVIS_BRANCH}"
echo "TRAVIS_TAG: ${TRAVIS_TAG}"
echo "TRAVIS_ALLOW_FAILURE: ${TRAVIS_ALLOW_FAILURE}"
echo "TRAVIS_OS_NAME: ${TRAVIS_OS_NAME}"
}
function travis_isPullRequest() {
if [ "${TRAVIS_REPO_SLUG}" != "pmd/pmd" ] || [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
return 0
else
return 1
fi
}
function travis_isPush() {
if [ "${TRAVIS_REPO_SLUG}" = "pmd/pmd" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ]; then
return 0
else
return 1
fi
}
function travis_isOSX() {
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
return 0
else
return 1
fi
}
function travis_isLinux() {
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
return 0
else
return 1
fi
}
function travis_isWindows() {
if [[ $TRAVIS_OS_NAME == 'windows' ]]; then
return 0
else
return 1
fi
}
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
set -e
echo "MAVEN_OPTS='-Xms1g -Xmx1g'" > ${HOME}/.mavenrc
mkdir -p ${HOME}/.m2
cp .travis/travis-settings.xml ${HOME}/.m2/settings.xml
+200
View File
@@ -0,0 +1,200 @@
#
# The functions here require the following scripts:
# .travis/logger.sh
#
# The functions here require the following environment variables:
# GITHUB_OAUTH_TOKEN
#
#
# Creates a new release on github with the given tag and target_commit.
# The release is draft and not published.
#
# $RESULT = release json string
#
# See: https://developer.github.com/v3/repos/releases/#create-a-release
#
function gh_releases_createDraftRelease() {
local tagName="$1"
local targetCommitish="$2"
log_debug "$FUNCNAME: Creating new draft release for tag=$tagName and commit=$targetCommitish"
local request=$(cat <<-EOF
{
"tag_name": "${tagName}",
"target_commitish": "${targetCommitish}",
"name": "${tagName}",
"draft": true
}
EOF
)
log_debug "POST https://api.github.com/repos/pmd/pmd/releases"
log_info "Creating github draft release"
RESULT=$(curl --fail -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \
-H "Content-Type: application/json" \
-X POST \
--data "${request}" \
"https://api.github.com/repos/pmd/pmd/releases")
log_debug " -> response: $RESULT"
log_success "Created draft release with id $(echo $RESULT | jq --raw-output ".url")"
}
#
# Gets the latest release, if it is a draft and returns with 0.
# Returns with 1, if the latest release is not a draft - meaning, there is no
# draft release (yet?).
#
# RESULT = release json string
#
# See: https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository
#
function gh_releases_getLatestDraftRelease() {
log_debug "$FUNCNAME"
log_debug "GET https://api.github.com/repos/pmd/pmd/releases?per_page=1"
RESULT=$(curl --fail -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \
"https://api.github.com/repos/pmd/pmd/releases?per_page=1" | jq ".[0]")
log_debug " -> response: $RESULT"
local draft=$(echo $RESULT | jq ".draft")
if [ "$draft" != "true" ]; then
RESULT=""
log_error "Could not find draft release!"
return 1
fi
log_info "Found draft release: $(echo $RESULT | jq --raw-output ".url")"
}
#
# Deletes a release.
#
# See: https://developer.github.com/v3/repos/releases/#delete-a-release
#
function gh_release_deleteRelease() {
local release="$1"
gh_release_getIdFromData "$release"
local releaseId="$RESULT"
log_debug "$FUNCNAME id=$releaseId"
log_debug "DELETE https://api.github.com/repos/pmd/pmd/releases/$releaseId"
log_info "Deleting github release $releaseId"
local response
response=$(curl --fail -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \
-X DELETE \
"https://api.github.com/repos/pmd/pmd/releases/$releaseId")
log_debug " -> response: $response"
log_success "Deleted release with id $releaseId"
}
#
# Determines the release id from the given JSON release data.
#
# RESULT = "the release id"
#
function gh_release_getIdFromData() {
local release="$1"
RESULT=$(echo $release | jq --raw-output ".id")
}
#
# Uploads a asset to an existing release.
#
# See: https://developer.github.com/v3/repos/releases/#upload-a-release-asset
#
function gh_release_uploadAsset() {
local release="$1"
local filename="$2"
local name=$(basename $filename)
gh_release_getIdFromData "$release"
local releaseId="$RESULT"
log_debug "$FUNCNAME: releaseId=$releaseId file=$filename name=$name"
local uploadUrl=$(echo "$release" | jq --raw-output ".upload_url")
uploadUrl="${uploadUrl%%\{\?name,label\}}"
uploadUrl="${uploadUrl}?name=${name}"
log_debug "POST $uploadUrl"
log_info "Uploading $filename to github release $releaseId"
local response
response=$(curl --fail -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \
-H "Content-Type: application/zip" \
--data-binary "@$filename" \
-X POST \
"${uploadUrl}")
log_debug " -> response: $response"
log_success "Uploaded release asset $filename for release $releaseId"
}
#
# Updates the release info: name and body.
# The body is escaped to fit into JSON, so it is allowed for the body to be
# a multi-line string.
#
# See: https://developer.github.com/v3/repos/releases/#edit-a-release
#
function gh_release_updateRelease() {
local release="$1"
local name="$2"
local body="$3"
gh_release_getIdFromData "$release"
local releaseId="$RESULT"
log_debug "$FUNCNAME releaseId=$releaseId name=$name"
body="${body//'\'/\\\\}"
body="${body//$'\r'/}"
body="${body//$'\n'/\\r\\n}"
body="${body//'"'/\\\"}"
local request=$(cat <<-EOF
{
"name": "${name}",
"body": "${body}"
}
EOF
)
log_debug "PATCH https://api.github.com/repos/pmd/pmd/releases/${releaseId}"
log_debug " -> request: $request"
log_info "Updating github release $releaseId"
local response
response=$(curl --fail -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \
-H "Content-Type: application/json" \
--data "${request}" \
-X PATCH \
"https://api.github.com/repos/pmd/pmd/releases/${releaseId}")
log_debug " -> response: $response"
log_success "Updated release with id=$releaseId"
}
#
# Publish a release by setting draft="false".
# Note: This will send out the notification emails if somebody
# watched the releases.
#
# See: https://developer.github.com/v3/repos/releases/#edit-a-release
#
function gh_release_publishRelease() {
local release="$1"
gh_release_getIdFromData "$release"
local releaseId="$RESULT"
log_debug "$FUNCNAME releaseId=$releaseId"
local request='{"draft":false}'
log_debug "PATCH https://api.github.com/repos/pmd/pmd/releases/${releaseId}"
log_debug " -> request: $request"
log_info "Publishing github release $releaseId"
local response
response=$(curl --fail -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \
-H "Content-Type: application/json" \
--data "${request}" \
-X PATCH \
"https://api.github.com/repos/pmd/pmd/releases/${releaseId}")
log_debug " -> response: $response"
local htmlUrl=$(echo "$response" | jq --raw-output ".html_url")
log_success "Published release with id=$releaseId at $htmlUrl"
}
+1
View File
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8yHVLHYDsKui8tYg/sFvkDqcs97pEZz0BzK9HtBF4O+/It1drRYRdUAFfjoImfprpKSxkJCTglHixGRp24eNaZ6woWVJ4/bmiMkEqEZAjr1NZ3qw7zIruMJMSkCV+YTtmL4cYcZlvMRPzzOZOnFbV05oi79oy41MUFHYjolK9QxMFNsVNN5iyzFxM3HqSFozz+ylKbFBtDk6ZHZQNRL/Xl2V9DJ69fVzjG4OZfcWNGmmKHHARmsnJyUOMeeKpLjDOe1M6ZdI8HkXWac8yCr9JTETNZZwemZAcS/RKoKCDqfIUOzkZfIPmyaznfVetTGsMi7yQrJhAyjznuNGF4+3lfgTcmRF8wz5FCeUkdYTmy2wNSFi5HiLPfC5OgRtjKzC6yb8rbRjDx6XQ2ph15PKOaXwzk49TaMc0xJvoiGDMZaTU0iTm3Y1/QUtfLvo3/jGMbtUdV3soWpuBAV2JUI4aB5xdLX9iNmcrVzoUe3y9DWuuTX46eoCvpUNXv/DXKhQw1D7xd7J67db5qUck/Akiqi0JR+e0SoBJvZFtYwVNLGC2bIJ/s8SR8X5Zp+1+ypf3WYjIylxQTkO1r4NfI0Cd9qXg7nmUrHAU7Z6xtJmUK8ZWzSST4wul8WkRJURtODLxt5firtlKhyZ93t9Mjuk6mATIPxr/b3x20T+IH463kw== ssh key for pmd. used for travis accessing sourceforge and github.
+62
View File
@@ -0,0 +1,62 @@
#!/bin/bash
set -e
#
# AdoptOpenJDK Builds from:
# https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.4%2B11
#
source .travis/logger.sh
source .travis/common-functions.sh
# VERSION_TAG e.g. "11.0.4+11" or "13+33"
VERSION_TAG=$1
OPENJDK_MAJOR=${VERSION_TAG/.*/}
OPENJDK_MAJOR=${OPENJDK_MAJOR/+*/}
#BASE_URL=https://github.com/AdoptOpenJDK/openjdk${OPENJDK_MAJOR}-binaries/releases/download
BASE_URL=https://pmd-code.org/openjdk
log_info "Installing OpenJDK${OPENJDK_MAJOR}U ${VERSION_TAG} for ${TRAVIS_OS_NAME}"
if travis_isOSX; then
DOWNLOAD_URL=${BASE_URL}/jdk-${VERSION_TAG/+/%2B}/OpenJDK${OPENJDK_MAJOR}U-jdk_x64_mac_hotspot_${VERSION_TAG/+/_}.tar.gz
COMPONENTS_TO_STRIP=3 # e.g. jdk-11.0.3+7/Contents/Home/bin/java
elif travis_isWindows; then
DOWNLOAD_URL=${BASE_URL}/jdk-${VERSION_TAG/+/%2B}/OpenJDK${OPENJDK_MAJOR}U-jdk_x64_windows_hotspot_${VERSION_TAG/+/_}.zip
else
DOWNLOAD_URL=${BASE_URL}/jdk-${VERSION_TAG/+/%2B}/OpenJDK${OPENJDK_MAJOR}U-jdk_x64_linux_hotspot_${VERSION_TAG/+/_}.tar.gz
COMPONENTS_TO_STRIP=1 # e.g. openjdk-11.0.3+7/bin/java
fi
OPENJDK_ARCHIVE=$(basename $DOWNLOAD_URL)
LOCAL_DIR=${HOME}/.cache/openjdk
TARGET_DIR=${HOME}/openjdk${OPENJDK_MAJOR}
mkdir -p ${LOCAL_DIR}
mkdir -p ${TARGET_DIR}
if [ ! -e ${LOCAL_DIR}/${OPENJDK_ARCHIVE} ]; then
log_info "Downloading from ${DOWNLOAD_URL} to ${LOCAL_DIR}"
wget --directory-prefix ${LOCAL_DIR} --timestamping --continue ${DOWNLOAD_URL}
else
log_info "Skipped download, file ${LOCAL_DIR}/${OPENJDK_ARCHIVE} already exists"
fi
log_info "Extracting to ${TARGET_DIR}"
if travis_isWindows; then
7z x ${LOCAL_DIR}/${OPENJDK_ARCHIVE} -o${TARGET_DIR}
mv ${TARGET_DIR}/*/* ${TARGET_DIR}/
else
tar --extract --file ${LOCAL_DIR}/${OPENJDK_ARCHIVE} -C ${TARGET_DIR} --strip-components=${COMPONENTS_TO_STRIP}
fi
cat > ${HOME}/java.env <<EOF
export JAVA_HOME="${TARGET_DIR}"
export PATH="${TARGET_DIR}/bin:${PATH}"
java -version
EOF
log_info "OpenJDK can be used via ${HOME}/java.env"
cat ${HOME}/java.env
source ${HOME}/java.env
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
COL_GREEN="\e[32m"
COL_RED="\e[31m"
COL_RESET="\e[0m"
COL_YELLOW="\e[33;1m"
function log_error() {
echo -e "${COL_RED}[ERROR ] $*${COL_RESET}"
}
function log_info() {
echo -e "${COL_YELLOW}[INFO ] $*${COL_RESET}"
}
function log_success() {
echo -e "${COL_GREEN}[SUCCESS] $*${COL_RESET}"
}
function log_debug() {
true
#echo -e "[DEBUG ] $*"
}
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<projectlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="projectlist_1_0_0.xsd">
<description>Standard Projects</description>
<project>
<name>checkstyle</name>
<type>git</type>
<connection>https://github.com/checkstyle/checkstyle</connection>
<tag>checkstyle-8.10</tag>
</project>
<project>
<name>spring-framework</name>
<type>git</type>
<connection>https://github.com/spring-projects/spring-framework</connection>
<tag>v5.0.6.RELEASE</tag>
</project>
<!---<project>
<name>openjdk10</name>
<type>hg</type>
<connection>http://hg.openjdk.java.net/jdk10/jdk10/jdk</connection>
<webview-url>http://hg.openjdk.java.net/jdk10/jdk10/jdk/file/777356696811</webview-url>
</project> -->
</projectlist>
+79
View File
@@ -0,0 +1,79 @@
#
# The functions here require the following scripts:
# .travis/logger.sh
#
# The functions here require the following environment variables:
# PMD_SF_USER
#
# Generate a new baseline and upload it to sourceforge
#
# Note: this function always succeeds, even if the upload fails.
# In that case, just a error logging is provided.
#
function regression-tester_uploadBaseline() {
log_debug "$FUNCNAME branch=${TRAVIS_BRANCH}"
local targetUrl="https://sourceforge.net/projects/pmd/files/pmd-regression-tester/"
local errexitstate="$(shopt -po errexit)"
set +e # disable errexit
(
# This handler is called if any command fails
function upload_failed() {
log_error "Error while uploading ${BRANCH_FILENAME}-baseline.zip to sourceforge!"
log_error "Please upload manually: ${targetUrl}"
}
# exit subshell after trap
set -e
trap upload_failed ERR
log_info "Generating and uploading baseline for pmdtester..."
cd ..
bundle config --local gemfile pmd/Gemfile
pmd/.travis/travis_wait "bundle exec pmdtester -m single -r ./pmd -p ${TRAVIS_BRANCH} -pc ./pmd/.travis/all-java.xml -l ./pmd/.travis/project-list.xml -f"
cd target/reports
BRANCH_FILENAME="${TRAVIS_BRANCH/\//_}"
zip -q -r ${BRANCH_FILENAME}-baseline.zip ${BRANCH_FILENAME}/
../../pmd/.travis/travis_wait "rsync -avh ${BRANCH_FILENAME}-baseline.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd-regression-tester/"
log_success "Successfully uploaded ${BRANCH_FILENAME}-baseline.zip to ${targetUrl}"
)
# restore errexit state
eval "$errexitstate"
}
#
# Execute danger, which executes pmd-regression-tester (via Dangerfile).
#
# Note: this function always succeeds, even if the danger fails.
# In that case, just a error logging is provided.
#
function regression-tester_executeDanger() {
log_debug "$FUNCNAME"
local errexitstate="$(shopt -po errexit)"
set +e # disable errexit
(
# This handler is called if any command fails
function danger_failed() {
log_error "Error while executing danger/pmd-regression-tester"
}
# exit subshell after trap
set -e
trap danger_failed ERR
# Create a corresponding remote branch locally
if ! git show-ref --verify --quiet refs/heads/${TRAVIS_BRANCH}; then
git fetch --no-tags origin +refs/heads/${TRAVIS_BRANCH}:refs/remotes/origin/${TRAVIS_BRANCH}
git branch ${TRAVIS_BRANCH} origin/${TRAVIS_BRANCH}
log_debug "Created local branch ${TRAVIS_BRANCH}"
fi
log_info "Running danger on branch ${TRAVIS_BRANCH}"
bundle exec danger --verbose
log_success "Executing danger successfully"
)
# restore errexit state
eval "$errexitstate"
}
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env ruby
# Renders the release notes for Github releases,
# and prints them to standard output
# Doesn't trim the header, which is done in shell
# Args:
# ARGV[0] : location of the file to render
require "liquid"
require "safe_yaml"
# include some custom liquid extensions
require_relative "../docs/_plugins/all_extensions"
# explicitly setting safe mode to get rid of the warning
SafeYAML::OPTIONS[:default_mode] = :safe
# START OF THE SCRIPT
unless ARGV.length == 1 && File.exists?(ARGV[0])
print "\e[31m[ERROR] In #{$0}: The first arg must be a valid file name\e[0m\n"
exit 1
end
release_notes_file = ARGV[0]
# Make the script execute wherever we are
travis_dir = File.expand_path File.dirname(__FILE__)
liquid_env = {
# wrap the config under a "site." namespace because that's how jekyll does it
'site' => YAML.load_file(travis_dir + "/../docs/_config.yml"),
# This signals the links in {% rule %} tags that they should be rendered as absolute
'is_release_notes_processor' => true
}
to_render = File.read(release_notes_file)
rendered = Liquid::Template.parse(to_render).render(liquid_env)
print(rendered)
Binary file not shown.
+63
View File
@@ -0,0 +1,63 @@
#!/bin/bash
set -e
source .travis/logger.sh
source .travis/common-functions.sh
if [ "${TRAVIS_REPO_SLUG}" != "pmd/pmd" ] || [ "${TRAVIS_PULL_REQUEST}" != "false" ] || [ "${TRAVIS_SECURE_ENV_VARS}" != "true" ]; then
echo "Not setting up secrets:"
echo " TRAVIS_REPO_SLUG=${TRAVIS_REPO_SLUG}"
echo " TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}"
echo " TRAVIS_SECURE_ENV_VARS=${TRAVIS_SECURE_ENV_VARS}"
exit 0
fi
echo "Setting up secrets..."
#
# contents of secrets.tar:
# * id_rsa
# * release-signing-key-D0BF1D737C9A1C22.gpg
openssl aes-256-cbc -K ${encrypted_a5724fade5c6_key} -iv ${encrypted_a5724fade5c6_iv} -in .travis/secrets.tar.enc -out .travis/secrets.tar -d
pushd .travis && tar xfv secrets.tar && popd
mkdir -p "$HOME/.ssh"
chmod 700 "$HOME/.ssh"
mv .travis/id_rsa "$HOME/.ssh/id_rsa"
chmod 600 "$HOME/.ssh/id_rsa"
if travis_isLinux; then
mkdir -p "$HOME/.gpg"
gpg --batch --import .travis/release-signing-key-D0BF1D737C9A1C22.gpg
else
log_info "Not setting up gpg for ${TRAVIS_OS_NAME}."
# Note: importing keys into gpg will start gpg-agent. This background task then
# prevents travis-ci from terminating the build job under Windows.
# Alternatively "gpgconf --kill gpg-agent" can be executed to stop the
# gpg-agent at the end, if the gpg keys are needed.
fi
rm .travis/secrets.tar
rm .travis/release-signing-key-D0BF1D737C9A1C22.gpg
echo "Setting up .ssh/known_hosts..."
#
# https://sourceforge.net/p/forge/documentation/SSH%20Key%20Fingerprints/
#
# run locally:
# ssh-keyscan web.sourceforge.net | tee -a known_hosts
#
# verify fingerprints:
# ssh-keygen -F web.sourceforge.net -l -f known_hosts
# # Host web.sourceforge.net found: line 1
# web.sourceforge.net RSA SHA256:xB2rnn0NUjZ/E0IXQp4gyPqc7U7gjcw7G26RhkDyk90
# # Host web.sourceforge.net found: line 2
# web.sourceforge.net ECDSA SHA256:QAAxYkf0iI/tc9oGa0xSsVOAzJBZstcO8HqGKfjpxcY
# # Host web.sourceforge.net found: line 3
# web.sourceforge.net ED25519 SHA256:209BDmH3jsRyO9UeGPPgLWPSegKmYCBIya0nR/AWWCY
#
# then add output of `ssh-keygen -F web.sourceforge.net -f known_hosts`
#
echo 'web.sourceforge.net ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2uifHZbNexw6cXbyg1JnzDitL5VhYs0E65Hk/tLAPmcmm5GuiGeUoI/B0eUSNFsbqzwgwrttjnzKMKiGLN5CWVmlN1IXGGAfLYsQwK6wAu7kYFzkqP4jcwc5Jr9UPRpJdYIK733tSEmzab4qc5Oq8izKQKIaxXNe7FgmL15HjSpatFt9w/ot/CHS78FUAr3j3RwekHCm/jhPeqhlMAgC+jUgNJbFt3DlhDaRMa0NYamVzmX8D47rtmBbEDU3ld6AezWBPUR5Lh7ODOwlfVI58NAf/aYNlmvl2TZiauBCTa7OPYSyXJnIPbQXg6YQlDknNCr0K769EjeIlAfY87Z4tw==' >> "$HOME/.ssh/known_hosts"
echo 'web.sourceforge.net ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCwsY6sZT4MTTkHfpRzYjxG7mnXrGL74RCT2cO/NFvRrZVNB5XNwKNn7G5fHbYLdJ6UzpURDRae1eMg92JG0+yo=' >> "$HOME/.ssh/known_hosts"
echo 'web.sourceforge.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOQD35Ujalhh+JJkPvMckDlhu4dS7WH6NsOJ15iGCJLC' >> "$HOME/.ssh/known_hosts"
+56
View File
@@ -0,0 +1,56 @@
#!/bin/bash
# Sitemap generator
# Assumes we have the latest version of the site under "latest" and "pmd-${RELEASE_VERSION}"
# https://www.sitemaps.org/protocol.html
WEBSITE_PREFIX="https://pmd.github.io/"
DOC_PREFIX="latest/" # "pmd-${RELEASE_VERSION}/"
DATE=`date +%Y-%m-%d`
# Priority is relative to the website, can be chosen in {0.1, 0.2, ..., 1}
# Default priority is 0.5
LATEST_PRIORITY=0.8
# Writes to standard output
cat << HEADER_END
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>${WEBSITE_PREFIX}index.html</loc>
<priority>1</priority>
<changefreq>monthly</changefreq>
<lastmod>$DATE</lastmod>
</url>
<url>
<loc>${WEBSITE_PREFIX}${DOC_PREFIX}index.html</loc>
<priority>0.9</priority>
<changefreq>monthly</changefreq>
<lastmod>$DATE</lastmod>
</url>
HEADER_END
for page in ${DOC_PREFIX}pmd_*.html
do
cat << ENTRY_END
<url>
<loc>${WEBSITE_PREFIX}$page</loc>
<priority>$LATEST_PRIORITY</priority>
<changefreq>monthly</changefreq>
<lastmod>$DATE</lastmod>
</url>
ENTRY_END
done
echo "</urlset>"
+166
View File
@@ -0,0 +1,166 @@
#
# The functions here require the following scripts:
# .travis/logger.sh
#
# The functions here require the following environment variables:
# PMD_SF_USER
# PMD_SF_APIKEY
#
#
# Uploads the release notes to sourceforge files as "ReadMe.md".
#
# Note: this function always succeeds, even if the upload fails.
# In that case, just a error logging is provided.
#
function sourceforge_uploadReleaseNotes() {
local pmdVersion="$1"
local releaseNotes="$2"
log_debug "$FUNCNAME pmdVersion=$pmdVersion"
local targetUrl="https://sourceforge.net/projects/pmd/files/pmd/${pmdVersion}"
local errexitstate="$(shopt -po errexit)"
set +e # disable errexit
(
# This handler is called if any command fails
function release_notes_fail() {
log_error "Error while uploading release notes as ReadMe.md to sourceforge!"
log_error "Please upload manually: ${targetUrl}"
cleanup_temp_dir
}
function cleanup_temp_dir() {
log_debug "Cleanup tempdir $releaseNotesTempDir"
rm "${releaseNotesTempDir}/${pmdVersion}/ReadMe.md" || true
rmdir "${releaseNotesTempDir}/${pmdVersion}" || true
rmdir "${releaseNotesTempDir}" || true
}
# exit subshell after trap
set -e
trap release_notes_fail ERR
local releaseNotesTempDir=$(mktemp -d)
log_debug "Tempdir: $releaseNotesTempDir"
mkdir -p "${releaseNotesTempDir}/${pmdVersion}"
echo "$releaseNotes" > "${releaseNotesTempDir}/${pmdVersion}/ReadMe.md"
log_info "Uploading release notes to sourceforge for version $pmdVersion"
rsync -avz \
"${releaseNotesTempDir}/" \
"${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/"
log_success "Successfully uploaded release notes as ReadMe.md to sourceforge: ${targetUrl}"
cleanup_temp_dir
)
# restore errexit state
eval "$errexitstate"
}
#
# Uploads the given file to sourceforge.
#
# Note: This function always succeeds, even if the upload fails.
# In that case, just a error logging is provided.
#
function sourceforge_uploadFile() {
local pmdVersion="$1"
local filename="$2"
log_debug "$FUNCNAME pmdVersion=$pmdVersion filename=$filename"
local targetUrl="https://sourceforge.net/projects/pmd/files/pmd/${pmdVersion}"
local errexitstate="$(shopt -po errexit)"
set +e # disable errexit
(
# This handler is called if any command fails
function upload_failed() {
log_error "Error while uploading ${filename} to sourceforge!"
log_error "Please upload manually: ${targetUrl}"
}
# exit subshell after trap
set -e
trap upload_failed ERR
log_info "Uploading $filename to sourceforge..."
.travis/travis_wait "rsync -avh ${filename} ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${pmdVersion}/"
log_success "Successfully uploaded ${filename} to sourceforge: ${targetUrl}"
)
# restore errexit state
eval "$errexitstate"
}
#
# Select the given version as the new default download.
#
# Note: This function always succeeds, even if the request fails.
# In that case, just a error logging is provided.
#
function sourceforge_selectDefault() {
local pmdVersion="$1"
log_debug "$FUNCNAME pmdVersion=$pmdVersion"
local targetUrl="https://sourceforge.net/projects/pmd/files/pmd/${pmdVersion}"
local errexitstate="$(shopt -po errexit)"
set +e # disable errexit
(
# This handler is called if any command fails
function request_failed() {
log_error "Error while selecting ${pmdVersion} as new default download on sourceforge!"
log_error "Please do it manually: ${targetUrl}"
}
# exit subshell after trap
set -e
trap request_failed ERR
log_info "Selecting $pmdVersion as new default on sourceforge..."
local response
response=$(curl --fail -s -H "Accept: application/json" \
-X PUT \
-d "api_key=${PMD_SF_APIKEY}" \
-d "default=windows&default=mac&default=linux&default=bsd&default=solaris&default=others" \
"https://sourceforge.net/projects/pmd/files/pmd/${pmdVersion}/pmd-bin-${pmdVersion}.zip")
log_debug " -> response: $response"
log_success "Successfully selected $pmdVersion as new default on sourceforge: ${targetUrl}"
)
# restore errexit state
eval "$errexitstate"
}
#
# Rsyncs the complete documentation to sourceforge.
#
# Note: This function always succeeds, even if the upload fails.
# In that case, just a error logging is provided.
#
function sourceforge_rsyncSnapshotDocumentation() {
local pmdVersion="$1"
local targetPath="$2"
log_debug "$FUNCNAME pmdVersion=$pmdVersion targetPath=$targetPath"
local targetUrl="https://pmd.sourceforge.io/${targetPath}/"
local errexitstate="$(shopt -po errexit)"
set +e # disable errexit
(
# This handler is called if any command fails
function upload_failed() {
log_error "Couldn't upload the documentation. It won't be current on ${targetUrl}"
}
# exit subshell after trap
set -e
trap upload_failed ERR
log_info "Uploading documentation to ${targetUrl}..."
.travis/travis_wait "rsync -ah --stats --delete docs/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/"
log_success "Successfully uploaded documentation: ${targetUrl}"
)
# restore errexit state
eval "$errexitstate"
}
Loaded 30 of 4493 files, more files were not shown because too many files have changed in this diff. Show more