-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 65638bc
Showing
27 changed files
with
1,539 additions
and
0 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,291 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> | ||
<module name="Checker"> | ||
<property name="charset" value="UTF-8"/> | ||
<property name="fileExtensions" value="java, properties, xml"/> | ||
<property name="severity" value="error"/> | ||
|
||
<!-- https://checkstyle.org/config_filefilters.html#BeforeExecutionExclusionFileFilter --> | ||
<module name="BeforeExecutionExclusionFileFilter"> | ||
<property name="fileNamePattern" value="module\-info\.java$"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#FileTabCharacter --> | ||
<module name="FileTabCharacter"> | ||
<property name="eachLine" value="true"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#JavadocPackage --> | ||
<module name="JavadocPackage"/> | ||
|
||
<!-- https://checkstyle.org/config_misc.html#NewlineAtEndOfFile --> | ||
<module name="NewlineAtEndOfFile"/> | ||
|
||
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter --> | ||
<module name="SuppressionFilter"> | ||
<property name="file" value="${configDirectory}/suppressions.xml"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_filters.html#SuppressWarningsFilter --> | ||
<module name="SuppressWarningsFilter"/> | ||
|
||
<!-- https://checkstyle.org/config_filters.html#SuppressWithPlainTextCommentFilter --> | ||
<module name="SuppressWithPlainTextCommentFilter"> | ||
<property name="offCommentFormat" value="// (@formatter|CHECKSTYLE):(off|OFF)"/> | ||
<property name="onCommentFormat" value="// (@formatter|CHECKSTYLE):(on|ON)"/> | ||
</module> | ||
|
||
<module name="TreeWalker"> | ||
<!-- https://checkstyle.org/config_misc.html#ArrayTypeStyle --> | ||
<module name="ArrayTypeStyle"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#AtclauseOrder --> | ||
<module name="AtclauseOrder"> | ||
<property name="violateExecutionOnNonTightHtml" value="true"/> | ||
<property name="tagOrder" value="@author, @exception, @param, @return, @serial, @serialData, @serialField, @throws, @see, @since, @sinceMinecraft, @version, @deprecated"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_imports.html#AvoidStarImport --> | ||
<module name="AvoidStarImport"/> | ||
|
||
<!-- https://checkstyle.org/config_misc.html#AvoidEscapedUnicodeCharacters --> | ||
<module name="AvoidEscapedUnicodeCharacters"> | ||
<property name="allowByTailComment" value="true"/> | ||
<property name="allowEscapesForControlCharacters" value="true"/> | ||
<property name="allowNonPrintableEscapes" value="true"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_misc.html#CommentsIndentation --> | ||
<module name="CommentsIndentation"/> | ||
|
||
<!-- https://checkstyle.org/config_imports.html#CustomImportOrder --> | ||
<module name="CustomImportOrder"> | ||
<property name="customImportOrderRules" value="THIRD_PARTY_PACKAGE###STATIC"/> | ||
<property name="standardPackageRegExp" value="^$"/> | ||
<property name="sortImportsInGroupAlphabetically" value="true"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#EmptyForInitializerPad --> | ||
<module name="EmptyForInitializerPad"/> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#EmptyForIteratorPad --> | ||
<module name="EmptyForIteratorPad"/> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#EmptyLineSeparator --> | ||
<module name="EmptyLineSeparator"> | ||
<property name="allowMultipleEmptyLines" value="false"/> | ||
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/> | ||
<property name="allowNoEmptyLineBetweenFields" value="true"/> | ||
<property name="tokens" value="CLASS_DEF, CTOR_DEF, ENUM_DEF, IMPORT, INSTANCE_INIT, INTERFACE_DEF, METHOD_DEF, STATIC_IMPORT, STATIC_INIT, VARIABLE_DEF"/> <!-- remove PACKAGE_DEF, temporarily remove COMPACT_CTOR_DEF, RECORD_DEF --> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_coding.html#FallThrough --> | ||
<module name="FallThrough"> | ||
<property name="checkLastCaseGroup" value="true"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_design.html#FinalClass --> | ||
<module name="FinalClass"/> | ||
|
||
<!-- https://checkstyle.org/config_coding.html#FinalLocalVariable --> | ||
<module name="FinalLocalVariable"> | ||
<property name="tokens" value="PARAMETER_DEF, VARIABLE_DEF"/> <!-- add PARAMETER_DEF --> | ||
<property name="validateEnhancedForLoopVariable" value="true"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#GenericWhitespace --> | ||
<module name="GenericWhitespace"/> | ||
|
||
<!-- https://checkstyle.org/config_design.html#HideUtilityClassConstructor --> | ||
<module name="HideUtilityClassConstructor"/> | ||
|
||
<!-- https://checkstyle.org/config_imports.html#IllegalImport --> | ||
<module name="IllegalImport"> | ||
<property name="illegalPkgs" value="sun, jdk, com.sun"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_coding.html#IllegalTokenText --> | ||
<module name="IllegalTokenText"> | ||
<property name="format" 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)"/> | ||
<property name="message" value="Consider using special escape sequence instead of octal value or Unicode escaped value."/> | ||
<property name="tokens" value="CHAR_LITERAL, STRING_LITERAL"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_misc.html#Indentation --> | ||
<module name="Indentation"> | ||
<property name="arrayInitIndent" value="2"/> | ||
<property name="basicOffset" value="2"/> | ||
<property name="braceAdjustment" value="0"/> | ||
<property name="caseIndent" value="2"/> | ||
<property name="lineWrappingIndentation" value="0"/> | ||
<property name="throwsIndent" value="2"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#InvalidJavadocPosition --> | ||
<module name="InvalidJavadocPosition"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#JavadocContentLocation --> | ||
<module name="JavadocContentLocation"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#JavadocMethod --> | ||
<module name="JavadocMethod" /> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#JavadocMissingWhitespaceAfterAsterisk --> | ||
<module name="JavadocMissingWhitespaceAfterAsterisk"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#JavadocParagraph --> | ||
<module name="JavadocParagraph"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#JavadocMissingWhitespaceAfterAsterisk --> | ||
<module name="JavadocTagContinuationIndentation"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#JavadocType --> | ||
<module name="JavadocType"> | ||
<property name="allowUnknownTags" value="true" /> <!-- @sinceMinecraft is not supported --> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_blocks.html#LeftCurly --> | ||
<module name="LeftCurly"/> | ||
|
||
<!-- https://checkstyle.org/config_naming.html#MethodName --> | ||
<module name="MethodName"> | ||
<property name="format" value="^(?:(?:.{1,3})|(?:[gs]et[^A-Z].*)|(?:(?:[^gsA-Z]..|.[^e].|..[^t]).+))$"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#MethodParamPad --> | ||
<module name="MethodParamPad"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#MissingJavadocMethod --> | ||
<module name="MissingJavadocMethod"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#MissingJavadocPackage --> | ||
<module name="MissingJavadocPackage"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#MissingJavadocType --> | ||
<module name="MissingJavadocType"/> | ||
|
||
<!-- https://checkstyle.org/config_coding.html#MultipleVariableDeclarations --> | ||
<module name="MultipleVariableDeclarations"/> | ||
|
||
<!-- https://checkstyle.org/config_coding.html#NoFinalizer --> | ||
<module name="NoFinalizer"/> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#NoLineWrap --> | ||
<module name="NoLineWrap"/> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#NonEmptyAtclauseDescription --> | ||
<module name="NonEmptyAtclauseDescription"/> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#NoWhitespaceAfter --> | ||
<module name="NoWhitespaceAfter"> | ||
<property name="allowLineBreaks" value="false"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#NoWhitespaceBefore --> | ||
<module name="NoWhitespaceBefore"> | ||
<property name="allowLineBreaks" value="true"/> | ||
<property name="tokens" value="COMMA, DOT, LABELED_STAT, METHOD_REF, POST_DEC, POST_INC, SEMI"/> <!-- remove ELLIPSIS --> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_coding.html#OneStatementPerLine --> | ||
<module name="OneStatementPerLine"/> | ||
|
||
<!-- https://checkstyle.org/config_misc.html#OuterTypeFilename --> | ||
<module name="OuterTypeFilename"/> | ||
|
||
<!-- https://checkstyle.org/config_imports.html#RedundantImport --> | ||
<module name="RedundantImport"/> | ||
|
||
<!-- https://checkstyle.org/config_modifier.html#RedundantModifier --> | ||
<module name="RedundantModifier"> | ||
<property name="tokens" value="ANNOTATION_FIELD_DEF, CLASS_DEF, CTOR_DEF, ENUM_DEF, INTERFACE_DEF, VARIABLE_DEF"/> <!-- remove METHOD_DEF and RESOURCE --> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#RequireEmptyLineBeforeBlockTagGroup --> | ||
<module name="RequireEmptyLineBeforeBlockTagGroup"/> | ||
|
||
<!-- https://checkstyle.org/config_coding.html#RequireThis --> | ||
<module name="RequireThis"> | ||
<property name="validateOnlyOverlapping" value="false"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_blocks.html#RightCurly --> | ||
<module name="RightCurly"> | ||
<property name="id" value="RightCurlyAlone"/> | ||
<property name="option" value="alone"/> | ||
<property name="tokens" value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_DEF, INSTANCE_INIT, LITERAL_FOR, LITERAL_WHILE, METHOD_DEF, STATIC_INIT"/> | ||
</module> | ||
<module name="RightCurly"> | ||
<property name="id" value="RightCurlySame"/> | ||
<property name="option" value="same"/> | ||
<property name="tokens" value="LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_IF, LITERAL_TRY"/> <!-- add LITERAL_DO --> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#SeparatorWrap --> | ||
<module name="SeparatorWrap"> | ||
<property name="id" value="SeparatorWrapEol"/> | ||
<property name="option" value="eol"/> | ||
<property name="tokens" value="COMMA, SEMI, ELLIPSIS, RBRACK, ARRAY_DECLARATOR, METHOD_REF"/> | ||
</module> | ||
<module name="SeparatorWrap"> | ||
<property name="id" value="SeparatorWrapNl"/> | ||
<property name="option" value="nl"/> | ||
<property name="tokens" value="DOT, AT"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_coding.html#SimplifyBooleanExpression --> | ||
<module name="SimplifyBooleanExpression"/> | ||
|
||
<!-- https://checkstyle.org/config_coding.html#SimplifyBooleanReturn --> | ||
<module name="SimplifyBooleanReturn"/> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#SingleSpaceSeparator --> | ||
<module name="SingleSpaceSeparator"> | ||
<property name="validateComments" value="true"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#SummaryJavadoc --> | ||
<module name="SummaryJavadoc"/> | ||
|
||
<!-- https://checkstyle.org/config_annotation.html#SuppressWarningsHolder --> | ||
<module name="SuppressWarningsHolder"/> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#TypecastParenPad --> | ||
<module name="TypecastParenPad"/> | ||
|
||
<!-- https://checkstyle.org/config_imports.html#UnusedImports --> | ||
<module name="UnusedImports"/> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#WhitespaceAfter --> | ||
<module name="WhitespaceAfter"/> | ||
|
||
<!-- https://checkstyle.org/config_whitespace.html#WhitespaceAround --> | ||
<module name="WhitespaceAround"> | ||
<property name="ignoreEnhancedForColon" value="false"/> | ||
<property name="allowEmptyTypes" value="true"/> | ||
<property name="allowEmptyLambdas" value="true"/> | ||
<property name="tokens" value="ASSIGN, COLON, 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, LITERAL_ASSERT, TYPE_EXTENSION_AND"/> | ||
</module> | ||
|
||
<!-- | ||
##################### | ||
#### third-party #### | ||
##################### | ||
--> | ||
|
||
<!-- https://gitlab.com/stellardrift/stylecheck/-/blob/trunk/src/main/java/ca/stellardrift/stylecheck/AnnotationsCloseToType.java --> | ||
<module name="AnnotationsCloseToType"> | ||
<property name="typeUseAnnotations" value="NotNull, Nullable, Pattern, RegExp, KeyPattern, KeyPattern.Namespace, KeyPattern.Value"/> | ||
</module> | ||
|
||
<!-- https://checkstyle.org/config_javadoc.html#WriteTag --> | ||
<!-- https://gitlab.com/stellardrift/stylecheck/-/blob/trunk/src/main/java/ca/stellardrift/stylecheck/FilteringWriteTag.java --> | ||
<module name="FilteringWriteTag"> | ||
<property name="tag" value="@since\s"/> | ||
<property name="tagFormat" value="\d\.\d+\.\d+"/> | ||
<property name="tagSeverity" value="ignore"/> | ||
<property name="minimumScope" value="public"/> | ||
<property name="tokens" value="INTERFACE_DEF, CLASS_DEF, ENUM_DEF, ANNOTATION_DEF, RECORD_DEF, METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF, RECORD_DEF, COMPACT_CTOR_DEF"/> | ||
</module> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "http://checkstyle.org/dtds/suppressions_1_2.dtd"> | ||
<suppressions> | ||
<!-- no javadoc on test classes --> | ||
<suppress files="src[\\/](test|jmh)[\\/]java[\\/].*" checks="(FilteringWriteTag|JavadocPackage|MissingJavadoc.*)"/> | ||
</suppressions> |
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,8 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = off |
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 @@ | ||
github: ["kashike"] |
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,24 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- "type: dependencies" | ||
- "dependencies" | ||
categories: | ||
- title: "✨ Features" | ||
labels: | ||
- "type: enhancement" | ||
- "enhancement" | ||
- title: "🔧 Changes" | ||
labels: | ||
- "breaking" | ||
- title: "🐛 Fixes" | ||
labels: | ||
- "type: bug" | ||
- "bug" | ||
- title: "📚 Documentation" | ||
labels: | ||
- "type: documentation" | ||
- "documentation" | ||
- title: "Other" | ||
labels: | ||
- "*" |
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,12 @@ | ||
name: "build" | ||
|
||
on: | ||
push: | ||
branches: "**" | ||
tags-ignore: ["**"] | ||
pull_request: | ||
|
||
jobs: | ||
call-build: | ||
uses: KyoriPowered/.github/.github/workflows/shared-ci.yaml@trunk | ||
secrets: inherit |
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,5 @@ | ||
/.gradle/ | ||
/.idea/ | ||
/*.iml | ||
/build/ | ||
/out/ |
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,4 @@ | ||
#Organize Import Order | ||
#Tue Mar 30 19:56:59 PDT 2021 | ||
0= | ||
1=\# |
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,15 @@ | ||
# ansi | ||
|
||
![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/KyoriPowered/feature-flag/build.yml?branch=trunk) [![MIT License](https://img.shields.io/badge/license-MIT-blue)](license.txt) [![Maven Central](https://img.shields.io/maven-central/v/net.kyori/feature-flag?label=stable)](https://search.maven.org/search?q=g:net.kyori%20AND%20a:feature-flag) ![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/net.kyori/feature-flag?label=dev&server=https%3A%2F%2Fs01.oss.sonatype.org) [![Javadoc](https://img.shields.io/badge/javadoc-all-green)](https://jd.advntr.dev/) | ||
|
||
A small library for handling version-based feature configuration. | ||
|
||
### Contributing | ||
|
||
We appreciate contributions of any type. For any new features or typo-fix/style changes, please open an issue or come talk to us in our [Discord] first so we make sure you're going in the right direction for the project. | ||
|
||
All the adventure projects are built with Gradle, require at least JDK 8, and use a common checkstyle configuration. Please make sure all tests pass, license headers are updated, and checkstyle passes to help us review your contribution. | ||
|
||
`feature-flag` is released under the terms of the [MIT License](license.txt). | ||
|
||
[Discord]: https://discord.gg/MMfhJ8F |
Oops, something went wrong.