Skip to content

Commit 7a4b303

Browse files
authored
Synced with plugin template v5 (#8)
* Synced with plugin template v5 * Fixed style errors
1 parent 318511e commit 7a4b303

83 files changed

Lines changed: 3973 additions & 1415 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = tab
8+
insert_final_newline = true
9+
max_line_length = 120
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
15+
[{*.{yml,yaml},.clang{-format,-tidy,d}}]
16+
indent_size = 2
17+
indent_style = space
18+
19+
# Kotlin requires spaces for its linter
20+
[*.{kt,kts}]
21+
indent_style = space
22+
indent_size = 4
23+
24+
# clang-format aligns by colon, mixing tabs with spaces
25+
[*.{m,mm,h}]
26+
indent_style = unset
27+
28+
# Properties
29+
[*.properties]
30+
indent_style = space
31+
indent_size = 2
32+
max_line_length = unset

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ body:
1010
options:
1111
- label: I have searched the existing open and closed issues
1212
required: true
13-
- label: I have searched the existing discussions
13+
- label: I have searched the discussions
14+
required: true
15+
- label: I have starred the repository
1416
required: true
1517
- type: textarea
1618
attributes:

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ body:
1010
options:
1111
- label: I have searched the existing open and closed issues
1212
required: true
13-
- label: I have searched the existing discussions
13+
- label: I have searched the discussions
14+
required: true
15+
- label: I have starred the repository
1416
required: true
1517
- type: textarea
1618
attributes:
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
# © 2026-present https://github.com/cengiz-pz
3+
#
4+
5+
name: Install editorconfig-checker
6+
description: Installs a pinned version of editorconfig-checker with caching.
7+
8+
inputs:
9+
version:
10+
description: 'The version of editorconfig-checker to install'
11+
required: false
12+
default: '3.6.1'
13+
14+
runs:
15+
using: composite
16+
17+
steps:
18+
- name: Cache editorconfig-checker
19+
id: cache-ec
20+
# Skip caching when running locally via 'act' to avoid missing Node/Docker execution errors
21+
if: env.ACT != 'true'
22+
uses: actions/cache@v5
23+
with:
24+
path: ~/.local/bin/editorconfig-checker
25+
key: ${{ runner.os }}-${{ runner.arch }}-ec-${{ inputs.version }}
26+
27+
- name: Install editorconfig-checker
28+
# This runs if there's a cache miss OR if the cache step was skipped entirely
29+
if: steps.cache-ec.outputs.cache-hit != 'true'
30+
shell: bash
31+
run: |
32+
# Determine OS and Architecture
33+
OS_TYPE=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
34+
ARCH_TYPE=$(uname -m)
35+
36+
# Map architecture to release naming conventions
37+
if [ "$ARCH_TYPE" = "x86_64" ]; then
38+
ARCH="amd64"
39+
elif [ "$ARCH_TYPE" = "aarch64" ] || [ "$ARCH_TYPE" = "arm64" ]; then
40+
ARCH="arm64"
41+
else
42+
echo "Unsupported architecture: $ARCH_TYPE"
43+
exit 1
44+
fi
45+
46+
ASSET="ec-${OS_TYPE}-${ARCH}"
47+
48+
echo "Downloading ${ASSET}..."
49+
curl -sSLO "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v${{ inputs.version }}/${ASSET}.tar.gz"
50+
51+
tar xzf "${ASSET}.tar.gz"
52+
mkdir -p "$HOME/.local/bin"
53+
mv "bin/${ASSET}" "$HOME/.local/bin/editorconfig-checker"
54+
chmod +x "$HOME/.local/bin/editorconfig-checker"
55+
56+
# Clean up
57+
rm -rf "${ASSET}.tar.gz" bin/
58+
59+
- name: Add to PATH
60+
shell: bash
61+
run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#
2+
# © 2026-present https://github.com/cengiz-pz
3+
#
4+
5+
name: Install ktlint
6+
description: Installs a pinned version of ktlint, caches it, and places it on PATH.
7+
8+
inputs:
9+
version:
10+
description: 'The version of ktlint to install'
11+
required: false
12+
default: '1.8.0'
13+
14+
runs:
15+
using: composite
16+
17+
steps:
18+
# Attempt to restore ktlint from the cache
19+
- name: Cache ktlint
20+
id: cache-ktlint
21+
# Skip caching when running locally via 'act' to avoid missing Node/Docker execution errors
22+
if: env.ACT != 'true'
23+
uses: actions/cache@v5
24+
with:
25+
path: ~/.local/bin/ktlint
26+
key: ${{ runner.os }}-ktlint-${{ inputs.version }}
27+
28+
# Download ktlint ONLY if it wasn't found in the cache
29+
- name: Download ktlint
30+
if: steps.cache-ktlint.outputs.cache-hit != 'true'
31+
shell: bash
32+
run: |
33+
echo "Cache miss: Downloading ktlint version ${{ inputs.version }}..."
34+
mkdir -p "$HOME/.local/bin"
35+
curl -sSL "https://github.com/pinterest/ktlint/releases/download/${{ inputs.version }}/ktlint" -o "$HOME/.local/bin/ktlint"
36+
chmod +x "$HOME/.local/bin/ktlint"
37+
38+
# Expose ktlint to PATH (must run on both cache hits and misses)
39+
- name: Add ktlint to PATH
40+
shell: bash
41+
run: |
42+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
43+
echo "ktlint is ready!"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#
2+
# © 2026-present https://github.com/cengiz-pz
3+
#
4+
5+
name: Install Node
6+
description: Installs Node.js manually when running under act, or via actions/setup-node on GitHub.
7+
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Install Node (act)
12+
if: env.ACT == 'true'
13+
shell: bash
14+
run: |
15+
NODE_VERSION=22.13.1
16+
17+
OS=$(uname -s)
18+
ARCH=$(uname -m)
19+
20+
if [ "$OS" = "Darwin" ]; then
21+
PLATFORM="darwin"
22+
else
23+
PLATFORM="linux"
24+
fi
25+
26+
if [ "$ARCH" = "arm64" ]; then
27+
ARCH="arm64"
28+
else
29+
ARCH="x64"
30+
fi
31+
32+
FILE="node-v$NODE_VERSION-$PLATFORM-$ARCH.tar.xz"
33+
URL="https://nodejs.org/dist/v$NODE_VERSION"
34+
35+
echo "Downloading $FILE from $URL"
36+
curl -fsSL "$URL/$FILE" -o node.tar.xz
37+
38+
mkdir -p "$HOME/node"
39+
tar -xJf node.tar.xz -C "$HOME/node" --strip-components=1
40+
41+
# Make available to this step
42+
export PATH="$HOME/node/bin:$PATH"
43+
44+
# Make available to later steps
45+
echo "$HOME/node/bin" >> "$GITHUB_PATH"
46+
47+
node -v
48+
npm -v
49+
50+
- name: Setup Node (GitHub)
51+
if: env.ACT != 'true'
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: 22

0 commit comments

Comments
 (0)