This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
43
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
52a150e9
Commit
52a150e9
authored
3 years ago
by
Daniel Rainer
Browse files
Options
Downloads
Patches
Plain Diff
Add PMD as java linter to pipeline
parent
f582cbbb
2 merge requests
!188
Merging Peer Reviewing et. al to Master
,
!164
211 peer reviewing functionality
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+17
-0
17 additions, 0 deletions
.gitlab-ci.yml
pmd_rules.xml
+60
-0
60 additions, 0 deletions
pmd_rules.xml
with
77 additions
and
0 deletions
.gitlab-ci.yml
+
17
−
0
View file @
52a150e9
...
...
@@ -12,10 +12,27 @@ stages:
-
package
-
release
-
deploy
before_script
:
-
export NG_CLI_ANALYTICS="false"
-
export MAVEN_USER_HOME=`pwd`/.maven
pmd
:
stage
:
lint
allow_failure
:
true
when
:
always
before_script
:
-
'
export
VERSION="6.40.0"'
-
'
wget
"https://github.com/pmd/pmd/releases/download/pmd_releases%2F$VERSION/pmd-bin-$VERSION.zip"'
-
'
unzip
"pmd-bin-$VERSION.zip"'
script
:
-
'
"pmd-bin-$VERSION/bin/run.sh"
pmd
-d
src/main/java
-f
textcolor
-R
pmd_rules.xml
2>&1
|
tee
pmd.log'
needs
:
[]
artifacts
:
when
:
on_failure
paths
:
-
pmd.log
checkstyle
:
stage
:
lint
script
:
...
...
This diff is collapsed.
Click to expand it.
pmd_rules.xml
0 → 100644
+
60
−
0
View file @
52a150e9
<?xml version="1.0"?>
<ruleset
name=
"Custom Rules"
xmlns=
"http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"
>
<description>
Rules for the PMD linter
</description>
<rule
ref=
"category/java/bestpractices.xml"
>
<exclude
name=
"GuardLogStatement"
/>
<exclude
name=
"UseVarargs"
/>
</rule>
<rule
ref=
"category/java/codestyle.xml"
>
<exclude
name=
"AtLeastOneConstructor"
/>
<exclude
name=
"OnlyOneReturn"
/>
<exclude
name=
"ShortClassName"
/>
<exclude
name=
"UselessParentheses"
/>
<!-- does not work properly with annotation imports -->
<exclude
name=
"UnnecessaryImport"
/>
<!-- should be included, removed to find other lints -->
<exclude
name=
"MethodArgumentCouldBeFinal"
/>
<exclude
name=
"LocalVariableCouldBeFinal"
/>
<exclude
name=
"FieldNamingConventions"
/>
<exclude
name=
"ShortVariable"
/>
<exclude
name=
"LongVariable"
/>
<exclude
name=
"UseUnderscoresInNumericLiterals"
/>
<exclude
name=
"CommentDefaultAccessModifier"
/>
<exclude
name=
"BooleanGetMethodName"
/>
</rule>
<rule
ref=
"category/java/design.xml"
>
<exclude
name=
"LawOfDemeter"
/>
<exclude
name=
"DataClass"
/>
<exclude
name=
"ExcessiveImports"
/>
<!-- seems to be broken in its default config -->
<exclude
name=
"LoosePackageCoupling"
/>
</rule>
<rule
ref=
"category/java/documentation.xml"
>
<exclude
name=
"CommentSize"
/>
<exclude
name=
"CommentRequired"
/>
<exclude
name=
"UncommentedEmptyConstructor"
/>
</rule>
<rule
ref=
"category/java/errorprone.xml"
>
<exclude
name=
"BeanMembersShouldSerialize"
/>
<exclude
name=
"AvoidLiteralsInIfCondition"
/>
</rule>
<rule
ref=
"category/java/multithreading.xml"
></rule>
<rule
ref=
"category/java/performance.xml"
>
<exclude
name=
"RedundantFieldInitializer"
/>
<exclude
name=
"TooFewBranchesForASwitchStatement"
/>
<exclude
name=
"AvoidInstantiatingObjectsInLoops"
/>
<exclude
name=
"AvoidFileStream"
/>
</rule>
<rule
ref=
"category/java/security.xml"
></rule>
</ruleset>
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment