-
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'SkriptLang:master' into feature/worldborder
- Loading branch information
Showing
55 changed files
with
766 additions
and
607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: checkstyle | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'dev/**' | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v2 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'adopt' | ||
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Run checkstyle | ||
run: ./gradlew clean checkstyleMain | ||
- name: Upload checkstyle report | ||
uses: actions/upload-artifact@v4 | ||
if: success() | ||
with: | ||
name: checkstyle-report | ||
path: | | ||
build/reports/checkstyle/*.xml | ||
build/reports/checkstyle/*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE module PUBLIC | ||
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" | ||
"https://checkstyle.org/dtds/configuration_1_3.dtd"> | ||
|
||
<module name="Checker"> | ||
|
||
<!--Basic Settings--> | ||
<!--Warning severity so the builds do not fail because of checkstyle, this is mainly for the GitHub workflow--> | ||
<property name="severity" value="warning"/> | ||
<property name="fileExtensions" value="java"/> | ||
<module name="BeforeExecutionExclusionFileFilter"> | ||
<property name="fileNamePattern" value="module\-info\.java$"/> | ||
</module> | ||
|
||
<!--At most 120 characters per line--> | ||
<module name="LineLength"> | ||
<property name="max" value="120"/> | ||
</module> | ||
|
||
<!--New line at the end of the file--> | ||
<module name="NewlineAtEndOfFile"/> | ||
|
||
<module name="TreeWalker"> | ||
|
||
<!--Tabs, no spaces--> | ||
<module name="RegexpSinglelineJava"> | ||
<property name="format" value="^\t* "/> | ||
<property name="message" value="Indent must use tab characters"/> | ||
<property name="ignoreComments" value="true"/> | ||
</module> | ||
|
||
<!--No trailing whitespace--> | ||
<module name="NoWhitespaceAfter" /> | ||
|
||
<!--When statements consume multiple lines, all lines but the first have two tabs of additional indentation--> | ||
<module name="Indentation"> | ||
<property name="arrayInitIndent" value="8" /> | ||
<property name="basicOffset" value="8" /> | ||
<property name="caseIndent" value="8" /> | ||
<property name="lineWrappingIndentation" value="8" /> | ||
<property name="throwsIndent" value="8" /> | ||
</module> | ||
|
||
<!--Each class begins with an empty line--> | ||
<module name="EmptyLineSeparator"> | ||
<property name="allowNoEmptyLineBetweenFields" value="true" /> | ||
<property name="tokens" | ||
value="IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, | ||
ENUM_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF, | ||
CTOR_DEF, VARIABLE_DEF, RECORD_DEF, COMPACT_CTOR_DEF" /> | ||
</module> | ||
|
||
<module name="OneStatementPerLine"/> | ||
|
||
<!--Annotations for a structure go on the line before that structure--> | ||
<module name="AnnotationLocation"/> | ||
|
||
<!--When splitting Strings into multiple lines the last part of the string must be (space character included) " " +--> | ||
<module name="OperatorWrap"> | ||
<property name="option" value="eol" /> | ||
<property name="tokens" value="PLUS" /> | ||
</module> | ||
|
||
<!--Class names are written in UpperCamelCase--> | ||
<module name="TypeName"/> | ||
|
||
<!--Methods named in camelCase--> | ||
<module name="MethodName"/> | ||
|
||
<!--Static constant fields should be named in UPPER_SNAKE_CASE--> | ||
<module name="ConstantName"/> | ||
|
||
<!--We use JetBrains Annotations for specifying null-ness--> | ||
<module name="IllegalImport"> | ||
<property name="illegalClasses" | ||
value="javax.annotation.Nonnull, | ||
javax.annotation.Nullable, | ||
org.eclipse.jdt.annotation.NonNull, | ||
org.eclipse.jdt.annotation.Nullable, | ||
org.eclipse.sisu.Nullable, | ||
org.checkerframework.checker.nullness.qual.NonNull, | ||
org.checkerframework.checker.nullness.qual.Nullable" /> | ||
<property name="illegalPkgs" value="" /> | ||
</module> | ||
|
||
<!--Modules for code improvements--> | ||
<module name="MissingOverride"/> | ||
<module name="EmptyBlock"/> | ||
<module name="HideUtilityClassConstructor"/> | ||
<module name="EmptyStatement"/> | ||
<module name="EqualsHashCode"/> | ||
<module name="SimplifyBooleanExpression"/> | ||
<module name="SimplifyBooleanReturn"/> | ||
<module name="StringLiteralEquality"/> | ||
<module name="UnusedLocalVariable"/> | ||
|
||
</module> | ||
|
||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.