Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
1ae42b8
feat: add new StyleTest2 class for testing
IShix-g Mar 1, 2025
c559464
refactor: rename field to follow naming conventions
IShix-g Mar 1, 2025
043e19b
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 3, 2025
b84ddab
Merge branch 'feature/unity-lint' into develop/unity-lint-head
IShix-g Mar 3, 2025
44d7265
refactor: clean up unused function definitions
IShix-g Mar 3, 2025
fc492fb
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 3, 2025
f042ec4
refactor: rename and add test methods for consistency
IShix-g Mar 3, 2025
3ac26d0
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 3, 2025
dae3f40
refactor: rename and clean up test methods in StyleTest.cs
IShix-g Mar 3, 2025
aca3569
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 3, 2025
c2a79e2
refactor: rename method to follow naming conventions
IShix-g Mar 3, 2025
f0f6c00
refactor: rename method to follow naming conventions
IShix-g Mar 3, 2025
6891951
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 3, 2025
868bb13
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 3, 2025
904836d
refactor: fix naming inconsistencies in StyleTest.cs
IShix-g Mar 3, 2025
95ef5dd
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
3b0337c
refactor: update code style rules and clean up test class
IShix-g Mar 5, 2025
78fc013
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
957619e
refactor: rename field for consistent naming convention
IShix-g Mar 5, 2025
96e84c0
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
0fdb479
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
d6aab98
feat: add StyleTest3 class for testing code styles
IShix-g Mar 5, 2025
f584e4f
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
20ce9f0
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
9e793a1
feat: add StyleTest4 class for testing coding styles
IShix-g Mar 5, 2025
00f53da
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
94d25e6
refactor: improve naming consistency in StyleTest classes
IShix-g Mar 5, 2025
450ce0c
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
d312902
feat: restructure and consolidate StyleTest files
IShix-g Mar 5, 2025
1b7346b
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
e5a6e56
refactor: rename StyleTest6 to StyleTest7
IShix-g Mar 5, 2025
f8f15d3
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
200a3d3
refactor: rename StyleTest7 to StyleTest8
IShix-g Mar 5, 2025
071f1ed
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 5, 2025
cf0013e
refactor: rename StyleTest8 to StyleTest9
IShix-g Mar 5, 2025
05b0749
Merge branch 'develop/unity-lint-base' into develop/unity-lint-head
IShix-g Mar 7, 2025
f0c424a
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
6f35e5c
refactor: adjust field naming convention for consistency
IShix-g Mar 7, 2025
1993ac6
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
2df30c9
refactor: rename Method2 to Method3 in StyleTest9.cs
IShix-g Mar 7, 2025
55ef6b3
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
2066779
refactor: remove unused Method3 from StyleTest9.cs
IShix-g Mar 7, 2025
0eb16b4
refactor: fix indentation in StyleTest9.cs
IShix-g Mar 7, 2025
70adc83
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
890b48f
feat: add new method to StyleTest9.cs
IShix-g Mar 7, 2025
cb972bb
feat: update .editorconfig with new formatting rules
IShix-g Mar 7, 2025
76bc4a3
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
06a4ee7
refactor: correct inconsistent indentation in StyleTest9.cs
IShix-g Mar 7, 2025
dfb6201
pref: remove final newline insertion in editorconfig
IShix-g Mar 7, 2025
083fc33
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
003504b
refactor: remove unnecessary whitespace in StyleTest9.cs
IShix-g Mar 7, 2025
2f7de45
feat: update code style rules and tooling installation
IShix-g Mar 7, 2025
71f4854
fix: correct dotnet tool usage and formatting command
IShix-g Mar 7, 2025
8b71385
fix: remove specific rule from dotnet format command
IShix-g Mar 7, 2025
cb377a7
fix: improve style violations logging in workflow
IShix-g Mar 7, 2025
675df59
fix: update lint workflow command for accuracy
IShix-g Mar 7, 2025
b182767
fix: improve style check command and remove unused diff flag
IShix-g Mar 7, 2025
49b8ae7
refactor: rename field for consistency with coding standards
IShix-g Mar 7, 2025
a39a2cf
refactor: update naming conventions and fix style issues
IShix-g Mar 7, 2025
4cb83bc
refactor: fix code formatting and naming conventions
IShix-g Mar 7, 2025
30ba0a4
fix: remove trailing whitespace trimming in .editorconfig
IShix-g Mar 7, 2025
cb84f92
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
ec6149f
refactor: remove unnecessary blank line in Method
IShix-g Mar 7, 2025
f3535ff
Merge branch 'develop/unity-lint-base' into develop/unity-lint-head
IShix-g Mar 7, 2025
ab690bd
refactor: update StyleTest9 field and method naming conventions
IShix-g Mar 7, 2025
694c85d
fix: use correct formatter for style analysis
IShix-g Mar 7, 2025
4b9b654
refactor: improve code style for consistency
IShix-g Mar 7, 2025
0378a41
fix: correct command for style checking in workflow
IShix-g Mar 7, 2025
845bc95
refactor: standardize naming conventions in StyleTest9.cs
IShix-g Mar 7, 2025
c85afe9
feat: update lint workflow to use analyzer formatting
IShix-g Mar 7, 2025
ca35206
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
964999e
refactor: fix code formatting and naming conventions
IShix-g Mar 7, 2025
971acc4
feat: add rule for consistent indentation
IShix-g Mar 7, 2025
beefe50
fix: correct command for style violation detection
IShix-g Mar 7, 2025
2adf83d
feat: add new method in StyleTest9.cs
IShix-g Mar 7, 2025
10991c7
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
b0f3dcc
refactor: remove unused method in StyleTest9.cs
IShix-g Mar 7, 2025
9ce084f
refactor: rename StyleTest9 to StyleTest10
IShix-g Mar 7, 2025
057e4c1
feat: update .editorconfig with new diagnostic rules
IShix-g Mar 7, 2025
6a51bdc
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
c82410b
refactor: rename StyleTest10 to StyleTest11
IShix-g Mar 7, 2025
b31a2e0
feat: add formatting options for blank lines in C#
IShix-g Mar 7, 2025
8665ff8
Merge branch 'main' into develop/unity-lint-head
IShix-g Mar 7, 2025
152bd97
refactor: rename StyleTest11 to StyleTest12
IShix-g Mar 7, 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
13 changes: 12 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ csharp_space_after_cast = true
# Insert a space after control flow keywords ('if', 'while', 'for', etc.)
csharp_space_after_keywords_in_control_flow_statements = true
# Do not insert spaces within parentheses '()'
csharp_space_between_parentheses = control_flow_statements, type_casts
csharp_space_between_parentheses = control_flow_statements
# Insert a space before colons ':' in inheritance clauses
csharp_space_before_colon_in_inheritance_clause = true
# Insert spaces after colons ':' in inheritance clauses
Expand Down Expand Up @@ -102,8 +102,17 @@ dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_allow_multiple_blank_lines_experimental = true:silent

csharp_format_keep_blank_lines_between_declarations = true
csharp_format_keep_blank_lines_between_members = true

# StyleCop Diagnostic Rules =================

dotnet_diagnostic.IDE0055.severity = warning
dotnet_diagnostic.IDE0017.severity = warning
dotnet_diagnostic.IDE0028.severity = none
dotnet_diagnostic.IDE0049.severity = warning


# Add braces (`{}`) to if or while statements
dotnet_diagnostic.IDE0011.severity = warning
# Naming rule violation
Expand Down Expand Up @@ -134,6 +143,8 @@ dotnet_diagnostic.SA1101.severity = none
dotnet_diagnostic.SA1111.severity = none
# Use string.Empty for empty strings
dotnet_diagnostic.SA1122.severity = warning
# Elements should have the same indentation
dotnet_diagnostic.SA1137.severity = warning
# Using directives should be placed correctly (either top of file or inside namespace).
dotnet_diagnostic.SA1200.severity = none
# Static elements should appear before instance elements.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-lint-cs-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ jobs:
- name: Collect Style Violations Log
id: violations-log
run: |
output=$(dotnet format TempProject.csproj --verify-no-changes 2>&1 || echo "Style violation detected")
output=$(dotnet format style TempProject.csproj --verify-no-changes 2>&1 || echo "Style violation detected")

if [ -z "$output" ]; then
echo "::notice::No issues were found in the code"
exit 0
Expand Down
15 changes: 0 additions & 15 deletions Assets/Tests/StyleTest/StyleTest.cs

This file was deleted.

3 changes: 0 additions & 3 deletions Assets/Tests/StyleTest/StyleTest.cs.meta

This file was deleted.

20 changes: 20 additions & 0 deletions Assets/Tests/StyleTest/StyleTest12.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace Tests.StyleTest
{
public sealed class StyleTest12
{
public const string ConstString = "ConstString";
static string s_staticField = string.Empty;
string _stringField;
string _stringField2;

Check warning on line 8 in Assets/Tests/StyleTest/StyleTest12.cs

View workflow job for this annotation

GitHub Actions / unity-cs-linter / lint-cs-files / lint-cs-files

Fix formatting
string _stringField3;

Check warning on line 10 in Assets/Tests/StyleTest/StyleTest12.cs

View workflow job for this annotation

GitHub Actions / unity-cs-linter / lint-cs-files / lint-cs-files

Fix formatting
void Method()
{

Check warning on line 13 in Assets/Tests/StyleTest/StyleTest12.cs

View workflow job for this annotation

GitHub Actions / unity-cs-linter / lint-cs-files / lint-cs-files

Fix formatting
}

Check warning on line 15 in Assets/Tests/StyleTest/StyleTest12.cs

View workflow job for this annotation

GitHub Actions / unity-cs-linter / lint-cs-files / lint-cs-files

Fix formatting
void _method2()

Check failure on line 16 in Assets/Tests/StyleTest/StyleTest12.cs

View workflow job for this annotation

GitHub Actions / unity-cs-linter / lint-cs-files / lint-cs-files

Naming rule violation: Prefix '_' is not expected
{
}
}
}
3 changes: 3 additions & 0 deletions Assets/Tests/StyleTest/StyleTest12.cs.meta

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

Loading