Compare commits

...
Author SHA1 Message Date
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
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
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
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
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
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
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
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
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 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 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
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
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
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 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
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
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
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
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
Juan Martín Sotuyo Dodero f01cc473d2 Initial support for CPD Groovy 2016-09-11 14:12:17 -03: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 cc3ad9aeb7 [maven-release-plugin] prepare release pmd_releases/5.5.1 2016-07-27 20:40:56 +02:00
Andreas Dangel 8684b58239 Prepare pmd release 5.5.1 2016-07-27 20:30:52 +02:00
Andreas Dangel eefda72b4d travis: update sonar url and token 2016-07-27 20:21:57 +02:00
Andreas Dangel 6f29730509 Update changelog 2016-07-27 19:58:26 +02:00
Andreas Dangel 841206187b Merge branch 'apex-commits' 2016-07-27 19:54:48 +02:00
Andreas Dangel 560e05feb0 Update changelog 2016-07-27 19:54:27 +02:00
Andreas Dangel 07443d5ec0 Merge remote-tracking branch 'pmd-apex/master' into apex-commits 2016-07-27 19:51:14 +02:00
Andreas Dangel 5b6580448e #1508 - Only close the classloader if its ours 2016-07-27 19:43:31 +02:00
Andreas Dangel aae3ee1395 Merge branch 'pr-104' 2016-07-26 22:17:04 +02:00
Andreas Dangel b067b32554 Update changelog 2016-07-26 22:11:04 +02:00
Andreas Dangel 20c4f168c1 Merge branch 'close-read-files' of https://github.com/wolfs/pmd into pr-104 2016-07-26 22:10:15 +02:00
Andreas Dangel 39a9d99710 #1508 - Only close the classloader if its ours 2016-07-26 21:59:15 +02:00
Andreas Dangel a491cef61c Merge branch 'bug-1508' 2016-07-26 21:56:14 +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 65708ef704 Update changelog 2016-07-26 21:39:03 +02:00
Andreas Dangel d76b689c07 Fixes #1508 [core] [java] PMD is leaking file handles
Closes class loader after PMD has processed all files
2016-07-25 21:42:21 +02:00
Andreas Dangel 293731f009 Fixes #1508 [core] [java] PMD is leaking file handles
Closes class loader after ant task is finished
2016-07-25 21:34:40 +02:00
Andreas Dangel 88d1823c2e Fixes #1508 [core] [java] PMD is leaking file handles
Fixes InputStreams and Readers
2016-07-25 21:25:34 +02:00
Stefan Wolf 23bee1cad1 Close the created URLClassLoader when finishing the Ant task 2016-07-25 14:08:04 +02:00
Stefan Wolf aafceb8d89 Close InputStreams for rule sets
When having a long running process like the Gradle daemon,
then not closing read resources makes it impossible to delete
files on Windows.
2016-07-25 13:20:56 +02:00
Stefan Wolf 9fe399f3b3 Close classes read by PMDASMClassLoader
When having a long running process like the Gradle daemon,
then not closing read resources makes it impossible to delete
files on Windows.
2016-07-25 13:20:56 +02:00
Robert Sösemann 5fc62c95b2 Fixed compiler warnings 2016-07-13 15:08:19 +02:00
Robert Sösemann 53752a0289 Minor formatting 2016-07-13 14:57:36 +02:00
Robert Sösemann 2cfcf33697 Merge pull request #43 from anand13s/master
Basic apex unit test rules
2016-07-13 14:51:05 +02:00
Anand b41f9e97b7 Fix missing rule in ruleset.xml, reenable test 2016-07-12 00:12:07 -07:00
Anand 4b2b576550 Basic apex unit test rules 2016-07-11 23:19:24 -07:00
Andreas Dangel 4e5e0187d7 Disable doclint in site generation (-Psite) with java8 2016-07-08 16:56:03 +02:00
Andreas Dangel 081ea676fb Merge branch 'pr-103-on-master' 2016-07-07 22:44:53 +02:00
Andreas Dangel 1916bcfd00 Merge branch 'pr-103' 2016-07-07 22:44:15 +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 648e697ab0 Update changelog 2016-07-07 22:29:30 +02:00
Andreas Dangel 0660097db2 Add unit test for #1501 [java] CyclomaticComplexity rule causes OOM when class reporting is disabled 2016-07-07 22:27:16 +02:00
Frits Jalvingh afc0f25795 Fix for 1501: CyclomaticComplexity rule causes OOM when class reporting is disabled 2016-07-07 22:26:27 +02:00
Andreas Dangel beb7f004b6 Update changelog 2016-07-07 22:08:49 +02:00
Andreas Dangel 4464302f53 Same fix for #1501 for apex 2016-07-07 22:05:04 +02:00
Andreas Dangel 8aaf70ec8d Merge branch 'fix-1501-oom' of https://github.com/fjalvingh/pmd into pr-103 2016-07-07 21:56:55 +02:00
Andreas Dangel ae1595c055 Add unit test for #1501 [java] CyclomaticComplexity rule causes OOM when class reporting is disabled 2016-07-07 21:56:09 +02:00
Andreas Dangel c438debc2a Merge branch 'pr-102' 2016-07-07 21:27:14 +02:00
Andreas Dangel 4fe4555c7a Update changelog 2016-07-07 21:19:04 +02:00
Andreas Dangel eca09a0ce8 Merge branch 'master' of https://github.com/up2go-sschwarz/pmd into pr-102 2016-07-07 20:56:52 +02:00
Andreas Dangel 66efd5c4f2 Merge branch 'pr-101' 2016-07-07 20:54:47 +02:00
Andreas Dangel 2ee62f7b5f Update changelog 2016-07-07 20:48:01 +02:00
Andreas Dangel 4d52be5cf2 PMDASMClassloader: minor refactoring 2016-07-07 20:47:53 +02:00
Andreas Dangel 9823f17cf8 Merge branch 'master' of https://github.com/fjalvingh/pmd into pr-101 2016-07-07 20:32:53 +02:00
David Renz 947e2ec1ac Merge remote-tracking branch 'pmd/master' 2016-07-04 17:09:08 +02:00
Frits Jalvingh 3ea707ee88 Fix for 1501: CyclomaticComplexity rule causes OOM when class reporting is disabled 2016-07-04 08:51:27 +02:00
Andreas Dangel e95faa9f28 Merge branch 'bug-1499' 2016-07-02 17:00:43 +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 553cafff6e Fixes #1499 [core] CPD test break PMD 5.5.1 build on Windows 2016-07-02 16:48:46 +02:00
Andreas Dangel 8510d8ef0a travis toolchains: add amd64 suffix 2016-07-02 13:00:13 +02:00
Andreas Dangel 435d30775c Add a toolchains.xml for travis 2016-07-02 12:50:56 +02:00
Andreas Dangel 28dd0305ec Remove unneeded profiles sf-release and sf-snapshot 2016-07-02 12:15:30 +02:00
Andreas Dangel 5f6e6c3861 Add javadoc and source plugin by default, so that the repo
is always release ready (e.g. no javadoc errors).
2016-07-02 12:11:48 +02:00
up2go-sschwarz 13c991c6ae fixed https://github.com/Up2Go/codeclimate-apexmetrics/issues/24 2016-06-30 17:41:56 +02:00
David Renz 918d1415dd Merge remote-tracking branch 'pmd/master' 2016-06-28 14:40:30 +02:00
Andreas Dangel 9b0f6f40fb Fix duplicated maven-antrun-plugin section 2016-06-27 20:44:28 +02:00
Andreas Dangel 17b6b17580 Update pmd plugin 2016-06-25 22:53:24 +02:00
Andreas Dangel 9f5839c7fa Prepare next development version 2016-06-25 18:50:13 +02:00
Frits Jalvingh 46ad3a4700 Improve multithreading performance: do not lock on classloader. 2016-06-25 17:59:42 +02:00
Andreas Dangel ef2a97d267 [maven-release-plugin] prepare for next development iteration 2016-06-25 17:53:11 +02:00
Andreas Dangel 64d9ef96fc [maven-release-plugin] prepare release pmd_releases/5.5.0 2016-06-25 17:53:10 +02:00
Andreas Dangel 7d928296e6 Fix javadoc errors 2016-06-25 17:40:48 +02:00
Andreas Dangel c7b94f6e5c Change the apex parser to look like "released"
The version is taken from https://github.com/forcedotcom/idecore/tree/55042bfc2ebeb4c9f38c445b577c3bdd6a18fc5a/com.salesforce.ide.apex.core/lib
2016-06-25 17:05:47 +02:00
Andreas Dangel 7009a92915 Prepare pmd release 5.5.0 2016-06-25 16:54:11 +02:00
Andreas Dangel 5c6cd5cbed Update changelog 2016-06-25 13:51:03 +02:00
Andreas Dangel 461213fd0a Merge branch 'pr-100' 2016-06-25 09:09:12 +02:00
Andreas Dangel ba0f2f6c35 Update changelog 2016-06-25 09:09:00 +02:00
Andreas Dangel 8ab06f3f9e core - CSVRenderer: add unit test for escaping filenames (#100) 2016-06-25 09:07:21 +02:00
Andreas Dangel a92bac5d84 Merge branch 'master' of https://github.com/founderbliss/pmd into pr-100 2016-06-25 08:58:14 +02:00
Andreas Dangel 597ad1ee5f Merge branch 'pr-99' 2016-06-25 08:57:25 +02:00
Andreas Dangel 3736d2cc67 Update changelog 2016-06-25 08:52:29 +02:00
Andreas Dangel 0b331a921e apex - add unit test for pr-99 / Trigger Name 2016-06-25 08:50:52 +02:00
Andreas Dangel 4042e0406e Merge branch 'issue-23' of https://github.com/Up2Go/pmd into pr-99 2016-06-25 08:35:12 +02:00
Michael Sive 3810074e69 escape filenames with commas in csvrenderer 2016-06-15 01:18:58 +00:00
David Renz c2dac283c9 Merge remote-tracking branch 'pmd/master' 2016-06-14 15:10:48 +02:00
David Renz ef78229374 Fixed Trigger name is reported incorrectly
https://github.com/Up2Go/codeclimate-apexmetrics/issues/23
2016-06-14 11:54:13 +02:00
Andreas Dangel 02378aa90c Merge branch 'pr-98' 2016-06-12 19:48:30 +02:00
Andreas Dangel be2f612ad1 Update changelog 2016-06-12 19:42:17 +02:00
Andreas Dangel bee5991121 Add unit test for inputfilepath parameter 2016-06-12 19:38:54 +02:00
Andreas Dangel 47e105bd36 Merge branch 'input_filelist_parameter' of https://github.com/mrb/pmd into pr-98 2016-06-12 19:20:09 +02:00
Andreas Dangel a68fb251e6 Merge branch 'pr-97' 2016-06-12 19:11:16 +02:00
Andreas Dangel be1751a0bf Update changelog 2016-06-12 19:06:14 +02:00
Andreas Dangel 9d6692976a Merge branch 'ignore-method-name-on-override' of https://github.com/Monits/pmd into pr-97 2016-06-12 19:03:15 +02:00
Andreas Dangel 312f614847 Merge branch 'pr-35' 2016-06-12 18:57:38 +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
Andreas Dangel f880d2ab95 Update changelog 2016-06-12 18:47:12 +02:00
mrb 363d066f23 Update docs and use better File functions 2016-06-09 15:57:04 -04:00
mrb c2b8e1872d Add option for PMD command line for a comma delimited list of files 2016-06-09 13:57:03 -04:00
Juan Martín Sotuyo Dodero fda753813b Don't report bad method names on @Override 2016-06-08 19:59:58 -03:00
Andreas Dangel 3b2b813b44 Update changelog 2016-06-08 20:14:07 +02:00
Andreas Dangel 0e105af2c0 Extend unit test for #1491 with quotes 2016-06-08 20:13:28 +02:00
Andreas Dangel fb5e59cc23 Formatting, whitespace 2016-06-08 20:04:19 +02:00
Andreas Dangel 77a24b2b22 Merge branch '1491_code_climate_output_bug' of https://github.com/mrb/pmd into pr-96
Conflicts:
	pmd-core/src/main/java/net/sourceforge/pmd/renderers/CodeClimateRenderer.java
2016-06-08 20:03:47 +02:00
Andreas Dangel 7d04b3322c Update changelog, add new rule 2016-06-08 19:56:31 +02:00
Andreas Dangel a454ec767a Merge branch 'master' of https://github.com/DavidRenz/pmd into pr-95 2016-06-08 19:53:48 +02:00
mrb efdcbfe109 Clean up Code Climate renderer 2016-06-07 10:19:28 -04:00
Jan van Nunen 63293f8b31 Javascript tokenizer now ignores comment tokens. 2016-06-06 09:31:04 +02:00
Andreas Dangel af21dd5297 Fixes #1492 [CLI] IncompatibleClassChangeError when running PMD
Use the maven shade plugin to create a modified apex-jorje uber jar,
which has the old asm dependency shaded into a different package,
so that it won't collide with asm 5.
2016-06-04 20:50:19 +02:00
Andreas Dangel 2e9b73141e Fix unit test 2016-06-04 20:19:19 +02:00
Andreas Dangel 0ec5f63744 Code Climate renderer - update PMD Developer URL 2016-06-04 19:40:00 +02:00
Andreas Dangel 8a9bccb583 Fixes #1491 Code Climate JSON - corrupt output with real line breaks 2016-06-04 19:22:55 +02:00
Andreas Dangel d9e6bab6a9 Fixes #1488 [Apex module] Windows line endings falsify the location of issues 2016-06-02 20:28:01 +02:00
David Renz 277ce76eb6 Added new apex rule (AvoidDmlStatementsInLoops) 2016-05-30 11:55:31 +02:00
David Renz 73b2e5e52d Merge remote-tracking branch 'pmd/master' 2016-05-30 11:49:30 +02:00
Andreas Dangel 5c9a8eb895 Merge branch 'pmd/5.4.x' 2016-05-29 21:17:50 +02:00
Andreas Dangel f87dcb16cc Fix site generation
cherry picked: 8b8bb6d504
2016-05-29 21:07:53 +02:00
Andreas Dangel 1fc6e7afa2 Prepare next development version 2016-05-29 21:00:32 +02:00
Andreas Dangel 4512da8f3f [maven-release-plugin] prepare for next development iteration 2016-05-29 20:04:35 +02:00
Andreas Dangel 5fa4b309ed [maven-release-plugin] prepare release pmd_releases/5.4.2 2016-05-29 20:04:34 +02:00
Andreas Dangel 9daa4ae835 Prepare pmd release 5.4.2 2016-05-29 19:55:25 +02:00
Andreas Dangel ec18a41872 Merge branch 'pr-94' 2016-05-29 18:58:33 +02:00
Andreas Dangel 92ee665617 Update changelog 2016-05-29 18:54:01 +02:00
Andreas Dangel 4e92c2bc2b Merge branch 'master' of https://github.com/Up2Go/pmd into pr-94 2016-05-29 18:51:05 +02:00
Andreas Dangel 39c78d8e89 travis: add sonar 2016-05-29 18:50:00 +02:00
Andreas Dangel 8b34b2ef23 Merge branch 'bug-1479' 2016-05-29 18:37:19 +02:00
Andreas Dangel be1a996ba5 Merge branch 'bug-1479' into pmd/5.4.x 2016-05-29 18:31:09 +02:00
Andreas Dangel 836af8d493 Merge branch 'bug-1479' into pmd/5.3.x 2016-05-29 18:23:34 +02:00
Andreas Dangel 04f16d7627 Fixes #1479 CloseResource false positive on Statement 2016-05-29 18:20:04 +02:00
Andreas Dangel e834003e20 Merge branch 'bug-1480' 2016-05-28 16:46:04 +02:00
Andreas Dangel 8f4a262e8e Merge branch 'bug-1480' into pmd/5.4.x 2016-05-28 16:40:27 +02:00
Andreas Dangel ef0891d527 Merge branch 'bug-1480' into pmd/5.3.x 2016-05-28 16:36:57 +02:00
Andreas Dangel 6afe513225 Fixes #1480 false positive on public modifier used with inner interface in enum 2016-05-28 16:33:10 +02:00
Andreas Dangel e586a3ca6d Merge branch 'bug-1481' 2016-05-28 11:46:33 +02:00
Andreas Dangel dc1d942241 Merge branch 'bug-1481' into pmd/5.4.x 2016-05-28 11:42:01 +02:00
Andreas Dangel d1b9b3bc1f Merge branch 'bug-1481' into pmd/5.3.x 2016-05-28 11:36:55 +02:00
Andreas Dangel 379b0de186 Update changelog 2016-05-28 11:36:41 +02:00
Andreas Dangel e71324e08c Fix unit test for #1481 2016-05-28 11:36:35 +02:00
Andreas Dangel 13f7675b67 Fixes #1481 no problems found results in blank file instead of empty xml 2016-05-28 11:27:22 +02:00
David Renz 5f1418e40c Fixed https://github.com/Up2Go/codeclimate-apex/issues/10 2016-05-25 17:34:19 +02:00
David Renz 4ef196a9b5 Tweaked Properties with real world repos 2016-05-24 16:11:39 +02:00
@rsoese (Twitter handle) f5cbbca7d5 Tweaked Properties with real world repos 2016-05-24 15:56:02 +02:00
David Renz 2711f40413 Changed formatting of code examples
https://github.com/Up2Go/codeclimate-apex/issues/11
2016-05-24 15:22:43 +02:00
David Renz a71bf9f234 Changed default values for Code Climate remediation points
https://github.com/Up2Go/codeclimate-apex/issues/7
2016-05-24 12:24:38 +02:00
David Renz 7c06f288e6 Fixed typo 2016-05-23 16:08:49 +02:00
David Renz 68cf252658 Refactored Code Climate Renderer 2016-05-23 15:53:09 +02:00
David Renz 8f6542263c Added property to rules to disable block highlighting on the Code
Climate Platform
https://github.com/Up2Go/codeclimate-apex/issues/5
2016-05-23 14:49:12 +02:00
David Renz f9162c345b Deleted unused rulesets 2016-05-23 14:46:22 +02:00
David Renz 179dfa8c71 Fixed message of NcssMethodCount Rule 2016-05-23 12:02:23 +02:00
Andreas Dangel c885ae9031 travis-ci: set MAVEN_OPTS in ~/.mavenrc
See http://stackoverflow.com/questions/29201549/travis-ci-ignoring-maven-opts
2016-05-21 20:38:49 +02:00
Andreas Dangel 69e0068f04 travis-ci: move maven opts to "before_install" 2016-05-21 20:23:57 +02:00
Andreas Dangel e522441b7a Try to increase memory for travis-ci 2016-05-21 20:04:12 +02:00
Andreas Dangel 8b0b6f3e4b Merge branch 'Monits-constant-interface' 2016-05-21 12:17:24 +02:00
Andreas Dangel 1eebfc26fa Update changelog 2016-05-21 12:13:09 +02:00
Andreas Dangel c89d041e5c Merge branch 'constant-interface' of https://github.com/Monits/pmd into Monits-constant-interface 2016-05-21 12:07:12 +02:00
Andreas Dangel a37854c707 Merge branch 'Up2Go-master' 2016-05-21 12:03:43 +02:00
Andreas Dangel 49f0df8547 Update changelog 2016-05-21 11:58:32 +02:00
Andreas Dangel b2cfd3ebd5 Revert "Update README.md"
This reverts commit d8fd245083.
2016-05-21 11:56:21 +02:00
Andreas Dangel 2bde467ce1 Revert "Update README.md"
This reverts commit 52fd661785.
2016-05-21 11:55:26 +02:00
Andreas Dangel 45ba6e9d49 Merge branch 'master' of https://github.com/Up2Go/pmd into Up2Go-master 2016-05-21 11:51:24 +02:00
Andreas Dangel 38f9d4361b Merge branch 'bug-1484' 2016-05-21 11:45:09 +02:00
Andreas Dangel a4baf5c2a8 Merge branch 'bug-1484' into pmd/5.4.x 2016-05-21 11:38:18 +02:00
Andreas Dangel 1efdb72ba9 Merge branch 'bug-1484' into pmd/5.3.x 2016-05-21 11:37:28 +02:00
Andreas Dangel 0d20fe7e1c Fixes #1484 UnusedLocalVariable - false positive - parenthesis 2016-05-21 11:37:10 +02:00
Andreas Dangel 8107977e1f Update m-jar-p and m-assembly-p to be java9 ready 2016-05-21 10:04:17 +02:00
Juan Martín Sotuyo Dodero 007f9b3921 Change default to match Effective Java 2016-05-20 17:12:26 -03:00
Juan Martín Sotuyo Dodero 2ec75e7050 Add ConstantsInInterface rule. Effective Java, 19 2016-05-20 16:59:02 -03:00
Andreas Dangel a244c19a26 Merge branch 'bug-1485' 2016-05-20 21:51:45 +02:00
Andreas Dangel 8ffaffc567 Fixes #1485 Analysis of some apex classes cause a stackoverflow error
Test file must use windows line endings
Fixes Up2Go/pmd#36
2016-05-20 21:51:22 +02:00
Andreas Dangel 501ef71e70 Verify #1485 Analysis of some apex classes cause a stackoverflow error 2016-05-20 20:10:01 +02:00
Andreas Dangel 426427e9f3 javascript: move test files from src/main/resources to src/test/resources 2016-05-20 19:43:44 +02:00
Andreas Dangel 9f40a707e0 Closes #1486 Add rule for no-else-return - New Javascript rule 2016-05-20 19:42:32 +02:00
Andreas Dangel 03d9175cd1 Merge branch 'DevFactory-release/multiple-code-improvements-fix-1' 2016-05-20 19:13:15 +02:00
Andreas Dangel 77fb0c9aea Update changelog 2016-05-20 19:13:00 +02:00
Andreas Dangel b2db6432e0 Merge branch 'release/multiple-code-improvements-fix-1' of https://github.com/DevFactory/pmd into DevFactory-release/multiple-code-improvements-fix-1 2016-05-20 19:11:14 +02:00
Andreas Dangel 97b3250f44 Merge branch 'dionisioC-master' 2016-05-20 19:06:46 +02:00
Andreas Dangel 7050e84d03 Update changelog 2016-05-20 18:58:25 +02:00
Andreas Dangel 9c21c14a85 Merge branch 'master' of https://github.com/dionisioC/pmd into dionisioC-master 2016-05-20 18:56:18 +02:00
David Renz 169c7ada1a Update README.md 2016-05-20 15:34:06 +02:00
David Renz 52fd661785 Update README.md 2016-05-20 15:30:54 +02:00
David Renz d8fd245083 Update README.md 2016-05-20 15:30:33 +02:00
David Renz 0cb7987388 Fixed #40 2016-05-20 12:46:06 +02:00
David Renz 4c0ce89afd Improved Markdown output #40 2016-05-19 14:12:22 +02:00
Robert Sösemann 2c023408ed Solved Markdown with line breaks inside of JSON problem 2016-05-18 21:17:31 +02:00
Andreas Dangel 9451ad025c Merge branch 'issue-1360-ruleset-compatibility' 2016-05-18 21:03:17 +02:00
Andreas Dangel 6cd0ca309f Merge branch 'issue-1360-ruleset-compatibility' into pmd/5.4.x 2016-05-18 20:57:53 +02:00
Andreas Dangel 58085e1520 Merge branch 'issue-1360-ruleset-compatibility' into pmd/5.3.x 2016-05-18 20:52:39 +02:00
Andreas Dangel f32beeb726 Provide a command line option for #1360 - "-noRuleSetCompatibility" 2016-05-18 20:38:44 +02:00
Robert Sösemann cf61dcc644 Renderer test 2016-05-17 22:17:28 +02:00
Robert Sösemann 2daa7e7773 Added rule information as JSON Body readup 2016-05-17 17:26:47 +02:00
Robert Sösemann b4a0e07806 Remove line breaks and multi-spaces before passing rule violation
description to JSON
2016-05-17 16:55:16 +02:00
David Renz 11df8fbf40 Fixed #38 2016-05-17 10:44:54 +02:00
Dionisio Cortes Fernandez 511c7778c5 Small code enhancements, basically reordering variable declarations, constructors and variable modifiers 2016-05-15 22:41:26 +02:00
Andreas Dangel ba18ee705e Merge branch 'issue-1360-ruleset-compatibility' 2016-05-13 19:06:33 +02:00
Andreas Dangel fadd6a9a1c Merge branch 'issue-1360-ruleset-compatibility' into pmd/5.4.x 2016-05-13 19:02:53 +02:00
Andreas Dangel 1816c1708a Merge branch 'issue-1360-ruleset-compatibility' into pmd/5.3.x 2016-05-13 18:58:39 +02:00
Andreas Dangel a8a18e6648 Fixes #1360 Provide backwards compatibility for PMD configuration file
Update changelog
2016-05-13 18:58:23 +02:00
Andreas Dangel 1b65c7fe91 References #1360 Provide backwards combatibility for PMD configuration file
Handle exclusions
2016-05-13 18:53:00 +02:00
Andreas Dangel 44ee51d5a6 References #1360 Provide backwards combatibility for PMD configuration file
Add test cases for excluded rules
2016-05-06 11:08:25 +02:00
Andreas Dangel 15fd444b7a References #1360 Provide backwards combatibility for PMD configuration file 2016-05-06 10:52:43 +02:00
Andreas Dangel bab3e965ff Fixes #1478 PMD CLI - Use first language as default if Java is not available 2016-05-05 19:59:06 +02:00
Andreas Dangel 642c47ab48 Merge branch 'pr-90' 2016-05-05 19:11:15 +02:00
Andreas Dangel 4405312c1b Refactor PMDTaskTest in java, too using BuildFileRule 2016-05-05 19:06:31 +02:00
Andreas Dangel 334cd5e0f5 Update changelog 2016-05-05 19:06:05 +02:00
George Kankava ae078e7252 multiple code improvements: squid:S1192, squid:S1118, squid:S1066, squid:S1854, squid:S2864 2016-05-05 09:47:50 +04:00
Dionisio 9ab1b23a5a Refactored two test to spot using the deprecated ant class BuildFileTest 2016-05-02 22:46:19 +02:00
Andreas Dangel 5e073d3bbf Merge branch 'dionisioC-master' 2016-05-01 14:18:21 +02:00
Andreas Dangel 0d075bc57f Update changelog 2016-05-01 13:49:08 +02:00
Andreas Dangel be8da01858 Merge branch 'master' of https://github.com/dionisioC/pmd into dionisioC-master 2016-05-01 13:47:45 +02:00
Andreas Dangel 69f3893b86 Update checkstyle configuration 2016-05-01 11:54:01 +02:00
Andreas Dangel 344ec44bd4 travis: increase memory 2016-05-01 10:11:24 +02:00
Andreas Dangel f8473d9d15 Merge branch 'pmd/5.3.x' 2016-05-01 00:05:40 +02:00
Andreas Dangel 07be0d640f Merge branch 'pmd/5.3.x' into pmd/5.4.x 2016-05-01 00:03:53 +02:00
Andreas Dangel 147662e035 Prepare next development version 2016-04-30 23:54:24 +02:00
Dionisio a69cfa2223 Changing tabs for spaces so the code dones't look awkward 2016-04-30 23:27:50 +02:00
Dionisio 5be8148e99 Some code enhancements:
PMD.java. splited the imports to avoid check style message: Using the '.*' form of import should be avoided - net.sourceforge.pmd.lang.*.
AbstractNodeInfo now has all the overrides
String utils now has the EMPTY_STRING variable declared as private and a getter method to access it. Refactored isSame to avoid using     @SuppressWarnings("PMD.CompareObjectsWithEquals")
DFAPanel uses the getter for empty strings. Also deleted comments that seems to be old code and addd the override to valueChanged
In DBMSMetadadataTest we were passing a parameter to  System.out.format but it hasn't the place holder for the parameter
2016-04-30 23:21:43 +02:00
Andreas Dangel 2afd30c283 [maven-release-plugin] prepare for next development iteration 2016-04-30 23:15:13 +02:00
Andreas Dangel d89549f994 [maven-release-plugin] prepare release pmd_releases/5.3.7 2016-04-30 23:15:13 +02:00
Andreas Dangel 8b8bb6d504 Fix site generation 2016-04-30 23:03:14 +02:00
Andreas Dangel ef6bb6ed53 Prepare pmd release 5.3.7 2016-04-30 22:03:24 +02:00
Andreas Dangel d6a06716e0 Merge branch 'bug-1470' 2016-04-30 19:27:59 +02:00
Andreas Dangel ad6ae9edb6 Merge branch 'bug-1470' into pmd/5.4.x 2016-04-30 19:23:47 +02:00
Andreas Dangel 7d053d41c2 Merge branch 'bug-1470' into pmd/5.3.x 2016-04-30 19:18:08 +02:00
Andreas Dangel 81378fe8ed Fixes #1470 Error with type-bound lambda 2016-04-30 19:14:46 +02:00
Andreas Dangel 156963d568 Merge branch 'bug-1475' 2016-04-30 18:43:31 +02:00
Andreas Dangel 7ee8e28484 Merge branch 'bug-1475' into pmd/5.4.x 2016-04-30 18:40:02 +02:00
Andreas Dangel ce8c4bf1a8 Merge branch 'bug-1475' into pmd/5.3.x 2016-04-30 18:36:44 +02:00
Andreas Dangel 325fcaf5e4 Fixes #1475 False positive of MethodReturnsInternalArray 2016-04-30 18:33:39 +02:00
Andreas Dangel cd6e3851d9 Merge branch 'bug-1476' 2016-04-30 12:33:07 +02:00
Andreas Dangel 316a8aa782 Merge branch 'bug-1476' into pmd/5.4.x 2016-04-30 12:12:18 +02:00
Andreas Dangel 361370db5d Merge branch 'bug-1476' into pmd/5.3.x 2016-04-30 12:00:09 +02:00
Andreas Dangel b9b0059797 Fixes #1476 False positive of ArrayIsStoredDirectly 2016-04-30 11:46:29 +02:00
Andreas Dangel 9a4dd27d59 Merge branch 'pr-88' 2016-04-29 11:42:53 +02:00
Andreas Dangel d1000ed0d0 Fix unit test - wsdl has no rulesets yet 2016-04-29 11:38:47 +02:00
Andreas Dangel 0c02da8313 Fix compile errors - commons-lang3 should be used 2016-04-29 11:32:31 +02:00
Andreas Dangel d8645dc0fc Update changelog 2016-04-29 11:28:10 +02:00
Andreas Dangel e2cc7e3dd6 Merge branch 'master' of https://github.com/Up2Go/pmd into pr-88 2016-04-29 11:27:15 +02:00
Andreas Dangel 9579832856 Add unit test for loading and parsing the rulesets 2016-04-29 11:22:46 +02:00
Robert Sösemann 130f05cffd Moved special handling code from model into renderer class 2016-04-28 21:18:19 +02:00
David Renz dfe2cc0ef5 Fixed the CodeClimate renderer - Cut off the "/Code/" working directory
of CodeClimate engines in order to get the relative path.
2016-04-28 18:51:38 +02:00
David Renz fe5e6921dd Fixed typo in ruleset.xml 2016-04-28 17:11:57 +02:00
Andreas Dangel cead3d3a9b Add MAVEN_OPTS="-Xmx500m" for travis-ci 2016-04-23 21:10:53 +02:00
Andreas Dangel a00e4d439e Merge branch 'bug-1471' 2016-04-23 19:54:52 +02:00
Andreas Dangel edd0eeb9c8 Merge branch 'bug-1471' into pmd/5.4.x 2016-04-23 19:50:22 +02:00
Andreas Dangel baad0f2abe Merge branch 'bug-1471' into pmd/5.3.x 2016-04-23 19:46:07 +02:00
Andreas Dangel 176cc2344d Fix NPEs 2016-04-23 19:43:13 +02:00
Andreas Dangel cb5ac3086e Fixes #1471 False positives for DoubleCheckedLocking 2016-04-23 19:34:32 +02:00
Andreas Dangel d1419f6b77 pom: Add a language module for Maven POM 2016-04-23 18:40:11 +02:00
Andreas Dangel 975d276f28 documentation: mention Perl and Swift in readme 2016-04-23 18:35:50 +02:00
Andreas Dangel 7460723660 documentation: new java and apex rules 2016-04-23 18:30:57 +02:00
Andreas Dangel ec8d1d9d31 documentation: mention java 7 / java 8 requirement 2016-04-23 18:30:13 +02:00
Andreas Dangel 2e008e4e26 Describe how to build the maven site 2016-04-23 13:29:59 +02:00
Andreas Dangel 06bf6e8cf8 Fix empty ruleset files 2016-04-23 13:27:57 +02:00
Andreas Dangel 8bd37d0033 Merge branch 'pr87' 2016-04-23 11:44:40 +02:00
Andreas Dangel 33983b3358 Refactor code climate categories to be a EnumeratedMultiProperty as
this is not a free text string property - only specific values
are supported
2016-04-23 11:43:48 +02:00
Andreas Dangel 040fa1d7d8 Update changelog 2016-04-23 11:37:45 +02:00
Andreas Dangel 78470b909f Merge branch 'master' of https://github.com/Up2Go/pmd into pr87 2016-04-23 11:16:08 +02:00
Robert Sösemann 3ed2b3bced Added Code Climate pass through properties to ruleset.xml 2016-04-19 15:59:44 +02:00
Robert Sösemann 021c92d9a9 Fixed #35 2016-04-19 15:39:14 +02:00
David Renz 25f5399d15 #33 Changed the default values, matching our default ruleset 2016-04-19 11:52:07 +02:00
Robert Sösemann 9d5598e63a Fixed Code Climate renderer test 2016-04-18 15:39:46 +02:00
Andreas Dangel 109d8d1384 travis: deploy the java8 build from now on 2016-04-17 20:00:05 +02:00
Andreas Dangel 487ac7d509 Make PMD Language modules comparable and provide a default implementation 2016-04-17 19:42:00 +02:00
Andreas Dangel 7af7522d11 apex: remove unnecessary dependencies, just use antlr-runtime 2016-04-17 10:02:11 +02:00
Robert Sösemann c50fd060ed 1) Renamed CodeClimate specific properties to better be recognizable as
CodeClimate specific
2) Added Code Climate categegories pass through property to not depend
on our current ruleset name = category solution
2016-04-16 20:25:20 +02:00
Robert Sösemann 2da0108306 Added CodeClimateRule to enhance Apex rules with pass through properties
needed for a sensible Code Climate output (currently only a multiplier
for their remediation_point default min value of 50.000)
2016-04-15 23:03:13 +02:00
David Renz 67daf44dcd Improved Code Climate Renderer
JSON report now indicates the proper category
2016-04-15 17:49:08 +02:00
David Renz b303f27554 Changed all rule categories according to the categories of the Code
Climate Spec https://github.com/codeclimate/spec/blob/master/SPEC.md
2016-04-15 17:30:14 +02:00
David Renz f53f6594de Formatting and minor changes 2016-04-15 15:58:35 +02:00
David Renz 116e66bfd9 Formatting and minor changes 2016-04-15 15:45:03 +02:00
David Renz 1a27678a31 Added .trigger to supported extensions 2016-04-15 15:31:00 +02:00
David Renz 1f563c4841 Adapted the ruleset.xml 2016-04-15 15:14:38 +02:00
Andreas Dangel 839a874157 Fix LanguageVersionTest for Java, add for Apex 2016-04-13 21:13:15 +02:00
Andreas Dangel 334ae8b9ba Fix missing rulesets.properties file for wsdl 2016-04-11 22:18:10 +02:00
Andreas Dangel c655dc72fd site generation - use java8 in order to be able to generate javadoc
for the modules which use java8
2016-04-11 21:05:11 +02:00
Andreas Dangel e215d372ef xml: use source code positioner from pmd-core 2016-04-11 20:24:43 +02:00
Andreas Dangel 66e533c212 Merge branch 'Up2Go-master' 2016-04-10 17:37:20 +02:00
Andreas Dangel e55ac168dd Update changelog 2016-04-10 17:36:52 +02:00
Andreas Dangel b230d4eebc Merge branch 'master' of https://github.com/Up2Go/pmd into Up2Go-master 2016-04-10 17:18:42 +02:00
Andreas Dangel 2df3db7b6b Merge branch 'toolchains' 2016-04-10 17:05:18 +02:00
Andreas Dangel 8c7f093a41 Merge branch 'toolchains' into pmd/5.4.x 2016-04-10 17:04:49 +02:00
Andreas Dangel 803d35005a Merge branch 'toolchains' into pmd/5.3.x 2016-04-10 17:03:40 +02:00
Andreas Dangel 6fc617bd11 Java version is now handled by toolchain 2016-04-10 17:03:30 +02:00
Andreas Dangel 6be8547f3e Add maven toolchains 2016-04-10 16:55:25 +02:00
Andreas Dangel b0773c8614 Restore accidently changed lines 2016-04-09 20:46:49 +02:00
Andreas Dangel b0a0cf66b6 Add link to apex reference documentation 2016-04-09 19:47:23 +02:00
Andreas Dangel 40bf24bced Provide a warning and do not fail, if java7 is used 2016-04-09 19:45:55 +02:00
Andreas Dangel bb5d5720fd Fix duplicate dependency in pmd-dist 2016-04-09 18:59:31 +02:00
Andreas Dangel 8bec393cf8 Use the source code position from core in javascript 2016-04-09 18:57:56 +02:00
Andreas Dangel 380fdcab54 Add missing license headers 2016-04-09 18:54:46 +02:00
Andreas Dangel 365b403005 Using now startIndex and endIndex of the location. Works for most cases.
Only exceptions are:
*   Methods: the end is determined by the contained block statement
*   Root nodes: the end is just the end of the whole source file

Uses the source code position from the javascript module.


Fixes Up2Go/pmd#30
2016-04-09 18:46:46 +02:00
Robert Sösemann 3ae9b489a0 Merge branch 'master' of https://github.com/Up2Go/pmd.git 2016-04-08 17:51:39 +02:00
Robert Sösemann 68bad8ae6a Fixed typos 2016-04-08 17:47:24 +02:00
David Renz 2c9c5a4e54 Fixed AvoidDeeplyNestedIfStmtsRule 2016-04-08 17:31:40 +02:00
Robert Sösemann 18bc0dfe94 Ignore test classes 2016-04-08 17:13:50 +02:00
Robert Sösemann 591da4f364 Added two more Salesforce.com specific rules AvoidGlobalModifier and
AvoidLogicInTrigger
2016-04-08 17:01:45 +02:00
Robert Sösemann 243f1928b7 Added Ncss rules 2016-04-08 15:15:09 +02:00
Robert Sösemann 9e6b25ce7f Added Ncss Rules 2016-04-08 15:11:06 +02:00
David Renz 4bbcdfdb49 Fixed ExcessiveParameterListRule 2016-04-08 14:09:32 +02:00
David Renz 1d3e3d2989 Restored ExcessiveClassLengthRule and formatted test code 2016-04-08 11:52:50 +02:00
Robert Sösemann b624880ff5 Replace Length methods with (still failing) Ncss rules 2016-04-08 00:42:11 +02:00
Robert M und David R fafc3a2470 Added regression test for #30 2016-04-07 22:32:57 +02:00
David Renz c6b31a8cfe Fixed #29 2016-04-07 17:26:54 +02:00
David Renz da9c5c5f77 Added test #29 2016-04-07 17:00:34 +02:00
David Renz 6b72013429 Added test #23 2016-04-07 16:15:11 +02:00
Robert Sösemann 5e9df4a446 Improved accuracy of UserClass startLine by not returning the LOC of the
UserClass but its first ModifierNode child.
2016-04-07 13:17:57 +02:00
Robert M und David R e8686552e7 Fixed #26 2016-04-06 21:56:46 +02:00
David Renz dc7c36f65c Added test #26 2016-04-06 18:11:49 +02:00
Robert Sösemann 747eb9b509 Fixed #25 2016-04-06 17:01:08 +02:00
Robert Sösemann 1dc61fe071 Auto-Format classes 2016-04-06 15:17:08 +02:00
Robert Sösemann f926a6d7cc Added class and method length dependant rules 2016-04-06 15:14:16 +02:00
David Renz 236ccecfb8 VariableNamingConvetionRule now can handle exception classes 2016-04-06 14:37:59 +02:00
David Renz 5ff244fb70 Removed some console output 2016-04-06 14:00:08 +02:00
David Renz c970180626 Fixed ruleset.xml 2016-04-06 12:09:50 +02:00
@rsoese (Twitter handle) d70e2b16ab Added Apex to Readme 2016-04-06 09:59:34 +02:00
Robert Sösemann e28183b1cf Added default version so CLI won't fail with Nullpointer 2016-04-04 12:02:06 +02:00
Robert M und David R 9f0071893e Remove "unused rules" as they are to hard to finalize before the planned
pull request
2016-04-03 15:58:42 +02:00
Robert M und David R 37cf87dc4c Fixed Naming tests 2016-04-03 15:46:32 +02:00
Andreas Dangel 0cc065e682 Add a local maven repo to avoid using system scope dependencies 2016-04-02 12:26:20 +02:00
Andreas Dangel 9a5b2a7dbd Add Modifiers information (public, private, ...) 2016-04-02 12:06:37 +02:00
Andreas Dangel 46c24f3a85 Improve node position beginLine. RootNodes are handled special, they
cover the full source code. Other nodes go from their start until the start
of the next sibling.
ModifierNodes not very accurate, but Methods look quiet good now.

References #14 (https://github.com/Up2Go/pmd/issues/14)
2016-04-02 12:05:57 +02:00
Andreas Dangel b71b95c3ba Merge branch 'bug-1458' 2016-04-01 21:44:51 +02:00
Andreas Dangel bc902cee19 Merge branch 'bug-1467' 2016-04-01 21:43:54 +02:00
Andreas Dangel a2c344fb54 Merge branch 'bug-1458' into pmd/5.4.x 2016-04-01 21:32:37 +02:00
Andreas Dangel c5691ecf35 Merge branch 'bug-1467' into pmd/5.4.x 2016-04-01 21:30:45 +02:00
Andreas Dangel 93227d1372 Merge branch 'bug-1458' into pmd/5.3.x 2016-04-01 21:08:40 +02:00
Andreas Dangel 5f9114a02a Merge branch 'bug-1467' into pmd/5.3.x 2016-04-01 21:08:20 +02:00
Andreas Dangel 494719d8ea Fixes #1458 Performance degradation scanning large XML files with XPath custom rules 2016-04-01 20:52:38 +02:00
Andreas Dangel 3d84e3af74 Fixes #1467 UseUtilityClass can't correctly check functions with multiple annotations 2016-04-01 19:04:53 +02:00
David Renz 74b922af35 Fixed ExcessiveParameterListRule 2016-04-01 17:21:44 +02:00
Robert Sösemann d22bfe7b70 Temporarilly removed length rules due to issue #14 2016-04-01 17:10:55 +02:00
David Renz cdb52e23b3 Fixed ExcessivePublicCountRule and some minor changes 2016-04-01 16:45:52 +02:00
David Renz 1fbfdf3842 Added ExcessivePublicCountRule 2016-04-01 13:33:32 +02:00
David Renz 1b1f3454d7 Removed NcssCountRules and NPathComplexityRule 2016-04-01 12:02:12 +02:00
David Renz 4593909dcc Fixed StdCyclomaticComplexityRule 2016-04-01 11:42:40 +02:00
Robert Sösemann 8f7ad9c1ab Added Unused code port (don't compile) 2016-03-31 17:18:18 +02:00
Robert Sösemann ecd7fbc59d Merge branch 'master' of https://github.com/Up2Go/pmd.git
Conflicts:
	pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitorAdapter.java
	pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/AbstractApexRule.java
2016-03-31 17:13:21 +02:00
Robert Sösemann 2acbc44b0a . 2016-03-31 17:08:31 +02:00
Robert Sösemann b22274c972 Fixed Naming Rules 2016-03-31 17:05:43 +02:00
David Renz 44dbe2283c Merge branch 'master' of https://github.com/Up2Go/pmd.git 2016-03-31 14:53:27 +02:00
David Renz 6458f90d23 small rule improvements 2016-03-31 14:52:44 +02:00
Robert Sösemann e3da2619dd CDP is also running for Apex (CLI and GUI) 2016-03-31 14:50:31 +02:00
Robert Sösemann b77fef6338 Ported very useful AvoidDeeplyNestedIfStmtsRule 2016-03-31 11:17:36 +02:00
Robert Sösemann 9069f53a23 Added PMD configuration file which will be the default used by the
CodeClimate engine if the user src doesn't contain an overriding file
2016-03-31 09:49:47 +02:00
Robert Sösemann 83931857e3 Fixed https://github.com/Up2Go/pmd/issues/16 2016-03-30 10:52:50 +02:00
Andreas Dangel 220c3f3618 Fix version of new swift module 2016-03-29 20:18:40 +02:00
Andreas Dangel 1e957080eb Merge branch 'pr-33' 2016-03-29 20:18:30 +02:00
Andreas Dangel 1e146d0e1d Fix version of swift module 2016-03-29 20:11:31 +02:00
Andreas Dangel 395a40a7ae Merge branch 'pr-33' into pmd/5.4.x 2016-03-29 20:06:23 +02:00
Andreas Dangel cbde6f48ea Merge branch 'pr-33' into pmd/5.3.x 2016-03-29 20:01:12 +02:00
Andreas Dangel c3f98356f8 Move antlr dependency definitions up into parent pom 2016-03-29 19:49:04 +02:00
Andreas Dangel ccd0badd4a Update changelog and docu to add swift 2016-03-29 19:44:50 +02:00
Andreas Dangel 2ce28f0ae3 Merge branch 'tiobe/add_swift_language' of https://github.com/tiobe/pmd into pr-33 2016-03-29 19:21:17 +02:00
David Renz 62aaf95e11 Fixed MethodNamingConventionsRule (isOverriddenMethod) 2016-03-29 17:14:54 +02:00
David Renz 0b81c72f40 Changed root node from (AST)UserClass to (AST)Compilation 2016-03-29 16:18:01 +02:00
David Renz 98899afca1 Added missing notes to AbstractApexRule 2016-03-29 11:48:36 +02:00
David Renz ce2b823193 Added missing notes to visitor 2016-03-29 11:34:54 +02:00
Robert Sösemann cef6824f78 Added Apex test class for parser test 2016-03-29 10:54:12 +02:00
Robert Sösemann 995e500eb4 Small improvements 2016-03-28 13:44:18 +02:00
Robert Sösemann 523dcc8fe0 Started porting naming rules 2016-03-28 00:39:13 +02:00
Andreas Dangel 26c9d95cfa Return a fixed linenumber/column until we figure out a reliable way
to determine the position of the node in the source code
2016-03-27 17:37:48 +02:00
Andreas Dangel acacf1906e Fix unit tests of AvoidSoqlInLoopsRule 2016-03-27 17:24:42 +02:00
Andreas Dangel aad2059731 Fix visitor - the jjtAccept methods have to be in the
concrete subclasses
2016-03-27 17:14:26 +02:00
Andreas Dangel 87c85c8aff Fix compile errors 2016-03-27 15:54:27 +02:00
Robert M und David R eb5491378a Merge branch 'master' of https://github.com/Up2Go/pmd.git 2016-03-25 22:48:19 +01:00
Robert M und David R 7be1510a65 Started working on first non-Java rule: AvoidSoqlInLoopsRule 2016-03-25 22:48:05 +01:00
David Renz 50c47371cc Fixed cyclomatic complexity rule 2016-03-24 15:36:13 +01:00
Robert Sösemann 01be142231 Added Cyclomatic complexity rules 2016-03-24 11:40:54 +01:00
Robert M und David R 1748a072a1 Focus on porting codesize test from java to apex 2016-03-23 23:58:32 +01:00
Robert Sösemann ebab8d0edb Next step towards real world rules 2016-03-23 16:20:08 +01:00
David Renz 9c6c3af8cc Added missing notes 2016-03-23 15:27:18 +01:00
@rsoese (Twitter handle) e648ab4b74 Update README.md 2016-03-23 15:01:37 +01:00
Robert Sösemann a48224bf01 Added ported code size tests 2016-03-23 10:53:26 +01:00
Robert Sösemann ea5f7017a6 Fixed imports 2016-03-23 10:29:40 +01:00
Robert Sösemann 00e3d9edc2 Renamed 2016-03-23 09:58:22 +01:00
Robert Sösemann ff62b2545c Added some codesize rules (with compile errors) 2016-03-23 09:54:47 +01:00
Robert Sösemann c310c51ea0 Forgot to push 2016-03-22 15:53:42 +01:00
Robert Sösemann 3bf1495cc2 Added minimal nodes but real life code doesn't parse yet 2016-03-22 09:40:19 +01:00
Andreas Dangel 202230e1db Fix unit test 2016-03-21 21:23:24 +01:00
Andreas Dangel ce3727e10a Revert "Fix compilation - remove the deleted projects - only keep apex"
This reverts commit 9faf05bfcb.

This adds back all the modules in the main pom.xml. Note: apex is only
active for java8 builds
2016-03-21 21:01:39 +01:00
Andreas Dangel e240a024d6 Revert "Next step towards compile ;-)" so that we don't loose
cs, fortran, go, jsp, matlab, php, plsql, python, scala, ui, vm, xml ;)

This reverts commit 89fcd45f75.

The apex files have not been reverted.
2016-03-21 20:57:34 +01:00
Robert Sösemann 378c903e9c I guess we need more AST nodes to make parsing of real world classes
work ;-)
2016-03-21 17:18:09 +01:00
Robert Sösemann 18da883596 . 2016-03-21 16:56:05 +01:00
Robert Sösemann 03e61f1684 Format source code 2016-03-21 11:58:24 +01:00
Robert Sösemann 03f10491bf Added basic rule 2016-03-21 11:06:59 +01:00
@rsoese (Twitter handle) e5c9107c7e Merge pull request #7 from adangel/pmd-apex-pr-1
Apex Parser / Tree Builder
2016-03-20 14:39:25 +01:00
Andreas Dangel 7e609e074e Try to determine position of nodes 2016-03-20 12:24:21 +01:00
Andreas Dangel 2d119a225d Fix test - we have actually 5 methods: 2 in source code, 3 generated by compiler 2016-03-20 12:23:57 +01:00
Andreas Dangel 620c2009e1 Determine name of UserClass and Method 2016-03-20 12:23:20 +01:00
Andreas Dangel 59414f9e5b Add a dump facade to print out the AST tree 2016-03-20 12:22:33 +01:00
Andreas Dangel d2b182f280 Add java as a dependency for designer - add designer profile
The designer can be started within "pmd-apex" by running

    mvn -P designer exec:java
2016-03-20 11:35:38 +01:00
Andreas Dangel 1a46ef9b05 Make the one apex version the default version 2016-03-20 11:29:09 +01:00
Andreas Dangel 9faf05bfcb Fix compilation - remove the deleted projects - only keep apex 2016-03-20 11:21:50 +01:00
Andreas Dangel 4221e7a00a Add a version for the apex language module 2016-03-20 11:18:20 +01:00
Andreas Dangel 294ae0de92 Mark UserClass as root node, so that XPath rules will work 2016-03-20 11:16:11 +01:00
Andreas Dangel efbe99b0d2 Add missing AST nodes to be able to parse the samples 2016-03-20 11:15:39 +01:00
Andreas Dangel d739f11ff4 Implement the apex visitor methods 2016-03-20 11:14:38 +01:00
Andreas Dangel 27fa89a3cb Call traverse on the Apex nodes with an scope (it is required) 2016-03-20 11:14:11 +01:00
Andreas Dangel 50fac3a5cf Make sure, we fail early if we can't parse the code 2016-03-20 11:11:24 +01:00
Andreas Dangel 3d63f1a8bd Add two code samples 2016-03-20 11:11:07 +01:00
Andreas Dangel 4df5999f6b Fix syntax error in code sample 2016-03-20 11:10:37 +01:00
Robert Sösemann 4f0ed30250 Removed jars that are now managed via maven 2016-03-15 16:48:59 +01:00
Robert Sösemann ea1eca0080 Added dependency entries for each Salesforce lib 2016-03-15 15:06:34 +01:00
Robert Sösemann e9bfefbbc1 Moved test class to correct package 2016-03-15 11:29:03 +01:00
Robert M und David R a144493516 Added minimal failing test 2016-03-15 00:46:47 +01:00
Robert M und David R ba9c8fc1b8 Removed sample code 2016-03-14 20:43:09 +01:00
Robert Sösemann 42273034c7 First simple ast node adapter 2016-03-14 16:37:12 +01:00
Robert Sösemann bb0302a6e7 Next step towards compile ;-) 2016-03-14 16:15:19 +01:00
Robert Sösemann 89fcd45f75 Next step towards compile ;-) 2016-03-14 12:49:30 +01:00
@rsoese (Twitter handle) 4e75f57bdf Added Apex module 2016-03-14 09:54:14 +01:00
Andreas Dangel c9ff12785a Merge branch 'bug-1461-doc' 2016-03-13 15:29:16 +01:00
Andreas Dangel e58feea9cd Merge branch 'bug-1461-doc' into pmd/5.4.x 2016-03-13 15:29:10 +01:00
Andreas Dangel c571abdb1d Merge branch 'bug-1461-doc' into pmd/5.3.x 2016-03-13 15:28:58 +01:00
Andreas Dangel 0725586b9a Update documentation about thread safety of rules (see #1461) 2016-03-13 15:28:37 +01:00
Robert Sösemann 9e1e5b21db Renamed cloned Ecmascript module classes and merged in Jorje libs
DOESN'T COMPILE
2016-03-12 23:58:04 +01:00
David Renz b82b641927 Added an Apex module (pmd-apex) 2016-03-11 13:30:05 +01:00
Andreas Dangel 3dd8156014 Merge branch 'bug-1461' into pmd/5.4.x 2016-03-10 20:23:43 +01:00
Andreas Dangel ccbb372a4f Fix compile error (pmd 5.3.x is on java6) 2016-03-10 20:19:30 +01:00
Andreas Dangel be51afc2b4 Merge branch 'bug-1461' into pmd/5.3.x 2016-03-10 20:18:58 +01:00
Andreas Dangel baf4a9c7f5 Merge branch 'bug-1461' 2016-03-10 20:16:26 +01:00
Andreas Dangel 5f9e90761d Fixes #1461 Possible threading issue due to PR#75
Update changelog
2016-03-10 20:12:13 +01:00
Andreas Dangel 4a0802a269 Revert "RuleSetFactory Performance Enhancement:-"
This reverts commit 9da51952ef.
2016-03-10 20:11:06 +01:00
Andreas Dangel 3de70426cf Revert "Update changelog, keep backwards compatible createRuleSets methods by overloading"
This reverts commit b753cc5ec5.
2016-03-10 20:10:58 +01:00
Andreas Dangel 54ce3036b2 Add unit test to verify concurrency issue #1461
References pr #75
2016-03-10 20:10:51 +01:00
Jan van Nunen 92678c0c0a Added support for Swift to CPD.
The tokenizer uses the ANTLR4 grammar of the Tailor static analyzer for
Swift. (https://github.com/sleekbyte/tailor)
2016-03-02 11:11:02 +01:00
Andreas Dangel ee131a3553 Merge branch 'bug-1464' 2016-02-28 15:13:10 +01:00
Andreas Dangel 3d58d913a7 Merge branch 'bug-1464' into pmd/5.4.x 2016-02-28 15:12:30 +01:00
Andreas Dangel 1726c33c19 Merge branch 'bug-1464' into pmd/5.3.x 2016-02-28 15:12:22 +01:00
Andreas Dangel 573186be69 fixes #1464 UnnecessaryFinalModifier false positive on a @SafeVarargs method 2016-02-28 14:22:04 +01:00
Andreas Dangel 1402e9320b Merge branch 'pr-85'
Closes #85
Note: pr-85 has been rebased onto pmd/5.3.x
2016-02-28 14:06:29 +01:00
Andreas Dangel a81de955c6 Merge branch 'pr-85' into pmd/5.4.x
Closes #85
Note: pr-85 has been rebased onto pmd/5.3.x
2016-02-28 14:05:29 +01:00
Andreas Dangel 090636e2db Merge branch 'pr-85' into pmd/5.3.x
Closes #85
Note: pr-85 has been rebased onto pmd/5.3.x
2016-02-28 14:04:57 +01:00
Andreas Dangel fc35a162d9 Update changelog, whitespaces, improve test case 2016-02-28 14:01:32 +01:00
albfernandez 08fb59180d remove trailing spaces 2016-02-28 13:07:03 +01:00
albfernandez 40bf82244f Fix the fix for #1340 2016-02-28 13:07:03 +01:00
albfernandez 3c0516b86f Fix #1340 UseStringBufferForStringAppends False Positive with ternary
operator (used both in condition and options)
2016-02-28 13:07:03 +01:00
Andreas Dangel f9c6b0b08d Merge branch 'bug-1465' 2016-02-27 19:38:39 +01:00
Andreas Dangel 15a82f0ddb Merge branch 'bug-1465' into pmd/5.4.x 2016-02-27 19:37:39 +01:00
Andreas Dangel 32cc07d7cb Merge branch 'bug-1465' into pmd/5.3.x 2016-02-27 19:37:29 +01:00
Andreas Dangel 1c08f94691 fixes #1465 False Positve UnusedImports with javadoc @link 2016-02-27 19:30:16 +01:00
Andreas Dangel fede0e28fb Merge branch 'tiobe-tiobe/fix_UTF8_escape_in_OBJC_string_literals' 2016-02-24 21:54:35 +01:00
Andreas Dangel 6dbcf77953 Merge branch 'tiobe-tiobe/fix_UTF8_escape_in_OBJC_string_literals' into pmd/5.4.x 2016-02-24 21:53:36 +01:00
Andreas Dangel aab525196c Merge branch 'tiobe-tiobe/fix_UTF8_escape_in_OBJC_string_literals' into pmd/5.3.x 2016-02-24 21:53:16 +01:00
Andreas Dangel 518f1eff6d Update changelog 2016-02-24 21:48:41 +01:00
Andreas Dangel 62e71035d9 Upgrade maven-pmd-plugin 2016-02-24 21:38:26 +01:00
Jan van Nunen 7915f08bc9 Extended Objective-C grammar to accept UTF-8 escapes (\uXXXX) in string literals. 2016-02-18 13:40:32 +01:00
Andreas Dangel 7f273da019 Merge branch 'bug-1457' 2016-02-07 12:39:33 +01:00
Andreas Dangel 873b28dd1d Merge branch 'bug-1457' into pmd/5.4.x 2016-02-07 12:38:29 +01:00
Andreas Dangel 84cfa37b94 Merge branch 'bug-1457' into pmd/5.3.x 2016-02-07 12:32:02 +01:00
Andreas Dangel 079ffeb4df fixes #1457 TooManyMethods counts inner class methods 2016-02-07 12:31:49 +01:00
Andreas Dangel a26564a5f6 Merge branch 'bug-1456' 2016-02-07 12:16:58 +01:00
Andreas Dangel 84a20e2082 Merge branch 'bug-1456' into pmd/5.4.x 2016-02-07 12:15:35 +01:00
Andreas Dangel 6509f78448 Merge branch 'bug-1456' into pmd/5.3.x 2016-02-07 12:03:44 +01:00
Andreas Dangel 89ffb56e4e fixes #1456 UnusedFormalParameter should ignore overriding methods 2016-02-07 12:03:30 +01:00
Andreas Dangel c4b50e7e3c Merge branch 'bug-1424' 2016-02-01 22:15:52 +01:00
Andreas Dangel df70bc4578 Merge branch 'bug-1424' into pmd/5.4.x 2016-02-01 22:14:49 +01:00
Andreas Dangel cfaaf2f52a fixes #1424 False positive with ternary operator 2016-02-01 22:10:38 +01:00
Andreas Dangel cf71f252a5 Merge branch 'bug-1453' 2016-01-28 22:29:59 +01:00
Andreas Dangel 62da34ccce Merge branch 'bug-1453' into pmd/5.4.x 2016-01-28 22:29:13 +01:00
Andreas Dangel dc7762b910 Merge branch 'bug-1453' into pmd/5.3.x 2016-01-28 22:24:57 +01:00
Andreas Dangel b9f8f2d4fb fixes #1453 Test Class Without Test Cases gives false positive 2016-01-28 22:24:34 +01:00
Andreas Dangel eefba9dcc6 java-unnecessary/UselessParentheses - add another test for
http://stackoverflow.com/questions/34911230/pmd-uselessparentheses-violation
2016-01-28 22:10:21 +01:00
Andreas Dangel de0608656b Merge branch 'Monits-emptymethodabstractmessage' 2016-01-28 21:49:31 +01:00
Andreas Dangel c85000b065 Update changelog 2016-01-28 21:48:40 +01:00
Andreas Dangel 56f21cf325 Merge branch 'emptymethodabstractmessage' of https://github.com/Monits/pmd into Monits-emptymethodabstractmessage 2016-01-28 21:47:56 +01:00
Andreas Dangel 7864c139f5 Merge branch 'bug-1455' 2016-01-25 10:41:10 +01:00
Andreas Dangel d4c4ab4e7e Merge branch 'bug-1455' into pmd/5.4.x 2016-01-25 10:36:34 +01:00
Andreas Dangel 80c10534b3 Merge branch 'bug-1455' into pmd/5.3.x 2016-01-25 10:32:50 +01:00
Andreas Dangel e6f5380719 fixes #1455 PMD doesn't handle Java 8 explicit receiver parameters
Those parameters are correctly parsed now and can be found
with "//FormalParameter[@ExplicitReceiverParameter='true']"
2016-01-25 10:29:00 +01:00
Andreas Dangel 5d7ea7d6aa Merge branch 'bug-1449' 2016-01-24 17:40:35 +01:00
Andreas Dangel 55685046ac Merge branch 'bug-1449' into pmd/5.4.x 2016-01-24 17:33:28 +01:00
Andreas Dangel e4438ff8a2 Merge branch 'bug-1449' into pmd/5.3.x 2016-01-24 17:29:22 +01:00
Andreas Dangel 44a8c0defe fixes #1449 false positive when casting a variable to short 2016-01-24 17:18:50 +01:00
Andreas Dangel e52be14980 Merge branch 'pr-31' 2016-01-21 20:37:53 +01:00
Andreas Dangel a42cb1b0c2 Merge branch 'pr-31' into pmd/5.4.x 2016-01-21 20:30:39 +01:00
Andreas Dangel 314ae4414b Merge branch 'pr-31' into pmd/5.3.x 2016-01-21 20:23:22 +01:00
Andreas Dangel 04527bc4cb Update changelog 2016-01-21 20:23:02 +01:00
Andreas Dangel 82178809fa Merge branch 'detect_file_encoding_using_UTF_BOM' of https://github.com/tiobe/pmd into pr-31 2016-01-21 20:10:22 +01:00
Ignacio Tirabasso 55453cc23d Fix rule's description. 2016-01-21 15:22:48 -03:00
Ignacio Tirabasso 371db089c9 Change EmptyMethodInAbstractClassShouldBeAbstract rule's description.
Summary: Change EmptyMethodInAbstractClassShouldBeAbstract rule's description.

Test Plan: run tests

Reviewers: jmsotuyo

Differential Revision: http://ph.monits.com/D14582
2016-01-21 15:09:27 -03:00
Andreas Dangel 260e777d71 Fix unit test 2016-01-20 22:47:15 +01:00
Andreas Dangel 2b700c02b6 Fix unit test 2016-01-20 22:33:50 +01:00
Andreas Dangel 3e791f5d22 Merge branch 'pr-30' 2016-01-20 22:25:40 +01:00
Andreas Dangel bd64e4fdc6 Merge branch 'pr-30' into pmd/5.4.x 2016-01-20 22:24:08 +01:00
Andreas Dangel 641ab25850 Merge branch 'pr-30' into pmd/5.3.x 2016-01-20 22:21:18 +01:00
Andreas Dangel 8c4d307ddd Refactor command line tests for CPD and create a BaseCPDCLITest class 2016-01-20 22:13:25 +01:00
Andreas Dangel 7a33d59a95 Add unit test for new behavior 2016-01-20 22:08:45 +01:00
Andreas Dangel b9b6e13849 Update changelog 2016-01-20 22:08:28 +01:00
Andreas Dangel 64441c8e93 Merge branch 'tiobe/remove_filefilter_for_files' of https://github.com/tiobe/pmd into pr-30 2016-01-20 21:38:23 +01:00
Andreas Dangel 531c88b103 Merge branch 'bug-1452' 2016-01-15 10:44:10 +01:00
Andreas Dangel 0cdc14deed Merge branch 'bug-1452' into pmd/5.4.x 2016-01-15 10:42:56 +01:00
Andreas Dangel d76c5b0de6 Merge branch 'bug-1452' into pmd/5.3.x 2016-01-15 10:42:47 +01:00
Andreas Dangel 7bf00118a7 Refactoring AccessorClassGenerationRule 2016-01-15 10:42:19 +01:00
Andreas Dangel 69dbbdfe2d references #81 2016-01-15 10:42:08 +01:00
Andreas Dangel 5d5ac077b1 Merge branch 'codeclimate-doc' 2016-01-15 09:54:20 +01:00
Andreas Dangel 74805b7a87 Merge branch 'codeclimate-doc' into pmd/5.4.x 2016-01-15 09:54:11 +01:00
Andreas Dangel 699077fc7d Merge branch 'codeclimate-doc' into pmd/5.3.x 2016-01-15 09:54:00 +01:00
Andreas Dangel e8e950ad20 Add codeclimate renderer to the documentation 2016-01-15 09:53:43 +01:00
Jan van Nunen 607606534d Added file encoding detection to CPD. 2016-01-11 13:57:04 +01:00
Andreas Dangel fbe5a52b6f pmd-perl: remove pmd-build / site plugin, as perl doesn't have any rulesets/rules 2016-01-07 11:49:39 +01:00
Andreas Dangel ac51f480a3 Merge branch 'pr-29' 2016-01-07 10:59:33 +01:00
Andreas Dangel 078db01307 Merge branch 'pr-29' into pmd/5.4.x 2016-01-07 10:58:53 +01:00
Andreas Dangel 207cf4842e Merge branch 'pr-29' into pmd/5.3.x 2016-01-07 10:58:46 +01:00
Andreas Dangel 03411d620e Update changelog 2016-01-07 10:58:33 +01:00
Andreas Dangel 4a90118222 Merge branch 'tiobe/UTF8_BOM_support_for_JSP_tokenizer' of https://github.com/tiobe/pmd into pr-29 2016-01-07 10:58:05 +01:00
Andreas Dangel ea7669ee92 Merge branch 'pr-27' 2016-01-07 10:56:59 +01:00
Andreas Dangel fda1c719d7 Merge branch 'pr-27' into pmd/5.4.x 2016-01-07 10:56:19 +01:00
Andreas Dangel 907a05670a Merge branch 'pr-27' into pmd/5.3.x 2016-01-07 10:56:09 +01:00
Andreas Dangel eee4bf2550 Update changelog 2016-01-07 10:55:56 +01:00
Andreas Dangel a33e83addc Merge branch 'tiobe/raw-CPP11-literals' of https://github.com/tiobe/pmd into pr-27 2016-01-07 10:55:27 +01:00
Andreas Dangel fc2856ee34 Merge branch 'pr-83'
Closes #83 (rebased)
2016-01-07 10:53:46 +01:00
Andreas Dangel 2b72dcabf2 Merge branch 'pr-83' into pmd/5.4.x
Closes #83 (rebased)
2016-01-07 10:52:28 +01:00
Andreas Dangel e5a046007a Merge branch 'pr-83' into pmd/5.3.x
Closes #83 (rebased)
2016-01-07 10:51:20 +01:00
Andreas Dangel e08ba3ea30 Update changelog 2016-01-07 10:50:48 +01:00
Bob W. Hogg b2d5342493 Adds new Code Climate-compliant JSON renderer 2016-01-07 10:47:47 +01:00
Andreas Dangel eff949eea9 Merge branch 'vickenty-cpd-perl' 2016-01-07 10:45:23 +01:00
Andreas Dangel f78358c329 Update changelog 2016-01-07 10:41:01 +01:00
Andreas Dangel e73926b3ee Merge branch 'cpd-perl' of https://github.com/vickenty/pmd into vickenty-cpd-perl 2016-01-07 10:39:59 +01:00
Andreas Dangel ccf2415eec Merge branch 'pr-80'
Closes #80 (rebased)
2016-01-07 10:37:14 +01:00
Andreas Dangel f186d250c3 Merge branch 'pr-80' into pmd/5.4.x
Closes #80 (rebased)
2016-01-07 10:36:55 +01:00
Andreas Dangel f4a3e77185 Merge branch 'pr-80' into pmd/5.3.x
Closes #80 (rebased onto pmd/5.3.x)
2016-01-07 10:36:37 +01:00
Andreas Dangel d783bdcfb0 Update changelog 2016-01-07 10:36:25 +01:00
Wim Deblauwe 8bb07ad5f5 Update mvn-plugin.md
The correct name of the property to configure linking to source code is `linkXRef` and not `linkXref`. If you use `<linkXRef>false</linkXRef>` then the warning "[WARNING] Unable to locate Source XRef to link to - DISABLED" is no longer printed. See also http://stackoverflow.com/a/18390459/40064
2016-01-07 10:35:12 +01:00
Andreas Dangel a200fd2625 Merge branch 'pr-79'
Closes #79
2016-01-07 10:26:39 +01:00
Andreas Dangel 38e1ff9c41 Merge branch 'pr-79' into pmd/5.4.x
Closes #79
2016-01-07 10:25:36 +01:00
Andreas Dangel 1dbf832d24 Merge branch 'pr-79' into pmd/5.3.x
Closes #79
2016-01-07 10:25:30 +01:00
Andreas Dangel 985ed57c52 Update changelog 2016-01-07 10:20:47 +01:00
Matt Benson f67dbb85f6 do not flag public static void main(String[]) as UseVarargs; ignore @Override for UseVarargs 2016-01-07 10:16:26 +01:00
Andreas Dangel efbea802f9 Fix typos in release script 2016-01-07 10:14:24 +01:00
Vickenty Fesunov f647e19fd6 Add Perl support to CPD. 2015-12-28 13:07:58 +01:00
Jan van Nunen 10db98bfee Removed file filter for files that are explicitly specified on the CPD command line using the '--files' command line option. 2015-12-10 16:47:58 +01:00
Jan van Nunen a735fb057e Added support for files with UTF-8 BOM to JSP tokenizer. 2015-12-10 16:24:51 +01:00
Jan van Nunen c099d50397 Added support for Raw String Literals (C++11). 2015-12-10 16:15:40 +01:00
Andreas Dangel c0d29af1c2 Merge branch 'pmd/5.4.x' 2015-12-04 22:55:34 +01:00
Andreas Dangel a483ff353b Prepare next development version 2015-12-04 22:25:44 +01:00
Andreas Dangel 9c60faeab5 [maven-release-plugin] prepare for next development iteration 2015-12-04 21:24:48 +01:00
Andreas Dangel 9a26c74723 [maven-release-plugin] prepare release pmd_releases/5.4.1 2015-12-04 21:24:47 +01:00
Andreas Dangel 3bdd013a5f Prepare pmd release 5.4.1 2015-12-04 21:15:08 +01:00
Andreas Dangel 14510cdc5c Fix pom of pmd-java8 2015-12-04 21:03:58 +01:00
Andreas Dangel 11c091d348 Merge branch 'pmd/5.3.x' into pmd/5.4.x 2015-12-04 21:03:18 +01:00
Andreas Dangel fda6bef16e Prepare next development version 2015-12-04 20:01:31 +01:00
Andreas Dangel 83eceab455 [maven-release-plugin] prepare for next development iteration 2015-12-04 19:15:01 +01:00
Andreas Dangel c141c91612 [maven-release-plugin] prepare release pmd_releases/5.3.6 2015-12-04 19:15:01 +01:00
Andreas Dangel beb07e883f Prepare pmd release 5.3.6 2015-12-04 19:00:54 +01:00
Andreas Dangel cdc7b688e4 Merge branch 'bug-1434' 2015-12-03 20:17:22 +01:00
Andreas Dangel 9931a52608 Merge branch 'bug-1434' into pmd/5.4.x 2015-12-03 20:16:21 +01:00
Andreas Dangel 6a3e7ce6ec Merge branch 'bug-1434' into pmd/5.3.x 2015-12-03 20:15:42 +01:00
Andreas Dangel 735b3e59f2 #1434 CommentRequired raises violation on serialVersionUID field 2015-12-03 20:15:25 +01:00
Andreas Dangel 07e60d756e Merge branch 'bug-1373' 2015-11-30 10:10:34 +01:00
Andreas Dangel a4c131c1bd Merge branch 'bug-1373' into pmd/5.4.x 2015-11-30 10:10:29 +01:00
Andreas Dangel af57d270e4 Merge branch 'bug-1373' into pmd/5.3.x 2015-11-30 10:10:18 +01:00
Andreas Dangel 2452db15f4 #1373 JUnitAssertionsShouldIncludeMessage is no longer compatible with TestNG 2015-11-30 10:05:42 +01:00
Andreas Dangel b72a9c5810 Merge branch 'bug-1374' 2015-11-30 09:46:33 +01:00
Andreas Dangel b74d821714 Merge branch 'bug-1374' into pmd/5.4.x 2015-11-30 09:46:25 +01:00
Andreas Dangel 06cce6055a Merge branch 'bug-1374' into pmd/5.3.x 2015-11-30 09:46:15 +01:00
Andreas Dangel bc9379d9b4 verify #1374 JUnitAssertionsShouldIncludeMessage does not work 2015-11-30 09:35:27 +01:00
Andreas Dangel f4f5af7fc3 Merge branch 'bug-1446' 2015-11-30 09:31:16 +01:00
Andreas Dangel 663d3ddad0 Merge branch 'bug-1446' into pmd/5.4.x 2015-11-30 09:31:06 +01:00
Andreas Dangel 9075c66a3a Merge branch 'bug-1446' into pmd/5.3.x 2015-11-30 09:30:56 +01:00
Andreas Dangel 2a52757aa5 #1446 False positive with JUnit4TestShouldUseBeforeAnnotation when TestNG is used 2015-11-30 09:26:13 +01:00
Andreas Dangel b78c7f2aa7 Merge branch 'java-7' 2015-11-29 22:11:44 +01:00
Andreas Dangel 9086dbb8b9 Merge branch 'java-7' into pmd/5.4.x 2015-11-29 22:02:27 +01:00
Andreas Dangel d563eb30fc Java 7 changes and some compiler warnings fixed 2015-11-29 19:55:13 +01:00
Andreas Dangel fd2dcddc44 Java 7 changes and some compiler warnings fixed 2015-11-25 22:06:18 +01:00
Andreas Dangel d7b5ef8884 Java 7 changes and some compiler warnings fixed 2015-11-20 11:32:18 +01:00
Andreas Dangel 1b64519690 Java 7 changes 2015-11-20 11:32:18 +01:00
Andreas Dangel 88477e3f54 Merge branch 'bug-1436' 2015-11-20 11:23:25 +01:00
Andreas Dangel 14af9fd1cb Merge branch 'bug-1436' into pmd/5.4.x 2015-11-20 11:23:18 +01:00
Andreas Dangel da50aa33ea Merge branch 'bug-1436' into pmd/5.3.x 2015-11-20 11:23:12 +01:00
Andreas Dangel b4c2a51781 #1436 UnnecessaryFullyQualifiedName false positive on clashing static imports with enums 2015-11-20 11:23:01 +01:00
Andreas Dangel 74b6be0690 Merge branch 'bug-1422' 2015-11-20 10:11:46 +01:00
Andreas Dangel 6754865e0b Merge branch 'bug-1422' into pmd/5.4.x 2015-11-20 10:10:55 +01:00
Andreas Dangel 988931c43d #1422 UselessQualifiedThis: False positive with Java 8 Function 2015-11-20 10:05:49 +01:00
Andreas Dangel 8fe0071cf9 Merge branch 'bug-1431' 2015-11-19 22:11:59 +01:00
Andreas Dangel 4a0853060f Merge branch 'bug-1431' into pmd/5.4.x 2015-11-19 22:11:51 +01:00
Andreas Dangel 07aa990ccc Merge branch 'bug-1431' into pmd/5.3.x 2015-11-19 22:11:40 +01:00
Andreas Dangel d621707e2f #1431 SuspiciousEqualsMethodName false positive 2015-11-19 22:06:51 +01:00
Andreas Dangel 12afa44ec8 Merge branch 'bug-1438' 2015-11-19 21:51:06 +01:00
Andreas Dangel 3282a84652 Merge branch 'bug-1438' into pmd/5.4.x 2015-11-19 21:45:45 +01:00
Andreas Dangel 1c7d1a1f1d Merge branch 'bug-1438' into pmd/5.3.x 2015-11-19 21:41:21 +01:00
Andreas Dangel f2ec1be93f #1438 UseNotifyAllInsteadOfNotify gives false positive 2015-11-19 21:35:50 +01:00
Andreas Dangel bbc0bc718d #1442 Java 9 Jigsaw readiness 2015-11-18 19:31:12 +01:00
Andreas Dangel 7ed200f387 Merge branch 'bug-1443' 2015-11-16 21:43:49 +01:00
Andreas Dangel adf3e231af Merge branch 'bug-1443' into pmd/5.4.x 2015-11-16 21:39:16 +01:00
Andreas Dangel aab043787b Merge branch 'bug-1443' into pmd/5.3.x 2015-11-16 21:34:33 +01:00
David Burström 90b1f65ea2 #1443 RedundantFieldInitializer: False positive for small floats 2015-11-16 21:33:51 +01:00
Andreas Dangel f9d1a4e3f7 Merge branch 'travis-pull-request-fix' 2015-11-14 18:09:21 +01:00
Andreas Dangel 0181f14347 Merge branch 'travis-pull-request-fix' into pmd/5.4.x 2015-11-14 18:09:17 +01:00
Andreas Dangel 41b51c2158 Merge branch 'travis-pull-request-fix' into pmd/5.3.x 2015-11-14 18:09:10 +01:00
Andreas Dangel f1a319d6ee Make sure the pull request validation builds don't fail 2015-11-14 18:08:56 +01:00
Andreas Dangel 066630ba21 Merge branch 'Monits-Add-check-to-MissingStaticMethodInNonInstantiableClass-rule' 2015-11-14 18:06:50 +01:00
Andreas Dangel eb39afe2cc Update changelog 2015-11-14 18:02:13 +01:00
Andreas Dangel 0056043ee6 Merge branch 'Add-check-to-MissingStaticMethodInNonInstantiableClass-rule' of https://github.com/Monits/pmd into Monits-Add-check-to-MissingStaticMethodInNonInstantiableClass-rule 2015-11-14 18:01:13 +01:00
Andreas Dangel ac39f245b2 Merge branch 'bug-1441' 2015-11-14 17:56:43 +01:00
Andreas Dangel 30a9309479 Merge branch 'bug-1441' into pmd/5.4.x 2015-11-14 17:56:01 +01:00
Andreas Dangel c8a1307684 Merge branch 'bug-1441' into pmd/5.3.x 2015-11-14 17:54:13 +01:00
Andreas Dangel c9dca8dc92 #1441 PMD: Update documentation how to compile after modularization 2015-11-14 17:53:52 +01:00
Andreas Dangel c584aa8cfa Merge branch 'bug-1440' 2015-11-13 19:18:51 +01:00
Andreas Dangel 0c2f2e5729 Merge branch 'bug-1440' into pmd/5.4.x 2015-11-13 19:14:24 +01:00
Andreas Dangel 0b1fc2b39f Merge branch 'bug-1440' into pmd/5.3.x 2015-11-13 19:09:27 +01:00
Andreas Dangel 02c49ce881 #1440 NPE in AvoidCallingFinalize 2015-11-13 19:05:24 +01:00
Andreas Dangel e6d67312e1 InvalidSlf4jMessageFormat: Fix Null pointer with VariableNamingDeclaration
and VariableDeclaratorId types
2015-11-01 19:39:06 +01:00
Andreas Dangel e7c0d03180 InvalidSlf4jMessageFormat: Fix class cast exception with method calls 2015-11-01 18:51:37 +01:00
Damian Techeira 50554257ce Add Builder pattern check
Summary: Add the builder pattern check to the MissingStaticMethodInNonInstantiatableClass rule

Test Plan: run tests

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Maniphest Tasks: T1440

Differential Revision: http://ph.monits.com/D13295
2015-10-30 12:10:27 -03:00
Andreas Dangel a0bef4d9fe Merge branch 'mkordas-typos' 2015-10-28 21:17:07 +01:00
Andreas Dangel 42be7c099d Update changelog 2015-10-28 21:11:46 +01:00
Andreas Dangel 8bfe2682e9 Merge branch 'typos' of https://github.com/mkordas/pmd into mkordas-typos 2015-10-28 21:10:20 +01:00
Andreas Dangel 7be078a2d8 Merge branch 'pull-request-25' into pmd/5.4.x 2015-10-26 21:00:53 +01:00
Andreas Dangel c43b24a40f Merge branch 'pull-request-25' 2015-10-26 21:00:31 +01:00
Andreas Dangel b0a1223748 Merge branch 'pull-request-25' into pmd/5.3.x 2015-10-26 20:54:39 +01:00
Andreas Dangel ba92715b19 CPD GUI: Add ignoreUsings option 2015-10-26 20:47:34 +01:00
Andreas Dangel 2fa869a868 CPD Ant Task: Add ignoreUsings option 2015-10-26 20:36:07 +01:00
Andreas Dangel 88634a220a Add "--ignore-usings" parameter to CPD commandline for C# 2015-10-25 19:10:18 +01:00
Andreas Dangel 3a7de73d96 Update changelog 2015-10-25 18:57:35 +01:00
Jan van Nunen 7be198aaa3 Added option to exclude C# using directives from duplicated code analysis.
To exclude C# using directives the system property 'ignore_usings=true' has to be specified on the command line with '-Dignore_usings=true'.
2015-10-23 15:48:25 +02:00
Jan van Nunen aa87701ee5 Extended Objective-C grammar to accept Unicode characters in identifiers. 2015-10-23 15:46:38 +02:00
Michal Kordas 31cef1474a Fix various typos 2015-10-17 20:33:42 +02:00
Andreas Dangel 312d4c60c0 Merge branch 'bug-1430' 2015-10-17 18:01:25 +02:00
Andreas Dangel 4db5965907 Merge branch 'bug-1430' into pmd/5.4.x 2015-10-17 18:00:48 +02:00
Andreas Dangel 9df4ff15b5 #1430 CommentDefaultAccessModifier triggers on field annotated with @VisibleForTesting 2015-10-17 18:00:37 +02:00
Andreas Dangel 74751bd613 Merge branch 'amitbitcse-pmd/5.3.x' 2015-10-16 17:51:16 +02:00
Andreas Dangel 2cff91d187 Merge branch 'amitbitcse-pmd/5.3.x' into pmd/5.4.x 2015-10-16 17:50:42 +02:00
Andreas Dangel 933002de34 Merge branch 'amitbitcse-pmd/5.3.x' into pmd/5.3.x 2015-10-16 17:50:14 +02:00
Andreas Dangel b753cc5ec5 Update changelog, keep backwards compatible createRuleSets methods by overloading 2015-10-16 17:49:45 +02:00
Andreas Dangel 64b0a04696 Merge branch 'kullfar-master' 2015-10-16 17:20:09 +02:00
Andreas Dangel 7e3c4887e2 Update changelog 2015-10-16 17:19:14 +02:00
Andreas Dangel 599a556bc1 Merge branch 'master' of https://github.com/kullfar/pmd into kullfar-master 2015-10-16 17:18:35 +02:00
Andreas Dangel 0bd9aa9568 Merge branch 'mkorda-patch-2', Closes #74 2015-10-16 17:09:37 +02:00
Andreas Dangel e4a244064b Merge branch 'mkorda-patch-2' into pmd/5.4.x 2015-10-16 17:08:04 +02:00
Andreas Dangel 7a7ef4b92e Update changelog 2015-10-16 17:07:53 +02:00
Michal Kordas ad853d14d7 Fix rendering CommentDefaultAccessModifier description as code 2015-10-16 17:05:36 +02:00
Andreas Dangel 4fd445cc26 Update changelog 2015-10-16 16:44:35 +02:00
Andreas Dangel e490c78519 Merge branch 'invalid-slf4j-message-format-rule' of https://github.com/Monits/pmd into Monits-invalid-slf4j-message-format-rule 2015-10-16 16:37:32 +02:00
Andreas Dangel 91d3dee1b6 Merge branch 'travis-fix' 2015-10-16 16:35:46 +02:00
Andreas Dangel 71ad5783b7 Merge branch 'travis-fix' into pmd/5.4.x 2015-10-16 16:35:34 +02:00
Andreas Dangel b5706d0726 Merge branch 'travis-fix' into pmd/5.3.x 2015-10-16 16:34:43 +02:00
Andreas Dangel 763bd9a478 travis: only deploy if we have the env vars and if it is not a pull request 2015-10-16 14:27:10 +02:00
Andreas Dangel 8d94c5b44c Merge branch 'bug-1425' 2015-10-16 12:36:06 +02:00
Andreas Dangel 0c3c9830e7 Merge branch 'bug-1425' into pmd/5.4.x 2015-10-16 12:30:14 +02:00
Andreas Dangel 7fe60c0747 Merge branch 'bug-1425' into pmd/5.3.x 2015-10-16 12:25:51 +02:00
Andreas Dangel 3393507082 #1425 Invalid XML Characters in Output
XMLRenderer correctly escapes the surrogate characters
AvoidDuplicateLiterals tries to reconstruct original string literal
2015-10-16 12:18:15 +02:00
Stas Gromov a1e6702a67 fix formatting typos in an example of the DoNotCallGarbageCollectionExplicitly rule 2015-10-15 15:53:22 +03:00
amitbitcse 9da51952ef RuleSetFactory Performance Enhancement:-
To enhance performance of RuleSetFactory, the RuleSets generated by RuleSetFactory from ruleSetString is set in PMDConfiguration and is checked before generating it again in MonoThreadProcessor, MutliThreadProcessor and PMDRunnable classes.
2015-10-13 17:50:37 +05:30
Andreas Dangel 4e8024e5b1 Merge branch 'bug-1428' into pmd/5.4.x 2015-10-10 19:00:18 +02:00
Andreas Dangel ce73691d5d Merge branch 'bug-1428' into pmd/5.3.x 2015-10-10 18:59:21 +02:00
Andreas Dangel 9d350e6f78 Merge branch 'bug-1428' 2015-10-10 18:59:10 +02:00
Andreas Dangel 808943e366 #1428 False positive in UnusedPrivateField when local variable hides member variable 2015-10-10 18:54:31 +02:00
Andreas Dangel ea074e2c53 Merge branch 'pr-72' 2015-10-10 17:40:41 +02:00
Andreas Dangel 262d154bdb Merge branch 'pr-72' into pmd/5.4.x 2015-10-10 17:40:29 +02:00
Andreas Dangel 63afc1ec94 Merge branch 'pr-72' into pmd/5.3.x 2015-10-10 17:40:13 +02:00
Andreas Dangel d788b6ce74 Update changelog for pr-72 2015-10-10 17:37:58 +02:00
Andreas Dangel 1e0b8cfa21 Merge branch 'pmd/5.3.x' of https://github.com/amitbitcse/pmd into pr-72 2015-10-10 17:22:59 +02:00
Andreas Dangel 01b76ad30d Merge branch 'travis-prevent-building-tags' 2015-10-10 16:53:46 +02:00
Andreas Dangel 4134904aa4 Merge branch 'travis-prevent-building-tags' into pmd/5.4.x 2015-10-10 16:53:40 +02:00
Andreas Dangel 79853cdace Merge branch 'travis-prevent-building-tags' into pmd/5.3.x 2015-10-10 16:53:31 +02:00
Andreas Dangel 2760827dc7 Prevent travis from building release tags 2015-10-10 16:53:19 +02:00
Andreas Dangel edc32b3f2b Merge branch 'bug-1429' 2015-10-10 16:13:59 +02:00
Andreas Dangel c79eff06e8 Merge branch 'bug-1429' into pmd/5.4.x 2015-10-10 16:13:18 +02:00
Andreas Dangel a7a84766bd #1429 Java - Parse Error: Cast in return expression 2015-10-10 16:08:38 +02:00
Andreas Dangel 44ebcf1e7c Merge branch 'travis-pull-requests' 2015-10-10 15:22:39 +02:00
Andreas Dangel 27fe4f5773 Merge branch 'travis-pull-requests' into pmd/5.4.x 2015-10-10 15:22:30 +02:00
Andreas Dangel 6b60b4be34 Fix travis build failure for pull requests 2015-10-10 15:20:25 +02:00
Damian Techeira 414da52fb2 remove annotation
Test Plan: none

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D12873
2015-10-09 15:26:18 -03:00
Damian Techeira 2899a679b3 Add rule to look for invalid message format in slf4j loggers
Test Plan: run test

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Maniphest Tasks: T1017

Differential Revision: http://ph.monits.com/D12540
2015-10-09 14:19:41 -03:00
amitbitcse 1d190605e5 Added capability in Java and JSP parser for tracking tokens. It is often useful to keep track of each node's first and last token so that input can be easily reproduced again. Ref - https://javacc.java.net/doc/JJTree.html 2015-10-06 11:04:22 +05:30
Andreas Dangel 4faf5e4240 Merge branch 'wip-dogfood-test' into pmd/5.4.x 2015-10-05 09:29:21 +02:00
Andreas Dangel 209c35039a Merge branch 'wip-dogfood-test' 2015-10-05 09:22:00 +02:00
Andreas Dangel 43c1aaa702 Add verification test for dogfood.xml ruleset and fix it
See also commit 0555396978
2015-10-05 09:17:25 +02:00
Andreas Dangel 0555396978 Upgrade dogfood 2015-10-04 16:27:32 +02:00
Andreas Dangel 9f74721ae7 Prepare next dev version on master branch: 5.5.0-SNAPSHOT 2015-10-04 16:10:33 +02:00
Andreas Dangel 37756dfc67 Merge branch 'pmd/5.4.x' 2015-10-04 16:08:17 +02:00
Andreas Dangel 5112352af0 Prepare next development version 2015-10-04 15:40:38 +02:00
Andreas Dangel d5bf509758 [maven-release-plugin] prepare for next development iteration 2015-10-04 14:39:14 +02:00
Andreas Dangel c21763a5e7 [maven-release-plugin] prepare release pmd_releases/5.4.0 2015-10-04 14:39:13 +02:00
Andreas Dangel 433c602880 Prepare pmd release 5.4.0 2015-10-04 14:31:40 +02:00
Andreas Dangel 2b4a4a6334 Merge branch 'pmd/5.3.x' 2015-10-04 14:15:29 +02:00
Andreas Dangel 84c407f5d2 add src zip file in do-release.sh upload instructions 2015-10-04 14:07:12 +02:00
Andreas Dangel 79e9b7616a Prepare next development version 2015-10-04 13:54:43 +02:00
Andreas Dangel af9f9d477d [maven-release-plugin] prepare for next development iteration 2015-10-04 12:48:25 +02:00
Andreas Dangel f357da73b6 [maven-release-plugin] prepare release pmd_releases/5.3.5 2015-10-04 12:48:25 +02:00
Andreas Dangel 98e0c1f914 Prepare pmd release 5.3.5 2015-10-04 12:40:49 +02:00
Andreas Dangel 52f8329ff9 Reformat changelog to that it works with the doxia markdown renderer 2015-10-04 12:30:29 +02:00
Andreas Dangel ad469d53cb Use released version of pmd-build plugin 2015-10-04 12:23:12 +02:00
Andreas Dangel 193f75925a Fix checkstyle configuration 2015-10-04 12:05:41 +02:00
Andreas Dangel 5ee98b8786 Fix javascript after upgrading rhino library 2015-10-04 12:00:24 +02:00
Andreas Dangel f154d0a2b4 Upgrade maven plugins and dependencies 2015-10-04 11:55:51 +02:00
Andreas Dangel 82a137880b UselessParentheses now exists only in unnecessary 2015-10-04 11:26:16 +02:00
Andreas Dangel c9f623ca7b Remove deprecated rules 2015-10-04 11:12:16 +02:00
Andreas Dangel 6797742497 Improve changelog format 2015-10-04 10:58:45 +02:00
Andreas Dangel b5c2932051 Add unit test for #1414 2015-10-04 10:07:05 +02:00
Andreas Dangel 39cfbc238b #1420 UnusedPrivateField: Ignore fields if using lombok 2015-10-04 09:52:22 +02:00
Andreas Dangel 73fe285b1a #1418 RedundantFieldInitializer false positive with large long value 2015-10-03 17:36:07 +02:00
Andreas Dangel 3bf91a84d6 travis - don't try to deploy pull request builds... 2015-10-03 16:57:16 +02:00
Andreas Dangel 8b80efbd88 Merge branch 'mkordas-patch-1' into pmd/5.3.x 2015-10-03 16:53:42 +02:00
Andreas Dangel 87db2a5736 Update changelog 2015-10-03 16:49:36 +02:00
Michal Kordas 4a395ee8b7 #1410 Improve description of DefaultPackage rule 2015-09-30 22:36:00 +02:00
Andreas Dangel 39d77e849a Add jacoco plugin for code coverage 2015-09-26 18:13:34 +02:00
Andreas Dangel f17cb5f86e Remove clover plugin in favor our jacoco 2015-09-26 18:13:10 +02:00
Andreas Dangel bbd0bf98fd #1414 Command line parameter to disable "failOnViolation" behavior 2015-09-26 17:08:20 +02:00
Andreas Dangel 38741d4638 Improve exit status documentation for PMD and CPD 2015-09-26 16:18:24 +02:00
Andreas Dangel 0ff27aab42 PMD 5.4.0 will use Java 1.7 from now on 2015-09-26 15:36:08 +02:00
Andreas Dangel 1ae4400ec0 Merge branch 'pmd/5.3.x' 2015-09-26 15:25:52 +02:00
Andreas Dangel 98278cfdfc #1413 False positive StringBuffer constructor with ?: int value 2015-09-26 11:08:21 +02:00
Andreas Dangel 145780de9c #1407 UselessParentheses "&" and "+" operator precedence 2015-09-26 10:23:43 +02:00
Andreas Dangel f3da33cca2 #1387 CloseResource has false positive for ResultSet 2015-09-26 09:55:02 +02:00
Andreas Dangel 4cce31418a Add travis.yml - see https://travis-ci.org/pmd/pmd
Cherry picked from master
* 1a110587f0
* 51f17c6010
* 36bc2c2dee
* cbf598c92c
2015-09-26 09:26:43 +02:00
Andreas Dangel cbf598c92c Travis - don't run maven in quiet mode 2015-09-25 20:17:47 +02:00
Andreas Dangel 36bc2c2dee Configure Travis
* email
* cache
* deployment to sonatype-nexus-snapshots
2015-09-25 20:02:55 +02:00
Andreas Dangel 51f17c6010 Add build status to README.md
And update URLs
2015-09-25 12:20:50 +02:00
Andreas Dangel 1a110587f0 Add travis.yml - see https://travis-ci.org/pmd/pmd 2015-09-25 11:50:09 +02:00
Andreas Dangel 8e6ef4c2d9 #1412 UnusedPrivateMethod false positive: Issue #1403 not completely solved
Fix plsql code
2015-09-22 21:55:25 +02:00
Andreas Dangel b965cf45b3 #1412 UnusedPrivateMethod false positive: Issue #1403 not completely solved 2015-09-22 21:55:06 +02:00
Andreas Dangel d8d8a9539f #1409 NullPointerException in InsufficientStringBufferRule 2015-09-20 20:51:09 +02:00
Andreas Dangel 365e7a1f68 #1410 DefaultPackage triggers on field annotated with @VisibleForTesting 2015-09-20 20:24:46 +02:00
Andreas Dangel aa5950fa41 Merge branch 'pmd/5.3.x' into master
# Conflicts:
#	pmd-core/pom.xml
#	pmd-cpp/pom.xml
#	pmd-cs/pom.xml
#	pmd-dist/pom.xml
#	pmd-fortran/pom.xml
#	pmd-go/pom.xml
#	pmd-java/pom.xml
#	pmd-java8/pom.xml
#	pmd-javascript/pom.xml
#	pmd-jsp/pom.xml
#	pmd-matlab/pom.xml
#	pmd-objectivec/pom.xml
#	pmd-php/pom.xml
#	pmd-plsql/pom.xml
#	pmd-python/pom.xml
#	pmd-ruby/pom.xml
#	pmd-scala/pom.xml
#	pmd-test/pom.xml
#	pmd-vm/pom.xml
#	pmd-xml/pom.xml
#	pom.xml
#	src/site/markdown/overview/changelog.md
2015-09-18 14:02:28 +02:00
Andreas Dangel 3fb43a060a Prepare next development version 2015-09-18 13:46:06 +02:00
Andreas Dangel 819611dd23 [maven-release-plugin] prepare for next development iteration 2015-09-18 12:36:07 +02:00
Andreas Dangel 0ffbe97a04 [maven-release-plugin] prepare release pmd_releases/5.3.4 2015-09-18 12:36:06 +02:00
Andreas Dangel 06d77b371a Use release profile PMD_GPG_PROFILE 2015-09-18 12:24:27 +02:00
Andreas Dangel 972eac40f0 Specify gpg.keyname via -Darguments 2015-09-18 11:57:09 +02:00
Andreas Dangel 336c06fb10 Actually use the variables PMD_GPG_KEY and PMD_SF_USER 2015-09-18 11:49:20 +02:00
Andreas Dangel 87803ed27a Prepare pmd release 5.3.4 2015-09-18 11:44:40 +02:00
Andreas Dangel ca2794bf7d Fixes for the release script 2015-09-18 11:40:16 +02:00
Andreas Dangel d921ffe1e3 Add the release shell script 2015-09-18 11:25:30 +02:00
Andreas Dangel 0f48fd501d #1393 PMD hanging during DataflowAnomalyAnalysis 2015-09-18 10:17:01 +02:00
Andreas Dangel e1a41bdf98 #1405 UnusedPrivateMethod false positive?
Don't use the auxclasspath if not provided.
2015-09-17 20:26:07 +02:00
Andreas Dangel ad1ffa5835 #1404 Java8 'Unnecessary use of fully qualified name' in Streams Collector 2015-09-16 22:11:18 +02:00
Andreas Dangel 64012cc0b4 verified #1405 UnusedPrivateMethod false positive? 2015-09-16 21:37:17 +02:00
Andreas Dangel c9b133d634 Update changelog 2015-09-16 08:11:53 +02:00
Andreas Dangel a030255e81 Merge branch 'master' of https://github.com/tiobe/pmd into tiobe-master 2015-09-16 08:08:19 +02:00
Andreas Dangel c7df93d22a More braces for code samples with if 2015-09-15 08:17:11 +02:00
Andreas Dangel ff91c172b0 Update changelog 2015-09-15 08:16:47 +02:00
Andreas Dangel 2500412b14 #1403 False positive UnusedPrivateMethod with JAVA8 2015-09-14 22:36:05 +02:00
Andreas Dangel 9f6190f3b6 #1380 InsufficientStringBufferDeclaration false positive when literal string passed to a lookup service 2015-09-13 10:20:58 +02:00
Andreas Dangel 9e620c2661 #1388 ConstructorCallsOverridableMethodRule doesn't work with params? 2015-09-12 17:56:45 +02:00
Jan van Nunen 5014a51630 Extended Objective-C grammar to accept Unicode characters in identifiers. 2015-09-11 15:17:04 +02:00
Andreas Dangel ac9fd51f84 #1392 SimplifyStartsWith false-negative 2015-09-11 12:22:49 +02:00
Pedro Rijo bbb9b4d9d9 Fix code example
Please, use proper java code style in your own examples. An if statement without brackets? More cases all over the examples
2015-09-11 11:20:53 +01:00
Andreas Dangel 93b4ce9bb4 #1394 dogfood.xml - Unable to exclude rules [UncommentedEmptyMethod] 2015-09-08 20:03:28 +02:00
Andreas Dangel f242c5c5f4 Upgrade maven-pmd-plugin to 3.5 and add pmd execution
The profile "reports" was accidently deactivated by adding other
profiles. Now pmd and checkstyle are executed with all builds.
2015-09-08 19:58:21 +02:00
Andreas Dangel 1984f5ac8a #1395 UnusedPrivateMethod false positive for array element method call 2015-09-08 19:45:49 +02:00
Andreas Dangel b553c52ef5 #1396 PrematureDeclaration lambda false positive 2015-09-07 20:23:10 +02:00
Andreas Dangel 3abfc2fccb #1397 StringToString should ignore method references 2015-09-07 20:01:18 +02:00
Andreas Dangel 100dd09b28 #1398 False positive for GuardLogStatementJavaUtil with Log4j 2015-09-06 11:06:48 +02:00
Andreas Dangel a1ab0d6657 #1399 False positive for VariableNamingConventions with annotation @interface 2015-09-05 19:53:05 +02:00
Andreas Dangel f0dd2b0519 #1400 False positive with JUnit4TestShouldUseBeforeAnnotation 2015-09-05 19:39:31 +02:00
Andreas Dangel 58292bfc38 #1401 False positive for StringBuilder.append called with constructor 2015-09-05 12:10:38 +02:00
Andreas Dangel b0e657a3d8 Merge branch 'pmd/5.3.x' into master 2015-09-04 22:02:40 +02:00
Andreas Dangel bd83821dd9 Fix unit test 2015-09-04 21:58:01 +02:00
Andreas Dangel c0c79e522f #1371 fix unit test 2015-09-04 21:55:16 +02:00
Andreas Dangel 0027fcdd77 Update changelog 2015-09-04 21:55:08 +02:00
José Manuel Rolón abe800dfa9 Fixed InsufficientStringBufferDeclaration error detection.
Summary:
Added new method to obtaint the lenght of strings added after a constructor.
Added new test for this case.

Fix: http://sourceforge.net/p/pmd/bugs/1371/

Test Plan: Run tests.

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D12322
2015-09-04 21:53:45 +02:00
Andreas Dangel b95433b059 #1371 fix unit test 2015-09-04 21:48:18 +02:00
Andreas Dangel 18e80d06a1 Update changelog 2015-09-04 21:36:55 +02:00
Andreas Dangel f975ff4a1e Merge branch 'addCheckInsufficientStringBufferDeclarationRule' of https://github.com/Monits/pmd into Monits-addCheckInsufficientStringBufferDeclarationRule 2015-09-04 21:35:35 +02:00
Andreas Dangel 203e39b9b3 Added a new if to check for the append statements after an append contructor.
Summary:
Now the rule check for appends after a contructor call.
Added a new test for this case.
Issue: http://sourceforge.net/p/pmd/bugs/1370/

Test Plan: Run tests.

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D12292
2015-09-04 21:34:38 +02:00
Andreas Dangel 735c2e0d4c Update changelog 2015-09-04 21:28:20 +02:00
Andreas Dangel 7a82a527bb Merge branch 'newCheckConsecutiveAppendsShouldReuseRule' of https://github.com/Monits/pmd into Monits-newCheckConsecutiveAppendsShouldReuseRule 2015-09-04 21:27:46 +02:00
Andreas Dangel 922e35453a #1402 Windows-Only: File exclusions are not case insensitive 2015-09-04 21:22:47 +02:00
Andreas Dangel 6e300f0854 #1402 Windows-Only: File exclusions are not case insensitive 2015-09-04 21:21:20 +02:00
Andreas Dangel 944082c53d Revert "Use Path instead of string to check file exclusions to fix windows-only bug where files were not being correctly excluded."
This reverts commit 59fcd70c8d.
2015-09-04 21:11:49 +02:00
Andreas Dangel f964d3329f Update changelog 2015-09-04 20:52:46 +02:00
Andreas Dangel 14a47c82cc Merge branch 'master' of https://github.com/msloan/pmd into msloan-master 2015-09-04 20:51:24 +02:00
Andreas Dangel 22671445e2 #1370 ConsecutiveAppendsShouldReuse not detected properly on StringBuffer
Extended unit test
2015-09-04 20:15:07 +02:00
Andreas Dangel e3357987f2 Update changelog 2015-09-04 20:14:56 +02:00
José Manuel Rolón dd8262cf69 Added new append validation.
Check for an append even when the block first child is a LocalVariableDeclaration.
Added new test to check the validation.

Issue: http://sourceforge.net/p/pmd/bugs/1370/
2015-09-04 20:14:09 +02:00
Andreas Dangel c8990a7977 #1370 ConsecutiveAppendsShouldReuse not detected properly on StringBuffer
Extended unit test
2015-09-04 20:06:55 +02:00
Andreas Dangel e8f7636e3e Update changelog 2015-09-04 19:59:29 +02:00
Andreas Dangel aa49f97b22 Merge branch 'missingCheckConsecutiveAppendsShouldReuse' of https://github.com/Monits/pmd into Monits-missingCheckConsecutiveAppendsShouldReuse 2015-09-04 19:57:23 +02:00
Andreas Dangel c98bdf2f44 Update changelog 2015-09-04 19:41:35 +02:00
Andreas Dangel 443d5094de Merge branch 'fixUselessOverridingMethodRule' of https://github.com/Monits/pmd into Monits-fixUselessOverridingMethodRule 2015-09-04 19:39:58 +02:00
Andreas Dangel 029cc1f779 Update changelog 2015-09-04 19:17:20 +02:00
Andreas Dangel 3ac7a5bcf6 Merge branch 'master' of https://github.com/ghenkes/pmd into ghenkes-master 2015-09-04 19:13:36 +02:00
Andreas Dangel a865a28af6 Update changelog 2015-09-04 19:05:43 +02:00
Andreas Dangel cfe91ac728 Merge branch 'addCloneMethodMustBePublicRule' of https://github.com/Monits/pmd into Monits-addCloneMethodMustBePublicRule 2015-09-04 19:02:05 +02:00
Andreas Dangel d117c9987b Fix list/array out of bounds for CommentDefaultAccessModifierRule and Enums 2015-08-31 20:00:47 +02:00
Andreas Dangel a9a1a37dbf Add snapshot repositories also for plugins 2015-08-31 19:41:51 +02:00
Andreas Dangel ea5bc9daa0 Fix changelog format 2015-08-31 19:32:08 +02:00
Andreas Dangel e69d3174de Use new pmd-build 0.10-SNAPSHOT plugin which documents
the minimum language version of a rule.
2015-08-31 18:20:35 +02:00
Andreas Dangel 36f48c9159 Update changelog, add the new rule to 540.xml 2015-08-31 18:01:03 +02:00
Andreas Dangel 7ea022a230 Merge branch 'addCloneMethodReturnTypeMustMatchClassNameRule' of https://github.com/Monits/pmd into Monits-addCloneMethodReturnTypeMustMatchClassNameRule 2015-08-31 17:54:38 +02:00
José Manuel Rolón 87b3f7d496 Added a new if to check for the append statements after an append contructor.
Summary:
Now the rule check for appends after a contructor call.
Added a new test for this case.
Issue: http://sourceforge.net/p/pmd/bugs/1370/

Test Plan: Run tests.

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D12292
2015-08-31 12:50:53 -03:00
José Manuel Rolón ef0c8c9d27 Fixed InsufficientStringBufferDeclaration error detection.
Summary:
Added new method to obtaint the lenght of strings added after a constructor.
Added new test for this case.

Fix: http://sourceforge.net/p/pmd/bugs/1371/

Test Plan: Run tests.

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D12322
2015-08-31 12:12:09 -03:00
Matt Sloan 59fcd70c8d Use Path instead of string to check file exclusions to fix windows-only bug where files were not being correctly excluded. 2015-08-24 00:28:12 -07:00
José Manuel Rolón 665f1ec5d1 Added new append validation.
Check for an append even when the block first child is a LocalVariableDeclaration.
Added new test to check the validation.

Issue: http://sourceforge.net/p/pmd/bugs/1370/
2015-08-21 18:14:45 -03:00
José Manuel Rolón 3cf58cb43a Fix statement cast in UselessOverridingMethodRule class.
Summary: Now using the parent Node class to avoid the ClassCastException.

Test Plan: Added new test for the modified class. Run tests

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D12213
2015-08-19 17:29:48 -03:00
Damian Techeira d9d02edb06 Add language version attribute
Test Plan: mvn test

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Subscribers: jmsotuyo

Differential Revision: http://ph.monits.com/D12205
2015-08-19 09:26:14 -03:00
Henkes 822140337e Change CheckResultSet to allow for the result of the navigation methods to be returned 2015-08-10 15:30:11 -05:00
Andreas Dangel 00a6dd0595 Merge branch 'Monits-addUselessQualifiedThisRule' 2015-08-10 21:14:35 +02:00
Andreas Dangel 72db30c87e Update changelog and add new rule to 540.xml 2015-08-10 21:10:47 +02:00
Andreas Dangel b9339b77c0 Merge branch 'addUselessQualifiedThisRule' of https://github.com/Monits/pmd into Monits-addUselessQualifiedThisRule 2015-08-10 21:05:54 +02:00
Andreas Dangel 1aa46f58ef Merge branch 'Monits-fixUseAssertTrueInsteadOfAssertEqualsRule' 2015-08-10 21:03:28 +02:00
Andreas Dangel 5ca06bb2a1 Update changelog 2015-08-10 20:59:20 +02:00
Andreas Dangel 166057c355 Merge branch 'fixUseAssertTrueInsteadOfAssertEqualsRule' of https://github.com/Monits/pmd into Monits-fixUseAssertTrueInsteadOfAssertEqualsRule 2015-08-10 20:56:54 +02:00
Andreas Dangel 89a3d5dd1e #1384 NullPointerException in ConsecutiveLiteralAppendsRule 2015-08-01 20:28:38 +02:00
Damian Techeira 4a5a80197b Add CloneMethodMustBePublic rule
Test Plan: mvn test

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D12023
2015-07-31 17:58:05 -03:00
Damian Techeira 445bd2d260 Add CloneMethodReturnTypeMustMatchClassName rule
Test Plan: mvn test

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D12031
2015-07-31 17:13:04 -03:00
Andreas Dangel 0bf765be04 Update changelog 2015-07-29 20:16:07 +02:00
Andreas Dangel 0850252bda Merge branch 'addUnnecessaryLiteralBooleanInTernaryOperatorRule' of https://github.com/Monits/pmd into Monits-addUnnecessaryLiteralBooleanInTernaryOperatorRule 2015-07-29 20:09:50 +02:00
Damian Techeira 454be6f1f1 Add UselessQualifiedThisRule
Summary: Look for Qualified This usages in the same class

Test Plan: mvn test

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D11981
2015-07-28 09:28:00 -03:00
Andreas Dangel dea9d41dd7 Merge branch 'Monits-addCommentDefaultModifierRule' 2015-07-26 19:25:04 +02:00
Andreas Dangel f963f76fd4 Update changelog, improve test for new CommentDefaultAccessModifier rule 2015-07-26 19:20:47 +02:00
Andreas Dangel 3b60cac700 Merge branch 'addCommentDefaultModifierRule' of https://github.com/Monits/pmd into Monits-addCommentDefaultModifierRule 2015-07-26 19:11:21 +02:00
Andreas Dangel 6b9d0fb5c8 Merge branch 'pmd/5.3.x' 2015-07-25 20:38:22 +02:00
Andreas Dangel c5216fed79 Fix site build 2015-07-25 20:38:03 +02:00
Andreas Dangel e299dffc2f Merge branch 'pmd/5.3.x' 2015-07-25 20:11:45 +02:00
Andreas Dangel d182626618 Update release-process with github 2015-07-25 19:59:28 +02:00
Andreas Dangel 4ecb295b06 Fix version of pmd-java8 module 2015-07-25 19:59:07 +02:00
Andreas Dangel 0785cef364 Prepare next development version 2015-07-25 16:00:08 +02:00
Andreas Dangel 0671c2e478 [maven-release-plugin] prepare for next development iteration 2015-07-25 15:28:23 +02:00
Andreas Dangel 1348ed8e06 [maven-release-plugin] prepare release pmd_releases/5.3.3 2015-07-25 15:28:22 +02:00
Andreas Dangel c2ec86bac5 Prepare pmd release 5.3.3 2015-07-25 15:16:54 +02:00
Andreas Dangel 53a1f5280c Create the site separately, so that javadoc aggreate can work 2015-07-25 15:10:19 +02:00
Andreas Dangel 9d8a2dd0a5 Use github page 2015-07-25 15:10:12 +02:00
Damian Techeira df6f1afa46 Add check to Boxed booleans in UseAssertTrueInsteadOfAssertEquals rule
Test Plan: mvn test

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D11963
2015-07-24 12:03:07 -03:00
Damian Techeira e0cd7adeef Add rule for unnecessary boolean in conditionals espressions
Summary: Add rule for unnecessary literals boolean in conditionals espressions

Test Plan: mvn test

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D11961
2015-07-23 17:07:15 -03:00
Damian Techeira 89e7d0433a Add default access modifier as comment rule
Summary: Add rule to look for methods and fields that have a default access modifier

Test Plan: mvn test

Reviewers: jmsotuyo

Reviewed By: jmsotuyo

Differential Revision: http://ph.monits.com/D11936
2015-07-22 15:31:19 -03:00
Andreas Dangel e93e9224ae #1381 CPD Cannot use CSV/VS Renderers because they don't support encoding property 2015-07-19 22:34:57 +02:00
Andreas Dangel df14ea9c95 #1379 PMD CLI: Cannot specify multiple properties 2015-07-13 19:50:40 +02:00
Andreas Dangel 617ca01a68 #1369 ConsecutiveLiteralAppends not detected properly on StringBuffer 2015-06-29 20:28:53 +02:00
Andreas Dangel ee5885065e reformat, whitespace 2015-06-29 19:58:48 +02:00
Andreas Dangel 0b7cca49f1 fix typo 2015-06-28 21:56:55 +02:00
Andreas Dangel 8dc25abcfe #1376 CompareObjectsWithEquals fails for type annotated method parameter 2015-06-28 21:51:04 +02:00
Andreas Dangel 62202a5293 Merge branch 'bernardo-macedo-master' 2015-06-28 21:23:42 +02:00
Andreas Dangel 99294dafb6 Update changelog 2015-06-28 21:18:52 +02:00
Bernardo Macedo 1416d2492d Cleaning code 2015-06-24 23:31:21 -03:00
Bernardo Macedo 6b742dba22 Added support for WSDL rules 2015-06-24 23:23:08 -03:00
Andreas Dangel 2b92e22546 #1372 False Negative for CloseResource rule.
already fixed with #1375
2015-06-20 18:38:09 +02:00
Andreas Dangel 1b35a59997 #1375 CloseResource not detected properly 2015-06-20 18:15:02 +02:00
Andreas Dangel 46afa5c36a Merge branch 'pmd/5.3.x' into master 2015-06-06 19:40:33 +02:00
Juan Pablo Civile 39eb581134 Fix run.sh for paths with spaces
When redirecting arguments, "$@" must be used.

cherry-picked: 429e1a91a1
cherry-picked: 59f5c86392
2015-06-06 19:38:02 +02:00
Andreas Dangel 59f5c86392 Update changelog 2015-06-06 19:34:44 +02:00
Andreas Dangel 99ff9fd68e Merge branch 'handle_spaces' of https://github.com/Monits/pmd into Monits-handle_spaces 2015-06-06 19:34:01 +02:00
Andreas Dangel 79ea3fae79 Merge branch 'pmd/5.3.x' into master 2015-06-06 19:32:41 +02:00
Juan Pablo Civile 429e1a91a1 Fix run.sh for paths with spaces
When redirecting arguments, "$@" must be used.
2015-06-05 18:51:20 -03:00
Andreas Dangel ecdcc20bda Add a pmd-ui module, which can use java8 and javafx 2015-06-01 22:16:05 +02:00
Andreas Dangel d28e4f1fb5 #1366 UselessParentheses false positive on multiple equality operators 2015-06-01 20:06:01 +02:00
Andreas Dangel 66c1191984 #1365 Aggregated javadoc report is missing 2015-05-31 14:01:40 +02:00
Andreas Dangel 42726428c5 Fix links on the integrations page 2015-05-31 12:14:45 +02:00
Andreas Dangel 19a13c0ab9 #1364 FieldDeclarationsShouldBeAtStartOfClass false positive using multiple annotations 2015-05-31 10:29:42 +02:00
Andreas Dangel f9b3f4ce4a Merge branch 'pmd/5.3.x' into master 2015-05-22 19:46:19 +02:00
Andreas Dangel 00ff9f25ae Prepare next development version 2015-05-22 19:28:37 +02:00
Andreas Dangel 793af091c0 [maven-release-plugin] prepare for next development iteration 2015-05-22 18:23:42 +02:00
Andreas Dangel 2c99fbd5e5 [maven-release-plugin] prepare release pmd_releases/5.3.2 2015-05-22 18:23:41 +02:00
Andreas Dangel 2aa1942015 Prepare pmd release 5.3.2 2015-05-22 18:18:12 +02:00
Andreas Dangel c34b55285b Adding back missing changelog entry for 5.3.1 2015-05-21 21:33:29 +02:00
Andreas Dangel 7e0cd20740 fix wrong copy-pasted comment 2015-05-20 20:40:29 +02:00
Andreas Dangel 869d4c7005 #1361 ShortVariable and ShortMethodName configuration 2015-05-20 20:34:32 +02:00
Andreas Dangel b50e49777f #1355 NullPointerException in a java file having a single comment line 2015-05-18 21:17:16 +02:00
Andreas Dangel a416513fc9 reformat, whitespaces 2015-05-18 21:14:12 +02:00
Andreas Dangel 357f206102 #1330 AvoidReassigningParameters does not work with varargs 2015-05-15 20:24:06 +02:00
Andreas Dangel cc43e6f8be #1354 Complex FieldDeclarationsShouldBeAtStartOfClass false positive with Spring annotations 2015-05-15 16:06:29 +02:00
Andreas Dangel 3c316c2018 #1343 MethodNamingConventions for overrided methods 2015-05-15 15:33:40 +02:00
Andreas Dangel cae16d39d7 #1353 False positive "Only One Return" with lambda 2015-05-13 21:33:30 +02:00
Andreas Dangel 4661d6a33d #1344 AbstractNaming should check reverse 2015-05-09 19:15:48 +02:00
Andreas Dangel b5e7cbbaf3 verify #1349 VariableNamingConventions : underscore in final but at first position ? 2015-05-09 18:41:42 +02:00
Andreas Dangel 7d630f6cb3 verify #1347 False positive for GuardLogStatementJavaUtil 2015-05-09 18:37:02 +02:00
Andreas Dangel bc41b00206 verify #1346 VariableNamingConventions do not work for method parameters 2015-05-09 18:31:48 +02:00
Andreas Dangel 171fdb877f #1345 UseCollectionIsEmpty throws NullPointerException 2015-05-09 18:25:12 +02:00
Andreas Dangel 12bbb65ebd Update fluido skin version to 1.4 2015-05-09 18:12:38 +02:00
Andreas Dangel 82c6e4f602 Update changelog 2015-05-09 15:11:20 +02:00
Andreas Dangel 19d18a65d3 Removing maven-plugin-pmd-build. This has been moved to https://github.com/pmd/build-tools 2015-05-09 15:08:35 +02:00
Romain PELISSE 8057a5c0df Add a new rule 'InvalidDependencyType' to pom rulesets 2015-05-09 00:45:07 +02:00
Andreas Dangel 3d73198ba9 verify #1340 UseStringBufferForStringAppends False Positive with ternary operator 2015-05-01 18:41:21 +02:00
Andreas Dangel e2a7356ccb verify #1341 pmd:GuardDebugLogging violates LOGGER.debug with format "{}"
It's a duplicate of #1224
2015-05-01 18:33:16 +02:00
Andreas Dangel a0d116ca6d #1335 GuardLogStatementJavaUtil should not apply to SLF4J Logger 2015-05-01 18:27:18 +02:00
Andreas Dangel 857ae074e1 #1342 UseConcurrentHashMap false positive (with documentation example) 2015-04-30 20:07:54 +02:00
Andreas Dangel a2526cc87a Update changelog and add a small test for new rule ProjectVersionAsDependencyVersion 2015-04-30 19:54:03 +02:00
Andreas Dangel bead232701 Merge branch 'pom_rulesets' of https://github.com/belaran/pmd into belaran-pom_rulesets 2015-04-30 19:40:39 +02:00
Andreas Dangel 770fc5763e Update project info reports, display modules after the main pages 2015-04-27 19:47:26 +02:00
Andreas Dangel d0f5279f3f Merge branch 'pmd/5.3.x' into master 2015-04-20 21:45:28 +02:00
Andreas Dangel fba55905b6 Prepare next development version 2015-04-20 21:30:15 +02:00
Andreas Dangel a720b93431 [maven-release-plugin] prepare for next development iteration 2015-04-20 20:15:12 +02:00
Andreas Dangel de7a81202f [maven-release-plugin] prepare release pmd_releases/5.3.1 2015-04-20 20:15:11 +02:00
Andreas Dangel f93a7bc67e Prepare pmd release 5.3.1 2015-04-20 19:55:55 +02:00
Andreas Dangel b6c12fe449 Added deprecated old name for UseSingleton/UseUtilityClass
#1059 and #1339
2015-04-20 19:46:16 +02:00
Andreas Dangel fdb54ecc0e #1337 False positive "Avoid throwing raw exception types" when exception is not thrown 2015-04-18 18:21:11 +02:00
Andreas Dangel 7452c68689 Merge branch 'pmd/5.3.x' into master 2015-04-18 10:11:40 +02:00
Andreas Dangel 1910a6844c #1332 False Positive: UnusedPrivateMethod 2015-04-18 10:04:31 +02:00
Andreas Dangel 5dc9f86a06 Simplify SingleMethodSingleton rule 2015-04-16 20:15:24 +02:00
Andreas Dangel a9cf5d0b73 whitespaces 2015-04-16 20:13:53 +02:00
Andreas Dangel d885267e6c Update changelog, add license headers, add externalInfoUrl for new rules 2015-04-16 20:12:22 +02:00
Andreas Dangel 5438ea180c Merge branch 'master' of https://github.com/kshantaramanUFL/pmd into kshantaramanUFL-master 2015-04-16 19:55:15 +02:00
Andreas Dangel 3485acaa6f Merge branch 'pmd/5.3.x' into master 2015-04-16 19:53:12 +02:00
Andreas Dangel 342e0c4789 Update changelog 2015-04-16 19:28:52 +02:00
Andreas Dangel a56f5545fa Merge branch 'fix-null-pointer-exceptions' of https://github.com/Vampire/pmd into Vampire-fix-null-pointer-exceptions 2015-04-16 19:21:47 +02:00
Romain PELISSE 054d3ce0c9 Add a new rulesets for Maven's POM rules 2015-04-16 13:34:02 +02:00
Karthik Shantaraman 4080a0f177 Update SingleMethodSingletonRule.java 2015-04-14 18:03:50 -07:00
Andreas Dangel 4d03c95158 #1338 The pmd-java8 POM bears the wrong parent module version 2015-04-14 19:50:32 +02:00
Andreas Dangel 6435cece2b #1338 The pmd-java8 POM bears the wrong parent module version 2015-04-14 19:49:09 +02:00
Björn Kautler d8961a903a Fix NullPointerException in ClassScope.resolveGenericType() 2015-04-14 11:24:23 +02:00
Björn Kautler f310138f9d Fix NullPointerException in ClassScope.qualifyTypeName() 2015-04-14 11:24:21 +02:00
Björn Kautler e8c36b34f8 Make TypeSet resolvers null-safe 2015-04-14 11:24:20 +02:00
kshantaraman 4862f0db89 Added code comments 2015-04-13 17:39:46 -07:00
kshantaraman f03883a793 Changed files to match naming conventions 2015-04-13 17:28:59 -07:00
kshantaraman 5d9ecfc203 Changed to follow coventions 2015-04-13 17:22:29 -07:00
Karthik Shantaraman 11470aeb56 Update SingleMethodSingletonRule.java
Minor Bug Fix
2015-04-13 16:44:17 -07:00
Karthik Shantaraman 828c99141c Updated design.xml file
Added the rules in Design
2015-04-13 16:14:27 -07:00
kshantaraman 2b9df33f99 Added PMD Rules for Singleton pattern violations. 2015-04-13 16:06:05 -07:00
Andreas Dangel 29a32bb2a7 #1333 Error while processing Java file with Lambda expressions 2015-04-13 20:01:28 +02:00
Andreas Dangel 85b6b3c0ff #1333 Error while processing Java file with Lambda expressions 2015-04-13 20:01:08 +02:00
Andreas Dangel fa9a4705e6 Prepare next development version 2015-04-13 19:57:34 +02:00
Andreas Dangel cf22d5841b Whitespaces 2015-04-13 19:22:53 +02:00
Andreas Dangel 63f1814c80 Define the goals for releaseing explicitly 2015-04-04 12:39:18 +02:00
Andreas Dangel 9ec438c97d Update project info reports, display modules after the main pages 2015-04-04 10:50:36 +02:00
Andreas Dangel f8be558c5b Remove unneeded maven profiles 2015-04-04 10:50:09 +02:00
Andreas Dangel 15800d6378 Add Clover plugin back 2015-04-04 10:49:37 +02:00
Andreas Dangel ed5b3608cd Define the goals for releaseing explicitly 2015-04-03 19:04:55 +02:00
Andreas Dangel c44a89cce3 [maven-release-plugin] prepare for next development iteration 2015-04-01 20:06:39 +02:00
Andreas Dangel 094c9c0ec9 [maven-release-plugin] prepare release pmd_releases/5.3.0 2015-04-01 20:06:38 +02:00
Andreas Dangel 4cb7c4166e Prepare next development version 2015-04-01 19:59:43 +02:00
Andreas Dangel 8fd4528feb [maven-release-plugin] prepare branch pmd/5.3.x 2015-04-01 19:57:15 +02:00
Andreas Dangel 5c2f6bc962 [maven-release-plugin] prepare for next development iteration 2015-04-01 19:57:15 +02:00
Andreas Dangel 53055517d1 Prepare pmd release 5.3.0 2015-04-01 19:56:05 +02:00
Andreas Dangel 330708a35b #1197 JUnit4TestShouldUseTestAnnotation for private method 2015-03-27 20:47:58 +01:00
Andreas Dangel ddb7c89505 #1307 False positive: SingularField and lambda-expression 2015-03-27 20:36:18 +01:00
Andreas Dangel 4ad83be724 #1326 PMD 5.3.0-SNAPSHOT doesn't compile under Windows 2015-03-27 19:15:36 +01:00
Andreas Dangel 63017dbf08 pmd-core: convert util/database to junit 4 tests, indentation fixes 2015-03-26 20:48:45 +01:00
Andreas Dangel 79b92b71f1 #1322 MethodReturnsInternalArray on private methods 2015-03-26 20:33:57 +01:00
Andreas Dangel e46bea857a #1323 False positive case of UseAssertTrueInsteadOfAssertEquals 2015-03-26 20:25:19 +01:00
Andreas Dangel 65c2493ec7 #1325 Inner class declared within a method fails to parse (ClassCastException) 2015-03-26 19:54:04 +01:00
Andreas Dangel 12cc353d38 #1324 MethodReturnsInternalArray false positive with clone() 2015-03-25 21:31:17 +01:00
Andreas Dangel e57007e1be dogfood, whitespaces 2015-03-25 20:16:55 +01:00
Andreas Dangel 61e8412afe dogfood, whitespaces 2015-03-24 22:48:01 +01:00
Andreas Dangel 056b2fbaea dogfood, whitespaces 2015-03-23 22:11:23 +01:00
Andreas Dangel 45a0227f17 Use released version 0.9 of pmd-build plugin 2015-03-23 20:32:59 +01:00
Andreas Dangel 231a416c87 [maven-release-plugin] prepare for next development iteration 2015-03-23 20:25:49 +01:00
Andreas Dangel 3c2721587d [maven-release-plugin] prepare release pmd-build/0.9 2015-03-23 20:25:49 +01:00
Andreas Dangel 34f1eaca11 Upgrade maven-pmd-plugin to 3.4 2015-03-23 20:19:11 +01:00
Andreas Dangel 2fdb51fcb6 dogfood, whitespaces 2015-03-23 20:16:03 +01:00
Andreas Dangel b7bf3fbb8c dogfood, whitespaces 2015-03-22 00:15:08 +01:00
Andreas Dangel 10ae0fb999 dogfood, whitespaces 2015-03-21 23:30:55 +01:00
Andreas Dangel 86d2387784 update gitignore 2015-03-21 23:11:45 +01:00
Andreas Dangel f300ce1ad6 maven-plugin-pmd-build: use target/generated-site directory as default 2015-03-21 22:50:22 +01:00
Andreas Dangel 9e7839b1f3 doc: Add github ribbon, add topBarIcon 2015-03-21 19:42:17 +01:00
Andreas Dangel 8b4d71a284 doc: Fix syntax error 2015-03-21 19:11:22 +01:00
Andreas Dangel 0c69ed6f8b PMD exit with status 4 if violations have been found. 2015-03-21 19:03:03 +01:00
Andreas Dangel 741a9470bd Update changelog 2015-03-21 18:17:02 +01:00
Andreas Dangel 07e641f20a Merge branch 'tiobe/fix-error-handling' of https://github.com/tiobe/pmd into tiobe-tiobe/fix-error-handling 2015-03-21 18:16:16 +01:00
Andreas Dangel f0dfca261d doc: Update best practices after basic doesn't contain empty/unnecessary
rules anymore (deprecation)
2015-03-21 18:09:04 +01:00
Andreas Dangel ea9789dac5 Use wildcard classpath instead of java.ext.dirs 2015-03-21 18:02:40 +01:00
Andreas Dangel fb1e1ba1aa doc: Improve PMD command line documentation 2015-03-21 17:55:50 +01:00
Andreas Dangel 9312e23a8f doc: add CPD GUI section 2015-03-21 16:38:25 +01:00
Andreas Dangel 415eed32c5 doc: Improve helptext of CPD command line 2015-03-21 16:38:21 +01:00
Andreas Dangel 3ad6663dfb doc: Improve CPD documentation 2015-03-21 16:38:17 +01:00
Andreas Dangel 28dfbeabf8 #1321 CPD format XML fails with NullPointer 2015-03-15 19:39:09 +01:00
Andreas Dangel 65398d9eed #1319 PMD stops with NoClassDefFoundError (typeresolution) 2015-03-15 18:49:45 +01:00
Andreas Dangel a153b974cc #1320 Enhance SimplifyBooleanReturns checks 2015-03-15 18:49:41 +01:00
Andreas Dangel dd6affeb6e Use new pmd-build plugin, adjust some rule documentation for markdown changes 2015-03-15 14:59:55 +01:00
Andreas Dangel d17786000f maven-plugin-pmd-build: generate markdown files for the rules
* simplify the configuration of the plugin
* use better default values
2015-03-15 14:58:57 +01:00
Andreas Dangel 9367879e69 #1277 Delete BooleanInversion as it makes no sense
Deprecate the rule for now - to be completely deleted later
2015-03-15 10:51:57 +01:00
Andreas Dangel d484469fdf doc: fix markdown sites 2015-03-14 22:26:36 +01:00
Andreas Dangel c5622d9c21 doc: Convert xdoc to markdown - usage pages 2015-03-14 22:26:35 +01:00
Andreas Dangel b182001920 doc: Convert xdoc to markdown - customizing pages 2015-03-14 22:26:30 +01:00
Andreas Dangel 0ac64e9d88 doc: Convert xdoc to markdown - index and all overview pages 2015-03-14 16:22:51 +01:00
Andreas Dangel 70070295b7 maven-plugin-pmd-build: Output also deprecated rules that are no references. 2015-03-14 14:40:00 +01:00
Andreas Dangel 03e35f5596 maven-plugin-pmd-build: add the deprecated rules to the rules index page 2015-03-14 13:47:19 +01:00
Andreas Dangel 233b948bd4 maven-plugin-pmd-build: Also display deprecated rules 2015-03-14 13:19:11 +01:00
Andreas Dangel 0ba3c0b8ed maven-plugin-pmd-build: output the rule priority 2015-03-14 11:54:11 +01:00
Andreas Dangel 08c89fb4f5 maven-plugin-pmd-build: whitespace for xsl 2015-03-14 11:47:56 +01:00
Andreas Dangel 9860ded4c8 maven-plugin-pmd-build: add project-info-reports version 2015-03-14 11:43:33 +01:00
Andreas Dangel b379d2e264 maven-plugin-pmd-build: pmd dogfood 2015-03-14 11:43:19 +01:00
Andreas Dangel bc44701af0 maven-plugin-pmd-build: whitespace, formatting 2015-03-14 11:30:43 +01:00
Andreas Dangel 22a5f95272 maven-plugin-pmd-build: update plugins, add plugin annotations 2015-03-14 11:26:02 +01:00
Andreas Dangel 6c79f12da1 maven-plugin-pmd-build: update plugins 2015-03-14 11:12:33 +01:00
Andreas Dangel a52d0dcc6f Make sure, a deprecated and renamed rule is not executed twice. 2015-03-09 22:14:37 +01:00
Andreas Dangel dff3bfb359 #1283 Rename UncommentedEmptyMethod to UncommentedEmptyMethodBody 2015-03-09 20:57:35 +01:00
Andreas Dangel 6c480f6dc7 Document deprecated rules in changelog 2015-03-09 19:56:53 +01:00
Andreas Dangel c74b43baf2 #1317 RuntimeException when parsing class with multiple lambdas
Removing Java8MultipleLambdasTest from java8 integration, as it can
be tested with java < 8 in pmd-java
2015-03-07 21:12:04 +01:00
Andreas Dangel 59b14bd009 Cleanup and add license headers 2015-03-07 20:09:47 +01:00
Andreas Dangel c3882ef6f4 Update changelog 2015-03-07 19:19:01 +01:00
Andreas Dangel c30b0be663 Merge branch 'bugfix/improves-jdk8-support' of https://github.com/bric3/pmd into bric3-bugfix/improves-jdk8-support 2015-03-07 19:13:56 +01:00
Andreas Dangel 74708fa69e RuleProperties: Further refactoring - making the delimiters configurable 2015-03-07 19:01:52 +01:00
Jan van Nunen e2cc67c591 Fixed exit status of PMD when error occurs
When an error occured the exit status of PMD was 0. The error occured
because the logic of 'NO_EXIT_AFTER_RUN' was incorrect/inverted. A
'System.exit()' was performed when 'NO_EXIT_AFTER_RUN' was set while it
should be skipped. I copied the fix from the CPDCommandLineInterface
class.

Furthermore I made sure all error messages are printed to System.err
instead of System.out, so they can easily extracted/found when PMD is
invoked by external tools.
2015-03-05 12:22:56 +01:00
Andreas Dangel 99f735cc3b RuleProperties: Whitespaces, reformat 2015-03-02 21:40:14 +01:00
Andreas Dangel 8ca4a57c13 RuleProperties: get rid of AbstractDelimitedProperty
Just using AbstractProperty now, it can do both.
2015-03-02 20:45:53 +01:00
Andreas Dangel df423b373c RuleProperties: Add more tests and fix some multi property issues.
Add missing BooleanMultiProperty.FACTORY
2015-03-02 20:15:04 +01:00
Brice Dutheil 18f393da3c Introduces java 8 integration test module
* Only for testing pmd-java
* Activated only if the jdk is 1.8
2015-03-01 22:11:51 +01:00
Brice Dutheil 28d1764428 Improves pmd jdk8 readiness
* Upgrade asm so that it understands default method and static methods in interfaces jdk8 class files
* see 9b91690f21 for ASM4 support
2015-03-01 22:09:33 +01:00
Brice Dutheil c50d84ff24 Replaces with spaces only (was mixed whitespaces) 2015-03-01 22:04:17 +01:00
Andreas Dangel fcad3925cd #1316 Multi Rule Properties with delimiter not possible 2015-02-28 14:12:53 +01:00
Andreas Dangel acb8b49aa8 #1302 False Positive: UnusedPrivateField when accessed by inner class 2015-02-21 11:53:38 +01:00
Andreas Dangel 33212c7da3 #1302 False Positive: UnusedPrivateField when accessed by inner class 2015-02-21 11:29:44 +01:00
Andreas Dangel bdf9c19a1d #1304 UseCollectionIsEmpty false positive comparing to 1 2015-02-21 11:26:12 +01:00
Shuyang Zhou cd8325dff3 #1303 OverrideBothEqualsAndHashcodeRule does not work on class implements resolvable interfaces 2015-02-21 11:16:13 +01:00
Andreas Dangel 9b8496ab16 #1305 variable declaration inside switch causes ClassCastException 2015-02-20 20:28:39 +01:00
Andreas Dangel 96b425be46 Disable Scala for jdk9 builds for now (see #1314 Enable Scala for JDK9) 2015-02-20 20:05:38 +01:00
Andreas Dangel 21d7ebb809 Fixes for java9 2015-02-20 19:19:16 +01:00
Andreas Dangel abb247a13a Update changelog 2015-02-20 18:51:36 +01:00
Robert Whitebit cd52e39b08 [JUnit] Check assertion message present in assertEquals with delta
A missing assertion message for assertEquals(double, double, double)
is detected in most cases now. If the assertEquals method has two
arguments, an assertion message is missing, if the assertEquals method
has three arguments, the first one has to be a string.

Pmd will only print an error if the first argument type has been
determined (getType() != null) and isn't a String. Therefore
assertEquals(getInt(), getInt(), getInt()) won't be detected as an
error. However, double d = 1.0; assertEquals(d, 1.0, 1.0); will be
detected.

The JUnitAssertionsShouldIncludeMessageRule.check method has been moved
to the inner class AssertionCall and has been expanded by an
isException hook. The assertEquals with three arguments check overrides
the isException method, returns true if the first argument can't be
determined or is a String and if so, no violation will be added. Also
the constructor arguments have been swapped for readability.

https://sourceforge.net/p/pmd/bugs/1313/
2015-02-20 00:36:11 +01:00
Andreas Dangel 1d0d7d995e Update changelog 2015-02-19 20:57:09 +01:00
Andreas Dangel ed6a876549 Merge branch 'missingAsserts' of https://github.com/robertwhitebit/pmd into robertwhitebit-missingAsserts 2015-02-19 20:56:29 +01:00
Andreas Dangel 5c9eae44c1 Update changelog 2015-02-19 20:52:19 +01:00
Andreas Dangel 6b7846a329 Merge branch 'unused-private-field-inner' of https://github.com/rsalvador/pmd into rsalvador-unused-private-field-inner 2015-02-19 20:51:40 +01:00
Andreas Dangel 299d167e1b Update changelog 2015-02-19 20:47:21 +01:00
Andreas Dangel 563fc4ed5a Merge branch 'no-class-def-found-error' of https://github.com/rsalvador/pmd into rsalvador-no-class-def-found-error 2015-02-19 20:40:15 +01:00
Andreas Dangel 0f0984af3c #1312 Rule reference must not override rule name of referenced rule
The RuleSetWriter used the wrong name, too
2015-02-19 18:29:03 +01:00
Robert Whitebit 41e921531a Add missing assertions in JUnitAssertionsShouldIncludeMessage test
Missing assertions were assertArrayEquals, assertNotSame, assertThat and
fail.
2015-02-18 23:02:43 +01:00
Andreas Dangel d5d6118f12 #1312 Rule reference must not override rule name of referenced rule
otherwise the rule reference is broken
2015-02-18 20:07:44 +01:00
Roman 070a7c992f Fix some false positives in UnusedPrivateField 2015-02-15 11:43:49 -08:00
Roman 1f6421ec88 Handle NoClassDefFoundError along ClassNotFoundException 2015-02-15 11:34:32 -08:00
Andreas Dangel c44d94416d verify #1310 PMD cannot parse int.class with real example 2015-02-10 22:32:09 +01:00
Andreas Dangel 5fbbe0ac94 verify #1310 PMD cannot parse int.class 2015-02-09 21:36:49 +01:00
Andreas Dangel 12d6d71242 Update changelog 2015-01-28 21:34:49 +01:00
Andreas Dangel 5572f9896c Merge branch 'master' into tiobe-tiobe/csv_linenumber_per_file 2015-01-28 20:33:51 +01:00
Andreas Dangel 4e23642f74 Rewrote java-design/FieldDeclarationsShouldBeAtStartOfClass as a java rule
Fixes #1308 PMD runs endlessly on some generated files
2015-01-28 20:22:24 +01:00
Andreas Dangel a51a58476c Another small performance improvement for rule FieldDeclarationsShouldBeAtStartOfClass
It is still the slowest rule from #1308 PMD runs endlessly on some generated files
2015-01-26 20:48:49 +01:00
Andreas Dangel 1159350e91 Merge branch 'tiobe/csv_linenumber_per_file' of https://github.com/tiobe/pmd into tiobe-tiobe/csv_linenumber_per_file 2015-01-24 18:34:21 +01:00
Andreas Dangel 172c20efa6 Small performance improvements for rule FieldDeclarationsShouldBeAtStartOfClass
It is the slowest rule from #1308 PMD runs endlessly on some generated files
2015-01-24 15:57:04 +01:00
Andreas Dangel 4be14adebb #1308 PMD runs endlessly on some generated files 2015-01-24 10:03:46 +01:00
Andreas Dangel 9522ab3cd4 #1306 False positive on duplicate when using static imports 2015-01-22 19:30:20 +01:00
Andreas Dangel 57beb7ed13 #914 False +ve from UnusedImports with wildcard static imports 2015-01-21 21:56:43 +01:00
Jan van Nunen b1769846e5 Created extra CSV output format 'csv_with_linecount_per_file' which outputs the correct line count per file.
Some of the tokenizers ignore comments and therefore the line count of a
duplication can differ per file. Take for example the following files:

FileA.java:

1: public class FileA {
2:  pulbic String Foo() {
3:    return "Foo";
4:   }
5:  }

FileB.java:

1: public class FileB {
2:   pulbic String Foo() {
3:     // This is a comment
4:     return "Foo";
5:   }
6: }

When comments are ignored and not tokenized, the duplication consist of
the following tokens:

'{', 'public', 'String', 'Foo', '(', ')', '{', 'return', 'Foo', ';',
'}', '}'

For 'FileA.java' the duplication is 5 lines long, it starts at line 1
and ends at line 5. For 'FileB.java' the duplication is 6 lines long, it
starts at line 1 and ends at line 6.

Note that this is just 1 example, because for most tokenizers comments
and white spaces are not significant. For example the following file
contains the same duplication all on 1 line:

FileC.java

1: public class FileC { public String Foo() { return "Foo"; } }

For us the correct line count per file is important, because we
highlight the duplications in an annotated source view and show the
percentage of duplicated code the file contains. The current output
formats only contain 1 line count per duplication and file set. For the
above example CPD would output the following:

Found a 4 line (12 tokens) duplication in the following files:
Starting at line 1 of FileA.java
Starting at line 1 of FileB.java

For FileB.java this is not correct and would lead to incorrect
percentage of duplicated code. (66% (4 of 6 lines) instead of the
correct 83% (5 of 6 lines)).

To fix the problem, I created an extra output format
'csv_with_linecount_per_file' which outputs the correct line count per
file. The format contains the following:

tokens,occurrences
<nr of tokens>,<nr of occurrences>(,<begin line>,<line count>,<file
name>)+

For the above example the output would be

tokens,occurrences
12,2,1,4,FileA.java,1,5,FileB.java
2015-01-21 13:55:49 +01:00
Andreas Dangel df81f1fbb5 Update changelog 2015-01-19 21:39:00 +01:00
Andreas Dangel e122ab2450 Fix unit tests after xerces is removed 2015-01-19 21:26:20 +01:00
Andreas Dangel 8d487384a3 Remove LineNumberAwareSaxHandler - as this would have needed xerces 2015-01-19 19:22:03 +01:00
Andreas Dangel a2a8d6c227 Remove xerces dependencies 2015-01-19 19:22:03 +01:00
Andreas Dangel 6ca24d1f8a Implement DOMLineNumbers to determine the line numbers after the parsing 2015-01-19 19:22:03 +01:00
Andreas Dangel 0da50b9e89 Fix XMLParser test to expect more accurate line numbers/columns 2015-01-19 19:22:03 +01:00
Andreas Dangel 5ae01d2d3e Up version to 5.3.0-SNAPSHOT 2015-01-18 12:19:52 +01:00
Andreas Dangel 3e7391ab64 Update changelog and credits 2015-01-18 12:15:01 +01:00
Andreas Dangel be6a422860 Merge branch 'tiobe/pmd-core-cpdcmdlineoptfix' of https://github.com/tiobe/pmd into tiobe-tiobe/pmd-core-cpdcmdlineoptfix 2015-01-18 12:13:09 +01:00
Andreas Dangel 2e8ff0487e Update changelog 2015-01-18 12:08:09 +01:00
Andreas Dangel 381a697a99 Merge branch 'tiobe/pmd-cpp-fixlexicalerrors' of https://github.com/tiobe/pmd into tiobe-tiobe/pmd-cpp-fixlexicalerrors 2015-01-18 12:06:29 +01:00
Andreas Dangel 6d89f5b30d Update changelog 2015-01-18 11:59:58 +01:00
Andreas Dangel 17e4d2fb9e Merge branch 'tiobe/pmd-cs-linenumberfix' of https://github.com/tiobe/pmd into tiobe-tiobe/pmd-cs-linenumberfix 2015-01-18 11:52:08 +01:00
Andreas Dangel d69624e823 Update changelog for scala pull request; update license infos 2015-01-18 11:45:26 +01:00
Andreas Dangel a4fbcef536 Merge branch 'tiobe/pmd-scala' of https://github.com/tiobe/pmd into tiobe-tiobe/pmd-scala 2015-01-18 11:22:03 +01:00
Andreas Dangel f5b36f3984 Update changelog for Objective-C pull request 2015-01-18 11:17:04 +01:00
Andreas Dangel cf442b463e Merge branch 'tiobe/pmd-objectivec' of https://github.com/tiobe/pmd into tiobe-tiobe/pmd-objectivec 2015-01-18 11:14:40 +01:00
Andreas Dangel e1886ac48e Update changelog for Matlab pull request 2015-01-18 11:09:41 +01:00
Andreas Dangel 68e4b3e4f1 Merge branch 'tiobe/pmd-matlab' of https://github.com/tiobe/pmd into tiobe-tiobe/pmd-matlab 2015-01-18 11:04:23 +01:00
Andreas Dangel 3ef82a6c3a Update changelog for python pull request 2015-01-18 11:00:10 +01:00
Andreas Dangel d5593f516f Merge branch 'tiobe/pmd-python' of https://github.com/tiobe/pmd into tiobe-tiobe/pmd-python 2015-01-18 10:47:24 +01:00
Andreas Dangel 6b69174e24 #1296 PMD UnusedPrivateMethod invalid detection of 'private void method(int,boolean,Integer...)' 2015-01-17 22:42:58 +01:00
Andreas Dangel 9d96d974de #1299 MethodReturnsInternalArray false positive 2015-01-17 11:32:55 +01:00
Andreas Dangel 24a435a42e RedundantFieldInitializer - consider binary literals and underscores (java7) 2015-01-17 11:08:46 +01:00
Andreas Dangel 89572efe0d #1298 Member variable int type with value 0xff000000 causes processing error 2015-01-16 21:34:05 +01:00
Jan van Nunen 5776c0e9c5 Made exceptions of the Scala tokenizer non-fatal when CPD is executed with the '--skipLexicalErrors' command line option. 2015-01-15 16:01:28 +01:00
Jan van Nunen 110184e542 Made exceptions of the Scala tokenizer non-fatal when CPD is executed with the '--skipLexicalErrors' command line option. 2015-01-15 15:32:19 +01:00
Jan van Nunen a376da0d9e Fixed '--files' command line option of CPD, so it also works for files and not only for directories.
The '--files' command line option of CPD lets you specify which
directories and files should be scanned for duplicated code.
Unfortunately it didn't work when you specified files instead of
directories, for example: '--files foo.c bar.c'. In this example CPD
executed successful, but the files 'foo.c' and 'bar.c' are completely
ignored.
2015-01-14 17:34:17 +01:00
Jan van Nunen 6c0b45519c Added pmd-python to default PMD distribution. 2015-01-13 14:25:42 +01:00
Jan van Nunen 5bbc99a6f8 Added pmd-objectivec to default PMD distribution. 2015-01-13 14:23:16 +01:00
Jan van Nunen 06f769ddd0 Added pmd-scala to default PMD distribution. 2015-01-13 14:19:08 +01:00
Jan van Nunen f58ee38cca Fixed build error by adding the configuration base-directory to the POM.xml 2015-01-13 14:11:06 +01:00
Jan van Nunen 23f03a78a9 Added pmd-matlab to default PMD distribution. 2015-01-13 14:07:43 +01:00
Jan van Nunen c92dc9706c Relaxed C++ tokenizer so a '\'(backslash) can be use to escape any character inside a string or character.
The following 2 code snippets could not be tokenized:

1:  if (*pbuf == '\0x05'), the problem is the '\0' in the character
literal '\0x05'.
2:  szPath = m_sdcacheDir + _T("\    oMedia");, the problem is the '\ '
in the string literal "\    oMedia".

I relaxed the lexical grammar so a '\' (backslash) can escape any
character inside a string or character literal. We can relax the grammar
because CPD only needs the tokens, so it is no problem to accept
'invalid' string / character literals. (according to the ANSI C
standard).  Failing too fast because the tokenizer is too strict is
annoying because then we can't check the files for duplicated code.

Both snippets were taken from existing projects and be successfully
compiled, so for some C / C++ compilers it is valid code.
2015-01-13 11:36:54 +01:00
Jan van Nunen d830974842 Fixed lexical error when a C++ file contains an empty character literal L''.
This commit fixes a lexical error when a C++ file contains an empty
character literal L''. The following code could not be tokenized:

std::wstring wsMessage( sMessage.length(), L'');

It triggers the following error:

net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file
'foo.cpp' at line 1, column 46.  Encountered: "\'" (39), after : "\'"
2015-01-13 11:36:54 +01:00
Jan van Nunen ceef6cd236 Fixed lexical eror when a preprocessor directive is followed by a single line comment that starts with "//*".
This commit fixes a lexical eror when a preprocessor directive is
followed by a single line comment that starts with "//*".

The following code could not be tokenized:

#define LSTFVLES_CPP  //*

It triggers the following error:

net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file
'foo.cpp' at line 2, column 0.  Encountered: <EOF> after : ""
2015-01-13 11:36:53 +01:00
Jan van Nunen 5c2df4c877 Fixed lexical error when a C++ file contains ASM with the '@' character.
This commit fixes a lexical error when a C++ file contains ASM with the
'@' character. The following code cannot be tokenized and triggers a
lexical error:

asm void eSPI_boot()
{
// setup stack pointer
lis r1, _stack_addr@h
ori r1, r1, _stack_addr@l
}

The error that occurs:

net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file
CODE_LOADED_FROM_STRING at line 4, column 22.  Encountered: "@" (64),
after : ""
2015-01-13 11:36:53 +01:00
Jan van Nunen 6d0be8b126 Fixed incorrect line numbers after mutiline comments and verbatim strings. 2015-01-12 10:53:34 +01:00
Jan van Nunen 952ace3128 Fixed build warning of Scala compiler. 2015-01-12 09:18:20 +01:00
Jan van Nunen bffea4bb3b Added support for Scala to CPD.
The Scala tokenizer was extracted from the Sonar Scala plugin.
(https://github.com/SonarCommunity/sonar-scala) I copied the code
because the Sonar Scala plugin has a lot of unwanted dependencies. I
tried to keep the changes to the Scala Sonar plugin as minimal as
possible.

To tokenize the source files the official Scala compiler is used.
2015-01-09 15:20:25 +01:00
Jan van Nunen 8dd3755db1 Added support for Objective-C to CPD. 2015-01-08 16:04:15 +01:00
Jan van Nunen 43750e3799 Added support for Python to CPD. 2015-01-07 12:07:24 +01:00
Jan van Nunen 16fabee7c3 Added support for Matlab to CPD. 2015-01-07 11:56:47 +01:00
Jan van Nunen 779ea00647 Created branch to add Matlab support 2015-01-07 11:00:49 +01:00
Andreas Dangel c1bc045c65 Update release process - use compression when uploading the site 2014-12-21 16:55:04 +01:00
Andreas Dangel 111fc31cd7 Update changelog for next version 2014-12-21 11:54:14 +01:00
Andreas Dangel 0e6a5db426 [maven-release-plugin] prepare for next development iteration 2014-12-21 11:46:02 +01:00
Andreas Dangel 6c316e9375 [maven-release-plugin] prepare release pmd_releases/5.2.3 2014-12-21 11:46:02 +01:00
Andreas Dangel 8831b710f1 Prepare pmd release 5.2.3 2014-12-21 11:39:41 +01:00
Andreas Dangel 990ed276f3 Update release process - don't use site-deploy anymore. 2014-12-21 11:26:41 +01:00
Andreas Dangel 0fce9a497b #1289 CommentRequired not ignored if javadoc {@inheritDoc} anon inner classes 2014-12-18 19:20:16 +01:00
Andreas Dangel 763b38e8de verify #1296 PMD UnusedPrivateMethod invalid detection of 'private void method(int,boolean,Integer...)' 2014-12-18 18:52:28 +01:00
Andreas Dangel 5530d7eb94 #1288 MethodNamingConventions for native should be deactivated 2014-12-17 21:52:42 +01:00
Andreas Dangel e48f18cce2 #1293 Disable VariableNamingConventions for native methods 2014-12-17 21:42:49 +01:00
Andreas Dangel 071040929e verify #1293 VariableNamingConventions False positive for native methods 2014-12-15 21:10:21 +01:00
Andreas Dangel 5daa4a9382 #1294 False positive UnusedPrivateMethod with public inner enum from another class 2014-12-14 18:01:07 +01:00
Andreas Dangel db51c7d217 Update changelog 2014-12-14 11:29:58 +01:00
alberto 3a2e1474d3 spaces 2014-12-12 20:50:20 +01:00
alberto 50df3e0e11 Allow byte[] data and byte data[] as no-varargs last argument 2014-12-12 20:39:46 +01:00
Andreas Dangel aea6c74a8f java/design/UseVargs - update changelog, extend test case 2014-12-12 19:26:36 +01:00
Andreas Dangel bdf454a967 Merge branch 'master' of https://github.com/albfernandez/pmd 2014-12-12 19:05:44 +01:00
Andreas Dangel 26b4f850b1 #1252 net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file xxx.cpp 2014-12-12 18:58:51 +01:00
Andreas Dangel 6b3b9d0ccc #1252 implement BOM detection differently for cpp 2014-12-12 17:45:38 +01:00
Alberto Fernández a07d8bdfce Update design.xml 2014-12-11 10:50:23 +01:00
Andreas Dangel 8fb2f0a09f Add a timeout for retrieving a ruleset from a URL
By default, timeout is 5 seconds
2014-12-10 22:00:05 +01:00
Andreas Dangel dd8c5f2d1a Implement possibility to specify a Single Rule from a Ruleset via http 2014-12-10 21:54:17 +01:00
alberto c5f28f4879 Allow byte[] as no-varargs final argument 2014-12-09 22:48:21 +01:00
Andreas Dangel a9e6d921dd Update changelog 2014-12-08 20:05:21 +01:00
Andreas Dangel b2f7a0b94c Merge branch 'master' of https://github.com/msiemczyk/pmd 2014-12-07 21:09:15 +01:00
msiemczyk 8d0f8080f4 #1290 RuleSetReferenceId does not process HTTP(S) correctly.
Fixed the bug and added one unit test.
2014-12-05 17:56:04 -05:00
Andreas Dangel 17e22c4cb3 Separate out the inner classes of XmlParser 2014-12-04 21:04:25 +01:00
Andreas Dangel 084c92efad Update changelog for next version 2014-12-03 21:24:39 +01:00
Andreas Dangel ac0181f017 [maven-release-plugin] prepare for next development iteration 2014-12-03 19:22:19 +01:00
Andreas Dangel c577dc8aac [maven-release-plugin] prepare release pmd_releases/5.2.2 2014-12-03 19:22:19 +01:00
Andreas Dangel 6ff80fbad1 Prepare pmd release 5.2.2 2014-12-03 19:11:52 +01:00
Andreas Dangel ce1e6b418c Fix dogfood ruleset 2014-11-30 21:23:04 +01:00
Andreas Dangel 0cab1ac78a Upgrade maven-pmd-plugin to 3.3 2014-11-30 20:29:32 +01:00
Andreas Dangel 944771c626 Fix javadoc for suppress marker 2014-11-30 20:24:22 +01:00
Andreas Dangel c8887de5ff #1090 cpp parser exception with inline asm 2014-11-28 21:32:32 +01:00
Andreas Dangel 7b58836ebb #1128 CompareObjectsWithEquals False Positive comparing boolean (primitive) values 2014-11-27 20:19:17 +01:00
Andreas Dangel 4d16e3a582 #1286 UnusedPrivateMethod returns false positives for varags and enums 2014-11-26 19:21:44 +01:00
Andreas Dangel 3fd0d7fe01 verify #1287 UnusedPrivateMethod returns false positives for Superclass 2014-11-26 19:12:33 +01:00
Andreas Dangel a9352d4d4c Update --encoding paramter description for CPD.
Thanks to Michael Osipov.
2014-11-25 21:49:58 +01:00
Andreas Dangel 3ce7442c2d Fix unit test 2014-11-24 22:18:13 +01:00
Andreas Dangel 20df4ca717 Don't rely on default encoding for unit tests 2014-11-24 21:06:16 +01:00
Andreas Dangel d0980bd30d Add back the old getRendererFromString method for compatibility 2014-11-24 20:30:17 +01:00
Andreas Dangel afc13b29a2 #1285 Prevent to modify the System environment 2014-11-24 20:18:44 +01:00
Andreas Dangel 8ab9f3ed5d #1280 False Positive in UnusedImports when import used in javadoc 2014-11-18 22:27:07 +01:00
Andreas Dangel 7d262036c6 Exclude LawOfDemeter rule from dogfood ruleset 2014-11-17 21:56:01 +01:00
Andreas Dangel e86341bf8e Checkstyle fixes 2014-11-17 21:55:57 +01:00
Andreas Dangel fbe6742666 Set beginColumn for the test nodes, so that no RuntimeException is thrown. 2014-11-16 12:00:29 +01:00
Andreas Dangel 5f35ded04b Fix PMD dogfood issues in pmd-java 2014-11-16 11:38:42 +01:00
Andreas Dangel 4345f04fb0 Fix PMD dogfood issues in pmd-plsql and pmd-xml 2014-11-16 11:11:56 +01:00
Andreas Dangel 3a4caa5c7c Fix PMD dogfood issues in pmd-cs, pmd-jsp, pmd-javascript, pmd-test 2014-11-16 00:15:47 +01:00
Andreas Dangel f7f89f2921 Fix PMD dogfood issues in pmd-core 2014-11-15 23:57:03 +01:00
Andreas Dangel 6b0ddaeb51 #1254 CPD run that worked in 5.1.2 fails in 5.1.3 with OOM
Removed default heapsize of 512m
reenabled multiple line strings in javascript
2014-11-15 21:44:37 +01:00
Andreas Dangel f5db63b374 Exclude generated sources from checkstyle 2014-11-15 19:53:34 +01:00
Andreas Dangel a2e6088faa Fix duplicated code in DBMSMetadata 2014-11-15 19:09:51 +01:00
Andreas Dangel e844ca290c Add cpd to the build 2014-11-15 19:08:39 +01:00
Andreas Dangel 0bca478e31 #1282 False Positive with implicit String.valuesOf() (Java) 2014-11-15 17:02:50 +01:00
Andreas Dangel 55a912e731 #1281 UnusedPrivateMethod incorrectly flagged for methods nested private classes 2014-11-15 16:51:51 +01:00
Andreas Dangel 70723b16bc verify #1280 False Positive in UnusedImports when import used in javadoc 2014-11-15 15:19:12 +01:00
Andreas Dangel a8d7b594ab #1276 False positive in UnusedPrivateMethod with inner enum 2014-11-15 12:55:15 +01:00
Andreas Dangel a5bc2a079f #1276, #1278, #1279, #1280 False positive in UnusedPrivateMethod
Make the auxclasspath option optional. Falls back to the old behavior,
which prevents many false positives.
But it introduces the false negative case #1226, if no auxclasspath is set.
2014-11-15 12:21:18 +01:00
Andreas Dangel 60fe895abf verify #1280 False Positive in UnusedImports when import used in javadoc 2014-11-13 20:10:14 +01:00
Andreas Dangel 4da773b7fc Add ruleset factory tests for all languages 2014-11-09 11:20:54 +01:00
Andreas Dangel 0daca93634 Fix links on index.html site 2014-11-05 21:18:34 +01:00
Andreas Dangel 461df4b86c Prepare changelog for next version 2014-11-03 20:45:16 +01:00
Andreas Dangel a97e9fc532 [maven-release-plugin] prepare for next development iteration 2014-11-03 19:59:01 +01:00
Andreas Dangel 22d22382f6 [maven-release-plugin] prepare release pmd_releases/5.2.1 2014-11-03 19:59:00 +01:00
Andreas Dangel 588330b4b9 pmd: Prepare pmd release 5.2.1 2014-11-03 19:45:50 +01:00
Andreas Dangel 61b11beda7 Another jdk9 fix for Swing's JTree TreeNode 2014-11-02 12:18:45 +01:00
Andreas Dangel 0450f9a9d7 #1258 Java 8 Lambda parse error on direct field access 2014-11-02 10:47:51 +01:00
Andreas Dangel 6b80078c03 #1253 Document default behaviour when CPD command line arguments "encoding" and "ignoreAnnotations" are not specified 2014-11-02 10:24:44 +01:00
Andreas Dangel 58bd3c0514 #1255 UseUtilityClass false positive with Exceptions 2014-11-02 10:13:12 +01:00
Andreas Dangel 1454d8d9c8 #1256 PositionLiteralsFirstInComparisons false positive with Characters 2014-11-02 09:55:04 +01:00
Andreas Dangel fdac23abfe #1259 CloseResource rule ignores conditionnals within finally blocks 2014-10-24 22:00:46 +02:00
Andreas Dangel 5fec443bad #1261 False positive "Avoid unused private methods" with Generics, another case 2014-10-24 20:18:19 +02:00
Andreas Dangel 0e68c00f41 #1275 False positive: UnusedModifier rule for static inner class in enum 2014-10-23 21:36:59 +02:00
Andreas Dangel 76af873708 #1274 ant integration broken with pmd-5.2.0
Separate PMDTask and PMDTaskImpl and set the context classloader
when executing PMD
For CPD, the validation of the language is deferred, until
the context class loader has been switched
2014-10-23 20:00:57 +02:00
Andreas Dangel d9ff018846 Checkstyle, whitespace, formatting 2014-10-21 22:38:19 +02:00
Andreas Dangel 67b1ad9c98 #1261 False positive "Avoid unused private methods" with Generics 2014-10-20 19:17:54 +02:00
Andreas Dangel 238f54ad70 Update rhino dependency to 1.7R4 2014-10-18 21:52:08 +02:00
Andreas Dangel d76454ec81 Update maven plugins 2014-10-18 21:38:57 +02:00
Andreas Dangel 71476b2b5a Fix website base url for sf-release 2014-10-18 21:28:36 +02:00
Andreas Dangel ef007904d2 Update maven-release-plugin 2014-10-18 21:28:26 +02:00
Andreas Dangel 2e7ddc9312 Update dependencies. The new dependencies don't seem to use any
internal jdk api anymore. At least, "jdeps -jdkinternals" doesn't flag
anything.
2014-10-18 21:22:21 +02:00
Andreas Dangel f213e7c38e Add project reports for top level site 2014-10-18 21:02:39 +02:00
Andreas Dangel 30c1a3f831 Fix duplicated maven-clover2-plugin configuration 2014-10-18 21:01:02 +02:00
Andreas Dangel 53048546ba Checkstyle/whitespace fixes 2014-10-18 13:31:14 +02:00
Andreas Dangel cc24717980 #1262 False positive for MissingBreakInSwitch 2014-10-18 13:15:47 +02:00
Andreas Dangel 8f866a8906 #1272 varargs in methods are causing IndexOutOfBoundException when trying to process files 2014-10-18 13:02:41 +02:00
Andreas Dangel 5f9bd17ee6 #1252 net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file xxx.cpp 2014-10-18 12:33:40 +02:00
Andreas Dangel 66ea6b0f9b #550 False +: MissingBreakInSwitch 2014-10-18 11:49:17 +02:00
Andreas Dangel 85afbcfe7c #1263 PMD reports CheckResultSet violation in completely unrelated source files. 2014-10-18 11:44:23 +02:00
Andreas Dangel 0b6f6322e6 #1273 CheckResultSet false positive in try-with-resources nested in if 2014-10-18 11:36:56 +02:00
Andreas Dangel 4660855609 delete Java grammer from pmd-core - it's now in pmd-java 2014-10-18 10:56:53 +02:00
Andreas Dangel 0351d02b20 Update changelog for next version 2014-10-17 22:37:05 +02:00
Andreas Dangel 6e9d825678 Update release process 2014-10-17 22:35:09 +02:00
Andreas Dangel 4a7be51c70 [maven-release-plugin] prepare for next development iteration 2014-10-17 20:15:46 +02:00
Andreas Dangel 118d1c5d30 [maven-release-plugin] prepare release pmd_releases/5.2.0 2014-10-17 20:15:45 +02:00
Andreas Dangel cdcbc8c7aa Enable autoVersionSubmodules for releasing 2014-10-17 20:08:42 +02:00
Andreas Dangel 7ee2faa359 Prepare pmd release 5.2.0 2014-10-17 20:01:40 +02:00
Andreas Dangel f3c238527b Fix link to changelog on index.html 2014-10-13 20:36:39 +02:00
Andreas Dangel b654d3c9cc Merge branch 'modularization' 2014-10-13 19:25:23 +02:00
Andreas Dangel c7d3d2969f Move Go Language into own sub-module, update changelog 2014-10-12 20:05:17 +02:00
Andreas Dangel e8fadec7de Merge branch 'cpd-language-go' of https://github.com/oinume/pmd into oinume-cpd-language-go 2014-10-12 19:57:41 +02:00
Andreas Dangel c714a7da87 Implement clean for generated xdocs 2014-10-12 19:50:25 +02:00
Andreas Dangel 64f9b04811 Update release docu, rename releases ruleset 514->520 2014-10-12 19:33:58 +02:00
Andreas Dangel 2584d7fbbd Update documentation 2014-10-12 19:10:47 +02:00
Andreas Dangel 9ade75a621 Refactor CPDGui to detect available languages dynamically 2014-10-12 10:43:53 +02:00
Andreas Dangel 694258d7df Cleanup dependencies 2014-10-12 09:39:43 +02:00
Andreas Dangel f839ff43d5 Cleanup dependencies 2014-10-11 13:26:10 +02:00
Andreas Dangel 464b0bcef8 Rework CPD's LanguageFactory to use ServiceLoader, too 2014-10-11 12:16:28 +02:00
Andreas Dangel 72719bd0c3 Move C# into own sub-module 2014-10-11 11:23:07 +02:00
Andreas Dangel 2e13d1dd5e Update changelog 2014-10-11 11:01:53 +02:00
Andreas Dangel 7deb1ac596 Bump version to 5.2.0-SNAPSHOT 2014-10-08 22:57:04 +02:00
Andreas Dangel f748539c45 Rename pmd -> pmd-core and pmd-aggregate -> pmd 2014-10-08 22:52:25 +02:00
Andreas Dangel 38dd43a16b PMD, Checkstyle and Clover configurations 2014-10-08 22:31:29 +02:00
Andreas Dangel 475745e98e Configure the site for every module 2014-10-08 21:49:23 +02:00
Andreas Dangel bc9469e385 Add all language modules to distribution package 2014-10-08 21:00:06 +02:00
Andreas Dangel 18ea8600ec Fix problem that some rules where not executed - max language version was
determined wrongly
2014-10-06 23:04:11 +02:00
Andreas Dangel 19fb5426f7 Move forgotten files to java 2014-10-06 22:52:13 +02:00
Andreas Dangel 17b573ef81 Fix ant tests - PMDTaskTest is moved partly to java,
javascript and xml
2014-10-06 22:46:01 +02:00
Andreas Dangel a36239bbc1 Fix remaining RuleSetFactoryTests and RuleSetReferenceIdTests 2014-10-06 22:08:34 +02:00
Andreas Dangel b8c79ffd47 Fix a couple of RuleSetFactoryTests 2014-10-06 20:44:09 +02:00
Andreas Dangel f120134b6d Fix CLI Tests, move coverage test to java 2014-10-06 20:14:43 +02:00
Andreas Dangel d038fed36e Fix RendererTests - XMLRendererTest same as all others now. 2014-10-06 20:00:31 +02:00
Andreas Dangel 8ce1607b23 Fix more tests like StatisticalRuleTest, SourceCodeTest
MatchAlgorithmTest moved to java
2014-10-06 19:19:52 +02:00
Andreas Dangel 09eb9ef2cc Fix DesignerTest - and lazily initialize the Designer class 2014-10-05 21:28:57 +02:00
Andreas Dangel 563a41afd7 More fixes - some tests simply moved to java module 2014-10-05 18:46:34 +02:00
Andreas Dangel 5c548570f6 Introduce two dummy languages for testing, fix more compile errors in tests 2014-10-04 21:16:33 +02:00
Andreas Dangel e41b56a8e5 Move tests for typeresolution and symboltable to java sub-module 2014-10-04 20:44:01 +02:00
Andreas Dangel 8165bc2bf5 Fix test compilation errors - LanguageVersion*Tests in each sub-module now 2014-10-04 20:40:05 +02:00
Andreas Dangel 36327e266e Move cpd code for ecmascript into javascript sub-module 2014-10-04 20:11:55 +02:00
Andreas Dangel 64728dd9c4 Move ruby into own sub-module 2014-10-04 20:09:46 +02:00
Andreas Dangel 600587e5b0 Move fortran into own sub-module 2014-10-04 20:05:38 +02:00
Andreas Dangel a3b4b0bff8 Move php into own sub-module 2014-10-04 20:00:55 +02:00
Andreas Dangel c352217131 Move cpd tokenizer tests to the various sub-modules 2014-10-04 19:16:01 +02:00
Andreas Dangel 36dd58a4ab Move xml and xsl into own sub-module pmd-xml 2014-10-04 19:06:41 +02:00
Andreas Dangel d2a7bc85f1 Move jsp into own sub-module 2014-10-04 18:56:33 +02:00
Andreas Dangel cdf293f9fc Move cpp into own sub-module 2014-10-04 18:48:35 +02:00
Andreas Dangel 802af053cf Move plsql into own sub-module 2014-10-04 18:40:22 +02:00
Andreas Dangel a8ef0ec863 Move velocity into own sub-module 2014-10-04 18:32:40 +02:00
Andreas Dangel 2e7310a2cd Move javascript into own sub-module 2014-10-04 18:23:23 +02:00
Andreas Dangel c859a05718 Extract test framework into own sub-module 2014-10-04 17:37:09 +02:00
Andreas Dangel ad88b4784d Move java into own sub-module pmd-java 2014-10-04 17:36:41 +02:00
Andreas Dangel fa950a8296 Merge remote-tracking branch 'chrisdutz/master' into modularization 2014-10-04 16:59:56 +02:00
Andreas Dangel 4546adac8f Move and remove more java language dependencies in tests
All the symboltable tests seem to be java specific
ParserTst is java specific, too
2014-10-04 16:34:40 +02:00
Andreas Dangel 01c59395b8 Remove more java language dependencies in test classes 2014-10-03 23:31:31 +02:00
Andreas Dangel 0c6e5c5e9a Remove more java language dependencies
SymbolTableViewer is unfinished and not used, so deleted now.
GetCommentOnFunction and TypeOfFunction are registered
with java's language handler.
2014-10-03 22:03:10 +02:00
Andreas Dangel e4faed2f47 Update gitignore 2014-10-03 21:20:08 +02:00
Andreas Dangel c214c1b5ba Move documentation up to parent module 2014-10-03 21:00:28 +02:00
Andreas Dangel c1c6f71981 Configure correct multi-module build
and move common parts up to the parent pom
2014-10-02 19:09:58 +02:00
Andreas Dangel 291245a081 Add sources to the src package
bin-package now only contains the binaries
src-package now only contains the sources
2014-10-01 20:09:58 +02:00
Andreas Dangel 6f7b1f55e4 Create a basic dist module, which creates the binaries for pmd 2014-10-01 19:46:31 +02:00
Andreas Dangel e8cb1bde54 Move test packages net.sourceforge.pmd.ast and .dfa to lang.java. 2014-09-30 21:54:40 +02:00
Andreas Dangel 64b43e1235 Remove references to java 2014-09-30 20:07:31 +02:00
Andreas Dangel d3e97d3c07 Move ImportWrapper in a general package as it's just a utility class 2014-09-30 20:05:26 +02:00
Andreas Dangel 612364a06d Create a first sub-module for java
* almost empty, just compiling the java grammar
* no code moved yet
2014-09-30 19:51:42 +02:00
oinuma-kazuhiro 8ca3805218 Fix indent tab 2014-09-30 15:44:52 +09:00
oinuma-kazuhiro 076d4a09b1 Add Go support to CPD 2014-09-30 15:42:17 +09:00
Christofer Dutz 079c72f7d6 Refactored the LanguageRegistry to use a Java 6 ServiceLoader instead of a custom-built property-file-based solution. 2014-09-29 22:38:46 +02:00
Christofer Dutz b781fd3eb5 Renamed LanguageVersionModule back to LanguageVersion and LanguageModule back to Language. 2014-09-29 21:28:33 +02:00
Andreas Dangel bb9039426b Merge branch 'marob-master' 2014-09-29 21:02:44 +02:00
Andreas Dangel 27b2466bf1 Add missing documentation + changelog 2014-09-29 20:55:51 +02:00
marob 59706b9075 Import jstl functions in tests 2014-09-24 18:11:14 +02:00
marob d7466ec50b Add the fn:escapeXml case 2014-09-24 17:00:50 +02:00
marob adbe4e4e9c merge from upstream 2014-09-24 16:03:42 +02:00
Christofer Dutz 5789144b93 Renamed LanguageVersionModule back to LanguageVersion and LanguageModule back to Language. 2014-09-22 22:05:17 +02:00
Christofer Dutz 0c43a7aae5 Refactored PMD to allow modular extension of languages. 2014-09-22 22:01:17 +02:00
Andreas Dangel dea0fe616e Prepare next version 2014-08-31 13:21:01 +02:00
Andreas Dangel 45c1a8ca71 [maven-release-plugin] prepare for next development iteration 2014-08-31 11:56:31 +02:00
Andreas Dangel 6063aafa80 [maven-release-plugin] prepare release pmd_releases/5.1.3 2014-08-31 11:56:31 +02:00
Andreas Dangel 730d1d75c2 release plugin back to 2.3.2 due to https://jira.codehaus.org/browse/MRELEASE-875 2014-08-31 11:52:16 +02:00
Andreas Dangel fae645106f Prepare pmd release 5.1.3 2014-08-31 11:14:35 +02:00
Andreas Dangel cd38be487e JDK9 code changes - interface javax.swing.tree.TreeNode changed slightly 2014-08-31 10:49:37 +02:00
Andreas Dangel b440eaf323 verify #1249 Regression: UnusedPrivateMethod from 5.0.5 to 5.1.2 2014-08-30 21:11:01 +02:00
Andreas Dangel c1f0d3c43b #1250 Method attribute missing for some violations 2014-08-30 20:57:19 +02:00
Andreas Dangel 94da2876c0 Documentation: Extra closing-brace in suppress-warnings example
See: https://sourceforge.net/p/pmd/discussion/188192/thread/9ecda507/
2014-08-30 19:03:05 +02:00
Andreas Dangel 5efaafc4f6 verify #1251 UnusedPrivateMethod false positives for boxing & unboxing arguments 2014-08-30 18:59:34 +02:00
Andreas Dangel b41e6ff682 #1246 False positive from MissingBreakInSwitch 2014-08-24 11:42:00 +02:00
Andreas Dangel eaa58d7f5f #1247 Not able to recognize JDK 8 Static Method References 2014-08-22 22:59:18 +02:00
Andreas Dangel 8a9c44148a #1245 False Positive for Law of Demeter 2014-08-22 22:38:25 +02:00
Andreas Dangel 3e182c9b03 Verify #1246 False positive from MissingBreakInSwitch 2014-08-22 22:17:10 +02:00
Andreas Dangel 67cdaf9edd Fix unit test 2014-08-18 20:47:58 +02:00
Andreas Dangel 2ffec3d953 Update changelog 2014-08-18 20:40:28 +02:00
Andreas Dangel 15571a15db Refactor cyclomatic complexity tests to be standard rule tests 2014-08-17 19:10:12 +02:00
Andreas Dangel fddf301589 Use PMDTestRunner for almost all rule tests 2014-08-16 20:54:37 +02:00
Andreas Dangel 7790c83fb1 #1241 False+ AvoidProtectedMethodInFinalClassNotExtending 2014-08-15 12:37:02 +02:00
Andreas Dangel 623ac14c51 #1243 Useless Parentheses False Positive 2014-08-15 12:27:08 +02:00
Andreas Dangel 8fcc45daf0 #1244 FieldDeclarationsShouldBeAtStartOfClass and anonymous classes 2014-08-15 12:09:32 +02:00
Andreas Dangel 2d6560c0f8 #1239 StackOverflowError in AbstractTokenizer.parseString running CPD on >1MB JS file 2014-08-14 22:50:34 +02:00
Andreas Dangel 643f85a5a2 #1235 scope dependencies in POM file 2014-08-14 21:58:31 +02:00
Andreas Dangel 9e3a672636 Verified #1156 False failure with "Avoid unused private methods" 2014-08-14 21:43:01 +02:00
Andreas Dangel c310c93c02 #1187 double variable with AvoidDecimalLiteralsInBigDecimalConstructor 2014-08-14 20:24:07 +02:00
Andreas Dangel 6c0eed7109 Fix NPE in ConstructorCallsOverridable and XPath error in AvoidLiteralsInIfCondition 2014-08-13 21:31:09 +02:00
Andreas Dangel 1025c09bf5 #1231 No Error Message on Missing Rule 2014-08-13 20:01:37 +02:00
marob 635fc40e6f Add NoUnsanitizedJSPExpression rule 2014-08-13 10:50:12 +02:00
Andreas Dangel 8a34f2c8d1 #1231 No Error Message on Missing Rule - add error message if excluded rule cannot be found 2014-08-12 20:02:34 +02:00
Andreas Dangel f6415ccc80 #1232 Make ShortClassName configurable 2014-08-11 20:04:01 +02:00
Andreas Dangel f5783eec6d #1234 Unused private methods still giving false positives in 5.1.3 snapshot 2014-08-10 18:59:46 +02:00
Andreas Dangel 9b73613ff4 Verify #1199 PMD CheckResultSet gives false positive in a do/while loop 2014-08-09 20:10:01 +02:00
Andreas Dangel c1f141f694 Upgrade maven plugins 2014-08-09 19:52:46 +02:00
Andreas Dangel d6b6e6a4a0 #1230 UseCollectionIsEmpty gets false positives 2014-08-09 18:05:40 +02:00
Andreas Dangel cb76795cb9 Improve test framework:
* PMDTestRunner reports all tests, that have been executed. This will
  explode the reported number of tests that are run
* It allows to selectively run single test cases (e.g. via eclipse)
* Used for now in DesignRulesTest
* Updated junit to 4.11
2014-08-09 16:04:03 +02:00
Andreas Dangel 9e35243b16 #1228 actually use the class loader for the symbol facade
and fix type resolution in the current package
2014-08-08 22:08:24 +02:00
Andreas Dangel 7a7ba2b23e #1228 UnusedPrivateMethod returns false positives - more cases 2014-08-08 21:13:02 +02:00
Andreas Dangel 1540440632 #1228 UnusedPrivateMethod returns false positives (7) - support allocation expressions 2014-08-08 19:37:23 +02:00
Andreas Dangel 6ee75a9e6d #1228 UnusedPrivateMethod returns false positives (6)
With auto-boxing for primitive types
2014-08-07 21:21:05 +02:00
Andreas Dangel 5428885ae4 #1233 UnusedPrivateMethod: False positive : method called on returned object. 2014-08-05 19:47:58 +02:00
Andreas Dangel 47a24d5625 Update maven-pmd-plugin 2014-08-03 17:36:36 +02:00
Andreas Dangel e28c7de3e5 #1228 UnusedPrivateMethod returns false positives (5a+b)
This adds the auxiliar classpath to the TypeSet type resolver that
is used by the symbol facade.
2014-08-01 19:35:30 +02:00
Andreas Dangel e6ce96cc10 #1228 UnusedPrivateMethod returns false positives (4) 2014-07-31 21:19:55 +02:00
Andreas Dangel 4cef35c7f6 #1228 UnusedPrivateMethod returns false positives 2014-07-28 19:53:59 +02:00
Andreas Dangel c730c15d13 Verify #1228 UnusedPrivateMethod returns false positives 2014-07-26 10:34:47 +02:00
Andreas Dangel 6d7d0bffd3 Checkstyle, Javadoc, Whitespace 2014-07-26 10:33:48 +02:00
Andreas Dangel ce1dca1c2c Update pmd plugin version to 3.1 2014-07-25 18:50:41 +02:00
Andreas Dangel a7f8c102ba Checkstyle, Javadoc, Whitespace 2014-07-25 18:41:23 +02:00
Andreas Dangel d5eafec027 Checkstyle, Javadoc, whitespace 2014-07-24 17:52:43 +02:00
Andreas Dangel fe325afb7b Update changelog 2014-07-20 12:24:43 +02:00
Andreas Dangel 805d4d0f92 [maven-release-plugin] prepare for next development iteration 2014-07-20 10:41:26 +02:00
Andreas Dangel cfc3617a4f [maven-release-plugin] prepare release pmd_releases/5.1.2 2014-07-20 10:41:25 +02:00
Andreas Dangel f6534c20ad pmd: Prepare pmd release 5.1.2 2014-07-20 10:11:40 +02:00
Andreas Dangel de1a8049ff Update release process documentation 2014-07-20 10:08:47 +02:00
Andreas Dangel 0e7ed771a6 Fix documentation about "Violation Suppress XPath"
Thanks to Scott Santucci.
2014-07-20 09:56:15 +02:00
Andreas Dangel da9c987ccd Verify #1225 UselessParentheses rule executed on empty ruleset 2014-07-20 09:40:20 +02:00
Andreas Dangel a0f3cb1027 #1226 False Positive: UnusedPrivateMethod overloading with varargs 2014-07-20 09:21:22 +02:00
Andreas Dangel 52ed5e3b8d #1198 ConfusingTernary does not ignore else if blocks even when property is set 2014-07-19 18:41:38 +02:00
Andreas Dangel 30dc6dfc6b #1200 setRuleSets method javadoc mistype commands instead commas 2014-07-19 18:04:03 +02:00
Andreas Dangel af0cbddc39 #1201 Error "Can't find resource null" when ruleset contains spaces after comma 2014-07-19 17:59:48 +02:00
Andreas Dangel ef236facb8 #1202 StackOverflowError in RuleSetReferenceId 2014-07-19 17:38:18 +02:00
Andreas Dangel 383a08847b #1227 GuardLogStatementJavaUtil doesn't catch log(Level.FINE, "msg" + " msg") calls 2014-07-18 20:29:48 +02:00
Andreas Dangel be46a71078 #1203 Make GuardLogStatementJavaUtil configurable 2014-07-18 19:57:12 +02:00
Andreas Dangel b476588f08 #1205 More parse errors with lambda expressions 2014-07-18 18:57:25 +02:00
Andreas Dangel ec088bdc9b #1205 Parse error on lambda with if 2014-07-17 20:53:31 +02:00
Andreas Dangel f4d767d844 #1208 yahtml's outputDir property does not work 2014-07-16 20:24:22 +02:00
Andreas Dangel 63851dfe55 #1209 XPath 2.0 following-sibling incorrectly includes context node 2014-07-15 20:54:20 +02:00
Andreas Dangel 783175eb01 #1224 GuardDebugLogging broken in 5.1.1 - missing additive statement check in log statement 2014-07-15 19:40:36 +02:00
Andreas Dangel ee2645f6fc #1213 AvoidLiteralsInIfCondition -- switch for integer comparison with 0 2014-07-14 22:15:27 +02:00
Andreas Dangel 629eb02970 #1211 PMD is failing with NPE for rule UseIndexOfChar while analyzing Jdk 8 Lambda expression
Actually fixed with 8f89d5a05f
2014-07-13 22:45:05 +02:00
Andreas Dangel b9dc8557aa Merge branch 'AlanHohn-master' 2014-07-12 19:23:52 +02:00
Andreas Dangel 6cf811b3b5 Make CyclomaticComplexityRule a subclass of StdCyclomaticComplexityRule
to remove the now duplicated code.
2014-07-12 19:18:46 +02:00
Andreas Dangel 029359607a Remove manual isSuppressed implementation 2014-07-12 19:07:06 +02:00
Andreas Dangel 6cfdeefdf4 Update changelog 2014-07-12 18:28:35 +02:00
Andreas Dangel d2d8a80958 Merge branch 'master' of https://github.com/AlanHohn/pmd into AlanHohn-master 2014-07-12 18:09:28 +02:00
Andreas Dangel 325b0cf06d #1214 UseCollectionIsEmpty misses some usage 2014-07-12 17:53:15 +02:00
Andreas Dangel ccd77a9e78 #1215 AvoidInstantiatingObjectsInLoops matches the right side of a list iteration loop 2014-07-12 14:53:59 +02:00
Andreas Dangel 38575faffa #1216 AtLeastOneConstructor ignores classes with *any* methods 2014-07-12 11:57:27 +02:00
Andreas Dangel b2f3b6cd53 Update changelog 2014-07-12 10:28:46 +02:00
Andreas Dangel 2f1c7a36de #1217 SystemPrintln always says "System.out.print is used"
Improved test framework to be able to assert the messages
produced by a rule.
2014-07-12 10:28:35 +02:00
Andreas Dangel 4b94dff6cf whitespace 2014-07-12 09:51:31 +02:00
Andreas Dangel 60ac836e21 #1218 TooFewBranchesForASwitchStatement misprioritized 2014-07-12 09:51:22 +02:00
Andreas Dangel dd63fdbfbd #1219 PrimarySuffix/@Image does not work in some cases in xpath 2.0 2014-07-11 23:17:08 +02:00
Andreas Dangel 33cd507fad Fix #1221 OneDeclarationPerLine really checks for one declaration each statement 2014-07-10 20:55:05 +02:00
Andreas Dangel 8f89d5a05f UseIndexOfChar: fix null pointer with lambda expressions 2014-07-09 21:16:25 +02:00
Andreas Dangel e08d585db0 Fix #1223 UnusedPrivateMethod: Java 8 method reference causing false positives 2014-07-09 20:40:01 +02:00
Andreas Dangel 671ba3367a #1206 Update Changelog 2014-07-08 21:00:58 +02:00
Andreas Dangel 6cad92ba4a #1206 Add test 2014-07-08 21:00:44 +02:00
Scott Santucci e20ab1629f #1206 Make SummaryHTMLRenderer respect show suppressions settings 2014-07-08 21:00:25 +02:00
Alan Hohn 7c0ff5f873 Standard and modified cyclomatic complexity 2014-06-18 21:42:46 -05:00
Andreas Dangel 8c042e394d Add tests for slf4j logger in MoreThanOneLogger.
This adds slf4j-api as a test dependency.
2014-06-14 10:00:31 -04:00
Mark Adamcin a0f04106fe Add SLF4j Logger type to MoreThanOneLogger rule 2014-06-12 15:34:06 -07:00
Andreas Dangel 40802ef517 Update changelog 2014-05-02 10:28:40 +02:00
muminc ba69f8bc82 update to use asm 5.0.2 2014-05-02 01:45:14 +01:00
Andreas Dangel 60bb47df8b Fix #1181 unused import false positive if used as parameter in javadoc only. 2014-04-30 09:41:39 +02:00
Andreas Dangel 62a8070657 Fix #1192 Ecmascript fails to parse this operator " ^= " 2014-04-29 09:14:04 +02:00
Andreas Dangel 057f996e6f Prepare changelog for next version 2014-04-27 11:45:57 +02:00
Andreas Dangel f9063393d3 [maven-release-plugin] prepare for next development iteration 2014-04-27 08:23:21 +02:00
Andreas Dangel 242ea1065b [maven-release-plugin] prepare release pmd_releases/5.1.1 2014-04-27 08:23:21 +02:00
Andreas Dangel 9273d334ac Prepare pmd release 5.1.1 2014-04-27 08:01:36 +02:00
Andreas Dangel d52db39846 Merge branch 'pmd/5.1.x' 2014-04-27 07:45:13 +02:00
Andreas Dangel 6f61b41e20 Fix #1191 Ecmascript fails to parse "void(0)" 2014-04-26 19:13:15 +02:00
Andreas Dangel d03f5a339c Adding TodoComment checkstyle rule. 2014-04-26 18:11:51 +02:00
Andreas Dangel 3b47b5d408 Checkstyle fixes. 2014-04-26 18:07:43 +02:00
Andreas Dangel 324f5707d2 Fix changelog layout 2014-04-26 17:53:13 +02:00
Andreas Dangel b2b02a69a4 Checkstyle fixes 2014-04-26 17:46:49 +02:00
Andreas Dangel dcb7668c57 Update changelog 2014-04-26 11:51:20 +02:00
Andreas Dangel 22647630b7 Merge branch 'commentrequired-enums' of https://github.com/igniti-gmbh/pmd into igniti-gmbh-master 2014-04-26 11:48:36 +02:00
Andreas Dangel 85d8660c6d Merge branch 'master' of https://github.com/igniti-gmbh/pmd into igniti-gmbh-master 2014-04-26 11:47:16 +02:00
Andreas Dangel f0346a9aee Verify #1189 GuardLogStatementRule and GuardDebugLoggingRule broken for log4j2 2014-04-23 16:54:39 +02:00
Andreas Dangel 0796dad74e Fix #1188 False positive in UnusedPrivateField 2014-04-23 16:29:57 +02:00
Alexander Stillich 785f01b0fa Added support for enums in CommentRequiredRule and extended corresponsing test 2014-04-16 14:33:11 +02:00
Alexander Stillich dbddeb01f1 Fixed NPE in ConsecutiveAppendsShouldReuseRule.getVariableAppended() which was triggered with the dogfood ruleset 2014-04-16 13:29:32 +02:00
Andreas Dangel 8694a26caf Fix #1167 Error while processing PLSQL file with BOM 2014-04-13 10:48:20 -04:00
Andreas Dangel 6eb8f84769 Fix #1165 SimplifyConditional false positive 2014-04-13 09:44:17 -04:00
Andreas Dangel 4bcef67b42 Fix #1185 UnusedModifier throws NPE when parsing enum with a nested static interface 2014-04-13 09:43:58 -04:00
Andreas Dangel 0f72ff41d9 Deleted all the folders that have been moved out into own repositories.
pmd-eclipse-plugin -> https://github.com/pmd/pmd-eclipse-plugin
pmd-jdeveloper* -> https://github.com/pmd/pmd-jdeveloper
website -> https://github.com/pmd/pmd.sourceforge.net
pmd-emacs -> https://github.com/pmd/pmd-emacs
everything else -> https://github.com/pmd/pmd-misc
2014-04-12 19:50:56 -04:00
Andreas Dangel 24c9bb9de9 Add test for AbstractCommentRule 2014-04-12 10:00:18 -04:00
Andreas Dangel 1fcc5ceeae Merge branch 'comment-fixes' of https://github.com/igniti-gmbh/pmd into igniti-gmbh-comment-fixes 2014-04-12 09:40:12 -04:00
Stuart Turton db000f3ad0 DBURI - add more feedback for problems returning DataSources from DBURIs 2014-04-11 20:37:12 -04:00
Stuart Turton 5ad79006ab PLSQL - Add InlinePragma class to support PRAGMA INLINE( method , ('YESY'|'NO') ) statement 2014-04-11 20:37:05 -04:00
Stuart Turton a12bc08c3b PLSQL - remove commented out Java Rule for PLSQ code size.xml Rules file 2014-04-11 20:36:57 -04:00
Andreas Dangel 423ac78d91 Enable PLSQL XPath Rule TooManyMethods 2014-04-11 20:34:42 -04:00
Stuart Turton 9a61116259 Incorporate PLDoc changes:-
Adding [EDITIONABLE|NONEDITIONABLE] keyword broke LOOKAHEAD Increase
QuickFix for Inline PRAGMA compiler instruction (support clause without adding new AST Type)
2014-04-11 20:24:11 -04:00
Andreas Dangel 2b11c5e1f2 Fix #1166 PLSQL XPath Rules Fail for XPath 1.0 2014-04-11 20:19:56 -04:00
Stuart Turton 06057f17ee PLSQL- Add minimal XPathHandler to PLSQLHandler in order to avoid NPE in XPath rules for XPath 1.0. 2014-04-11 20:06:49 -04:00
Andreas Dangel 1e3dbdb357 Add unit test for bug #1166 PLSQL XPath Rules Fail for XPath 1.0 2014-04-11 20:06:14 -04:00
Alexander Stillich e42bc43287 Fix comments between other comments being wrongly assigned:
/** Comment 1 */
	public void method1() {}

	/** Comment 2 */

	/** Comment 3 */
	public void method2() {}

Would assign Comment 2 to method2, should assign Comment 3.

Also added support for enums in AbstractCommentRule.orderedCommentsAndDeclarations().
2014-04-10 15:54:37 +02:00
Andreas Dangel 1aa11e5ee7 Fix unit test DesignerTest so that it runs in headless mode, too. 2014-04-07 21:02:11 -04:00
Andreas Dangel e8e7420027 Document that PMD requires java 1.6 2014-04-07 20:05:01 -04:00
Andreas Dangel 4dd18721c1 pmd: fix #1168 Designer errors when trying to copy xml to clipboard 2014-04-04 18:32:09 -04:00
Andreas Dangel 552acfd0c1 pmd: fix #1180 False Positive for ConsecutiveAppendsShouldReuse on different variable names 2014-04-03 20:20:28 -04:00
Andreas Dangel bc4f7cc1c2 pmd: fix #1177 Incorrect StringBuffer warning when that class is not used 2014-04-03 19:33:01 -04:00
Andreas Dangel 36fc87c3c8 pmd/cpd: add skipLexicalErrors and skipDuplicateFiles to CPD's ant task 2014-04-02 21:29:57 -04:00
Andreas Dangel 12adae6034 pmd: fix #1178 LexicalError while parsing Java code aborts CPD run 2014-04-02 20:22:34 -04:00
Andreas Dangel 88ee9c47d8 pmd: fix #1176 ShortVariable false positive with for-each loops 2014-03-30 16:58:26 -04:00
Andreas Dangel e54b6dd22f pmd: fix #1173 Java 8 support: method references 2014-03-30 09:32:10 -04:00
Andreas Dangel e0ece8f82a pmd: fix #1170 false positive with switch in loop 2014-03-29 19:49:38 -04:00
Andreas Dangel 7a806df932 pmd: verify #1173 Java 8 support: method references 2014-03-29 19:34:15 -04:00
Andreas Dangel 87989b524a pmd: fix #1175 false positive for StringBuilder.append called 2 consecutive times 2014-03-29 19:18:46 -04:00
Andreas Dangel 6e1927ee2a pmd: fix #1171 Specifying minimum priority from command line gives NPE 2014-03-29 16:51:21 -04:00
Andreas Dangel f0049c5946 pmd: format source, no changes 2014-03-29 16:44:57 -04:00
Andreas Dangel 21750b9bc4 pmd: update release process documentation
pmd.website.baseurl is set correctly if the profile "pmd-release" is used
  during releasing
2014-02-12 20:46:58 +01:00
Andreas Dangel 4aee867fc2 [maven-release-plugin] prepare for next development iteration 2014-02-11 21:32:12 +01:00
Andreas Dangel 79a9af14f2 [maven-release-plugin] prepare release pmd_releases/5.1.0 2014-02-11 21:30:13 +01:00
Andreas Dangel c7bba5bf26 pmd: Update changelog for next development version 2014-02-11 20:26:15 +01:00
Andreas Dangel b970324b97 pmd: Prepare pmd release 5.1.0 2014-02-11 20:26:15 +01:00
Andreas Dangel d36190ea7c pmd: Prepare next development version 5.2.0-SNAPSHOT 2014-02-11 20:26:15 +01:00
Andreas Dangel 83552fb843 pmd: Fix rulesets not meeting pmd conventions 2014-02-11 20:26:08 +01:00
Andreas Dangel f4343f6b19 pmd: update documentation about new supported languages. 2014-02-09 09:37:19 +01:00
Andreas Dangel c011fc6dd1 pmd: fix #1054 XML Rules ever report a line -1 and not the line/column where the error occurs 2014-02-08 22:46:55 +01:00
Andreas Dangel 93a46d17e7 pmd: fix #1045 //NOPMD not working (or not implemented) with ECMAscript 2014-02-02 22:37:15 +01:00
Andreas Dangel ec0471cebe pmd: fix #1164 Violations are not suppressed with @java.lang.SuppressWarnings("all") 2014-02-02 13:21:30 +01:00
Andreas Dangel 8aa83291c0 pmd: update changelog 2014-02-02 12:12:10 +01:00
Andreas Dangel 08041af650 pmd: fix #1124 PMD.run() multithreading issue 2014-02-02 12:09:55 +01:00
Andreas Dangel 8482948518 pmd: fix #1120 equalsnull false positive 2014-02-02 11:51:59 +01:00
Andreas Dangel a0a7f58dec pmd: verify #1122 parse error at class.super 2014-02-02 11:18:42 +01:00
Andreas Dangel 29a139797c pmd: verify #1143 ShortClassName fires with a 5-letter class name 2014-02-02 11:14:31 +01:00
Andreas Dangel 8607d02120 pmd: fix #1146 UseArrayListInsteadOfVector false positive when using own Vector class 2014-02-02 11:11:07 +01:00
Andreas Dangel 8e8cec667e pmd: fix #1125 Missing Static Method In Non Instantiatable Class 2014-02-02 10:54:03 +01:00
Andreas Dangel 5b52ba642c pmd: fix #1126 False positive with FieldDeclarationsShouldBeAtStartOfClass for static enums 2014-02-02 10:33:31 +01:00
Andreas Dangel bbb36686b9 pmd: fix #1147 EmptyMethodInAbstractClassShouldBeAbstract false positives 2014-02-01 19:47:43 +01:00
Andreas Dangel c0efb45c10 pmd: verify #1149 getBeginLine and getEndLine not working (ECMAScript) 2014-02-01 19:31:27 +01:00
Andreas Dangel ab158fe19f pmd: fix #1150 "EmptyExpression" for valid statements! 2014-02-01 19:15:06 +01:00
Andreas Dangel 86d9c1060c pmd: fix #1154 Call super onPause when there is no super 2014-02-01 18:56:30 +01:00
Andreas Dangel cc27363c97 pmd: verify #1156 False failure with "Avoid unused private methods" 2014-02-01 18:42:22 +01:00
Andreas Dangel aad969665f pmd: fix #1159 false positive UnusedFormalParameter readObject(ObjectInputStream) if not used 2014-02-01 18:36:07 +01:00
Andreas Dangel dff3d181f9 pmd-eclipse: update release notes 2014-02-01 13:02:04 +01:00
Andreas Dangel 8cac431226 Merge branch 'project-ruleset-workspace-path' of github.com:robinst/pmd 2014-02-01 12:53:38 +01:00
Andreas Dangel 4e30abe315 Merge branch 'preference-keyword' of github.com:robinst/pmd 2014-02-01 12:52:32 +01:00
Andreas Dangel 964f6933e1 pmd: update changelog 2014-02-01 12:50:03 +01:00
Andreas Dangel d9064e6956 Merge branch 'cpd_concurrency' of github.com:golpira/pmd into golpira-cpd_concurrency 2014-02-01 12:46:47 +01:00
Andreas Dangel 1a48102d9a pmd: register plsql dates ruleset 2014-02-01 12:44:16 +01:00
Andreas Dangel dc945f78b2 Merge branch 'master' of github.com:sturton/pmd into sturton-master 2014-02-01 11:37:45 +01:00
Andreas Dangel 570d6cedc6 pmd: enable some ignored tests and remove System.out in tests... 2014-02-01 11:34:12 +01:00
Andreas Dangel 2624b6b3ea pmd: add test code that cannot be parsed, but is valid java 8 code. 2014-02-01 10:09:01 +01:00
Andreas Dangel ee708b42ea pmd: add intersectionTypes flag to ASTCastExpression 2014-01-31 22:33:04 +01:00
Andreas Dangel 6355c1f6f4 pmd: adjust variable declarator id for missing type node in case
of lambda expressions.
2014-01-31 19:38:05 +01:00
Andreas Dangel 6dc3701cc8 pmd: add java 8 syntax for type annotations 2014-01-30 23:13:12 +01:00
Andreas Dangel 9fbaf13bd9 pmd: fix unit tests after changing default java version to 1.8. 2014-01-30 20:44:41 +01:00
Andreas Dangel 64ab7b78e7 pmd: Improve java 8 parser 2014-01-30 20:36:40 +01:00
Robin Stocker 4de96d5dd2 pmd-eclipse: Support workspace-relative path in ruleSetFile property
When using multiple projects that want to share the rule set definitions
in a single file, it's currently only possible to reference the shared
file using an absolute path. The downside of the absolute path is that
it is different for each developer, so the resulting .pmd file can not
be committed in the repository.

To fix this, this change also tries to resolve the path against the
workspace root, so e.g. "/foo/.ruleset" can be used to refer to the
.ruleset file in the foo project.

Such a path can be ambiguous to an absolute file system path, but in
practice it should not be a problem. An alternative solution would be to
support variables (as known from Eclipse run configurations) such as
"${project_loc:foo}" in the path.
2014-01-29 13:35:47 +01:00
Robin Stocker 5f9598815f pmd-eclipse: Add "PMD" keyword to all preference pages
Otherwise the subpages are not shown when searching for "PMD" in the
preferences.
2014-01-29 12:31:29 +01:00
Andreas Dangel bef23a8d2d pmd: use java 8 as default version of java. 2014-01-28 22:28:00 +01:00
Andreas Dangel bfa925a44f pmd: feature #1161 Confusing Ternary should skip else if statements (or have a property to do so) 2014-01-27 20:35:46 +01:00
Andreas Dangel b3af64fa52 pmd: update changelog for java 1.8 support. 2014-01-26 20:17:23 +01:00
Andreas Dangel 65864b6189 pmd: fix java 8 grammar with LambdaExpression to not be confused with Expression 2014-01-26 20:10:16 +01:00
Andreas Dangel 350d0c3cfc pmd: improve java parse exceptions - tell, where the parse exception occurred. 2014-01-26 19:47:17 +01:00
Andreas Dangel 9ba87965ca pmd: Integrate LambdaExpressions in java symboltable.
Lambda parameters are not added to the local scope's symbol table.
2014-01-26 12:29:05 +01:00
Andreas Dangel e57eb66c55 pmd: add Java language version 1.8 and enable checks in grammar/parser. 2014-01-26 12:00:12 +01:00
Andreas Dangel a49391f3f5 pmd: Adjust grammar to not break other parsing corner cases with java 8 enhancements. 2014-01-26 11:52:15 +01:00
Andreas Dangel 88d766ee8b pmd: Extend java grammar to support Java 8 language features. 2014-01-25 19:47:49 +01:00
Andreas Dangel 9b91690f21 pmd: make pmd jdk8 ready
* Upgrade asm so that it understands jdk8 class files
2014-01-23 22:46:02 +01:00
David Golpira 8c0a4f6e4f Changed TokenEntry to use ThreadLocal.
Two static fields are now stored in ThreadLocal.  This allows
multiple instances of CPD to run concurrently without stepping
on each other (eg: multi-module Maven projects.)
2014-01-23 01:08:24 -05:00
Stuart Turton 5f02803d78 CPD: add getter for all identified or added Sources 2014-01-10 22:05:12 +00:00
Stuart Turton f7b61616ea CPD: Rename List<String> getSources() to getSourcePaths() 2014-01-10 21:58:14 +00:00
Stuart Turton 28449e7f71 XPATH - make DocumentNavigator more robust 2014-01-09 00:03:33 +00:00
Stuart Turton 61c25b793e CPD- add getter for list of Source paths 2014-01-08 23:59:31 +00:00
Stuart Turton faa035b1c1 PMD-PLSQL - derive different faux-filename suffices for package/type specifications and bodies
-  Add rules for date
2014-01-08 23:47:05 +00:00
Andreas Dangel 4d9b7b0f8b pmd: checkstyle fixes 2014-01-05 15:17:20 +01:00
Andreas Dangel 36224a5ef7 pmd: checkstyle fixes 2014-01-05 14:48:16 +01:00
Andreas Dangel bc47a7109e pmd: checkstyle fixes 2014-01-03 14:51:51 +01:00
Andreas Dangel 9bf3895a48 pmd: update changelog and integrate it into the site
* The changelog uses now markdown for formatting
2014-01-03 11:55:46 +01:00
Andreas Dangel 7ec06b3adb pmd: review Velocity pull request
* Introduced AbstractVmNode (formerly SimpleNode)
* Added VmNode interface
* Added PMD's license header to the rule implementations, etc.
* Added rulesets.properties file for velocity rules
* Added externalInfoUrl to the rules
* Added Apache License info
2014-01-02 18:46:39 +01:00
Andreas Dangel 4fe4b40279 Merge branch 'master' of github.com:andrey81inmd/pmd into velocity
Conflicts:
	pmd/src/main/ant/alljavacc.xml
	pmd/src/main/java/net/sourceforge/pmd/lang/LanguageVersion.java
2014-01-02 10:10:17 +01:00
Andreas Dangel cce09d0f64 Merge branch 'm2e-error' of github.com:robinst/pmd 2014-01-02 10:06:36 +01:00
Andreas Dangel 388b1f5e65 pmd: code cleanups - no functional change
* checkstyle and pmd dogfood
2014-01-01 11:12:32 +01:00
Andreas Dangel 687eadbb10 pmd: update maven-pmd-plugin to 3.0.1 2013-12-31 16:06:07 +01:00
Andreas Dangel 75addab584 pmd: add howto about adding new languages to PMD. Thanks to Andrey Utis. 2013-12-31 16:06:07 +01:00
Andreas Dangel 0dd9ffb390 pmd: add markdown as additional documentation language 2013-12-31 16:05:12 +01:00
Andreas Dangel 6fd188a2ab pmd: Reviewed plsql pull request
* reworked symboltable implementation of plsql to use the refactored
general interfaces
2013-12-31 16:01:58 +01:00
Andreas Dangel d8ec3bfd39 Merge branch 'master' into plsql 2013-12-31 15:58:08 +01:00
Andreas Dangel 6a09146169 Merge branch 'symboltable' 2013-12-31 15:50:32 +01:00
Andreas Dangel 7d455c0064 pmd: update changelog with symboltable API changes 2013-12-25 10:20:31 +01:00
Andreas Dangel 5ed9bd8a0a pmd: move ScopedNode into the symboltable package 2013-12-25 10:19:50 +01:00
Andreas Dangel 93a5d77184 pmd: update changelog and add test for bug #1155 2013-12-23 13:17:34 +01:00
Henning Schmiedehausen c1cb3bfb5e Fix NPE with empty rulesets.
This is the fix for bug #1155 (https://sourceforge.net/p/pmd/bugs/1155/)

The whole code is in dire need of revisiting its behaviour when a
value is null or empty. Same goes for e.g. createRules whether it
should return null values (then the caller will have to deal with it)
or empty Rulesets.

Catching and discarding the rule not found exception looks pretty
suspicious.
2013-12-23 13:10:48 +01:00
Andreas Dangel e2b5b3753e pmd: add changelog and test for #1144 2013-12-23 13:09:33 +01:00
Andreas Dangel d4719914fa pmd: Refactor designer to not be Java specific anymore 2013-12-22 18:44:33 +01:00
Andreas Dangel 036cd3c143 pmd: Refactor rule implementation to use new generic symboltable 2013-12-22 18:44:33 +01:00
Andreas Dangel eee76b0248 pmd: Refactor java's symboltable implementation to use the new generic base classes 2013-12-22 18:44:32 +01:00
Andreas Dangel 1354f6f1fa pmd: Add basic/abstract implementations for Scope and NameDeclaration 2013-12-22 18:44:32 +01:00
Andreas Dangel a10c7dc78e pmd: Introduce generic Scope, NameDeclaration and NameOccurrence 2013-12-22 18:44:32 +01:00
Andreas Dangel 7f3a949935 pmd: Correct usage of generic ParseException 2013-12-22 18:44:32 +01:00
Andreas Dangel dee9df77c6 pmd: Refactor DFA and Designer, so that DFA is not Java specific 2013-12-22 18:44:32 +01:00
Robin Stocker 8412e5eb62 pmd-eclipse: Relax versionRange in pluginExecutionFilter for m2e 2013-11-30 15:17:07 +01:00
Pelisse Romain aea2504b2b Merge pull request #29 from hgschmie/master
Bring back the old CPDConfiguration constructor
2013-11-26 14:21:05 -08:00
Henning Schmiedehausen 8ad4a6a375 Bring back the old CPDConfiguration constructor; removing it will break
at least the maven pmd plugin which uses it.
2013-11-26 10:19:22 -08:00
Robin Stocker eb31689e26 pmd-eclipse: Fix "maven-dependency-plugin ... is not supported by m2e"
After importing the projects into Eclipse, m2e had the following error:

maven-dependency-plugin (goals "copy-dependencies", "unpack") is not
supported by m2e.

The error can be suppressed by adding a pluginExecutionFilter for m2e.
This does not affect the command-line build.
2013-11-18 17:00:13 +01:00
Andreas Dangel 9c9ab97523 pmd: improve doc example "how to write a rule" 2013-11-11 20:41:19 +01:00
Andreas Dangel 5c461b738d pmd: Verify UncommentedEmptyConstructor and move the tests to use the common test infrastructure. 2013-11-11 20:08:48 +01:00
Andreas Dangel 54f77b9ad4 pmd-eclipse: update release procedure 2013-10-31 12:47:01 +01:00
Andreas Dangel d6b6afab23 Prepare next pmd-eclipse-plugin development version 4.0.3-SNAPSHOT 2013-10-31 12:31:52 +01:00
Stuart Turton e9d7dddfbd plsql - make RELEASE an unreserved keywo 2013-10-22 00:15:48 +01:00
Andrey Utis 7ee2493593 Adding noinlinestyles rule 2013-10-17 13:38:00 -04:00
Andrey Utis 3a96e8ada3 Adding NoInlineJavaScript rule 2013-10-17 13:13:07 -04:00
Andrey Utis f5d9785625 Adding UnusedMacroParameterRule 2013-10-16 09:12:45 -04:00
Andrey Utis 3af86ec2aa Added EmptyForeachStmt rule 2013-10-11 16:40:25 -04:00
Andrey Utis f8e02bbd9f Adding EmptyIfStmt rule 2013-10-11 15:38:32 -04:00
Andrey Utis 3df53c4e1b Adding ExcessiveTemplateLengthRule and AvoidReassigningParameters rules 2013-10-09 15:38:08 -04:00
Andrey Utis 8e9bf2f321 Adding CollapsibleIfStatements rule for Velocity 2013-10-08 16:39:12 -04:00
Andrey Utis 2f21e2db42 creating Nested IF statement rule for VM 2013-10-07 21:20:21 -04:00
Andrey Utis b394464dcb Add VM visitor classes 2013-10-04 17:18:43 -04:00
Andrey Utis 916cdca56f fixing a couple more parsing issues 2013-10-01 21:56:49 -04:00
Andrey Utis d2bb244256 more cleanup - making dump work for vm 2013-10-01 21:23:36 -04:00
Andrey Utis 76beb2c48a removing dependency on velocity and cleanup 2013-10-01 20:59:52 -04:00
Andrey Utis d6df33915a fixing #foreach and cleanup 2013-09-30 22:23:59 -04:00
Andrey Utis 24b19cfd55 adding directives 2013-09-28 22:19:31 -04:00
Andrey Utis cbba43c6a3 initial attempt to add velocity language 2013-09-24 22:42:26 -04:00
Stuart Turton be4b6ecc5c Incorporate PLDoc 1.5.6 changes - Make NULLIF and RENAME unreserved keywords 2013-08-29 21:24:16 +01:00
Stuart Turton c8d41ce3b3 PLSQL Correct AccessibleByClause for second and successive accessors 2013-07-22 19:08:17 +01:00
Stuart Turton 67a4ed5b2e Merge branch 'master' of https://github.com/sturton/pmd
Conflicts:
	pmd/src/main/java/net/sourceforge/pmd/cpd/CPDCommandLineInterface.java
2013-07-21 18:05:43 +01:00
Stuart Turton ddacf7ec44 PLSQL- bring parser up to PLDoc 1.5.4 (11g EDITIONABLE/NONEDITIONABLE, 12c ACCESSIBLE BY clause )
Remove unused imports and variables
2013-07-21 00:58:03 +01:00
Stuart Turton a739794218 Merge commit '989672f8fb65b310f815d19667dd2e3dbdc92550'
Conflicts:
	pmd/src/main/java/net/sourceforge/pmd/RuleSet.java
	pmd/src/main/java/net/sourceforge/pmd/cpd/CPDCommandLineInterface.java
	pmd/src/main/java/net/sourceforge/pmd/cpd/CPDConfiguration.java
	pmd/src/test/java/net/sourceforge/pmd/LanguageVersionTest.java
2013-06-24 23:52:32 +01:00
Stuart Turton 3aa04a8860 PLSQL: Allow DEFINE SQL*Plus keyword to be used as a PL/SQL keyword 2013-06-17 19:31:14 +01:00
Stuart Turton 4781cdbcb5 Support ANSI DATE literals (DATE 'YYYY-MM-DD')
Allow TRIGGER REFERENCING clause to have ZERO subclauses.
2013-05-01 22:32:33 +01:00
Stuart Turton 391cf253ed PMD-PLSQL - correct AST for Named Global Block (Block Label(s) were checked for in LOOKAHEAD but not included in subsequent processing) 2013-03-24 21:05:25 +00:00
Stuart Turton 5b3b8df945 PMD-PLSQL - add plsql LanguageVersion tests 2013-03-24 21:03:44 +00:00
Stuart Turton cb5fea59ae Merge branch 'master' of git://github.com/pmd/pmd
Conflicts:
	pmd/src/main/java/net/sourceforge/pmd/cli/PMDParameters.java
2013-03-24 21:02:51 +00:00
Stuart Turton 782135b18a PMD-DB Add support for passing connection parameters via DBURI parameters and DBType properties with this priority (highest to lowest):-
explicit properties or explicit user and password
DBURI parameters
DBType properties

Update comments
2013-03-23 22:35:10 +00:00
Stuart Turton 584743234c PMD- DBURI changes - add getDataSourceName() to avoid calling getNiceFileName(….) with ignored parameters 2013-03-23 00:41:18 +00:00
Stuart Turton 5e1f79148f PMD-PLSQL: map TYPE and PACKAGE DBA_OBJECTS.OBJECT_TYPE values to DBMS_METADATA.GET_DDL TYPE_SPEC and PACKAGE_SPEC parameter values respectively - unchanged these values return both the specification and body objects. 2013-03-23 00:39:06 +00:00
Stuart Turton ace4fa4b46 PMD-PLSQL: comment out TooManyMethods because it throws a NULL pointer exception when used (works in PLSQLDesigner) 2013-03-23 00:35:48 +00:00
Stuart Turton 4034dbbe39 PMD - add helper method getURIDataSources to simplify use of DBURIs from maven-pmd-plugin 2013-03-21 19:45:45 +00:00
Stuart Turton 0d8b89aeeb CPD - refactor to simplify use of DBURIs from maven-pmd-plugin 2013-03-21 19:44:15 +00:00
Stuart Turton c58ad5603c PMD-DB - correct test defaults 2013-03-19 02:01:22 +00:00
Stuart Turton 42193382a1 Add some DBType property files used in tests 2013-03-19 01:25:09 +00:00
Stuart Turton a8cb39b313 Add BSD licensing boilerplate 2013-03-15 22:44:17 +00:00
Stuart Turton dfaca12bd3 PMD- add command line support for (database) URI source code location 2013-03-15 21:49:26 +00:00
Stuart Turton 9d302ed969 Merge branch 'master' of git://github.com/pmd/pmd
Conflicts:
	pmd/src/main/java/net/sourceforge/pmd/cpd/GUI.java
	pmd/src/main/java/net/sourceforge/pmd/cpd/LanguageFactory.java

Also:
Add ability to read source code via JDBC
net/sourceforge/pmd/util/database
CPD has been modified
2013-03-10 21:55:44 +00:00
Stuart Turton da68c9c6d3 Use Apache Commons IOUtils 2013-01-06 19:21:39 +00:00
Stuart Turton 9278e565aa Merge branch 'master' of git://github.com/pmd/pmd
Conflicts:
	pmd/src/test/java/net/sourceforge/pmd/ast/ParserCornersTest.java
2013-01-06 19:19:53 +00:00
Stuart Turton cfd4a980bd Set Image for BooleanLiteral and NullLiteral 2013-01-06 18:19:16 +00:00
Stuart Turton 718e918777 PLSQL: Alter Naming and Scope class changes to reflect adangel's refactoring 2013-01-06 16:18:13 +00:00
Stuart Turton b27d17f064 Support FORCE keyword in CREATE OR REPLACE TYPE (from PLDoc bug-fix) 2013-01-06 16:13:03 +00:00
Stuart Turton 78d5532b6f Merge branch 'master' of https://github.com/sturton/pmd into HEAD
Conflicts:
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/symboltable/NameOccurrence.java
2012-12-29 15:47:31 +00:00
Stuart Turton 509cc2a9ab Pre-Origin Pull commit to store CanonicalImage and dumpNodes changes to remove PLSQL Scope case-sensitivity 2012-12-29 15:43:21 +00:00
Stuart Turton 1c2fbb4c00 Merge branch 'adangel-master'
Conflicts:
	pmd/src/test/java/net/sourceforge/pmd/lang/plsql/dfa/StatementAndBraceFinderTest.java
2012-12-20 01:30:15 +00:00
Stuart Turton ec057aff19 PLSQL: sdd tests for code size rules; correct NcssObjectCountTule to ignore ProgramUnits not at the SchemaLevel 2012-12-20 01:18:59 +00:00
Stuart Turton 78a8735615 PLSQL: add tests for CASE statement 2012-12-16 17:53:39 +00:00
Stuart Turton 72dc749ef4 Ensure that tests can display standard output and error- use latest version of surefire plugin 2012-12-16 17:52:02 +00:00
Andreas Dangel f1ead3be52 pmd: make the java compiler happy by moving the string concatenation into a resource file 2012-12-14 15:40:25 +01:00
Andreas Dangel f88bcf144a pmd: plsql - added unit test for NPathComplexity and a initial PLSQL parser test 2012-12-13 18:22:43 +01:00
Andreas Dangel 2d5e59ba73 pmd: minor cleanups 2012-12-13 17:20:05 +01:00
Andreas Dangel cf1a1a2db9 pmd: adding license header to new files 2012-12-13 15:35:09 +01:00
Andreas Dangel 4fb3a50df2 pmd: refactored PLSQL integration
* Using now javacc during build time to regenerate most of the AST nodes
   and the parser
 * all AST nodes inherit now from the new class AbstractPLSQLNode. This
   class replaces the former SimpleNode. This class implements
   the interface PLSQLNode which inherits from PMD's Node.
 * Deleted all AST nodes that didn't have any modification after
   generating them.
 * PLSQL integration is now more like the Java integration
2012-12-13 15:24:18 +01:00
Andreas Dangel fa45557845 Merge remote-tracking branch 'pmd/master' into plsql 2012-12-12 19:23:37 +01:00
Stuart Turton 7a571b741e Amend StatementAndBraceFinder to add SWITCH_START for Searched CASE statement ; garden commented out code
Add more instrumentation into Linker
2012-12-11 23:39:24 +00:00
Stuart Turton 5d5b9e6a18 Correct control flow stack generation for ELSIF clause 2012-12-09 20:10:41 +00:00
Stuart Turton 873d9f6f83 PLSQL:codesize.xmlConvert Java examples to equivalent PLSQL examples; rewrite TooManyMethods Rule for PLSQL 2012-12-05 00:01:44 +00:00
Stuart Turton 4013461794 Avoid null pointer exception in PLSQLParser.canonicalName() 2012-12-04 23:58:15 +00:00
Stuart Turton 20bd584634 Add generic Oracle Object Length Rule - based on the OracleObject interface
Add PLSQL codesize ruleset file and example PLSQL  XPATH Rule (TomKytesDespair.xml)
2012-12-03 01:05:50 +00:00
Stuart Turton 17c9eadc61 Create OracleObject to flag AST that are (or for functions and procedures may be) schema-level items
Add  more statistical Rules (cribbed from Java Rules)
2012-12-03 00:05:02 +00:00
Stuart Turton 526b5610f0 Add unit tests for PLSQLParser and PLSQLStatementAndBraceFinder 2012-12-02 23:13:44 +00:00
Stuart Turton 374c734a98 Correct PLSQLDataNode to describe TypeMethod as a method
Remove System.err.println() from DFAPLSQLPanel
2012-12-02 21:53:55 +00:00
Stuart Turton d41ade9d10 Expose PLSQLParser.canonicalName() as helper method getCanonicalName() in SimpleNode
Correct logging message for StatementExpression equivalent inStatementAndBraceFinder
Correct off-by-one error when displaying code text )lines is zero-based so that it was displaying the next line- possibly what was intended)
Remove unused import from PLSQLDesigner (Interface ExecutableCode used instead)
2012-12-02 21:44:07 +00:00
Stuart Turton f5f4660b0a null pointer in Skip2NextTokenOccurrence 2012-11-30 19:14:14 +00:00
Stuart Turton 47ad0bbd7c PLSQL AST - Change StringBuffers to StringBuilders, parse Synonyms, Directories, Database Links, and the USING and RETURNING INTO clauses of embedded SQL.
Add a DDLCommand production, and add LOOKAHEAD to cope with otherwise unparsed  CREATE[ OR REPLACE] and  ALTER  statements.
2012-11-30 00:00:06 +00:00
Stuart Turton ef23c93398 Minor refactoring of NodeType and class which reference it StackObject, SequenceChecker, Linker etc.
The aspiration in  NodeType was to convert it to an enumeration: this refactoring moves AbstractDataFlowNode.stringFromType to make the class a bit more enum like and to make it publicly available for use in debugging other languages.
2012-11-29 23:47:10 +00:00
Stuart Turton 4a49e67caa Remove unused fields from TooManyFieldsRule 2012-11-29 23:05:51 +00:00
Stuart Turton 4f50ec7bc7 PLSQL - Correct DataFlow Stack generation for ELSIF clause 2012-11-29 23:01:51 +00:00
Stuart Turton 21a1afb2df Use StringBuilder instead of StringBuffer; add LOOKAHEAD for all input; parse and ignore DDL commands/system changes not already parsed; add static parser method to return a canonical Oracle name from arbitrary input 2012-11-28 00:26:46 +00:00
Stuart Turton 28f5d5d1ed Overwrite PLSQLParser and TokenManager after incorrect merge/rebase 2012-11-24 23:02:07 +00:00
Stuart Turton aab003ea51 Add support for SYNONYM, DIRECTORY and DATABASE LINK 2012-11-24 22:41:09 +00:00
Stuart Turton 969b29c1c8 Correct comment 2012-11-24 20:18:04 +00:00
Stuart Turton d21fdaf31d Remove end of line characters from Special Token SINGLE_LINE_TOKEN in order to allow the Skip* productions to search for the EOL Special Token without missing. 2012-11-24 20:13:40 +00:00
Stuart Turton 86f37b529c PLSQL: Attempt to set Class equivalent (Oracle Object level) for AbstractPLSQLRule; override getViolationParameters to return actual calculated measure for ExcessiveLength and AbstractNcssCountRule PLSQL Rules. 2012-11-21 00:11:07 +00:00
Stuart Turton 0f6ace560b PLSQL: Non-commented Source Statement and Too Many Methods (Package Specification and Object Type Specification 2012-11-20 22:47:20 +00:00
Stuart Turton 2ab85d1c35 Merge commit 'b0c2721c22dd03fd4c4fb1579b75f3005afd229b' 2012-11-20 19:43:06 +00:00
Stuart Turton ab0c209e53 Make Cyclomatic Complexity and NPath Complexity function with schema-level functions and procedures, object type bodies and triggers 2012-11-20 19:41:13 +00:00
Stuart Turton bfe1932037 PLSQL AST grammar with draft BSD lichence 2012-11-20 19:38:21 +00:00
Stuart Turton 93f5e8b2b4 Add more logging to PLSQL rules; Add visit() method for ExecutableCode interface 2012-11-16 20:56:22 +00:00
Stuart Turton 77fa5b6d1d Merge commit '3545b58820289b9dff7d404fb24f400323dd8f1f' 2012-11-16 20:51:31 +00:00
Stuart Turton 85f865e5e7 Add some code size rules (taken directly) from the Java rules: object length, Cyclomatic Complexity and NPath Complexity 2012-11-16 20:50:27 +00:00
Stuart Turton d157f8f869 The generated PLSQLParser code sets the last token _AFTER_ closing the scope, so getLastToken
cannot be used to identify the last Token: use getToken(0) instead.
         <code>
	      jjtreeCloseNodeScope(jjtn000);
	      jjtn000.jjtSetLastToken(getToken(0));
         </code>
2012-11-16 20:37:30 +00:00
Stuart Turton 3fb8fc1642 MethodDeclaration - ensure that TypeMethod is processed when building Dataflows.
MethodDeclaration covers both ProgramUnit and TypeMethod - previous  processing seemed to ignore TypeMethod when building data flows in Type Bodies.
2012-11-12 00:32:47 +00:00
Stuart Turton 878596e15f Support DFA analysis of simple and compound PL/SQL Triggers 2012-11-11 23:08:52 +00:00
Stuart Turton 03af9d4760 Correct comment spelling 2012-11-11 23:07:12 +00:00
Stuart Turton 1491532ea2 Allow PLSQLDesigner to process multiple types - create minimal interface ExecutableCode and refactor the relevant AST classes, graph rule, panel and PLSQDesigner to manipulate ExecutableCode objects. 2012-11-11 23:06:00 +00:00
Stuart Turton 66deb16cb1 Correct treatment of Labelled Statements 2012-11-07 00:02:44 +00:00
Stuart Turton 84853e2099 PL/SQL CASE statements with added BREAKS 2012-11-04 23:38:05 +00:00
Stuart Turton f47e6b9813 IF, IF,ELSE, IF,ELSIF, IF,ELSIF,ELSE, WHILE, amd LOOP statements now return 2012-11-04 18:54:52 +00:00
Stuart Turton 06e0af2cfe Add logging message and add comment about SquenceChecker infinite loop control index 2012-11-03 17:02:49 +00:00
Stuart Turton 037eaf9d2b Remove generated java classes from src/main/java ; change StringBuffer to StringBuilder in Structure.java 2012-11-03 16:59:57 +00:00
Stuart Turton 8dbd3798f9 Merge branch 'master' of git://github.com/pmd/pmd
Conflicts:
	pmd/src/main/java/net/sourceforge/pmd/lang/ast/CharStream.java
	pmd/src/main/java/net/sourceforge/pmd/lang/ast/JavaCharStream.java
	pmd/src/main/java/net/sourceforge/pmd/lang/ast/SimpleCharStream.java
	pmd/src/main/java/net/sourceforge/pmd/lang/ast/TokenMgrError.java
	pmd/src/main/java/net/sourceforge/pmd/lang/cpp/ast/Token.java
	pmd/src/main/java/net/sourceforge/pmd/lang/java/ast/JJTJavaParserState.java
	pmd/src/main/java/net/sourceforge/pmd/lang/java/ast/JavaParser.java
	pmd/src/main/java/net/sourceforge/pmd/lang/java/ast/JavaParserTreeConstants.java
	pmd/src/main/java/net/sourceforge/pmd/lang/java/ast/JavaParserVisitor.java
	pmd/src/main/java/net/sourceforge/pmd/lang/java/ast/ParseException.java
	pmd/src/main/java/net/sourceforge/pmd/lang/java/ast/Token.java
	pmd/src/main/java/net/sourceforge/pmd/lang/jsp/ast/JJTJspParserState.java
	pmd/src/main/java/net/sourceforge/pmd/lang/jsp/ast/JspParserTreeConstants.java
	pmd/src/main/java/net/sourceforge/pmd/lang/jsp/ast/JspParserVisitor.java
	pmd/src/main/java/net/sourceforge/pmd/lang/jsp/ast/ParseException.java
	pmd/src/main/java/net/sourceforge/pmd/lang/jsp/ast/Token.java
2012-11-02 23:55:26 +00:00
Stuart Turton f0eafc912b Instrument code to identify infinite loop she procession PLSQL IF/THEN/ELSE
Amend AST to make this easier
2012-11-02 01:11:02 +00:00
Stuart Turton 6de746a359 Bring PLSQL AST file up to current code level 2012-10-21 23:09:01 +01:00
Stuart Turton cfa1b0c574 Cope with Object Type Bodies (TypeMethods) when generating scope; commit outstanding PLSQL changes after recovery from filename case problems 2012-10-21 22:39:32 +01:00
Stuart Turton 342b0848d1 Commit outstanding changes after merge 2012-10-21 22:25:02 +01:00
Stuart Turton 6dd19418d8 Merge branch 'master' of https://github.com/sturton/pmd 2012-10-21 22:21:44 +01:00
Stuart Turton f8b1ee358e Correct the filename case of AST production classes within git again 2012-10-21 22:21:02 +01:00
Stuart Turton 6d4905335c Merge commit '3d2ff17d8345c442bd94236892e1750112cd48f0' 2012-10-21 22:13:22 +01:00
Stuart Turton 4677cf8634 Correct case of filenames in github project 2012-10-21 21:02:46 +01:00
Stuart Turton 65edfe5e2f Push outstanding PLSQL changes 2012-10-20 22:52:52 +01:00
Stuart Turton ca5a24edd5 ASTTypeMethod added for TYPE BODY methods scope tracking; DFA works for PACKAGE BODIES 2012-10-17 22:33:32 +01:00
Stuart Turton d4a211087f Remeove terminating semi-colon from Conditional Compilation statement; add terminating semi-colon to global Block(); correct pasring for WRAPPED objects; assign ConditionalOrExpression() to avoid null pointer exception 2012-10-17 19:05:11 +01:00
Stuart Turton fb74093d2a Merge commit 'd126d9b0b89229de905dcaf3926b1321127fde9f' 2012-10-10 23:37:00 +01:00
Stuart Turton 8c4fefe4a8 Amended PLSQL AST 2012-10-10 20:00:47 +01:00
Stuart Turton daf1f4c632 PLSQL AST now supports CONTINUE as an 11G CONTINUE statement and as a variable name; EXIT may be a variable name; LabelledStatement is now cleaned up 2012-10-10 19:59:02 +01:00
Stuart Turton a9507e0ccd PLSQL AST now copes with 11G CONTINUE statements; PMD rule works for simple PLSQL; DFA is not working; PMD symbol handling is very buggy 2012-10-10 19:33:16 +01:00
Stuart Turton 99c71ddcbd PLSQL AST now copes with 11G CONTINUE statements; PMD rule works for simple PLSQL; DFA is not working; PMD symbol handling is very buggy 2012-10-10 19:28:30 +01:00
Stuart Turton 3b8d09cdd7 PLSQL AST now copes with 11G CONTINUE statements; PMD rule works for simple PLSQL; DFA is not working; PMD symbol handling is very buggy 2012-10-10 19:25:51 +01:00
Stuart Turton bf5bb5e2bb PLSQLDesigner - remove System.err 2012-10-02 23:14:07 +01:00
Stuart Turton c482f7a81a PLSQL AST JJTree - return Types from productions are accurate rather than all being declared as SimpleNode - NODE_EXTENDS,TRACK_TOKENS and NODE_SCOPE_HOOK are specified so that beginLine,beginColumn,endLine,endColumn fields are set 2012-10-02 23:02:55 +01:00
Stuart Turton 10e1e8cdb3 get XPath window working 2012-10-02 19:07:39 +01:00
Stuart Turton 3c3f811dff PldocAST.jjt - setImage() for IDs and Names 2012-10-01 23:24:00 +01:00
Stuart Turton fe3f159255 Hack PLSQLParser.java to avoid Arguments null pointer exception 2012-10-01 19:40:47 +01:00
Stuart Turton 501a4754f7 DumpFacade added 2012-09-30 23:48:57 +01:00
Stuart Turton 4580690ca9 PLSQLDesigner - removed System.err tracking 2012-09-30 23:35:32 +01:00
Stuart Turton 56df618d60 DumpFacade implemented- AST panel populates 2012-09-30 23:08:51 +01:00
Stuart Turton f513a0cad0 Merge branch 'master' of https://github.com/sturton/pmd
Conflicts:
	pmd/etc/grammar/PldocAST.jjt
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/PLSQLHandler.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/PLSQLParser.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/ast/ASTArguments.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/ast/ASTName.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/ast/ASTPrimaryPrefix.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/ast/ASTPrimarySuffix.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/ast/Node.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/ast/PLSQLParser.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/ast/PLSQLParserVisitor.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/ast/PLSQLParserVisitorAdapter.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/ast/SimpleNode.java
	pmd/src/main/java/net/sourceforge/pmd/lang/plsql/rule/PLSQLRuleChainVisitor.java
2012-09-30 17:45:37 +01:00
Stuart Turton 66f31a2c9a PLSQL AST rewritten to be more PMD-like; Scope compiles; PLSQLDesigner work in progress 2012-09-30 15:36:53 +01:00
Stuart Turton d7037af36f JJTree production names changed to be consistent with Java AST 2012-09-24 20:55:29 +01:00
Stuart Turton ba84d1d9fa Visitor JJTree language file 2012-09-24 20:47:00 +01:00
Stuart Turton 6f84da00a2 Convert parser classes from the initial (CPD) version to separate AST* classes in order allow the Visitor pattern (as used in
PMD).

These classes work with CPD, but also form an initial basis for PLSQL integration with PMD.

Also viewer_properties has been copied under src/main/resources so that it is automatically included in the packaged JAR file.
2012-08-26 15:29:02 +01:00
Stuart Turton ec4d9f9af2 PLSQL AST - modify PldocAST.jjt to allow Visitor pattern and return a terminal object (ASTinput) 2012-08-25 23:34:49 +01:00
Stuart Turton f7cdadc3a9 Revert "PLSQL AST - modify PldocAST.jjt to allow Visitor pattern and return a terminal object (ASTinput)"
This reverts commit 2e4e6b2231.
2012-08-25 23:26:45 +01:00
Stuart Turton 2e4e6b2231 PLSQL AST - modify PldocAST.jjt to allow Visitor pattern and return a terminal object (ASTinput) 2012-08-25 23:03:10 +01:00
Stuart Turton 0019f52074 Add PLSQL AST grammar for integrating PL/SQL parser for use in CPD.
This is the minimal conversion of the PLDoc parser (pldoc.sourceforge.net). This version is not suitable for incorporation into the main PMD suite, simply because PldocAST.jjt  does not specify the Visitor pattern, which seems to be required for PMD integration.
2012-08-25 22:43:07 +01:00
Stuart Turton 7ac8edb6a1 Add tests for PLSQLTokenizer 2012-08-08 20:17:32 +01:00
Stuart Turton 1d2d04b3eb Incorporate PLDoc 1.3.3 changes - support "AT LOCAL" and "AT TIME ZONE (DBTIMEZONE|SESSIONTIMEZONE|literal|expression)" time zone clauses 2012-08-05 23:03:09 +01:00
Stuart Turton 1cdbc0ca0a PMD-3546925 - Add PLSQL Language for PMD and CPD (extracted from PLDoc 1.3.2) 2012-07-23 21:11:10 +01:00
4638 changed files with 231687 additions and 247624 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
+14
View File
@@ -0,0 +1,14 @@
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]*
**Rule Set:**
**Description:**
**Code Sample demonstrating the issue:**
```
```
**Running PMD through:** *[CLI | Ant | Maven | Gradle | Designer | Other]*
+9
View File
@@ -0,0 +1,9 @@
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.
- [ ] `mvn test` passes.
- [ ] `mvn checkstyle:check` passes. [Check this for more info](https://github.com/pmd/pmd/blob/master/CONTRIBUTING.md#code-style)
**PR Description:**
+12
View File
@@ -0,0 +1,12 @@
target/
bin/
.project
.classpath
.checkstyle
.pmd
.ruleset
.settings/
*.iml
.idea
*.patch
*/src/site/site.xml
BIN
View File
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
+86
View File
@@ -0,0 +1,86 @@
sudo: false
addons:
apt:
packages:
- oracle-java8-installer
ssh_known_hosts:
- web.sourceforge.net
language: java
jdk: oraclejdk8
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="
- 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: "geOU/7VR83KYTOCR5XkgFqnHJEnXeB6hNDE7UFcN4ZsL9uVLhxlDVWV3ujJ87nyBzggG1KfSnUx11UwOQrbBl0K6sEXo/B2q5ytOsWoSLi7+0qm/uhhw/DTBOq57p8TIDKFM7rDhO7uajSn7Y86LeZkh9wIs5265Fh1yhCkiPbczDUMsX4P0GGg2qgkIKSBw4DZf6sPDc4xjJq/4/cLnjXo/K0ZYAIoSLqDfe1gmkzMtQlad+1t8Lwv/gOJ4BNRF4a5aEvGF6kbFovFoeFWCQTKlkn6VJtY+BETGKW2RH9efGeMs7JbBbNm+nnpoNsbJ0gdmGlhSbWT8enIm72/P0ThTBJWVcLJ30tUd0UeYD9C49wbJ3RHSxsoUKP9YhHJ+XKNx+8irkJ8LPCkNMQEFE153gEVvU7tCgah9Uq6laYZv9cQE0dWzNt3//Ymls8BzY38Ha4PbrIIJqEuWwnAX6ZgTgzVtXx1AJjkDFG9KFKPhN7NfNMbh7rn5C84a1h5zrIydm+6RcIBC+xTLDEiN7djiquf3PcNtyGLcO8dNN4Uv8iU0Jw8ch3+w0PJO53v5py+IS1V8pwwYaYF2iVPOoziS0tP8MsgYVGwpTZhvz3v8x0ge8r6KJE4zdvoPtCRNr2Oo3sJGYqkt86Hu6agKFiljP5AgJNx7iQD5GQn6J3w="
- secure: "gqyPF3d75JuwZptnQQQKO6rGUILXGO09y9dZhShdX8qq5Mexa2ISk77Y/b0yyAdhJMgEglls5cWlbHkwCAB0i4yL25RE5CtQUe4er+CIKwBIs0M56ghbcOwWAFB/cXeyyWmXDHBVnVUeKm7IJ34txsEclnMzQSR/DInSzsCFMUQok8HEaWZNssMjyRgo6goKGdG5vNWGfLLY7mKGMe/6PpYJD0G8k+Na08aX06ZWph38He8O3imUAngoQrxiSp0UYmnHDkigbV7S2LdZOsj7kMxkiyigzK/P1eygHVbFAhohLroaqS9B4CBK7QeOyup2vxVKqJVzFwOCylD0786CImvaG2ZYMtvJkapvaEE0mdMlyYpHgdIkmHZu28aMW7hXEhxHyBAxKuPcj5eGCGziO+ztCvfYIA9CGs1uA4KLrED7SahvB0oXnt3KTFdRc857cWcpp2NmRKihLzVdgHlmT8zcYaec3zP1VdMoa2bmLHoaZtAwvMTcAG56FcET1p7f9v+uiU88ZeptEjTJfpAWlq34tpwZXNyIQi5IROocSHM+PKTgLAsAMP5klGascr8E0sEzREl7tg8hqEwXKym/sVKyT+HMptA3UZcrZZhm07/cmQ0pUVvbV9QDb0MzU3O2wF7vT3U7R7Fb1u0LxMjblPyEazTp8ldabVRJREwlsDc="
- secure: "JIhuqaI0i+zvuqqXiQBHpuKr7AQ8jfk6Gbr8Qgiq4yJtdEWXZGxnAT9BmlbjkgT7ABXvLgxf2CIdUOMo1yYfBlxQL/y5+e89jaVpYF3tvNAzYQ1e12VzQRsd/jDb7qvm7tw3rDHEn3dSEot7Q6KbPcL6WzWJINVMCCmOgvq9gKHgE6Y5q5EgZ5rxiXyuO27ndzcbxaor4PIaiSzHO9+AJQ7p2zDLP+kG4nKVTBX0l9VoKiYFhIpIhpbigi3jyLDMDRiWpwTWZC6P8/RXfZg/lc5ADOuM2DM8oXPpZuqOa/g31LWQOSCuEnQ1G16vbLgipSPpgAc7jYWD5cywhG9dLkiKaZDh5x0meLM2RoAgz6eAnQfTTqJ68OM9o9yXjubEedsNpNRAr9/DXMd+fbh10W2vbvL5HCNB3lic3anehhR9le7PLuEKxg654wXt3KM2PZGVWbotIyBK0CvGzqGkppvwT23QdDDqSdkWuGQIhGQ0xBOdYkwebycxP5wwPUmObG+mymQ1Be2BXvmghttsiJdKlt4CVSYOJUMus6kU32G95hdTgKblsX4J1Of2i1nYsjyMKh3k945tqXwQrIsxOOQug0oIkz24zlLaOaQcorWtJ6Y1HPaZKpVIFUEF0y8Uq/O4oB2bOYC6WDUQfpj7nRG6xbi+BeBS84m1ttCEk4g="
matrix:
- BUILD=deploy
- BUILD=site
- BUILD=sonar
before_install:
- bash .travis/setup-secrets.sh
- bash .travis/configure-maven.sh
install: true
before_script: true
script: bash .travis/build-$BUILD.sh
after_success: true
before_deploy: true
deploy:
provider: releases
api_key: ${GITHUB_OAUTH_TOKEN}
file_glob: true
file:
- pmd-dist/target/pmd-*.zip
- target/pmd-doc-*.zip
skip_cleanup: true
on:
tags: true
repo: pmd/pmd
condition: "${TRAVIS_SECURE_ENV_VARS} = true && ${BUILD} != sonar"
after_deploy: bash .travis/release.sh
notifications:
email:
recipients:
- adangel@users.sourceforge.net
on_success: always
on_failure: always
cache:
directories:
- "$HOME/.m2"
# 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
#
+43
View File
@@ -0,0 +1,43 @@
#
# Helper functions to run a chatty, long task in the background,
# redirecting the output to file and keep travis happy by regularly
# writing to the log.
#
# This is to workaround the travis log length limit of 4MB
# Solution from http://stackoverflow.com/questions/26082444/how-to-work-around-travis-cis-4mb-output-limit/26082445#26082445
#
# Source this file into the shell script, that needs it.
#
# expected variables
# Name | Example Value
# PING_SLEEP | 30s
# BUILD_OUTPUT | /tmp/build-step-logfile.out
# PING_PID_FILE | /tmp/build-step-ping.pid
touch $BUILD_OUTPUT
dump_output() {
echo Tailing the last 100 lines of output:
tail -100 $BUILD_OUTPUT
}
kill_ping() {
if [ -e $PING_PID_FILE ]; then
PING_LOOP_PID=$(cat $PING_PID_FILE)
kill $PING_LOOP_PID
rm $PING_PID_FILE
fi
}
error_handler() {
kill_ping
echo ERROR: An error was encountered with the build.
dump_output
exit 1
}
# If an error occurs, run our error handler to output a tail of the build
trap 'error_handler' ERR
# Set up a repeating loop to send some output to Travis.
bash -c "while true; do echo \$(date) - building ...; sleep $PING_SLEEP; done" &
PING_LOOP_PID=$!
echo "$PING_LOOP_PID" > $PING_PID_FILE
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
set -e
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 | tail -1)
echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
if travis_isPullRequest; then
echo "This is a pull-request build"
./mvnw verify -B -V
elif travis_isPush; then
if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then
echo "This is a release build for tag $TRAVIS_TAG"
./mvnw deploy -Possrh,pmd-release -B -V
elif [[ "$VERSION" == *-SNAPSHOT ]]; then
echo "This is a snapshot build"
./mvnw deploy -Possrh -B -V
else
# other build. Can happen during release: the commit with a non snapshot version is built, but not from the tag.
echo "This is some other build, probably during release: commit with a non-snapshot version on branch master..."
./mvnw verify -Possrh -B -V
# we stop here - no need to execute further steps
exit 0
fi
# Uploading pmd distribution to sourceforge
rsync -avh pmd-dist/target/pmd-*-${VERSION}.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/
rsync -avh src/site/markdown/overview/changelog.md ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/ReadMe.md
else
echo "This is neither a pull request nor a push!"
exit 1
fi
+63
View File
@@ -0,0 +1,63 @@
#!/bin/bash
set -e
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 | tail -1)
echo "Building PMD Site ${VERSION} on branch ${TRAVIS_BRANCH}"
if ! travis_isPush; then
echo "Not building site, since this is not a push!"
exit 0
fi
(
export PING_SLEEP=30s
export BUILD_OUTPUT=/tmp/build-site.out
export PING_PID_FILE=/tmp/build-site-ping.pid
source .travis/background-job-funcs.sh
# Run the build, redirect output into the file
./mvnw install -DskipTests=true -B -V >> $BUILD_OUTPUT 2>&1
./mvnw site site:stage -Psite -B -V >> $BUILD_OUTPUT 2>&1
# The build finished without returning an error so dump a tail of the output
dump_output
# nicely terminate the ping output loop
kill_ping
)
# create pmd-doc archive
(
cd target
mv staging pmd-doc-${VERSION}
zip -qr pmd-doc-${VERSION}.zip pmd-doc-${VERSION}/
)
# Uploading pmd doc distribution to sourceforge
if [[ "$TRAVIS_TAG" != "" || "$VERSION" == *-SNAPSHOT ]]; then
rsync -avh target/pmd-doc-${VERSION}.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/
fi
(
if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then
# this can take very long and no output is generated. therefore use the background job again
export PING_SLEEP=30s
export BUILD_OUTPUT=/tmp/build-site-upload.out
export PING_PID_FILE=/tmp/build-site-upload-ping.pid
source .travis/background-job-funcs.sh
# Uploading snapshot site...
rsync -ah --stats --delete target/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/
# The build finished without returning an error so dump a tail of the output
dump_output
# nicely terminate the ping output loop
kill_ping
fi
)
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
set -e
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 | tail -1)
echo "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
export PING_SLEEP=30s
export BUILD_OUTPUT=/tmp/build-sonar.out
export PING_PID_FILE=/tmp/build-sonar-ping.pid
source .travis/background-job-funcs.sh
# Run the build, redirect output into the file
./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=${SONAR_TOKEN} -B -V >> $BUILD_OUTPUT 2>&1
# The build finished without returning an error so dump a tail of the output
dump_output
# nicely terminate the ping output loop
kill_ping
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
set -e
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"
function travis_isPullRequest() {
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
return 0
else
return 1
fi
}
function travis_isPush() {
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ]; then
return 0
else
return 1
fi
}
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
echo "MAVEN_OPTS='-Xms1g -Xmx1g'" > $HOME/.mavenrc
mkdir -p $HOME/.m2
cp .travis/travis-toolchains.xml $HOME/.m2/toolchains.xml
cp .travis/travis-settings.xml $HOME/.m2/settings.xml
+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.
+75
View File
@@ -0,0 +1,75 @@
#!/bin/bash
set -e
echo "BUILD: $BUILD"
if [ "${BUILD}" = "deploy" ]; then
RELEASE_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
# Deploy to ossrh has already been done with the usual build. See build-deploy.sh
# The site has been built before, the files have already been uploaded to sourceforge.
# Since this is a release, making the binary the new default file...
curl -H "Accept: application/json" -X PUT -d "default=windows&default=mac&default=linux&default=bsd&default=solaris&default=others" \
-d "api_key=${PMD_SF_APIKEY}" https://sourceforge.net/projects/pmd/files/pmd/${RELEASE_VERSION}/pmd-bin-${RELEASE_VERSION}.zip
# Assumes, the release has already been created by travis github releases provider
RELEASE_ID=$(curl -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" https://api.github.com/repos/pmd/pmd/releases/tags/pmd_releases/${RELEASE_VERSION}|jq ".id")
RELEASE_NAME="PMD ${RELEASE_VERSION} ($(date -u +%d-%B-%Y))"
RELEASE_BODY=$(tail -n +3 src/site/markdown/overview/changelog.md) # skips the first 2 lines - the heading 'PMD Release Notes'
RELEASE_BODY="${RELEASE_BODY//'\'/\\\\}"
RELEASE_BODY="${RELEASE_BODY//$'\r'/}"
RELEASE_BODY="${RELEASE_BODY//$'\n'/\\r\\n}"
RELEASE_BODY="${RELEASE_BODY//'"'/\\\"}"
cat > release-edit-request.json <<EOF
{
"name": "$RELEASE_NAME",
"body": "$RELEASE_BODY"
}
EOF
echo "Updating release at https://api.github.com/repos/pmd/pmd/releases/${RELEASE_ID}..."
RESPONSE=$(curl -i -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" -H "Content-Type: application/json" --data "@release-edit-request.json" -X PATCH https://api.github.com/repos/pmd/pmd/releases/${RELEASE_ID})
if [[ "$RESPONSE" != *"HTTP/1.1 200"* ]]; then
echo "Request:"
cat release-edit-request.json
echo
echo "Response:"
echo "$RESPONSE"
else
echo "Update OK"
fi
fi
if [ "${BUILD}" = "site" ]; then
echo "Adding the site 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.email "adangel+pmd-bot@users.sourceforge.net"
git config user.name "Andreas Dangel (PMD Releases)"
git config core.sparsecheckout true
git remote add origin git@github.com:pmd/pmd.github.io.git
echo "latest/" > .git/info/sparse-checkout
git pull --depth=1 origin master
rsync -a ../target/pmd-doc-${RELEASE_VERSION}/ pmd-${RELEASE_VERSION}/
git add pmd-${RELEASE_VERSION}
git commit -q -m "Added pmd-${RELEASE_VERSION}"
git rm -qr latest
cp -a pmd-${RELEASE_VERSION} latest
git add latest
git commit -q -m "Copying pmd-${RELEASE_VERSION} to latest"
git push origin master
)
fi
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
set -e
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "${TRAVIS_SECURE_ENV_VARS}" != "true" ]; then
echo "Not setting up secrets (TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} TRAVIS_SECURE_ENV_VARS=${TRAVIS_SECURE_ENV_VARS})."
exit 0
fi
openssl aes-256-cbc -K $encrypted_5630fbebf057_key -iv $encrypted_5630fbebf057_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"
mkdir -p "$HOME/.gpg"
gpg --batch --import .travis/release-signing-key-82DE7BE82166E84E.gpg
rm .travis/secrets.tar
rm .travis/release-signing-key-82DE7BE82166E84E.gpg
+29
View File
@@ -0,0 +1,29 @@
<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>ossrh</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
<mirrors/>
<proxies/>
<profiles>
<profile>
<id>ossrh</id>
<properties>
<gpg.keyname>${env.CI_SIGN_KEYNAME}</gpg.keyname>
<gpg.passphrase>${env.CI_SIGN_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
<activeProfiles/>
</settings>
+34
View File
@@ -0,0 +1,34 @@
<?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>
+29
View File
@@ -0,0 +1,29 @@
# How to build PMD
PMD uses [Maven](https://maven.apache.org/).
You'll need to have a `~/.m2/toolchains.xml` file setup
with jdk 1.7 and jdk 1.8 (for some features in pmd).
See [maven toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html).
A example file can be found here: [example-toolchains.xml](https://github.com/pmd/pmd/blob/master/example-toolchains.xml).
PMD uses the [maven wrapper](https://github.com/takari/maven-wrapper), so you can simply build PMD as following:
* `./mvnw clean verify` (on Unix-like platform such as Linux and Mac OS X)
* `mvnw.cmd clean verify` (on Windows)
This will create the zip files in the directory `pmd-dist/target`:
cd pmd-dist/target
ls *.zip
That's all !
## How to build the documentation (maven site)?
Building the maven site is done with the following commands:
./mvnw clean install -DskipTests=true
./mvnw install site site:stage -Psite
You'll find the built site in the directory `target/staging/`.
+55
View File
@@ -0,0 +1,55 @@
# How to contribute to PMD
First off, thanks for taking the time to contribute!
## Pull requests
* Please create your pull request against the `master` branch. We will rebase/merge it to the maintenance
branches, if necessary.
* We are using [checkstyle](http://checkstyle.sourceforge.net/) to enforce a common code style.
The check is integrated into the default build - so, make sure, you can [build PMD](BUILDING.md) without errors.
See [code style](#code-style) for more info.
## Bug reports
We used to use Sourceforge for bug tracking, but we are in the process of moving to github issues.
* Old bugs are still available at <https://sourceforge.net/p/pmd/bugs/>.
* Please report new bugs at <https://github.com/pmd/pmd/issues>.
When filing a bug report, please provide as much information as possible, so that we can reproduce the issue:
* The name of the rule, that is buggy
* A code snippet, which triggers a false positive/negative or crash
* How do you execute PMD? (command line, ant, maven, gradle, other)
## Documentation
There is some documentation available under <https://pmd.github.io>. Feel free to create a bug report if
documentation is missing, incomplete or outdated.
The documentation is generated as a maven site, the source is available at: <https://github.com/pmd/pmd/tree/master/src/site>
## Questions
There are various channels, on which you can ask questions:
* The mailing list: [pmd-devel](https://lists.sourceforge.net/lists/listinfo/pmd-devel)
* The discussion forums on sourceforge: <https://sourceforge.net/p/pmd/discussion/>
* On [StackOverflow](https://stackoverflow.com/questions/tagged/pmd): Make sure, to tag your question with "pmd".
## Code Style
PMD uses [checkstyle](http://checkstyle.sourceforge.net/) to enforce a common code style.
See [pmd-checkstyle-config.xml](https://github.com/pmd/build-tools/blob/master/config/src/main/resources/net/sourceforge/pmd/pmd-checkstyle-config.xml) for the configuration and
[the eclipse configuration files](https://github.com/pmd/build-tools/tree/master/config/eclipse) that can
be imported into a fresh workspace.
+405
View File
File diff suppressed because it is too large. Load diff
+12
View File
@@ -0,0 +1,12 @@
PMD
This product is licensed under a BSD-style license;
for more info see http://pmd.sourceforge.net/license.html or LICENSE
Part of this product (mostly the package net.sourceforge.pmd.lang.vm)
is licensed under the Apache License, Version 2.0;
for more info see http://www.apache.org/licenses/LICENSE-2.0 or LICENSE
Part of this product (part of pmd-scala)
is licensed under the GNU Lesser General Public License, Version 3 or later
for more info see http://www.gnu.org/licenses/lgpl.txt or LICENSE
+19 -21
View File
@@ -1,27 +1,25 @@
[![PMD - Don't shoot the messenger][PMDLogo]][website]
# PMD
PMD
===
[![Build Status](https://travis-ci.org/pmd/pmd.svg?branch=master)](https://travis-ci.org/pmd/pmd)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd)
About
-----
PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks,
unnecessary object creation, and so forth. It supports Java, JavaScript, XML, XSL.
Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code in
Java, C, C++, C#, PHP, Ruby, Fortran, JavaScript.
## About
Source
------
Our latest source of PMD can be found on [GitHub]. Fork us!
The current status of this repo can be seen at [BuildHive].
**PMD** is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks,
unnecessary object creation, and so forth. It supports Java, JavaScript, Salesforce.com Apex, PLSQL, Apache Velocity,
XML, XSL.
News and Website
----------------
More information can be found on our [Website] and on [SourceForge].
Additionally it includes **CPD**, the copy-paste-detector. CPD finds duplicated code in
Java, C, C++, C#, Groovy, PHP, Ruby, Fortran, JavaScript, PLSQL, Apache Velocity, Scala, Objective C,
Salesforce.com Apex, Perl, Swift, Matlab, Python.
## Source and Documentation
[PMDLogo]: http://pmd.sourceforge.net/pmd_logo.png
[GitHub]: https://github.com/pmd/pmd
[BuildHive]: https://buildhive.cloudbees.com/job/pmd/
[Website]: http://pmd.sourceforge.net
[SourceForge]: https://sourceforge.net/projects/pmd/
Our latest source of PMD can be found on [GitHub](https://github.com/pmd/pmd). Fork us!
* [How to build PMD](BUILDING.md)
* [How to contribute to PMD](CONTRIBUTING.md)
## News and Website
More information can be found on our [Website](https://pmd.github.io) and on [SourceForge](https://sourceforge.net/projects/pmd/).
@@ -1,41 +0,0 @@
package net.sourceforge.pmd.util.viewer;
import net.sourceforge.pmd.util.viewer.gui.MainFrame;
/**
* viewer's starter
*
* @author Boris Gruschko ( boris at gruschko.org )
* @version $Id$
*/
public class Viewer {
/**
* starts the viewer
*
* @param args arguments
*/
public static void main(String[] args) {
new MainFrame();
}
}
/*
* $Log$
* Revision 1.1 2005/08/15 19:51:41 tomcopeland
* Initial revision
*
* Revision 1.2 2004/09/27 19:42:52 tomcopeland
* A ridiculously large checkin, but it's all just code reformatting. Nothing to see here...
*
* Revision 1.1 2003/09/23 20:32:42 tomcopeland
* Added Boris Gruschko's new AST/XPath viewer
*
* Revision 1.1 2003/09/24 01:33:03 bgr
* moved to a new package
*
* Revision 1.1 2003/09/22 05:21:54 bgr
* initial commit
*
*/
@@ -1,147 +0,0 @@
package net.sourceforge.pmd.util.viewer.gui;
import net.sourceforge.pmd.ast.Node;
import net.sourceforge.pmd.ast.SimpleNode;
import net.sourceforge.pmd.util.viewer.gui.menu.ASTNodePopupMenu;
import net.sourceforge.pmd.util.viewer.model.ASTModel;
import net.sourceforge.pmd.util.viewer.model.ViewerModel;
import net.sourceforge.pmd.util.viewer.model.ViewerModelEvent;
import net.sourceforge.pmd.util.viewer.model.ViewerModelListener;
import net.sourceforge.pmd.util.viewer.util.NLS;
import javax.swing.*;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
import java.awt.BorderLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.LinkedList;
/**
* tree panel GUI
*
* @author Boris Gruschko ( boris at gruschko.org )
* @version $Id$
*/
public class ASTPanel
extends JPanel
implements ViewerModelListener, TreeSelectionListener {
private ViewerModel model;
private JTree tree;
/**
* constructs the panel
*
* @param model model to attach the panel to
*/
public ASTPanel(ViewerModel model) {
this.model = model;
init();
}
private void init() {
model.addViewerModelListener(this);
setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), NLS.nls("AST.PANEL.TITLE")));
setLayout(new BorderLayout());
tree = new JTree((TreeNode) null);
tree.addTreeSelectionListener(this);
tree.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if (e.isPopupTrigger()) {
TreePath path =
tree.getClosestPathForLocation(e.getX(), e.getY());
tree.setSelectionPath(path);
JPopupMenu menu =
new ASTNodePopupMenu(model, (SimpleNode) path.getLastPathComponent());
menu.show(tree, e.getX(), e.getY());
}
}
});
add(new JScrollPane(tree), BorderLayout.CENTER);
}
/**
* @see ViewerModelListener#viewerModelChanged(ViewerModelEvent)
*/
public void viewerModelChanged(ViewerModelEvent e) {
switch (e.getReason()) {
case ViewerModelEvent.CODE_RECOMPILED:
tree.setModel(new ASTModel(model.getRootNode()));
break;
case ViewerModelEvent.NODE_SELECTED:
if (e.getSource() != this) {
LinkedList list = new LinkedList();
for (
Node node = (Node) e.getParameter(); node != null;
node = node.jjtGetParent())
list.addFirst(node);
TreePath path = new TreePath(list.toArray());
tree.setSelectionPath(path);
tree.scrollPathToVisible(path);
}
break;
}
}
/**
* @see javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent)
*/
public void valueChanged(TreeSelectionEvent e) {
model.selectNode((SimpleNode) e.getNewLeadSelectionPath().getLastPathComponent(), this);
}
}
/*
* $Log$
* Revision 1.1 2005/08/15 19:51:42 tomcopeland
* Initial revision
*
* Revision 1.5 2005/02/16 15:46:05 mikkey
* javadoc fixes
*
* Revision 1.4 2004/09/27 19:42:52 tomcopeland
* A ridiculously large checkin, but it's all just code reformatting. Nothing to see here...
*
* Revision 1.3 2004/04/15 18:21:58 tomcopeland
* Cleaned up imports with new version of IDEA; fixed some deprecated Ant junx
*
* Revision 1.2 2003/09/23 20:51:06 tomcopeland
* Cleaned up imports
*
* Revision 1.1 2003/09/23 20:32:42 tomcopeland
* Added Boris Gruschko's new AST/XPath viewer
*
* Revision 1.1 2003/09/24 01:33:03 bgr
* moved to a new package
*
* Revision 1.3 2003/09/24 00:40:35 bgr
* evaluation results browsing added
*
* Revision 1.2 2003/09/23 07:52:16 bgr
* menus added
*
* Revision 1.1 2003/09/22 05:21:54 bgr
* initial commit
*
*/
@@ -1,35 +0,0 @@
package net.sourceforge.pmd.util.viewer.gui;
/**
* contains action command constants
*
* @author Boris Gruschko ( boris at gruschko.org )
* @version $Id$
*/
public interface ActionCommands {
String COMPILE_ACTION = "Compile";
String EVALUATE_ACTION = "Evaluate";
}
/*
* $Log$
* Revision 1.1 2005/08/15 19:51:42 tomcopeland
* Initial revision
*
* Revision 1.3 2004/12/22 20:52:12 tomcopeland
* Fixing some stuff PMD found
*
* Revision 1.2 2004/09/27 19:42:52 tomcopeland
* A ridiculously large checkin, but it's all just code reformatting. Nothing to see here...
*
* Revision 1.1 2003/09/23 20:32:42 tomcopeland
* Added Boris Gruschko's new AST/XPath viewer
*
* Revision 1.1 2003/09/24 01:33:03 bgr
* moved to a new package
*
* Revision 1.1 2003/09/22 05:21:54 bgr
* initial commit
*
*/
@@ -1,105 +0,0 @@
package net.sourceforge.pmd.util.viewer.gui;
import net.sourceforge.pmd.ast.SimpleNode;
import net.sourceforge.pmd.util.viewer.model.ViewerModel;
import net.sourceforge.pmd.util.viewer.model.ViewerModelEvent;
import net.sourceforge.pmd.util.viewer.model.ViewerModelListener;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.BorderLayout;
import java.util.Vector;
/**
* A panel showing XPath expression evaluation results
*
* @author Boris Gruschko ( boris at gruschko.org )
* @version $Id$
*/
public class EvaluationResultsPanel
extends JPanel
implements ViewerModelListener {
private ViewerModel model;
private JList list;
/**
* constructs the panel
*
* @param model model to refer to
*/
public EvaluationResultsPanel(ViewerModel model) {
super(new BorderLayout());
this.model = model;
init();
}
private void init() {
model.addViewerModelListener(this);
list = new JList();
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
list.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (list.getSelectedValue() != null) {
model.selectNode((SimpleNode) list.getSelectedValue(), EvaluationResultsPanel.this);
}
}
});
add(new JScrollPane(list), BorderLayout.CENTER);
}
/**
* @see ViewerModelListener#viewerModelChanged(ViewerModelEvent)
*/
public void viewerModelChanged(ViewerModelEvent e) {
switch (e.getReason()) {
case ViewerModelEvent.PATH_EXPRESSION_EVALUATED:
if (e.getSource() != this) {
list.setListData(new Vector(model.getLastEvaluationResults()));
}
break;
case ViewerModelEvent.CODE_RECOMPILED:
list.setListData(new Vector(0));
break;
}
}
}
/*
* $Log$
* Revision 1.1 2005/08/15 19:51:42 tomcopeland
* Initial revision
*
* Revision 1.5 2005/02/16 15:46:34 mikkey
* javadoc fixes
*
* Revision 1.4 2004/09/27 19:42:52 tomcopeland
* A ridiculously large checkin, but it's all just code reformatting. Nothing to see here...
*
* Revision 1.3 2004/04/15 18:21:58 tomcopeland
* Cleaned up imports with new version of IDEA; fixed some deprecated Ant junx
*
* Revision 1.2 2003/09/23 20:51:06 tomcopeland
* Cleaned up imports
*
* Revision 1.1 2003/09/23 20:32:42 tomcopeland
* Added Boris Gruschko's new AST/XPath viewer
*
* Revision 1.1 2003/09/24 01:33:03 bgr
* moved to a new package
*
* Revision 1.1 2003/09/24 00:40:35 bgr
* evaluation results browsing added
*
*/
@@ -1,172 +0,0 @@
package net.sourceforge.pmd.util.viewer.gui;
import net.sourceforge.pmd.ast.ParseException;
import net.sourceforge.pmd.util.viewer.model.ViewerModel;
import net.sourceforge.pmd.util.viewer.model.ViewerModelEvent;
import net.sourceforge.pmd.util.viewer.model.ViewerModelListener;
import net.sourceforge.pmd.util.viewer.util.NLS;
import javax.swing.*;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* viewer's main frame
*
* @author Boris Gruschko ( boris at gruschko.org )
* @version $Id$
*/
public class MainFrame
extends JFrame
implements ActionListener, ActionCommands, ViewerModelListener {
private ViewerModel model;
private SourceCodePanel sourcePanel;
private ASTPanel astPanel;
private XPathPanel xPathPanel;
private JButton compileBtn;
private JButton evalBtn;
private JLabel statusLbl;
/**
* constructs and shows the frame
*/
public MainFrame() {
super(NLS.nls("MAIN.FRAME.TITLE"));
init();
}
private void init() {
model = new ViewerModel();
model.addViewerModelListener(this);
sourcePanel = new SourceCodePanel(model);
astPanel = new ASTPanel(model);
xPathPanel = new XPathPanel(model);
getContentPane().setLayout(new BorderLayout());
JSplitPane editingPane =
new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sourcePanel, astPanel);
editingPane.setResizeWeight(0.5d);
JPanel interactionsPane = new JPanel(new BorderLayout());
interactionsPane.add(xPathPanel, BorderLayout.SOUTH);
interactionsPane.add(editingPane, BorderLayout.CENTER);
getContentPane().add(interactionsPane, BorderLayout.CENTER);
compileBtn = new JButton(NLS.nls("MAIN.FRAME.COMPILE_BUTTON.TITLE"));
compileBtn.setActionCommand(COMPILE_ACTION);
compileBtn.addActionListener(this);
evalBtn = new JButton(NLS.nls("MAIN.FRAME.EVALUATE_BUTTON.TITLE"));
evalBtn.setActionCommand(EVALUATE_ACTION);
evalBtn.addActionListener(this);
evalBtn.setEnabled(false);
statusLbl = new JLabel();
statusLbl.setHorizontalAlignment(SwingConstants.RIGHT);
JPanel btnPane = new JPanel(new FlowLayout(FlowLayout.LEFT));
btnPane.add(compileBtn);
btnPane.add(evalBtn);
btnPane.add(statusLbl);
getContentPane().add(btnPane, BorderLayout.SOUTH);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
pack();
setSize(800, 600);
setVisible(true);
}
/**
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
long t0, t1;
if (command.equals(COMPILE_ACTION)) {
try {
t0 = System.currentTimeMillis();
model.commitSource(sourcePanel.getSourceCode());
t1 = System.currentTimeMillis();
setStatus(NLS.nls("MAIN.FRAME.COMPILATION.TOOK")+ " "+(t1-t0)+" ms");
} catch (ParseException exc) {
setStatus(NLS.nls("MAIN.FRAME.COMPILATION.PROBLEM")+ " "+exc.toString());
new ParseExceptionHandler(this, exc);
}
} else if (command.equals(EVALUATE_ACTION)) {
try {
t0 = System.currentTimeMillis();
model.evaluateXPathExpression(xPathPanel.getXPathExpression(), this);
t1 = System.currentTimeMillis();
setStatus(NLS.nls("MAIN.FRAME.EVALUATION.TOOK")+ " "+(t1-t0)+" ms");
} catch (Exception exc) {
setStatus(NLS.nls("MAIN.FRAME.EVALUATION.PROBLEM")+ " "+exc.toString());
new ParseExceptionHandler(this, exc);
}
}
}
/**
* Sets the status bar message
* @param string the new status, the empty string will be set if the value is <code>null</code>
*/
private void setStatus(String string) {
if (string == null)
string = "";
statusLbl.setText(string);
}
/**
* @see ViewerModelListener#viewerModelChanged(ViewerModelEvent)
*/
public void viewerModelChanged(ViewerModelEvent e) {
evalBtn.setEnabled(model.hasCompiledTree());
}
}
/*
* $Log$
* Revision 1.1 2005/08/15 19:51:42 tomcopeland
* Initial revision
*
* Revision 1.6 2005/02/16 15:47:01 mikkey
* javadoc fixes
*
* Revision 1.5 2004/12/13 14:46:11 tomcopeland
* Applied, thanks Miguel!
*
* Revision 1.4 2004/09/27 19:42:52 tomcopeland
* A ridiculously large checkin, but it's all just code reformatting. Nothing to see here...
*
* Revision 1.3 2004/04/15 18:21:58 tomcopeland
* Cleaned up imports with new version of IDEA; fixed some deprecated Ant junx
*
* Revision 1.2 2003/09/23 20:51:06 tomcopeland
* Cleaned up imports
*
* Revision 1.1 2003/09/23 20:32:42 tomcopeland
* Added Boris Gruschko's new AST/XPath viewer
*
* Revision 1.1 2003/09/24 01:33:03 bgr
* moved to a new package
*
* Revision 1.2 2003/09/24 00:40:35 bgr
* evaluation results browsing added
*
* Revision 1.1 2003/09/22 05:21:54 bgr
* initial commit
*
*/
@@ -1,112 +0,0 @@
package net.sourceforge.pmd.util.viewer.gui;
import net.sourceforge.pmd.util.viewer.util.NLS;
import javax.swing.*;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* handles parsing exceptions
*
* @author Boris Gruschko ( boris at gruschko.org )
* @version $Id$
*/
public class ParseExceptionHandler
extends JDialog
implements ActionListener {
private Exception exc;
private JTextArea errorArea;
private JButton okBtn;
/**
* creates the dialog
*
* @param parent dialog's parent
* @param exc exception to be handled
*/
public ParseExceptionHandler(JFrame parent, Exception exc) {
super(parent, NLS.nls("COMPILE_ERROR.DIALOG.TITLE"), true);
this.exc = exc;
init();
}
private void init() {
errorArea = new JTextArea();
errorArea.setEditable(false);
errorArea.setText(exc.getMessage() + "\n");
getContentPane().setLayout(new BorderLayout());
JPanel messagePanel = new JPanel(new BorderLayout());
messagePanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createRaisedBevelBorder(),
BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
NLS.nls("COMPILE_ERROR.PANEL.TITLE"))));
messagePanel.add(new JScrollPane(errorArea), BorderLayout.CENTER);
getContentPane().add(messagePanel, BorderLayout.CENTER);
JPanel btnPane = new JPanel(new FlowLayout(FlowLayout.RIGHT));
okBtn = new JButton(NLS.nls("COMPILE_ERROR.OK_BUTTON.CAPTION"));
okBtn.addActionListener(this);
btnPane.add(okBtn);
getRootPane().setDefaultButton(okBtn);
getContentPane().add(btnPane, BorderLayout.SOUTH);
pack();
setLocationRelativeTo(getParent());
setVisible(true);
}
/**
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() == okBtn) {
dispose();
}
}
}
/*
* $Log$
* Revision 1.1 2005/08/15 19:51:42 tomcopeland
* Initial revision
*
* Revision 1.4 2004/09/27 19:42:52 tomcopeland
* A ridiculously large checkin, but it's all just code reformatting. Nothing to see here...
*
* Revision 1.3 2004/04/15 18:21:58 tomcopeland
* Cleaned up imports with new version of IDEA; fixed some deprecated Ant junx
*
* Revision 1.2 2003/09/23 20:51:06 tomcopeland
* Cleaned up imports
*
* Revision 1.1 2003/09/23 20:32:42 tomcopeland
* Added Boris Gruschko's new AST/XPath viewer
*
* Revision 1.1 2003/09/24 01:33:03 bgr
* moved to a new package
*
* Revision 1.2 2003/09/24 00:40:35 bgr
* evaluation results browsing added
*
* Revision 1.1 2003/09/22 05:21:54 bgr
* initial commit
*
*/
Loaded 30 of 4638 files, more files were not shown because too many files have changed in this diff. Show more