-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/csharp lint test #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
StyleCop
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| while (a<5) a++; // 見づらいコード、波括弧省略 |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| while (a<5) a++; // 見づらいコード、波括弧省略 |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| if(a>=5) |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| if(a>=5) |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| if(a>=5) |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| var myList= new List<int>{1,2,3}; |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| var myList= new List<int>{1,2,3}; |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| var myList= new List<int>{1,2,3}; |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| var myList= new List<int>{1,2,3}; |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| var myList= new List<int>{1,2,3}; |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| var myList= new List<int>{1,2,3}; |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| foreach(int item in myList) { |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| foreach(int item in myList) { |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
| foreach(int item in myList) { |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
Add braces to 'if' statement.
| if (CorrectProperty > 0) |
Add braces to 'if' statement.
| Debug.Log("Hello "); // スペースの不足や、不要なトレイリングスペース(SA1028) |
Add braces to 'for' statement.
Add braces to 'if' statement.
| foreach ( var x in testCollection) // インデント、スペースが正しく装飾されていない |
Add braces to 'foreach' statement.
Add braces to 'while' statement.
| if(a>=5) |
Add braces to 'if' statement.
Add braces to 'else' statement.
The file header is missing or not located at the top of the file.
File name should match first type name.
| public class RuleChecker |
Code should not contain blank lines at start of file
The file header is missing or not located at the top of the file.
Code should not contain blank lines at start of file
Code should not contain multiple whitespace characters in a row.
| public int property_value { get; set; } // プロパティ名が小文字始まり (SA1300) |
Code should not contain multiple whitespace characters in a row.
| int testVariable = 42 ; // 余分なスペースで整列が崩れている (スペースルール反則) |
Code should not contain multiple whitespace characters in a row.
| Debug.Log("Hello "); // スペースの不足や、不要なトレイリングスペース(SA1028) |
Code should not contain multiple whitespace characters in a row.
| testCollection.Add(i); // ループで波括弧が欠如 (SA1503) |
Code should not contain multiple whitespace characters in a row.
Code should not contain multiple whitespace characters in a row.
Braces should not be omitted
Braces should not be omitted
| if(a>=5) |
Braces should not be omitted
| if(m_nonStaticField < 10) Debug.Log("Direct Action") ; // 単一行の制御構文で波括弧が欠如 (SA1503) |
Braces should not be omitted
| foreach ( var x in testCollection) // インデント、スペースが正しく装飾されていない |
Braces should not be omitted
Braces should not be omitted
Braces should not be omitted
A closing brace should not be preceded by a blank line.
| // コレクションと演算で波括弧を使用せず、冗長 |
Element 'property_value' should begin with an uppercase letter
| public int property_value { get; set; } // プロパティ名が小文字始まり (SA1300) |
Element 'test_Method' should begin with an uppercase letter
| public void test_Method() { // メソッド名が PascalCase に一致していない (SA1300) |
Element 'runAdditionalLogic' should begin with an uppercase letter
| for (int i=0; i <50;i++) // 行の適切なスペースを欠く (スペース関連違反) |
Prefix local calls with this
| if(m_nonStaticField < 10) Debug.Log("Direct Action") ; // 単一行の制御構文で波括弧が欠如 (SA1503) |
Prefix local calls with this
| foreach ( var x in testCollection) // インデント、スペースが正しく装飾されていない |
Prefix local calls with this
Braces should not be omitted
| Debug.Log("Correct Property is greater than zero"); |
An opening brace should not be followed by a blank line.
A closing brace should not be preceded by a blank line.
A closing brace should not be preceded by a blank line.
Element 'improperly_named_class' should begin with an uppercase letter
| class improperly_named_class |
Prefix local calls with this
| if (CorrectProperty > 0) |
Prefix local calls with this
| if (CorrectProperty > 0) |
Prefix local calls with this
| public int IntProperty => _intField; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
StyleCop
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
Add braces to 'if' statement.
| if (CorrectProperty > 0) |
Add braces to 'if' statement.
| Debug.Log("Hello "); |
Add braces to 'while' statement.
| if(a>=5) |
Add braces to 'if' statement.
Add braces to 'else' statement.
The file header is missing or not located at the top of the file.
File name should match first type name.
| public class RuleChecker |
Code should not contain blank lines at start of file
The file header is missing or not located at the top of the file.
Code should not contain blank lines at start of file
Braces should not be omitted
| if(a>=5) |
Braces should not be omitted
Braces should not be omitted
Braces should not be omitted
An opening brace should not be followed by a blank line.
A closing brace should not be preceded by a blank line.
| private void Very_Long_Method_With_No_Clear_Structure () |
A closing brace should not be preceded by a blank line.
| // コレクションと演算で波括弧を使用せず、冗長 |
Element 'property_value' should begin with an uppercase letter
| public int property_value { get; set; } |
Element 'runAdditionalLogic' should begin with an uppercase letter
Element 'test_Method' should begin with an uppercase letter
| public void test_Method() { |
Braces should not be omitted
| Debug.Log("Correct Property is greater than zero"); |
An opening brace should not be followed by a blank line.
A closing brace should not be preceded by a blank line.
A closing brace should not be preceded by a blank line.
Element 'improperly_named_class' should begin with an uppercase letter
| class improperly_named_class |
Prefix local calls with this
| if (CorrectProperty > 0) |
Prefix local calls with this
| if (CorrectProperty > 0) |
Prefix local calls with this
| public int IntProperty => _intField; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
StyleCop
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
Add braces to 'if' statement.
| if (CorrectProperty > 0) |
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: '_'
| private string stringField; |
Add braces to 'if' statement.
| Debug.Log("Hello "); |
Add braces to 'while' statement.
| if(a>=5) |
Add braces to 'if' statement.
Add braces to 'else' statement.
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: '_'
| private int m_nonStaticField; |
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: '_'
| private List<int> testCollection = new List<int>(); |
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Prefix 's_' does not match expected prefix '_'
| private static int _s_static_Field = 10; |
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: '_'
| static readonly string s_staticField = "This is a static field"; |
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: '_'
| string stringField; |
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: '_'
| double doubleField; |
The file header is missing or not located at the top of the file.
File name should match first type name.
| public class RuleChecker |
Code should not contain blank lines at start of file
The file header is missing or not located at the top of the file.
Code should not contain blank lines at start of file
Braces should not be omitted
| if(a>=5) |
Braces should not be omitted
Braces should not be omitted
Braces should not be omitted
An opening brace should not be followed by a blank line.
A closing brace should not be preceded by a blank line.
| private void Very_Long_Method_With_No_Clear_Structure () |
A closing brace should not be preceded by a blank line.
| var myList= new List<int>{1,2,3}; |
Elements should be separated by blank line
| public int property_value { get; set; } |
Braces should not be omitted
| Debug.Log("Correct Property is greater than zero"); |
An opening brace should not be followed by a blank line.
A closing brace should not be preceded by a blank line.
A closing brace should not be preceded by a blank line.
Prefix local calls with this
| if (CorrectProperty > 0) |
Prefix local calls with this
| if (CorrectProperty > 0) |
Prefix local calls with this
| public int IntProperty => _intField; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
StyleCop
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Insert '\s'.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Delete 1 characters.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
🚫 [StyleCop] reported by reviewdog 🐶
Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
| if ( item%2 == 0) Debug.Log("偶数 アイテム") ; else Debug.Log ("奇数 アイテム") ; } |
Braces should not be omitted
| Debug.Log("Correct Property is greater than zero"); |
Braces should not be omitted
Braces should not be omitted
| if(a>=5) |
Braces should not be omitted
Braces should not be omitted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
StyleCop
The file header is missing or not located at the top of the file.
| using UnityEngine; |
The file header is missing or not located at the top of the file.
File name should match first type name.
| public class RuleChecker |
Code should not contain blank lines at start of file
The file header is missing or not located at the top of the file.
Code should not contain blank lines at start of file
Braces should not be omitted
Braces should not be omitted
| if(a>=5) |
Braces should not be omitted
Braces should not be omitted
An opening brace should not be followed by a blank line.
A closing brace should not be preceded by a blank line.
| private void Very_Long_Method_With_No_Clear_Structure () |
Elements should be separated by blank line
| public int property_value { get; set; } |
Braces should not be omitted
| Debug.Log("Correct Property is greater than zero"); |
An opening brace should not be followed by a blank line.
A closing brace should not be preceded by a blank line.
A closing brace should not be preceded by a blank line.
Prefix local calls with this
| if (CorrectProperty > 0) |
Prefix local calls with this
| if (CorrectProperty > 0) |
Elements should be separated by blank line
| public string ProperlyStyledProperty { get; } = "This is a properly styled property"; |
Elements should be separated by blank line
| public int IntProperty => _intField; |
Interface names should begin with I
| public interface StyleTestInterface{} |
Prefix local calls with this
| public int IntProperty => _intField; |
| public const int ConstField = 10; | ||
| public static readonly int StaticField = 10; | ||
| public int NonStaticField; | ||
| private static int _s_static_Field = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: 's_'
| public int CorrectProperty { get; set; } | ||
|
|
||
| public static readonly string StaticProperty = "This is a static property"; | ||
| static readonly string staticField = "This is a static field"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: 's_'
|
|
||
| public static readonly string StaticProperty = "This is a static property"; | ||
| static readonly string staticField = "This is a static field"; | ||
| static string staticField2 = "This is a static field"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: 's_'
| public int CorrectProperty { get; set; } | ||
|
|
||
| private int _incorrectField; | ||
| private string stringField; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: '_'
| private int _incorrectField; | ||
| private string stringField; | ||
|
|
||
| static readonly string staticField = "This is a static field"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: 's_'
| private string stringField; | ||
|
|
||
| static readonly string staticField = "This is a static field"; | ||
| static string staticField2 = "This is a static field"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [StyleCop] reported by reviewdog 🐶
Naming rule violation: Missing prefix: 's_'
| public sealed class StyleTestScript5 | ||
| { | ||
| public static readonly string StaticProperty = "This is a static property"; | ||
| public int CorrectProperty { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elements should be separated by blank line
No description provided.