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
e588f772c0
Merge branch 'pr-242'
2017-02-13 19:30:13 +01:00
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
45ef7f7926
Merge branch 'pr-239'
2017-02-12 11:04:01 +01:00
04a4145b1c
[doc] Improve docs on InvalidSlf4jMessageFormatRule
2017-02-12 11:03:36 +01:00
c5cf7e78e3
Merge branch 'issue-232'
2017-02-12 09:49:34 +01:00
294dd3e6af
Merge branch 'issue-232' into pmd/5.5.x
2017-02-12 09:42:26 +01:00
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
94c552d225
Merge branch 'pr-230'
2017-02-11 15:35:50 +01:00
067c2e9a22
Merge branch 'pr-230' into pmd/5.5.x
2017-02-11 15:29:46 +01:00
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
8efca91c29
Merge branch 'pr-226'
2017-02-11 15:15:14 +01:00
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
38861a6a0c
Merge branch 'pr-225'
2017-02-11 10:20:26 +01:00
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
1b7a2b82cd
Merge branch 'pr-224'
2017-02-10 23:59:08 +01:00
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
4d7938d821
[java] Allow CPD suppression through comments
2017-02-08 17:07:20 -03:00
970624dab1
Merge branch 'issue-216'
2017-02-06 20:16:09 +01:00
cc6cc2c6bc
Merge branch 'issue-216' into pmd/5.5.x
2017-02-06 20:13:43 +01:00
03306df325
[doc] [java] Improve docs on NonThreadSafeSingleton
2017-02-06 20:11:30 +01:00
42a07c808a
Merge branch 'issue-219'
2017-02-06 20:09:09 +01:00
53b4884dc0
Merge branch 'issue-219' into pmd/5.5.x
2017-02-06 20:02:10 +01:00
1950aeb001
[java] Fix ClassCastException in UnnecessaryLocalBeforeReturn
...
- This fixes #219
2017-02-06 19:52:41 +01:00
c4298c6b3c
Merge branch 'issue-215'
2017-02-05 18:00:14 +01:00
8ba4335080
Merge branch 'issue-215' into pmd/5.5.x
2017-02-05 17:51:08 +01:00
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
09b2644688
Merge branch 'master' of https://github.com/kdaemonv/pmd into pr-217
2017-02-02 20:53:49 +01:00
d92688a07d
Introduce end-of-line normalization
...
References pmd/build-tools#2
2017-02-02 20:52:08 +01:00
e01951a63d
Use OS independant path separator in checkstyle suppressions
2017-01-29 13:23:22 +02:00
4dc0699788
[maven-release-plugin] prepare for next development iteration
2017-01-28 14:43:17 +01:00
847ea1c084
[maven-release-plugin] prepare release pmd_releases/5.5.3
2017-01-28 14:43:17 +01:00
e9149551b7
[maven-release-plugin] prepare for next development iteration
2017-01-28 13:15:11 +01:00
12758ef777
[maven-release-plugin] prepare release pmd_releases/5.4.4
2017-01-28 13:15:10 +01:00
c8b62ed651
Merge branch 'issue-1495'
2017-01-28 12:04:14 +01:00
c402c0b970
Merge branch 'issue-1495' into pmd/5.5.x
2017-01-28 11:50:43 +01:00
6899c63597
Fixes #1495 [java] UnnecessaryLocalBeforeReturn with assert
2017-01-28 11:45:59 +01:00
a5e85b8069
Merge branch 'issue-1448'
2017-01-28 10:55:14 +01:00
ebf088693a
Merge branch 'issue-1448' into pmd/5.5.x
2017-01-28 10:48:21 +01:00
7fbb304c8f
java: ImmutableFieldRule - use enum
2017-01-28 10:43:17 +01:00
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
0ef09b2c0a
Merge branch 'issue-208'
...
Closes #211 (rebased onto pmd/5.4.x)
2017-01-27 20:11:49 +01:00
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
c53e1790e1
[java] Allow more than 1 annotation in local classes
...
- This fixes #208
2017-01-27 20:00:08 +01:00
bbc9abd4e2
Merge branch 'issue-206'
...
Closes #210 (rebased onto pmd/5.4.x)
2017-01-27 19:50:50 +01:00
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
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
5c1a0a7abe
Merge branch 'issue-207'
...
Closes #209 (rebased onto pmd/5.4.x)
2017-01-27 19:26:56 +01:00
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
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