1454 Commits

Author SHA1 Message Date
Clément Fournier
38f15056bb Add a line of doc 2020-04-23 19:41:35 +02:00
Clément Fournier
8fd181b29f Deprecate a few more Node methods 2020-04-23 19:41:35 +02:00
Andreas Dangel
71884c5157 Merge branch 'pr-2414'
[core] Fix HTMLRenderer not using linkPrefix/linePrefix #2414
2020-04-23 11:13:35 +02:00
Andreas Dangel
ca75d9492d [core] Add test case with empty line prefix for HtmlRenderer 2020-04-23 11:13:18 +02:00
Andreas Dangel
51f22c1486 Merge branch 'pr-2404'
[core] Add JsonRenderer #2404
2020-04-23 11:10:15 +02:00
Andreas Dangel
a0f127905b [core] CodeClimate renderer links are dead
Fixes #2426
2020-04-23 10:44:55 +02:00
Clément Fournier
f22fa24cb9 Merge branch 'master' into json-report-format 2020-04-20 10:35:30 +02:00
Clément Fournier
c7fce361a5 Test when linePrefix is not set 2020-04-20 10:30:45 +02:00
Clément Fournier
9115d79a00 Merge branch 'master' into issue-2412 2020-04-20 10:10:47 +02:00
Clément Fournier
491e513775 Merge branch 'doc-renderer' 2020-04-20 09:46:57 +02:00
Clément Fournier
57ae752756 Add separate format version 2020-04-20 09:26:55 +02:00
Clément Fournier
d3c4d4b1fd Merge branch 'master' into json-report-format 2020-04-20 09:09:51 +02:00
Andreas Dangel
b1496df145 Merge branch 'xpath-warnings' of github.com:oowekyala/pmd into pr-2425 2020-04-18 18:30:59 +02:00
Andreas Dangel
bcae7e5243 Small corrections 2020-04-18 18:20:27 +02:00
Andreas Dangel
4a9aa1a926 [core] Log deprecated attribute usage in findChildNodesWithXPath queries 2020-04-18 17:43:18 +02:00
Clément Fournier
400ca5dca5 Delete test for findChildNodesWithXPath 2020-04-18 17:42:56 +02:00
Clément Fournier
e9cc7e00ef Merge branch 'master' into xpath-warnings 2020-04-18 17:36:44 +02:00
Andreas Dangel
c62041e827 Merge branch 'pr-2377'
[all] Update all XPath rules to XPath 2.0 #2377
2020-04-18 11:49:44 +02:00
Clément Fournier
4db656a679 Cleanup 2020-04-18 01:58:02 +02:00
Harsh Kukreja
9c98508fec Operator Wrap Issue Solved 2020-04-18 05:21:35 +05:30
Clément Fournier
be19da5a07 Test in pmd-core 2020-04-17 20:53:19 +02:00
Clément Fournier
f3db39641a Test with ASTVariableDeclaratorId#getName 2020-04-17 20:28:00 +02:00
Clément Fournier
be152e92a8 Output replacement as well 2020-04-17 20:18:32 +02:00
Clément Fournier
9dca569cc4 Make deprecation warnings for xpath rules mention the name of the rule
Fix #2019
2020-04-17 20:04:27 +02:00
Clément Fournier
48294ae668 Cleanup 2020-04-17 20:03:39 +02:00
Clément Fournier
798cce1666 Dont use global tree cache 2020-04-17 19:59:42 +02:00
Clément Fournier
7a37be55db Revert "don't use global namepool to avoid resource contention"
Actually benchmarking with different levels of
parallelism shows that there is no contention,
and that sharing the namepool is beneficial even
with many threads. When the number of threads is
very high, using independent namepools increases
the amount of work to allocate names.

This reverts commit 2253f38ccb999430b70b4b14c47cd6eb2b1758f7.
2020-04-17 18:03:57 +02:00
Clément Fournier
2253f38ccb don't use global namepool to avoid resource contention 2020-04-17 17:10:16 +02:00
Clément Fournier
9629cacddd Checstyle 2020-04-17 16:30:37 +02:00
Clément Fournier
dde5b29da8 Optimise attribute fetch
Use a map to fetch the
attribute, also don't recreate
attribute nodes so much, so that
the cache behind Method::invoke
in Attribute amounts to something.
2020-04-17 04:57:45 +02:00
Clément Fournier
12e843cb47 Pool names, optimize getNodeKind
NameTest::matches is a very hot spot
in saxon. Profiling shows that most
of its runtime is spent doing virtual
method dispatch on NodeInfo#getNodeKind

We optimise this by making a base class
with the node kind as a field.

Also, we now pool xpath names using saxon's
name pool, which reduces name tests to
integer comparison instead of string.equals

Saxon now spends 80x less time in the name test
overall shaving off 30% of execution time of
XPath rules.
2020-04-17 04:57:08 +02:00
Andreas Dangel
08d31c62a9 Merge branch 'master' into pr-2377 2020-04-16 17:52:03 +02:00
Andreas Dangel
ac21dc95b1 Merge branch 'pr-2407'
[core] Deprecate Jaxen and XPath internal API #2407
2020-04-13 12:17:58 +02:00
Andreas Dangel
5c31d40ec2 [core] XPathRule: use == for enum comparison 2020-04-13 12:16:55 +02:00
Andreas Dangel
ad1e196173 [core] CodeClimateRenderer: correct links to spec 2020-04-11 20:18:12 +02:00
Andreas Dangel
44e43d6186 [core] Fix HTMLRenderer not using linkPrefix/linePrefix
* add new option "htmlExtension", so that the mechanism can
be used with github as well
* render links for suppressed violations and errors

Fixes #2412
2020-04-11 20:15:04 +02:00
Andreas Dangel
85924b5ad1 Merge branch 'pr-2388'
[lang-test] Use tree dumps for regression tests #2388
2020-04-11 15:09:42 +02:00
Andreas Dangel
0710877d05 [core] Deprecate AntlrToken#getType() in favor of #getKind()
Refs #2371
2020-04-10 18:50:58 +02:00
Clément Fournier
60d443963c Call default ctor
Defines properties
2020-04-09 15:28:20 +02:00
Clément Fournier
60087590e6 Remove changes to XPathHandler 2020-04-08 22:07:26 +02:00
Clément Fournier
1de1d1c66d Update some usages early 2020-04-08 22:00:36 +02:00
Clément Fournier
5067c79eb2 Cleanup a test 2020-04-08 21:38:10 +02:00
Clément Fournier
8284fc8e81 Deprecate two other things 2020-04-08 21:35:34 +02:00
Clément Fournier
bcf90ceb8a Externalize creator for XPath rule 2020-04-08 21:35:34 +02:00
Clément Fournier
fc304bf70c Add XPath version maker 2020-04-08 21:35:34 +02:00
Andreas Dangel
fc88b79b92 Fix build under windows 2020-04-07 19:42:23 +02:00
Andreas Dangel
d23d44c308 [core] Add JsonRenderer
Fixes #1286
2020-04-05 20:13:53 +02:00
Andreas Dangel
69ed0464a7 Merge branch 'pr-2385'
[java] Make yield statements more conditional #2385

Fixes #2319
2020-04-04 18:20:49 +02:00
Andreas Dangel
5ed8570703 Add new rule: apex/bestpractices.xml/UnusedLocalVariable 2020-04-04 18:09:44 +02:00
Andreas Dangel
2f33951f60 Add new rules ruleset for release 6.23.0 2020-04-04 17:49:09 +02:00