1690 Commits

Author SHA1 Message Date
Andreas Dangel
cad02c775a Merge branch 'master' into reproducible-jjtree 2021-01-15 18:26:21 +01:00
Andreas Dangel
c7cd242ab2 [core] Renderers - adjust tests for different rule priorities (#2994) 2021-01-07 20:14:29 +01:00
Vincent Maurin
c5fa4cbfa0 Fix severity strings
Code Climate issue severity are specified here
https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#issues
as `info`, `minor`, `major`, `critical`, or `blocker`. It was mapped to
a value `normal` that is not recognized by tools compatible with Code
Climate's format. I have mapped the five PMD priority values on the five Code Climate severity levels
2021-01-04 15:51:27 +01:00
Andreas Dangel
c37f208d3e Call jjtree/javacc with UTF-8 as default encoding
Fixes #2970
2020-12-17 18:31:13 +01:00
Andreas Dangel
d284ea9634 [maven-release-plugin] prepare for next development iteration 2020-12-12 09:42:10 +01:00
Andreas Dangel
d2e4fb4ca3 [maven-release-plugin] prepare release pmd_releases/6.30.0 2020-12-12 09:42:02 +01:00
Andreas Dangel
1a4ca95f6c Merge pull request #2635 from oowekyala:ruleset-factory-builder
[core] New RuleSet API and deprecations for PMD's entry point APIs #2635
2020-12-11 19:03:41 +01:00
Andreas Dangel
afcb45ea89 Remove unneeded suppresswarnings in AbstractPMDProcessor 2020-12-11 18:47:19 +01:00
Andreas Dangel
bcbf588bba Rename RuleSetLoadException 2020-12-11 18:35:41 +01:00
Clément Fournier
f7829531c9 Add some doc 2020-12-10 20:17:51 +01:00
Clément Fournier
e7f7f7184e Merge branch 'master' into pr/2864 2020-12-10 19:56:08 +01:00
Maikel Steneker
aaef0fde4e Add option to ignore sequences of literals
In some cases, code may include sequences of literals that represent lists or tables of constants, such as lookup tables. Large sequences of these (particularly parts with many zeroes) will be identified by CPD as duplicates, but in practice, these are not the types of duplicates that are considered interesting.

This introduces a new option for CPD (--ignore-literal-sequences) that ignores these sequences of literals, in a very similar way to how using directives for C# can already be skipped as well. For now, this functionality is restricted to C#, but it could be added for other languages as well.
2020-11-25 12:35:02 +01:00
Clément Fournier
0244ebf6e3 Fix javadoc 2020-11-25 11:51:54 +01:00
Clément Fournier
141c51b0ab Fix ant tests
Report was being rendered mutliple times
2020-11-24 14:43:27 +01:00
Clément Fournier
1a2a897b3f Fix bug with sub-report not being merged into global report 2020-11-24 13:55:26 +01:00
Clément Fournier
87e2a9c99b Replace checked exception with wrapper 2020-11-24 13:07:43 +01:00
Clément Fournier
37c2c505f3 Merge branch 'master' into ruleset-factory-builder 2020-11-24 12:49:18 +01:00
Clément Fournier
4efe1493a5 Remove some unchecked warnings 2020-11-24 12:12:32 +01:00
Clément Fournier
b94ac4f018 Don't create a vf language module per parser options 2020-11-24 12:09:25 +01:00
Clément Fournier
898c301ce0 Merge branch 'master' into pr/2864 2020-11-24 12:06:07 +01:00
Clément Fournier
58cf6cbc96 Remove AbstractPropertySource equals/hashCode 2020-11-24 11:55:09 +01:00
Clément Fournier
fabf2cf6db Make the parser options properties private 2020-11-24 11:53:45 +01:00
Andreas Dangel
cefd5a6056 Merge pull request #2874 from adangel/pmd:xmlrenderer-utf16
[core] Fix XMLRenderer with UTF-16 #2874
2020-11-23 11:22:34 +01:00
Andreas Dangel
af07f1af92 Merge pull request #2914 from GuntherSchrijvers/pmd:issue-1961-include-rule-name-in-text-renderer
[core] Issue 1961 include rule name in text renderer #2914
2020-11-23 11:18:22 +01:00
Jeff Bartolotta
86b5948f07 Update the way nodes with data are identified
Changed method for how the Visualforce strings are reconstructed from the AST. The previous implementation had incorrect assumptions about the structure of the AST. Added tests to more thoroughly test these situations.

Changed name of IdentifierType to DataType. This information can be stored on either ASTIdentifier or ASTLiteral nodes.

Changes based on PR feedgack:
- Restored ParserOptionsTest in order to avoid binary compatibilty issues.
- Changed ParserOptions to contain a PropertySource instead of extending AbtractPropertySource.
2020-11-20 11:59:23 -08:00
abhishek-kumar09
84e6c0997b Correct Annotation Array Initialiation indents from checkstyle #8083 2020-11-16 00:36:30 +05:30
Clément Fournier
87892adefe Fix unnecessary throws clause 2020-11-13 17:23:43 +01:00
Clément Fournier
93c5ef33cf Merge branch 'master' into ruleset-factory-builder 2020-11-13 17:12:27 +01:00
Jeff Bartolotta
e1c42a10ec Move visitor to VfParser#parse
LanguageVersionHandler#getTypeResolutionFacade is deprecated. Moved the VfExpressionTypeVisitor creation and execution to VfParser#parse instead.

ParsingOptionsTest located in pmd-test wasn't running previously because it was in the src/main hierarchy. Moved this test into the src/test hierarchy and consolidated the methods from the
similarly named class from pmd-core.
2020-11-12 20:13:19 -08:00
jbartolotta-sfdc
0348b2c0d2 Merge branch 'master' into issue1092-vf-escape-false-positives 2020-11-12 10:39:10 -08:00
Jeff Bartolotta
db7bf0a786 Store type information in AST instead of map
Store the IdentifierType on ASTIdentifier node instead of in a separate map.

Use the existing TypeResolution pattern to configure the visitor instead deriving from an abstract rule.

Changed ParserOptions to extend AbstractPropertySource with the ability to override the defaults via environment variables.
2020-11-12 10:15:04 -08:00
GuntherSchrijvers
e4ecc3bfb7 Update pmd-core/src/main/java/net/sourceforge/pmd/renderers/TextRenderer.java
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2020-11-12 14:24:05 +01:00
Gunther Schrijvers
fbe2e6bb2e [core] Changed output for a violating rule to put the RuleName in front of the description after receiving feedback on the PR. 2020-11-12 13:13:08 +01:00
Gunther Schrijvers
c7022c4881 [core] Corrected constant naming from SEPERATOR to SEPARATOR. 2020-11-12 13:05:03 +01:00
Gunther Schrijvers
7ef6084a79 [core] Refactored generation of Text output to use constants defining the 3 different types of text seperators: small '-'; medium ':\t' and large '\t-\t' to increase readability and to standardise the text output. 2020-11-12 11:57:01 +01:00
Gunther Schrijvers
72291e9a59 [core] Removed unnecessary explicit casting of Integer to String 2020-11-12 11:46:05 +01:00
Gunther Schrijvers
3a2c1b8334 [core] Modified output of TextRenderer to include the RuleName in the generated output 2020-11-12 11:44:18 +01:00
Gunther Schrijvers
8ac13b769e [core] Modified test cases for TextRenderer to include the RuleName in the generated output 2020-11-12 11:41:10 +01:00
Andreas Dangel
75d197b592 [core] Add deprecations for ParametricRuleViolation and ParserOptions#suppressMarker 2020-11-06 16:39:22 +01:00
Clément Fournier
6eee3d037f Provide replacement api for getRegisteredRuleSets 2020-11-03 15:05:58 +01:00
Clément Fournier
e30fcaf31d Rename to loadFromResources 2020-11-03 14:52:45 +01:00
Clément Fournier
8f7801c2e7 Remove try with resources 2020-11-03 14:51:23 +01:00
Clément Fournier
4f175a1c4f Hide RuleSetLoader fields 2020-11-03 14:48:29 +01:00
Clément Fournier
08fca9367e Rename RuleSetParser to RuleSetLoader 2020-11-03 14:44:54 +01:00
Clément Fournier
1ff1e07c4d Return a report instead of side-effecting on it
I think this will be more compatible with pmd 7.
2020-11-03 14:43:38 +01:00
Clément Fournier
36e55bc2c1 Fix broken rule reporting 2020-10-27 09:15:16 +01:00
Clément Fournier
050ec4464e Stop parsing comma-separated paths by default 2020-10-26 23:42:37 +01:00
Clément Fournier
38a0934fee PMD warnings 2020-10-26 21:33:33 +01:00
Clément Fournier
9c56fb629a Fix bug 2020-10-26 21:21:29 +01:00
Clément Fournier
8f8af7780e Rename stuff 2020-10-26 21:10:58 +01:00