Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e271d4d
Format files
baruchInsert-tech Sep 1, 2025
4dc5316
Add new line at the end of file
baruchInsert-tech Sep 1, 2025
3ff1673
Use solution styles instead of Built in rider
baruchInsert-tech Sep 1, 2025
e21886a
Set warp long lines to false
baruchInsert-tech Sep 4, 2025
eab653d
pass only the solution
baruchInsert-tech Sep 4, 2025
395f59a
Remove retduntent pass
baruchInsert-tech Sep 4, 2025
f44e954
Make sure the .sln is in git
baruchInsert-tech Sep 4, 2025
8c7b896
Add sln
baruchInsert-tech Sep 4, 2025
b6ddd62
Add csproj
baruchInsert-tech Sep 4, 2025
df0665d
path to root
baruchInsert-tech Sep 4, 2025
3b1f697
specify csproj
baruchInsert-tech Sep 4, 2025
18e7b70
change to sln
baruchInsert-tech Sep 4, 2025
bb32e09
include yahalom.csproj
baruchInsert-tech Sep 4, 2025
0ddfde9
find and clean up the code files
baruchInsert-tech Sep 4, 2025
1791616
change to actual solution
baruchInsert-tech Sep 4, 2025
8582499
Revert yaml
baruchInsert-tech Sep 4, 2025
7e16cc5
Removed trailing
baruchInsert-tech Sep 4, 2025
98d08c7
Finds all .csproj files
baruchInsert-tech Sep 4, 2025
d66fa5d
use dotnet format
baruchInsert-tech Sep 4, 2025
fea5f56
specify yahalom
baruchInsert-tech Sep 4, 2025
9e9f71c
Modify yaml
baruchInsert-tech Sep 7, 2025
7fa0c64
Revert "Modify yaml"
baruchInsert-tech Sep 7, 2025
0622404
Add editorconfig
baruchInsert-tech Sep 7, 2025
b5d6d2b
Revert "Add editorconfig"
baruchInsert-tech Sep 7, 2025
ea69162
modify yaml
baruchInsert-tech Sep 7, 2025
56de020
Change to home directory to avoid project file conflicts
baruchInsert-tech Sep 7, 2025
f6741f2
modify yyaml
baruchInsert-tech Sep 7, 2025
79153f3
modify yaml
baruchInsert-tech Sep 7, 2025
0517baa
modify yaml
baruchInsert-tech Sep 7, 2025
e6e00de
use CSharpier
baruchInsert-tech Sep 7, 2025
24d2960
update csharpierignore
baruchInsert-tech Sep 7, 2025
47a5d9f
Revert "update csharpierignore"
baruchInsert-tech Sep 7, 2025
6716b7b
Revert "use CSharpier"
baruchInsert-tech Sep 7, 2025
1628468
modify yaml
baruchInsert-tech Sep 7, 2025
2e9b986
fix yaml
baruchInsert-tech Sep 7, 2025
598ff44
fix yaml again
baruchInsert-tech Sep 7, 2025
df3a274
Change to a temp directory to avoid project file conflicts
baruchInsert-tech Sep 7, 2025
b1363d5
test formatting
baruchInsert-tech Sep 7, 2025
ab8243e
revert test
baruchInsert-tech Sep 7, 2025
82dd3bd
modify yaml to use DotSettings
baruchInsert-tech Sep 7, 2025
0f30a20
EDIT YAML
baruchInsert-tech Sep 7, 2025
75fa01f
MODIFY YAML
baruchInsert-tech Sep 7, 2025
7b75c30
Revert "MODIFY YAML"
baruchInsert-tech Sep 7, 2025
a7b9acb
Add editor config
baruchInsert-tech Sep 7, 2025
5a8ee54
Revert "Add editor config"
baruchInsert-tech Sep 7, 2025
6a76d2c
add new line at the end of file
baruchInsert-tech Sep 7, 2025
d648a93
new line at end of file
baruchInsert-tech Sep 7, 2025
c01b949
Revert "add new line at the end of file"
baruchInsert-tech Sep 7, 2025
e1fe4e4
run jb cleanupcode locally
baruchInsert-tech Sep 7, 2025
8a767dc
Add editor config file
baruchInsert-tech Sep 7, 2025
13e8bda
remove commented lines
baruchInsert-tech Sep 7, 2025
f211d3d
Enforce type isntead of var
baruchInsert-tech Sep 8, 2025
dca4cd1
preserve single line
baruchInsert-tech Sep 8, 2025
7a907d6
Change hard warp settings
baruchInsert-tech Sep 8, 2025
2d57150
fix style
baruchInsert-tech Sep 8, 2025
ed18ee8
test one line property
baruchInsert-tech Sep 8, 2025
9f235fd
revert test
baruchInsert-tech Sep 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = false:suggestion
csharp_style_var_elsewhere = false:suggestion
dotnet_diagnostic.IDE0008.severity = error
dotnet_diagnostic.IDE0007.severity = silent

csharp_preserve_single_line_statements = false
csharp_preserve_single_line_blocks = false
max_line_length = 999
116 changes: 63 additions & 53 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -1,81 +1,91 @@
name: Format
name: format_check

on:
workflow_call:

jobs:
format_check:
name: Verify Rider formatting
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: 8.0.x

- name: Install JetBrains ReSharper Global Tools (jb)
shell: bash
run: |
set -euo pipefail
cd /tmp
dotnet tool install --global JetBrains.ReSharper.GlobalTools
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"

- name: Run Rider cleanup (dry-check via diff)
- name: Discover all solutions
id: discover
shell: bash
run: |
jb cleanupcode \
--profile="Built-in: Reformat Code" \
--no-build \
--verbosity=WARN \
--include="**/*.cs" \
--exclude="**/bin/**" \
--exclude="**/obj/**" \
--exclude="**/.idea/**" \
.
set -euo pipefail
git ls-files '*.sln' > solutions.txt || true
echo "Found solution files:"
cat solutions.txt || true
count=$(wc -l < solutions.txt | tr -d ' ')
echo "solution_count=$count" >> "$GITHUB_OUTPUT"

- name: Detect formatting changes (code files only)
id: diff
- name: Check formatting
if: steps.discover.outputs.solution_count != '0'
shell: bash
run: |
LIST_FILE="$RUNNER_TEMP/files_needing_format.txt"
CHANGED="$(git status --porcelain --untracked-files=no -- '*.cs' '*.csproj' '*.sln' | awk '{print $2}' | sort -u)"
if [[ -n "$CHANGED" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "$CHANGED" | tee "$LIST_FILE"
echo "list_file=$LIST_FILE" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "list_file=" >> "$GITHUB_OUTPUT"
fi
set -euo pipefail
while IFS= read -r sln; do
[ -z "$sln" ] && continue
echo "==> Restoring $sln"
dotnet restore "$sln"

- name: Summarize unformatted files
if: steps.diff.outputs.changed == 'true'
run: |
{
echo "### ❌ Formatting check failed"
echo
echo "The following code files are not formatted properly:"
echo
echo '```'
cat "${{ steps.diff.outputs.list_file }}"
echo '```'
echo
echo "➡️ Run Rider **Code Cleanup** (Built-in: *Reformat Code*) locally and commit."
} >> "$GITHUB_STEP_SUMMARY"
echo "==> Running jb cleanupcode"
jb cleanupcode "$sln" \
--profile="Built-in: Reformat Code" \
--no-build \
--verbosity=WARN \
--include="Assets/**/*.cs" \
--exclude="**/bin/**" \
--exclude="**/obj/**" \
--exclude="**/.idea/**" \
--exclude="**/Library/**" \
--exclude="**/Logs/**" \
--exclude="**/Temp/**"
done < solutions.txt

- name: Annotate files in Checks UI
if: steps.diff.outputs.changed == 'true'
- name: Diff & annotate unformatted files (fail if any)
if: steps.discover.outputs.solution_count != '0'
shell: bash
run: |
while IFS= read -r f; do
echo "::error file=$f,title=Not formatted::Run Rider Code Cleanup (Built-in: Reformat Code) and commit."
done < "${{ steps.diff.outputs.list_file }}"
set -euo pipefail
DIFF_FILE=cleanup.diff
git --no-pager diff --unified=0 -- 'Assets/**/*.cs' > "$DIFF_FILE" || true

- name: Revert any changes (always clean workspace)
if: always()
run: |
git restore --staged .
git checkout -- .
git clean -fd
if [ -s "$DIFF_FILE" ]; then
echo "Unformatted changes detected in Assets/:"
awk '
BEGIN { file="" }
/^\+\+\+ b\// { sub(/^\+\+\+ b\//, "", $0); file=$0; next }
/^@@ / {
match($0, /\+([0-9]+)(,([0-9]+))?/, m)
start = m[1]
printf("::error file=%s,line=%d,title=Formatting differs::Run Rider Code Cleanup (or jb cleanupcode) locally and commit.\n", file, start)
}
' "$DIFF_FILE"
echo "::error title=Formatting check failed::Some files under Assets/ differ from the configured formatting."
exit 1
else
echo "Formatting is clean in Assets/."
fi

- name: Fail job if formatting needed
if: steps.diff.outputs.changed == 'true'
run: exit 1
- name: No solutions found (informative)
if: steps.discover.outputs.solution_count == '0'
run: echo "No .sln files found; skipping formatting check."
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
Expand Down
9 changes: 6 additions & 3 deletions .idea/.idea.yahalom/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

107 changes: 105 additions & 2 deletions .idea/.idea.yahalom/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading