4314 Commits

Author SHA1 Message Date
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
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
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
9be65ef2eb Add unit test for #1537 Implement strict ruleset parsing 2016-11-01 18:30:39 +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
Juan Martín Sotuyo Dodero
42277d7b8d Simplify collection expressions 2016-10-13 17:17:17 -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
Andreas Dangel
2fc01fedb5 Add readme 2016-09-06 21:10:56 +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
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
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
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
553cafff6e Fixes #1499 [core] CPD test break PMD 5.5.1 build on Windows 2016-07-02 16:48:46 +02:00
Andreas Dangel
8ab06f3f9e core - CSVRenderer: add unit test for escaping filenames (#100) 2016-06-25 09:07:21 +02:00
Michael Sive
3810074e69 escape filenames with commas in csvrenderer 2016-06-15 01:18:58 +00:00
Andreas Dangel
bee5991121 Add unit test for inputfilepath parameter 2016-06-12 19:38:54 +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
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
mrb
efdcbfe109 Clean up Code Climate renderer 2016-06-07 10:19:28 -04: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
4e92c2bc2b Merge branch 'master' of https://github.com/Up2Go/pmd into pr-94 2016-05-29 18:51:05 +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
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
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
Andreas Dangel
1eebfc26fa Update changelog 2016-05-21 12:13:09 +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
9f40a707e0 Closes #1486 Add rule for no-else-return - New Javascript rule 2016-05-20 19:42:32 +02:00