Skip to content

Commit 7d8d9da

Browse files
authored
Merge pull request #98 from xdev-software/develop
Release
2 parents db8452f + a79859f commit 7d8d9da

33 files changed

+1725
-481
lines changed

.config/checkstyle/checkstyle.xml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<module name="LineLength">
1717
<property name="max" value="120"/>
1818
<property name="fileExtensions" value="java"/>
19-
<!-- Ignore default + links in comments -->
19+
<!-- Ignore default + links -->
2020
<property name="ignorePattern" value="(^(package|import))|(^\s*(\/\/|\*) .*https?.*$)"/>
2121
</module>
2222
<module name="NewlineAtEndOfFile"/>
@@ -30,10 +30,6 @@
3030
</module>
3131

3232
<!-- Generated code -->
33-
<module name="SuppressionSingleFilter">
34-
<property name="checks" value="."/>
35-
<property name="files" value="[\\/](src)?gen[\\/].*\.java$"/>
36-
</module>
3733
<module name="SuppressionSingleFilter">
3834
<property name="checks" value="."/>
3935
<property name="files" value="[\\/]src[\\/]gen(erated)?[\\/].*\.java$"/>
@@ -43,11 +39,20 @@
4339
<property name="checks" value="MagicNumberCheck"/>
4440
<property name="files" value="[\\/]test[\\/].*\.java$"/>
4541
</module>
42+
43+
<!-- Suppressions -->
4644
<module name="SuppressWarningsFilter"/>
45+
<!-- https://github.com/checkstyle/checkstyle/issues/7287 -->
46+
<module name="SuppressWithPlainTextCommentFilter">
47+
<property name="offCommentFormat" value="// CHECKSTYLE\:OFF ([\w\|]+)"/>
48+
<property name="onCommentFormat" value="// CHECKSTYLE\:ON ([\w\|]+)"/>
49+
<property name="checkFormat" value="$1"/>
50+
</module>
4751

4852
<module name="TreeWalker">
4953
<!-- Checks - sorted alphabetically -->
5054
<module name="ArrayTypeStyle"/>
55+
<module name="AvoidDoubleBraceInitialization"/>
5156
<module name="AvoidStarImport"/>
5257
<module name="ConstantName"/>
5358
<module name="DefaultComesLast"/>
@@ -64,6 +69,11 @@
6469
<module name="FinalParameters"/>
6570
<module name="GenericWhitespace"/>
6671
<module name="HideUtilityClassConstructor"/>
72+
<module name="IllegalCatch">
73+
<!-- https://docs.pmd-code.org/pmd-doc-7.11.0/pmd_rules_java_errorprone.html#avoidcatchingnpe -->
74+
<!-- https://docs.pmd-code.org/pmd-doc-7.11.0/pmd_rules_java_errorprone.html#avoidcatchingthrowable -->
75+
<property name="illegalClassNames" value="Error,Throwable,NullPointerException,java.lang.Error,java.lang.Throwable,java.lang.NullPointerException"/>
76+
</module>
6777
<module name="IllegalImport"/>
6878
<module name="InterfaceIsType"/>
6979
<module name="JavadocStyle">
@@ -89,7 +99,6 @@
8999
<module name="MethodParamPad"/>
90100
<module name="MissingDeprecated"/>
91101
<module name="MissingOverride"/>
92-
<module name="MissingSwitchDefault"/>
93102
<module name="ModifierOrder"/>
94103
<module name="NeedBraces"/>
95104
<module name="NoClone"/>
@@ -118,7 +127,13 @@
118127
</module>
119128
<module name="TypecastParenPad"/>
120129
<module name="TypeName"/>
130+
<module name="UnnecessaryParentheses"/>
131+
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
132+
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
133+
<module name="UnnecessarySemicolonInEnumeration"/>
134+
<module name="UnnecessarySemicolonInTryWithResources"/>
121135
<module name="UnusedImports"/>
136+
<module name="UnusedLocalVariable"/>
122137
<module name="UpperEll"/>
123138
<module name="VisibilityModifier">
124139
<property name="packageAllowed" value="true"/>
@@ -131,11 +146,5 @@
131146
<property name="tokens"
132147
value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND"/>
133148
</module>
134-
135-
<!-- Filter -->
136-
<module name="SuppressionCommentFilter">
137-
<property name="offCommentFormat" value="\s*CHECKSTYLE:OFF\s*[^\s]{1,}"/>
138-
<property name="onCommentFormat" value="\s*CHECKSTYLE:ON"/>
139-
</module>
140149
</module>
141150
</module>

.config/pmd/ruleset.xml

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ruleset name="Default"
3+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
6+
7+
<description>
8+
This ruleset checks the code for discouraged programming constructs.
9+
</description>
10+
11+
<!-- Only rules that don't overlap with CheckStyle! -->
12+
13+
<rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace"/>
14+
<rule ref="category/java/bestpractices.xml/AvoidStringBufferField"/>
15+
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/>
16+
<rule ref="category/java/bestpractices.xml/ConstantsInInterface"/>
17+
<rule ref="category/java/bestpractices.xml/ExhaustiveSwitchHasDefault"/>
18+
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons"/>
19+
<!-- CheckStyle can't handle this switch behavior -> delegated to PMD -->
20+
<rule ref="category/java/bestpractices.xml/NonExhaustiveSwitch"/>
21+
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine">
22+
<properties>
23+
<property name="strictMode" value="true"/>
24+
</properties>
25+
</rule>
26+
<rule ref="category/java/bestpractices.xml/PreserveStackTrace"/>
27+
<rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion"/>
28+
<rule ref="category/java/bestpractices.xml/SystemPrintln"/>
29+
<rule ref="category/java/bestpractices.xml/UnusedAssignment"/>
30+
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
31+
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
32+
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/>
33+
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty"/>
34+
<rule ref="category/java/bestpractices.xml/UseEnumCollections"/>
35+
<rule ref="category/java/bestpractices.xml/UseStandardCharsets"/>
36+
<rule ref="category/java/bestpractices.xml/UseTryWithResources"/>
37+
38+
<!-- Native code is platform dependent; Loading external native libs might pose a security threat -->
39+
<rule ref="category/java/codestyle.xml/AvoidUsingNativeCode"/>
40+
<rule ref="category/java/codestyle.xml/IdenticalCatchBranches"/>
41+
<rule ref="category/java/codestyle.xml/LambdaCanBeMethodReference"/>
42+
<rule ref="category/java/codestyle.xml/NoPackage"/>
43+
<rule ref="category/java/codestyle.xml/PrematureDeclaration"/>
44+
<rule ref="category/java/codestyle.xml/UnnecessarySemicolon"/>
45+
46+
<rule ref="category/java/design.xml">
47+
<!-- Sometimes abstract classes have just fields -->
48+
<exclude name="AbstractClassWithoutAnyMethod"/>
49+
50+
<!-- Using RuntimeExceptions is ok -->
51+
<exclude name="AvoidCatchingGenericException"/>
52+
<exclude name="AvoidThrowingRawExceptionTypes"/>
53+
54+
<!-- Limit too low -->
55+
<exclude name="AvoidDeeplyNestedIfStmts"/>
56+
57+
<!-- Limit too low -->
58+
<exclude name="CouplingBetweenObjects"/>
59+
60+
<!-- Limit too low -->
61+
<exclude name="CyclomaticComplexity"/>
62+
63+
<!-- Makes entity classes impossible -->
64+
<exclude name="DataClass"/>
65+
66+
<!-- Used commonly particular in bigger methods with upstream throws -->
67+
<exclude name="ExceptionAsFlowControl"/>
68+
69+
<!-- Limit too low -->
70+
<exclude name="ExcessiveImports"/>
71+
72+
<!-- Handled by TooManyFields/TooManyMethods -->
73+
<exclude name="ExcessivePublicCount"/>
74+
75+
<!-- Prohibits accessing members using multiple depths -->
76+
<exclude name="LawOfDemeter"/>
77+
78+
<!-- No effect -->
79+
<exclude name="LoosePackageCoupling"/>
80+
81+
<!-- Prohibits singleton pattern -->
82+
<exclude name="MutableStaticState"/>
83+
84+
<!-- Checks LoC, already handled by Checkstyle -->
85+
<exclude name="NcssCount"/>
86+
87+
<!-- Some override methods or Junit require this -->
88+
<exclude name="SignatureDeclareThrowsException"/>
89+
90+
<!-- Reports FP for equals methods -->
91+
<exclude name="SimplifyBooleanReturns"/>
92+
93+
<!-- Limit too low -->
94+
<exclude name="TooManyFields"/>
95+
96+
<!-- Limit too low -->
97+
<exclude name="TooManyMethods"/>
98+
99+
<!-- Limit too low -->
100+
<exclude name="UseObjectForClearerAPI"/>
101+
</rule>
102+
103+
<rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts">
104+
<properties>
105+
<property name="problemDepth" value="4"/>
106+
</properties>
107+
</rule>
108+
<rule ref="category/java/design.xml/CouplingBetweenObjects">
109+
<properties>
110+
<property name="threshold" value="100"/>
111+
</properties>
112+
</rule>
113+
<rule ref="category/java/design.xml/CyclomaticComplexity">
114+
<properties>
115+
<property name="classReportLevel" value="150"/>
116+
<property name="methodReportLevel" value="25"/>
117+
<property name="cycloOptions" value=""/>
118+
</properties>
119+
</rule>
120+
<rule ref="category/java/design.xml/ExcessiveImports">
121+
<properties>
122+
<property name="minimum" value="200"/>
123+
</properties>
124+
</rule>
125+
<rule ref="category/java/design.xml/TooManyFields">
126+
<properties>
127+
<property name="maxfields" value="50"/>
128+
</properties>
129+
</rule>
130+
<rule ref="category/java/design.xml/TooManyMethods">
131+
<properties>
132+
<property name="maxmethods" value="100"/>
133+
</properties>
134+
</rule>
135+
136+
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic"/>
137+
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
138+
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators"/>
139+
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/>
140+
<rule ref="category/java/errorprone.xml/BrokenNullCheck"/>
141+
<rule ref="category/java/errorprone.xml/ComparisonWithNaN"/>
142+
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly"/>
143+
<rule ref="category/java/errorprone.xml/DontImportSun"/>
144+
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/>
145+
<rule ref="category/java/errorprone.xml/EqualsNull"/>
146+
<rule ref="category/java/errorprone.xml/IdempotentOperations"/>
147+
<rule ref="category/java/errorprone.xml/ImplicitSwitchFallThrough"/>
148+
<rule ref="category/java/errorprone.xml/InstantiationToGetClass"/>
149+
<rule ref="category/java/errorprone.xml/InvalidLogMessageFormat"/>
150+
<rule ref="category/java/errorprone.xml/JumbledIncrementer"/>
151+
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
152+
<rule ref="category/java/errorprone.xml/MoreThanOneLogger"/>
153+
<rule ref="category/java/errorprone.xml/NonStaticInitializer"/>
154+
<rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock"/>
155+
<rule ref="category/java/errorprone.xml/SingletonClassReturningNewInstance"/>
156+
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement"/>
157+
<rule ref="category/java/errorprone.xml/UnnecessaryCaseChange"/>
158+
<rule ref="category/java/errorprone.xml/UselessOperationOnImmutable"/>
159+
160+
161+
<rule ref="category/java/multithreading.xml">
162+
<!-- Just bloats code; improved in JEP-491/Java 24+ -->
163+
<exclude name="AvoidSynchronizedAtMethodLevel"/>
164+
165+
<!-- NOPE -->
166+
<exclude name="DoNotUseThreads"/>
167+
168+
<!-- Doesn't detect nested thread safe singleton pattern -->
169+
<exclude name="NonThreadSafeSingleton"/>
170+
171+
<!-- Should relevant for fields that use multithreading which is rare -->
172+
<exclude name="UseConcurrentHashMap"/>
173+
</rule>
174+
175+
<rule ref="category/java/performance.xml">
176+
<!-- This was fixed in Java 10 -->
177+
<exclude name="AvoidFileStream"/>
178+
179+
<!-- Used everywhere and has neglectable performance impact -->
180+
<exclude name="AvoidInstantiatingObjectsInLoops"/>
181+
182+
<!-- Handled by checkstyle -->
183+
<exclude name="RedundantFieldInitializer"/>
184+
185+
<!-- Nowadays optimized by compiler; No code bloating needed -->
186+
<exclude name="UseStringBufferForStringAppends"/>
187+
</rule>
188+
189+
<rule ref="category/java/performance.xml/TooFewBranchesForSwitch">
190+
<properties>
191+
<!-- If you have one case only please use a if -->
192+
<property name="minimumNumberCaseForASwitch" value="2"/>
193+
</properties>
194+
</rule>
195+
196+
<rule ref="category/java/security.xml"/>
197+
</ruleset>

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
# Auto detect text files and perform LF normalization
22
* text=auto
3+
4+
# Force sh files to have LF
5+
*.sh text eol=lf
6+
7+
# Force MVN Wrapper Linux files LF
8+
mvnw text eol=lf
9+
.mvn/wrapper/maven-wrapper.properties text eol=lf

.github/.lycheeignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignorefile for broken link check
2+
localhost
3+
mvnrepository.com

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: 🐞 Bug
2+
description: Create a bug report for something that is broken
3+
labels: [bug]
4+
type: bug
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for reporting a bug.
10+
11+
Please fill in as much information as possible about your bug so that we don't have to play "information ping-pong" and can help you immediately.
12+
13+
- type: checkboxes
14+
id: checklist
15+
attributes:
16+
label: "Checklist"
17+
options:
18+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/spring-data-eclipse-store-migration/releases/latest)"
19+
required: true
20+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/spring-data-eclipse-store-migration/issues) or [closed](https://github.com/xdev-software/spring-data-eclipse-store-migration/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
21+
required: true
22+
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
23+
required: true
24+
- label: "This issue contains only one bug."
25+
required: true
26+
27+
- type: input
28+
id: app-version
29+
attributes:
30+
label: Affected version
31+
description: "In which version did you encounter the bug?"
32+
placeholder: "x.x.x"
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: steps-to-reproduce
38+
attributes:
39+
label: Steps to reproduce the bug
40+
description: |
41+
What did you do for the bug to show up?
42+
43+
If you can't cause the bug to show up again reliably (and hence don't have a proper set of steps to give us), please still try to give as many details as possible on how you think you encountered the bug.
44+
placeholder: |
45+
1. Use '...'
46+
2. Do '...'
47+
validations:
48+
required: true
49+
50+
- type: textarea
51+
id: expected-behavior
52+
attributes:
53+
label: Expected behavior
54+
description: |
55+
Tell us what you expect to happen.
56+
57+
- type: textarea
58+
id: actual-behavior
59+
attributes:
60+
label: Actual behavior
61+
description: |
62+
Tell us what happens with the steps given above.
63+
64+
- type: textarea
65+
id: additional-information
66+
attributes:
67+
label: Additional information
68+
description: |
69+
Any other relevant information you'd like to include

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
contact_links:
2+
- name: 💬 Contact support
3+
url: https://xdev.software/en/services/support
4+
about: "If you need support as soon as possible or/and you can't wait for any pull request"

0 commit comments

Comments
 (0)