-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from yhs0602/dev
💚 Add clang-format ci
- Loading branch information
Showing
116 changed files
with
15,767 additions
and
12,341 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,7 @@ | ||
BasedOnStyle: LLVM | ||
IndentWidth: 4 | ||
PointerAlignment: Right | ||
AlignAfterOpenBracket: BlockIndent | ||
BinPackArguments: false | ||
BinPackParameters: false | ||
InsertTrailingCommas: Wrapped |
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,22 @@ | ||
[*.{kt,kts}] | ||
end_of_line = lf | ||
ij_kotlin_allow_trailing_comma = true | ||
ij_kotlin_allow_trailing_comma_on_call_site = true | ||
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^ | ||
ij_kotlin_indent_before_arrow_on_new_line = false | ||
ij_kotlin_line_break_after_multiline_when_entry = true | ||
ij_kotlin_packages_to_use_import_on_demand = unset | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
ktlint_argument_list_wrapping_ignore_when_parameter_count_greater_or_equal_than = unset | ||
ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than = 4 | ||
ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = 1 | ||
ktlint_code_style = ktlint_official | ||
ktlint_enum_entry_name_casing = upper_or_camel_cases | ||
ktlint_function_naming_ignore_when_annotated_with = [unset] | ||
ktlint_function_signature_body_expression_wrapping = multiline | ||
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = 2 | ||
ktlint_ignore_back_ticked_identifier = false | ||
ktlint_property_naming_constant_naming = screaming_snake_case | ||
max_line_length = 140 |
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 @@ | ||
name: Format Check for C++ and Objective-C | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**/*.cpp' | ||
- '**/*.c' | ||
- '**/*.h' | ||
- '**/*.mm' | ||
- '**/*.m' | ||
|
||
jobs: | ||
format-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install clang-format 19 | ||
run: sudo wget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s -- 19 | ||
- name: Find and Check All Files | ||
run: | | ||
FILES=$(find . -type f \( -name '*.cpp' -o -name '*.c' -o -name '*.h' -o -name '*.mm' -o -name '*.m' \)) | ||
for file in $FILES; do | ||
clang-format --dry-run -Werror -style=file $file || exit 1 | ||
done |
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,26 @@ | ||
name: Java Format Check | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**/*.java' | ||
|
||
jobs: | ||
format-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Install google-java-format | ||
run: | | ||
curl -Lo google-java-format.jar https://github.com/google/google-java-format/releases/download/v1.25.2/google-java-format-1.25.2-all-deps.jar | ||
- name: Check formatting | ||
run: | | ||
java -jar google-java-format.jar --dry-run --set-exit-if-changed $(find . -name '*.java') |
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,17 @@ | ||
name: Format Check for Kotlin | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**/*.kt' | ||
- '**/*.kts' | ||
|
||
jobs: | ||
format-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install ktlint | ||
run: curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.5.0/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/ | ||
- name: Find and Check All Files | ||
run: ktlint '!src/craftground/MinecraftEnv/src/main/java/com/kyhsgeekcode/minecraftenv/proto/**' |
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.