Skip to content

Commit 41673ae

Browse files
author
TheSnoozer
committed
git-commit-id/git-commit-id-maven-plugin#562: reorgnaize project structure and initialize git-commit-id-plugin-core from commit git-commit-id/git-commit-id-maven-plugin@33468cf
1 parent f8ff562 commit 41673ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+6990
-0
lines changed

.buildscript/settings.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<settings>
2+
<servers>
3+
<server>
4+
<id>ossrh</id>
5+
<username>${env.CI_DEPLOY_USERNAME}</username>
6+
<password>${env.CI_DEPLOY_PASSWORD}</password>
7+
</server>
8+
</servers>
9+
<mirrors>
10+
<mirror>
11+
<id>central-secure</id>
12+
<url>https://repo.maven.apache.org/maven2</url>
13+
<mirrorOf>central</mirrorOf>
14+
</mirror>
15+
</mirrors>
16+
</settings>

.checkstyle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
4+
<local-check-config name="git-commit-id-plugin" location=".github/.checkstyle/google_checks_checkstyle_8.2.xml" type="project" description="">
5+
<additional-data name="protect-config-file" value="false"/>
6+
</local-check-config>
7+
<fileset name="all" enabled="true" check-config-name="git-commit-id-plugin" local="true">
8+
<file-match-pattern match-pattern="." include-pattern="true"/>
9+
</fileset>
10+
</fileset-config>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0"?>
2+
3+
<!DOCTYPE suppressions PUBLIC
4+
"-//Puppy Crawl//DTD Suppressions 1.0//EN"
5+
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
6+
7+
<suppressions>
8+
<suppress checks="JavadocStyle" files=".*\.java" />
9+
<suppress checks="SummaryJavadoc" files=".*\.java" />
10+
<suppress checks="JavadocParagraph" files=".*\.java" />
11+
<suppress checks="JavadocMethod" files=".*\.java" />
12+
<suppress checks="JavadocTagContinuationIndentation" files=".*\.java" />
13+
<suppress checks="SingleLineJavadoc" files=".*\.java" />
14+
15+
<suppress checks="LineLength" files=".*\.java" />
16+
<suppress checks="OperatorWrap" files=".*\.java" />
17+
<suppress checks="ParameterName" files=".*\.java" />
18+
<suppress checks="AvoidStarImport" files=".*\.java" />
19+
<suppress checks="MemberName" files=".*\.java" />
20+
<suppress checks="LocalVariableName" files=".*\.java" />
21+
<suppress checks="MethodName" files=".*\.java" />
22+
<suppress checks="CustomImportOrder" files=".*\.java" />
23+
<suppress checks="OverloadMethodsDeclarationOrder" files=".*\.java" />
24+
<suppress checks="VariableDeclarationUsageDistance" files=".*\.java" />
25+
26+
<suppress checks="AbbreviationAsWordInName" files="NativeAndJGitProviderTest\.java" lines="90"/>
27+
28+
</suppressions>
Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
5+
6+
<!--
7+
The following content was obtained from:
8+
https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-8.2/src/main/resources/google_checks.xml
9+
10+
Manual changes:
11+
- <module name = "SuppressionFilter"> added
12+
- <module name="Header"> added
13+
14+
Checkstyle configuration that checks the Google coding conventions from Google Java Style
15+
that can be found at https://google.github.io/styleguide/javaguide.html
16+
17+
Checkstyle is very configurable. Be sure to read the documentation at
18+
http://checkstyle.sf.net (or in your downloaded distribution).
19+
20+
To completely disable a check, just comment it out or delete it from the file.
21+
22+
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
23+
-->
24+
25+
<module name = "Checker">
26+
<!-- manually added -->
27+
<module name = "SuppressionFilter">
28+
<!-- <property name="file" value="${config_loc}/checkstyle-suppressions.xml"/> -->
29+
<property name="file" value="${samedir}/checkstyle-suppressions.xml"/>
30+
<!--
31+
relative locations do not work with eclipse / STS
32+
<property name="file" value="src/test/resources/checks/checkstyle-suppressions.xml"/>
33+
-->
34+
</module>
35+
<module name="Header">
36+
<property name="headerFile" value="${samedir}/java.header"/>
37+
<property name="fileExtensions" value="java"/>
38+
</module>
39+
40+
<property name="charset" value="UTF-8"/>
41+
42+
<property name="severity" value="warning"/>
43+
44+
<property name="fileExtensions" value="java, properties, xml"/>
45+
<!-- Excludes all 'module-info.java' files -->
46+
<!-- See https://checkstyle.org/config_filefilters.html -->
47+
<module name="BeforeExecutionExclusionFileFilter">
48+
<property name="fileNamePattern" value="module\-info\.java$"/>
49+
</module>
50+
<!-- Checks for whitespace -->
51+
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
52+
<module name="FileTabCharacter">
53+
<property name="eachLine" value="true"/>
54+
</module>
55+
56+
<module name="LineLength">
57+
<property name="fileExtensions" value="java"/>
58+
<property name="max" value="100"/>
59+
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
60+
</module>
61+
62+
<module name="TreeWalker">
63+
<module name="OuterTypeFilename"/>
64+
<module name="IllegalTokenText">
65+
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
66+
<property name="format"
67+
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
68+
<property name="message"
69+
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
70+
</module>
71+
<module name="AvoidEscapedUnicodeCharacters">
72+
<property name="allowEscapesForControlCharacters" value="true"/>
73+
<property name="allowByTailComment" value="true"/>
74+
<property name="allowNonPrintableEscapes" value="true"/>
75+
</module>
76+
<module name="AvoidStarImport"/>
77+
<module name="OneTopLevelClass"/>
78+
<module name="NoLineWrap"/>
79+
<module name="EmptyBlock">
80+
<property name="option" value="TEXT"/>
81+
<property name="tokens"
82+
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
83+
</module>
84+
<module name="NeedBraces"/>
85+
<module name="LeftCurly"/>
86+
<module name="RightCurly">
87+
<property name="id" value="RightCurlySame"/>
88+
<property name="tokens"
89+
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
90+
LITERAL_DO"/>
91+
</module>
92+
<module name="RightCurly">
93+
<property name="id" value="RightCurlyAlone"/>
94+
<property name="option" value="alone"/>
95+
<property name="tokens"
96+
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
97+
INSTANCE_INIT"/>
98+
</module>
99+
<module name="WhitespaceAround">
100+
<property name="allowEmptyConstructors" value="true"/>
101+
<property name="allowEmptyLambdas" value="true"/>
102+
<property name="allowEmptyMethods" value="true"/>
103+
<property name="allowEmptyTypes" value="true"/>
104+
<property name="allowEmptyLoops" value="true"/>
105+
<message key="ws.notFollowed"
106+
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
107+
<message key="ws.notPreceded"
108+
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
109+
</module>
110+
<module name="OneStatementPerLine"/>
111+
<module name="MultipleVariableDeclarations"/>
112+
<module name="ArrayTypeStyle"/>
113+
<module name="MissingSwitchDefault"/>
114+
<module name="FallThrough"/>
115+
<module name="UpperEll"/>
116+
<module name="ModifierOrder"/>
117+
<module name="EmptyLineSeparator">
118+
<property name="allowNoEmptyLineBetweenFields" value="true"/>
119+
</module>
120+
<module name="SeparatorWrap">
121+
<property name="id" value="SeparatorWrapDot"/>
122+
<property name="tokens" value="DOT"/>
123+
<property name="option" value="nl"/>
124+
</module>
125+
<module name="SeparatorWrap">
126+
<property name="id" value="SeparatorWrapComma"/>
127+
<property name="tokens" value="COMMA"/>
128+
<property name="option" value="EOL"/>
129+
</module>
130+
<module name="SeparatorWrap">
131+
<!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
132+
<property name="id" value="SeparatorWrapEllipsis"/>
133+
<property name="tokens" value="ELLIPSIS"/>
134+
<property name="option" value="EOL"/>
135+
</module>
136+
<module name="SeparatorWrap">
137+
<!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
138+
<property name="id" value="SeparatorWrapArrayDeclarator"/>
139+
<property name="tokens" value="ARRAY_DECLARATOR"/>
140+
<property name="option" value="EOL"/>
141+
</module>
142+
<module name="SeparatorWrap">
143+
<property name="id" value="SeparatorWrapMethodRef"/>
144+
<property name="tokens" value="METHOD_REF"/>
145+
<property name="option" value="nl"/>
146+
</module>
147+
<module name="PackageName">
148+
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
149+
<message key="name.invalidPattern"
150+
value="Package name ''{0}'' must match pattern ''{1}''."/>
151+
</module>
152+
<module name="TypeName">
153+
<message key="name.invalidPattern"
154+
value="Type name ''{0}'' must match pattern ''{1}''."/>
155+
</module>
156+
<module name="MemberName">
157+
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
158+
<message key="name.invalidPattern"
159+
value="Member name ''{0}'' must match pattern ''{1}''."/>
160+
</module>
161+
<module name="ParameterName">
162+
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
163+
<message key="name.invalidPattern"
164+
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
165+
</module>
166+
<module name="LambdaParameterName">
167+
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
168+
<message key="name.invalidPattern"
169+
value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
170+
</module>
171+
<module name="CatchParameterName">
172+
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
173+
<message key="name.invalidPattern"
174+
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
175+
</module>
176+
<module name="LocalVariableName">
177+
<property name="tokens" value="VARIABLE_DEF"/>
178+
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
179+
<message key="name.invalidPattern"
180+
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
181+
</module>
182+
<module name="ClassTypeParameterName">
183+
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
184+
<message key="name.invalidPattern"
185+
value="Class type name ''{0}'' must match pattern ''{1}''."/>
186+
</module>
187+
<module name="MethodTypeParameterName">
188+
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
189+
<message key="name.invalidPattern"
190+
value="Method type name ''{0}'' must match pattern ''{1}''."/>
191+
</module>
192+
<module name="InterfaceTypeParameterName">
193+
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
194+
<message key="name.invalidPattern"
195+
value="Interface type name ''{0}'' must match pattern ''{1}''."/>
196+
</module>
197+
<module name="NoFinalizer"/>
198+
<module name="GenericWhitespace">
199+
<message key="ws.followed"
200+
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
201+
<message key="ws.preceded"
202+
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
203+
<message key="ws.illegalFollow"
204+
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
205+
<message key="ws.notPreceded"
206+
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
207+
</module>
208+
<module name="Indentation">
209+
<property name="basicOffset" value="2"/>
210+
<property name="braceAdjustment" value="0"/>
211+
<property name="caseIndent" value="2"/>
212+
<property name="throwsIndent" value="4"/>
213+
<property name="lineWrappingIndentation" value="4"/>
214+
<property name="arrayInitIndent" value="2"/>
215+
</module>
216+
<module name="AbbreviationAsWordInName">
217+
<property name="ignoreFinal" value="false"/>
218+
<property name="allowedAbbreviationLength" value="1"/>
219+
</module>
220+
<module name="OverloadMethodsDeclarationOrder"/>
221+
<module name="VariableDeclarationUsageDistance"/>
222+
<module name="CustomImportOrder">
223+
<property name="sortImportsInGroupAlphabetically" value="true"/>
224+
<property name="separateLineBetweenGroups" value="true"/>
225+
<property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
226+
</module>
227+
<module name="MethodParamPad"/>
228+
<module name="NoWhitespaceBefore">
229+
<property name="tokens"
230+
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
231+
<property name="allowLineBreaks" value="true"/>
232+
</module>
233+
<module name="ParenPad"/>
234+
<module name="OperatorWrap">
235+
<property name="option" value="NL"/>
236+
<property name="tokens"
237+
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
238+
LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
239+
</module>
240+
<module name="AnnotationLocation">
241+
<property name="id" value="AnnotationLocationMostCases"/>
242+
<property name="tokens"
243+
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
244+
</module>
245+
<module name="AnnotationLocation">
246+
<property name="id" value="AnnotationLocationVariables"/>
247+
<property name="tokens" value="VARIABLE_DEF"/>
248+
<property name="allowSamelineMultipleAnnotations" value="true"/>
249+
</module>
250+
<module name="NonEmptyAtclauseDescription"/>
251+
<module name="InvalidJavadocPosition"/>
252+
<module name="JavadocTagContinuationIndentation"/>
253+
<module name="SummaryJavadoc">
254+
<property name="forbiddenSummaryFragments"
255+
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
256+
</module>
257+
<module name="JavadocParagraph"/>
258+
<module name="AtclauseOrder">
259+
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
260+
<property name="target"
261+
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
262+
</module>
263+
<module name="JavadocMethod">
264+
<property name="scope" value="public"/>
265+
<property name="allowMissingParamTags" value="true"/>
266+
<property name="allowMissingThrowsTags" value="true"/>
267+
<property name="allowMissingReturnTag" value="true"/>
268+
<property name="allowedAnnotations" value="Override, Test"/>
269+
<property name="allowThrowsTagsForSubclasses" value="true"/>
270+
</module>
271+
<module name="MissingJavadocMethod">
272+
<property name="scope" value="public"/>
273+
<property name="minLineCount" value="2"/>
274+
<property name="allowedAnnotations" value="Override, Test"/>
275+
</module>
276+
<module name="MethodName">
277+
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
278+
<message key="name.invalidPattern"
279+
value="Method name ''{0}'' must match pattern ''{1}''."/>
280+
</module>
281+
<module name="SingleLineJavadoc">
282+
<property name="ignoreInlineTags" value="false"/>
283+
</module>
284+
<module name="EmptyCatchBlock">
285+
<property name="exceptionVariableName" value="expected"/>
286+
</module>
287+
<module name="CommentsIndentation"/>
288+
</module>
289+
</module>

.github/.checkstyle/java.header

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* This file is part of git-commit-id-plugin by Konrad 'ktoso' Malawski <konrad.malawski@java.pl>
3+
*
4+
* git-commit-id-plugin is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU Lesser General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* git-commit-id-plugin is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public License
15+
* along with git-commit-id-plugin. If not, see <http://www.gnu.org/licenses/>.
16+
*/

.github/ISSUE_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### Description
2+
Please provide a brief summary of the issue and provide a summarised description in the title above.
3+
4+
### Expected behavior
5+
- Please provide a description of what you expected to happen.
6+
7+
### Additional context
8+
For reproducibility please provide the following:
9+
10+
- the plugin version is being used (if not included in the configuration)
11+
- the Java-Version is being used (output of ``java -version`` and also include details about oracle-jdk VS open-jdk)
12+
- the Maven-Version is being used (output of ``mvn --version``)
13+
- on what Operating System you experience the bug (on Linux run ``lsb_release -a`` or ``cat /etc/*release*``)
14+
- in what context maven is being executed (e.g. inside Windows Terminal, Powershell, Git Bash, /bin/bash, ...)
15+
- how maven is being executed (e.g. ``mvn clean deploy`` VS ``mvn deploy:deploy``)
16+
17+
Feel free to add any other context or screenshots about the bug.

0 commit comments

Comments
 (0)