884 Commits

Author SHA1 Message Date
Andreas Dangel
1ee12a4792 Merge branch 'pr-1080'
Fixes #1018
2018-05-21 11:39:21 +02:00
Juan Martín Sotuyo Dodero
998dd2d3ee Merge branch 'pr-1111' 2018-05-20 02:48:22 -03:00
Juan Martín Sotuyo Dodero
a4e4acb4d9 Simplify code 2018-05-20 02:43:18 -03:00
Clément Fournier
bb1dd661db Merge branch 'pr-1075' 2018-05-19 23:43:44 +02:00
Clément Fournier
4f6150548e Fix bug with getImage overriding 2018-05-18 21:42:18 +02:00
Clément Fournier
fb4bf5f4c7 Fix a couple of typos & checkstyle warnings 2018-05-18 21:08:03 +02:00
Clément Fournier
c10d920248 Fix implementation of isFindBoundary, add some doc 2018-05-18 21:00:35 +02:00
Clément Fournier
d1ce28d0c9 Fix wrong implementation of hasImageEqualTo 2018-05-18 20:54:43 +02:00
Andreas Dangel
69fc648edd [java] JUnit4TestShouldUseTestAnnotation
*   use xpath 2.0
*   add new regex parameter
*   use typeof
2018-05-17 20:35:58 +02:00
Juan Martín Sotuyo Dodero
1e73b8c0c5 Further cleanups 2018-05-11 01:14:26 -03:00
Juan Martín Sotuyo Dodero
85d3089413 Fix copy paste 2018-05-10 20:53:22 -03:00
Juan Martín Sotuyo Dodero
cf914f424d [core] Hack to get Ant's log level
- Very ugly, uses reflection and is limited to the few
implementatations that come with Ant itself or and testutils
 - Intended as a starting point for fixing #1018
2018-05-10 20:53:22 -03:00
Juan Martín Sotuyo Dodero
254c08ea75 Rework into an autoclosable
- Allow callers to simply use a try-with-resources around the measured
code
2018-05-10 20:23:52 -03:00
Juan Martín Sotuyo Dodero
c51fac8dad Better handle mono-thread case 2018-05-09 19:29:54 -03:00
Juan Martín Sotuyo Dodero
0e1b565d03 Minor cleanups 2018-05-09 19:18:43 -03:00
Juan Martín Sotuyo Dodero
2f4d852017 Use the right import 2018-05-03 21:45:52 -03:00
Juan Martín Sotuyo Dodero
0bb75c2ce0 Changes requested by reviewer 2018-05-03 21:41:05 -03:00
Juan Martín Sotuyo Dodero
8af01d6565 [core] Rework benchmarking code
The old implementation had many limitations:
 - Relayed ALL measuring logic to the client
 - Used `synchronized` methods
 - Was unable to measure nested operations without mixing values
 - Mixed wall-clock and CPU time, which caused trouble when running
multithreaded analysis (negative values for non-meassured time)
 - A separate `main` existed which was undocumented and unsupported.

So I reworked it and added some goodies along the way:
 - When not running in benchmark mode, all operations are NOOPs
 - Nested operations are the default. Total and self time are
differentiated. This allows and encourages to better track overhead (ie:
time spent in a loop over another timed operation)
 - We can meassure call count along with custom counters, which add
meaning to metrics
 - Wall clock time for total execution is separated from all other CPU
times
 - All meassurements are done by the `TimeTracker` itself
 - No `synchronized` use, all structs are thread-safe and lock as little
and sporadically as possible
 - Categories can be split up by labels
 - The tracker is generic, has little knowledge of what is being
tracked. Same applies to report rendering. This is extremely flexible to
add more and custom tracks in the future
2018-05-02 12:31:53 -03:00
Andreas Dangel
d85db07196 [core] Report exceptions thrown during rule execution 2018-05-01 16:48:24 +02:00
Andreas Dangel
85874e7e9c [maven-release-plugin] prepare for next development iteration 2018-04-29 09:54:45 +02:00
Andreas Dangel
10c66fbf38 [maven-release-plugin] prepare release pmd_releases/6.3.0 2018-04-29 09:54:36 +02:00
Clément Fournier
751ee8e167 Merge branch 'master' into improve-method-naming-conventions-rule 2018-04-27 00:07:52 +02:00
gibarsin
0942ae36f8 Make MultiThreadProcessor more space efficient 2018-04-24 15:51:10 -03:00
Andreas Dangel
c7e493f283 [java] Enable security ruleset for all-java.xml 2018-04-23 21:21:22 +02:00
Andreas Dangel
ba6f3fb5cb Merge branch 'pr-1042' 2018-04-23 21:02:48 +02:00
Andreas Dangel
1f662e81f7 Update release notes, refs #1042 - new rule 2018-04-23 21:01:11 +02:00
Andreas Dangel
092ec8264a Merge branch 'pr-1045', fixes #1036 2018-04-23 20:29:40 +02:00
Andreas Dangel
391193c044 PMD dogfooding - avoid unnecessary local before return 2018-04-23 20:29:13 +02:00
Andreas Dangel
bf8855c1e5 Merge branch 'pr-1039' 2018-04-23 18:59:05 +02:00
Juan Martín Sotuyo Dodero
a91bc4bfb6 [core] Log only once all messages
- CLI runs log only to stderr, never to stdout
 - Both Ant and CLI runs log only once, the root logger never gets a
hold of the logs, completely isolating PMD
2018-04-23 01:02:35 -03:00
Andreas Bergander
7c7a66d750 Make BasicProjectMemoizer thread safe. Fixes issue #1020. 2018-04-17 17:51:32 +02:00
Clément Fournier
47923d6eb4 Add regex properties to MethodNamingConventions
Brush up some AST classes
2018-04-16 16:00:12 +02:00
Juan Martín Sotuyo Dodero
29aed16cb9 PMD dogfooding 2018-04-15 12:53:06 -03:00
Juan Martín Sotuyo Dodero
dd1a2910c1 Fixing broken build 2018-04-15 12:46:08 -03:00
Juan Martín Sotuyo Dodero
052c46f5b6 Merge branch 'pr-1006' 2018-04-15 02:06:41 -03:00
Juan Martín Sotuyo Dodero
9d4354333d Use atomic operations on concurrentmap
- Take the chance to actually use the lazy loading
2018-04-15 02:05:45 -03:00
Juan Martín Sotuyo Dodero
e838179bb2 Fix PMD dogfooding 2018-04-15 01:44:02 -03:00
Clément Fournier
83ce600782 Use JunitLoggingRule to intercept log 2018-04-14 04:00:38 +02:00
Clément Fournier
5a65701d0c Add hamcrest matchers to pom for pmd-core 2018-04-14 03:51:35 +02:00
Clément Fournier
0138b1a69b Use ConcurrentMap instead of Set 2018-04-14 03:34:36 +02:00
Juan Martín Sotuyo Dodero
d6bea21ed6 [core] Refactor CPD token filtering
- Define a generic `TokenFilter` interface in pmd-core
 - Provide a base, extension-friendly `JavaCCTokenFilter` to process and
filter JavaCC token streams, honoring `CPD-OFF` and `CPD-ON` comments
 - Refactor the `JavaTokenizer` to use `JavaCCTokenFilter` by extending
it and adding custom Java-specific token filters
2018-04-11 01:49:40 -03:00
Clément Fournier
8ae3916505 Merge branch 'master' into update-classnamingconventions 2018-04-07 17:42:19 +02:00
Clément Fournier
a3c93766df Move toCamelCase to StringUtil 2018-04-07 17:38:59 +02:00
Juan Martín Sotuyo Dodero
8c6688b854 [core] Ignore missing files form auxclasspath
- Resolves #988
2018-04-03 02:33:44 -03:00
Clément Fournier
3ca6e40197 Merge branch 'master' into update-classnamingconventions 2018-03-29 18:48:31 +02:00
Juan Martín Sotuyo Dodero
1e3b1bf0b5 Merge branch 'master' into tree-transversal-boundaries 2018-03-29 01:54:56 -03:00
Clément Fournier
82799bdfe2 Fix property names and utility class detection 2018-03-27 15:05:06 +02:00
Clément Fournier
958a26db38 CStyle 2018-03-26 20:53:29 +02:00
Clément Fournier
7754224f9d Fix deprecated XPath attribute not found
Deprecated attributes are not eliminated from the attribute iterator
anymore, which made deprecating attributes API breaking.

Instead, deprecated attribute usage are now detected and logged as
warnings
2018-03-26 20:29:14 +02:00
Andreas Dangel
f3ab54d6da [maven-release-plugin] prepare for next development iteration 2018-03-26 09:23:23 +02:00