Commit Graph

95 Commits

Author SHA1 Message Date
Andreas Dangel
e225821272 Merge branch 'master' into pr-1965 2019-09-07 16:21:11 +02:00
Andreas Dangel
20c7d7f421 [test] fix language version tests to check registered rulesets
Now categories.properties are tested. rulesets.properties
is only tested, if it exists.
2019-09-07 15:50:17 +02:00
Andreas Dangel
bdd0f2c525 [core] Use real file name in ruleContext during analysis
* This is needed to fix #1923
* RuleContext, RuleViolations all use the real name
* The shortname is only applied by the renderers now
  at the end of the processing
* Error logging and reporting also uses the real, full name
  of the file being analysed
2019-08-16 11:22:48 +02:00
Andreas Dangel
e735ee0f84 Dogfood - IdenticalCatchBranches, AvoidFileStream 2018-11-25 16:00:47 +01:00
Andreas Dangel
77d392c30d Followup on #1399 2018-10-28 09:25:21 +01:00
Clément Fournier
b62b216b29 Merge branch 'pr-1399' 2018-10-27 22:55:10 +02:00
Clément Fournier
39f87ca5f3 Update schema location in rulesets 2018-10-27 21:02:16 +02:00
Will Herrmann
377baf7caf Replacing IOUtils.closeQuietly(foo) with try-with-resources statements 2018-10-19 14:23:51 -05:00
Andreas Dangel
a28657d8dd [test] Add a PMD specific PmdRuleTst base class for PMD's own tests.
Restore SimpleAggregatorTst to be general again.
2018-10-05 19:47:40 +02:00
Andreas Dangel
aaabd20173 [test] Provide a default implementation for test setUp 2018-09-09 12:38:25 +02:00
Juan Martín Sotuyo Dodero
5ca1f7438c Merge branch 'pr-1269' 2018-08-04 15:14:06 -03:00
Andreas Dangel
d859f6e0e3 Test Framework: Only show "Unit Tests" node, if there are unit tests 2018-08-04 18:54:00 +02:00
Andreas Dangel
dd99a35aaa [core] Test Framework: Sort violations by line/column
Fixes #1191
2018-07-30 20:49:15 +02:00
Andreas Dangel
5a7bbe19a2 dogfood: fix missing override
Note: the rule is disabled for pmd-xml, refs #1074
2018-06-16 17:48:36 +02:00
Andreas Dangel
787d62420c Fix unit test, handle Pattern special 2018-05-17 21:00:05 +02:00
Juan Martín Sotuyo Dodero
451815bf0a Merge branch 'pr-954' 2018-03-11 02:23:26 -03:00
Juan Martín Sotuyo Dodero
5ead2eda16 Use TemporaryFolder instead 2018-03-11 02:16:01 -03:00
Andreas Dangel
8bd1e3b486 Fix PMD dogfood: UncommentedEmptyMethodBody, SimplifyBooleanReturns,
UnnecessaryLocalBeforeReturn, OptimizableToArrayCall,
ClassWithOnlyPrivateConstructorsShouldBeFinal,
UseLocaleWithCaseConversions, NonStaticInitializer, UseCollectionIsEmpty
2018-03-10 12:04:50 +01:00
Andreas Dangel
cf88117820 Fix PMD dogfood: UnusedFormalParameter, UselessParentheses and UselessOverridingMethod 2018-03-09 12:52:20 +01:00
Andreas Dangel
f3a358c419 Fix PMD dogfood: EmptyCatchBlock 2018-03-09 09:58:04 +01:00
Andreas Dangel
7aaa9966c2 Fix PMD dogfood: AvoidCatchingThrowable
Refs #361
2018-03-09 09:57:15 +01:00
Clément Fournier
3d5a0aa4c6 Cleanup 2018-03-05 22:14:57 +01:00
Clément Fournier
f8864e9060 Make real Ant test cases 2018-03-05 21:58:05 +01:00
Clément Fournier
e2c6f1e467 Add '-no-cache' CLI switch, to disable incremental analysis
- The switch discards the argument provided to '-cache' if any
- Using the switch disables the suggestion to use incremental analysis
- Rule tests use that option to avoid the warning, which clutters build logs
- Refs #946
2018-03-05 13:47:48 +01:00
Clément Fournier
6a3b332aee Abstract toString into AbstractNode, deprecate the implementation
Log that the default implementation will be removed
2018-01-25 03:02:44 +01:00
Clément Fournier
3c0bb45a60 Add getXPathNodeName to the Node interface
A default implementation is available in AbstractNode
to preserve compatibility with the previous way, which
used Object.toString.

Fixes #569
2018-01-24 19:22:36 +01:00
Clément Fournier
2ca4b347c3 Make TCC consider local classes.
If a local class is declared inside a method of the outer class,
then attribute accesses made by the local class count as if they
are made by the enclosing method.
2018-01-16 23:42:29 +01:00
Andreas Dangel
4214a75fc4 [core] Add bean-like getter/setter for Rule 2017-11-24 20:13:20 +01:00
Juan Martín Sotuyo Dodero
20093c809a Rework ruleset loading
- ResourceLoader is now instantiable, and we can tell which classloader
to use to get resources
 - We will always use the execution classloader, or just add the paths
added by ant, but *never* the auxclasspath
 - The classpath added by Ant won't get into the auxclasspath either
2017-10-24 18:07:09 -03: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
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
Andreas Dangel
ef3d3a87c6 Fix schema and exception reporting
* relax order of test-code and code-fragment
* allow sourceType with language version
* define complexTypes
* relax requirements
2017-09-11 21:55:25 +02:00
Andreas Dangel
72b5ca8b4f Fix schema and parser after rename 2017-09-11 21:55:25 +02:00
Andreas Dangel
21388c3638 [doc] Mention schema in documentation 2017-09-11 21:55:25 +02:00
Andreas Dangel
116f218907 Add schema validation to rule tests 2017-09-11 21:55:18 +02:00
Andreas Dangel
4f371618d9 Add initial xml schema for rule tests 2017-09-09 11:11:35 +02:00
Andreas Dangel
b5eb2ef467 Fix checkstyle 2017-09-08 16:35:48 +02:00
Andreas Dangel
9498473c20 PMDTestRunner should not fail, if there are no unit tests 2017-09-08 16:35:48 +02:00
Andreas Dangel
276028d04e Simplify PMDTestRunner 2017-09-08 16:35:48 +02:00
Andreas Dangel
154616e9f5 Create a new JUnit test runner to execute rule tests
This runner now also supports Before, After, and (JUnit) Rules.
2017-09-08 16:35:48 +02:00
Clément Fournier
584041e1e7 Removed the metrics visitor 2017-08-27 23:32:17 +02:00
Andreas Dangel
b1b2683e92 [core] Use new schema version 3.0.0 2017-08-22 20:59:42 -03:00
Andreas Dangel
b49eb24579 Merge branch 'issue-463' of https://github.com/Monits/pmd into pr-515 2017-08-20 19:30:15 +02:00
Andreas Dangel
cfa4e15d54 [doc] [apex] Adjust externalInfoUrl properties to new site - Part 5
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel
6e02494e5e [doc] [java] Adjust externalInfoUrl properties to new site - Part 1
Note: I also took the chance to fix tab damage
2017-08-15 14:31:03 +02:00
Andreas Dangel
3d9511a0e5 [doc] Remove old maven site 2017-08-15 14:31:03 +02:00
Matias Comercio
e5ddad3c3b Remove pushed .gitignored files
These files were already at the repository
but they should have been ignored
2017-07-27 18:31:20 -03:00