664 Commits

Author SHA1 Message Date
Andreas Dangel
2ef082ae19 [java] Move rule LooseCoupling from typeresolution to coupling
Replace existing rule with the typeresolution-based implementation.
2017-10-13 12:36:36 +02:00
Juan Martín Sotuyo Dodero
a81d142317 [core] Avoid a phony warning about not using cache
- Avoid creating a NoopAnalysisCache by default to prevent a phony
warning about not using the cache being printed.
 - This way, we only produce a new instance lazily if not configured,
preserving the same behaviour bu without the warning.
2017-10-10 00:46:07 -03:00
Juan Martín Sotuyo Dodero
6000bcb2e2 Merge branch 'pr-660' 2017-10-09 15:51:11 -03:00
Juan Martín Sotuyo Dodero
4dcef95e43 Add new apex-performance/AvoidSoslInLoops rule to 600 ruleset 2017-10-09 15:44:20 -03:00
Juan Martín Sotuyo Dodero
60c87ff783 Merge branch 'pr-625' 2017-10-08 20:20:10 -03:00
Juan Martín Sotuyo Dodero
3c067d8071 Add references to 6.0.0 release ruleset 2017-10-08 19:55:32 -03:00
Juan Martín Sotuyo Dodero
33804aa08f Merge branch 'pr-632' 2017-10-08 19:45:38 -03:00
Juan Martín Sotuyo Dodero
9b28bdbe86 Add AvoidDirectAccessTriggerMap to 6.0.0 release rs 2017-10-08 19:37:16 -03:00
Andreas Dangel
61376f8112 [core] add temporary support for maven debug output
refs #650
2017-10-07 21:28:56 +02:00
Andreas Dangel
c0302cd314 [java] check for parsing/processing errors in unit test 2017-10-05 22:40:37 +02:00
Juan Martín Sotuyo Dodero
f7c0437470 Merge branch 'pr-644' 2017-09-30 18:40:48 -03:00
Juan Martín Sotuyo Dodero
5d51df880a Add JUnit test to validate output 2017-09-30 18:37:04 -03:00
Andreas Dangel
d7c1dac59a Merge branch 'pr-619' 2017-09-30 11:31:27 +02:00
Andreas Dangel
72db0dfc07 Merge branch 'pr-616' 2017-09-30 10:39:04 +02:00
Andreas Dangel
e60d1c2a24 Merge branch 'pr-615' 2017-09-29 19:42:11 +02:00
Andreas Dangel
66b67a8a95 Merge branch 'pr-614' 2017-09-29 14:16:29 +02:00
Andreas Dangel
f59ec03db1 Merge branch 'pr-612' 2017-09-29 11:42:08 +02:00
Andreas Dangel
3f2610ea21 Merge branch 'pr-602' 2017-09-29 11:21:26 +02:00
Andreas Dangel
f7d67df442 Remove ruleset schema 3.0.0 2017-09-29 11:20:37 +02:00
Andreas Dangel
5bfff7615f Add missing entity resolver in unit test 2017-09-27 21:20:45 +02:00
Filipe Esperandio
a4c1150891 Fix wrong internal property name 2017-09-22 17:18:48 -03:00
Filipe Esperandio
4d01d2c6d5 Remove import 2017-09-22 17:13:01 -03:00
Filipe Esperandio
c6aaf3fbc4 Prevent internal dev-properties from being displayed on CodeClimate's documentation markdown 2017-09-22 17:10:10 -03:00
Clément Fournier
d12e70aab5 Truly disable multifile 2017-09-22 01:04:48 +02:00
Andreas Dangel
9e55969eb1 Merge branch 'pr-601' 2017-09-16 16:18:17 +02:00
Andreas Dangel
4272674488 Merge branch 'pr-593' 2017-09-15 11:07:56 +02:00
Andreas Dangel
7ec56e37b0 Merge branch 'pr-592' 2017-09-15 10:59:14 +02:00
Juan Martín Sotuyo Dodero
02fc43737a Remove commented default access modifier 2017-09-14 11:47:52 -03:00
Clément Fournier
0349ad74c1 Forgot stuff in n.s.pmd 2017-09-14 15:28:40 +02:00
Clément Fournier
f02026995d Merge upstream 2017-09-14 14:37:00 +02:00
Clément Fournier
6a162c238c Moved properties to n.s.pmd.properties 2017-09-14 00:05:55 +02:00
Juan Martín Sotuyo Dodero
14cb503713 [core] Revamp charset / stream management
- File encoding is converted to Charset only once. Errors in it's setup
wil fail the run immeditable instead of producing one error per file.
 - We make sure to close the source stream from the same place we create
it, by using try-with-resources
 - When wrapping the stream to a reader, we use try-with-resources
again, just in case
 - The bechmark code now takes into account charset setup, and more
closely resembles the normal execution path
 - This fixes #618
2017-09-13 18:22:38 -03:00
Juan Martín Sotuyo Dodero
09d49c6e68 Merge branch 'pr-587' 2017-09-12 18:01:10 -03:00
Juan Martín Sotuyo Dodero
be27dea8de Checkstyle fixes 2017-09-12 17:23:12 -03:00
Juan Martín Sotuyo Dodero
e734c9cce9 Add failing test scenario for repeated config error 2017-09-12 17:11:38 -03:00
Juan Martín Sotuyo Dodero
62fd6b3be4 [core] dysfunctional rules are removed only once
Under multi-thread runs, each thread parsed it's own copy of the
ruleset, and removed dysfunctional rules. This meant 1 `ConfigError` per
thread was being generated.
  Since #519, we now log `ConfigErrors`, meaning multiple identical
logs in reports and noise for the user.
  Therefore, we change our approach. RuleSets are parsed only once.
Dysfunctional rules are filtered and reported early on, before
dispathing actual file analysis. Each analysis thread can then produce
their own copy of the ruleset by taking advantage of the `deepCopy`
support for rules, ruleset and rulesets introduced in #464.
  The result is not only more concise reports, but the analysis thread
actually perform less work. Rulesets XMLs are parsed exactly once,
instead of 1 + 1 per thread as before, and rule configuration is
validated only once.

  During this process an issue with how property descriptors where
copied has arised and was fixed. A new unit test to validate this
scenario has been introduced.
2017-09-12 17:11:25 -03:00
Clément Fournier
732af08f16 Corrections for PR #587 2017-09-10 21:30:45 +02:00
Juan Martín Sotuyo Dodero
ad1013c2ba Fix typo 2017-09-10 05:36:58 -03:00
Juan Martín Sotuyo Dodero
49d314fc5b [core] Incremental Analysis can detect changes to jars
- We now look inside the jars of the classpath in search for any
changes. If we find any, we invalidate the cache.
 - Resolves #604
2017-09-10 05:35:09 -03:00
Juan Martín Sotuyo Dodero
9418ab1822 [core] Improve incremental analysis logging
- Resolves #608
 - Log succesful cache loading
 - Log hits / misses on debug, reason for miss too
 - Invite users to enable incremental analysis
 - Provide a new section on the web for the feature. May be promoted to
a top level page at some point.
2017-09-09 21:57:28 -03:00
Juan Martín Sotuyo Dodero
116c428708 [core] Restrict root element of ruleset xml
- Unfortunately DTD doesn't allow to do this... we should probably
cease to support DTD altogether...
2017-09-09 19:45:12 -03:00
Juan Martín Sotuyo Dodero
2bb4d3fbfe Restrict root element to pmd 2017-09-09 19:27:23 -03:00
Andreas Dangel
a50d5a82cc Add new rule to internal ruleset 600.xml 2017-09-09 09:56:27 +02:00
Juan Martín Sotuyo Dodero
96d2983f4f [core] Fix NPE on cache
- Resolves #600
2017-09-07 12:05:58 -03:00
Clément Fournier
7464705cf7 Merge branch 'master' of https://github.com/pmd/pmd into multifile-split 2017-09-06 23:25:51 +02:00
Andreas Dangel
fa86d073af Merge branch 'pr-585' 2017-09-05 18:03:47 +02:00
Andreas Dangel
a41df604e5 Update release notes, refs #585 2017-09-05 18:03:15 +02:00
Juan Martín Sotuyo Dodero
079fc1cc68 [core] Provide and XML Schema for XML reports
- Fixes #538
2017-09-04 02:01:50 -03:00
Juan Martín Sotuyo Dodero
e295711343 Harden XML parsing
- Fixes #532
2017-09-03 21:12:15 -03:00
Juan Martín Sotuyo Dodero
cdc5cde3a0 Merge branch 'pr-533' 2017-09-03 19:56:14 -03:00