diff --git a/.clang-format b/.clang-format index 9d02d81..d965f2a 100644 --- a/.clang-format +++ b/.clang-format @@ -1,10 +1,11 @@ BasedOnStyle: Google Language: Cpp -AlignEscapedNewlinesLeft: false +AccessModifierOffset: -2 +AlignEscapedNewlines: Right AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false AllowShortEnumsOnASingleLine: true -AllowShortFunctionsOnASingleLine: None +AllowShortFunctionsOnASingleLine: Empty AllowShortIfStatementsOnASingleLine: Never AllowShortLambdasOnASingleLine: Empty AllowShortLoopsOnASingleLine: false diff --git a/.editorconfig b/.editorconfig index d92fd87..bc97b29 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,21 @@ trim_trailing_whitespace = true insert_final_newline = true indent_style = space indent_size = 2 + +# handled by clang-format +[*.{h,c}] +charset = unset +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset +indent_style = unset +indent_size = unset + +# image format +[*.ase] +charset = unset +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset +indent_style = unset +indent_size = unset diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0401a3..1042b92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,19 @@ on: permissions: contents: read jobs: + check-formatting-all: + name: Check Formatting (All) + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v6.0.2 + - name: Set up node + uses: actions/setup-node@v6.2.0 + with: + node-version: lts/* + - name: Check formatting + run: npx editorconfig-checker check-formatting-c: name: Check Formatting (C) runs-on: ubuntu-latest @@ -14,7 +27,7 @@ jobs: - name: Check formatting uses: jidicula/clang-format-action@v4.16.0 with: - clang-format-version: 18 + clang-format-version: 21 check-formatting-markdown: name: Check Formatting (Markdown) runs-on: ubuntu-latest diff --git a/.gitmodules b/.gitmodules index 3aebbca..190aad7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,12 @@ [submodule "sgdk"] - path = externals/sgdk - url = https://github.com/Stephane-D/SGDK.git - branch = master - ignore = dirty - shallow = true + path = externals/sgdk + url = https://github.com/Stephane-D/SGDK.git + branch = master + ignore = dirty + shallow = true [submodule "sgcc"] - path = externals/sgcc - url = https://github.com/devpow112/sgcc.git - branch = main - ignore = dirty - shallow = true + path = externals/sgcc + url = https://github.com/devpow112/sgcc.git + branch = main + ignore = dirty + shallow = true