Skip to content

Commit 2347264

Browse files
committed
refactor: fix style violations and improve code consistency
1 parent 76e30b6 commit 2347264

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Assets/Tests/StyleTest/FileNameIssueStyleViolationTest.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ public class FileNameIssueStyleViolationTest
1010

1111
// 正しい名前のフィールド
1212
private string _exampleField = "Valid";
13-
14-
// Staticメンバー配置順序の違反(推奨: 静的要素 → インスタンスメンバーの順序)
15-
public static readonly string StaticExample = "Static Value";
13+
14+
// スペースが1つ足りない違反
15+
public static readonly string StaticExample = "Static Value";
1616

1717
// メソッド名の命名規則違反(PascalCaseが推奨される)
1818
public void printmessage() // 【違反】PascalCaseでない
@@ -31,6 +31,12 @@ public void CheckCondition(int value)
3131
{
3232
if (value > 0) // 【違反】波括弧が無い
3333
Debug.Log("Value is positive.");
34+
35+
float x = 10;
36+
// 【違反】キャストと値の間に空白
37+
int y = (int)x;
38+
// 【違反】制御フロー ステートメントのキーワードの後に空白文字を配置
39+
for (var i=0;i<x;i++) { }
3440
}
3541

3642
// 正しい条件分岐

0 commit comments

Comments
 (0)