Andreas Dangel
5cd0f2e928
Merge branch 'issue-257'
2017-02-20 16:13:37 +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
6d50709fc1
Merge branch 'pr-258'
2017-02-20 15:50:21 +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
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
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
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
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
Andreas Dangel
05237bf323
Merge branch 'issue-240'
2017-02-14 22:06:18 +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
Andreas Dangel
4e04e62374
Merge branch 'feature-1496'
2017-02-13 21:13:56 +01:00
Andreas Dangel
983a0dc9b8
Remove the to be ignored test from the regressionTests
2017-02-13 21:04:12 +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
e588f772c0
Merge branch 'pr-242'
2017-02-13 19:30:13 +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
45ef7f7926
Merge branch 'pr-239'
2017-02-12 11:04:01 +01:00
Juan Martín Sotuyo Dodero
04a4145b1c
[doc] Improve docs on InvalidSlf4jMessageFormatRule
2017-02-12 11:03:36 +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
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
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
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
8efca91c29
Merge branch 'pr-226'
2017-02-11 15:15:14 +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
38861a6a0c
Merge branch 'pr-225'
2017-02-11 10:20:26 +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
Andreas Dangel
1b7a2b82cd
Merge branch 'pr-224'
2017-02-10 23:59:08 +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
Juan Martín Sotuyo Dodero
4d7938d821
[java] Allow CPD suppression through comments
2017-02-08 17:07:20 -03: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
Juan Martín Sotuyo Dodero
03306df325
[doc] [java] Improve docs on NonThreadSafeSingleton
2017-02-06 20:11:30 +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
Juan Martín Sotuyo Dodero
1950aeb001
[java] Fix ClassCastException in UnnecessaryLocalBeforeReturn
...
- This fixes #219
2017-02-06 19:52:41 +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
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
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
Dmitry Kurelchuk
e01951a63d
Use OS independant path separator in checkstyle suppressions
2017-01-29 13:23:22 +02: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