-
Notifications
You must be signed in to change notification settings - Fork 18
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
Make StyleCop & al. happier #21
Open
gregoryruiz
wants to merge
17
commits into
alexvictoor:master
Choose a base branch
from
gregoryruiz:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- use NFluent 'CheckThat...' instead of 'Assert', as the tests majority do
- [StyleCop Rule: SA1503] The body of the if statement must be wrapped in opening and closing curly brackets. - [StyleCop Rule: SA1505] An opening curly bracket must not be followed by a blank line. - [StyleCop Rule: SA1507] The code must not contain multiple blank lines in a row. - [StyleCop Rule: SA1508] A closing curly bracket must not be preceded by a blank line. - [StyleCop Rule: SA1513] Statements or elements wrapped in curly brackets must be followed by a blank line. - [StyleCop Rule: SA1515] A single-line comment must be preceded by a blank line or another single-line comment, or must be the first item in its scope. - [StyleCop Rule: SA1516] Adjacent elements must be separated by a blank line. - [StyleCop Rule: SA1517] The code must not contain blank lines at the start of the file.
- Test class names should end with 'Tests'
- [StyleCop Rule: SA1600] The class must have a documentation header. - [StyleCop Rule: SA1644] The documentation header must not contain blank lines. Use the 'para' tag to insert line breaks within documentation text. - [StyleCop Rule: SA1615] The documentation header must contain a returns tag since the element has a return value. disabled as unknown copyright and company: - [StyleCop Rule: SA1633] The file has no header, the header Xml is invalid, or the header is not located at the top of the file. - [StyleCop Rule: SA1634] The file header must contain a copyright tag. disabled in tests classes: - [StyleCop Rule: SA1600] The class must have a documentation header.
disabled as conflicts with internal naming rules: - [StyleCop Rule: SA1309] Field names must not begin with underscore. - ReSharper InconsistentNaming
- [StyleCop Rule: SA1111] The closing parenthesis or bracket must be placed on the same line as the last parameter in the parameter list. - [StyleCop Rule: SA1113] The comma must be placed on the same line as the previous parameter. - [StyleCop Rule: SA1115] The parameter must begin on the line after the previous parameter. - [StyleCop Rule: SA1116] If the method parameters are on separate lines, the first parameter must begin on the line beneath the name of the method. - [StyleCop Rule: SA1121] Use the built-in type alias 'string' rather than String or System.String. - [StyleCop Rule: SA1121] Use the built-in type alias 'char' rather than Char or System.Char. - [StyleCop Rule: SA1122] Use string.Empty rather than "". disabled as it conflicts with internal naming rules: - [StyleCop Rule: SA1101] The call to _XXX must begin with the 'this.' prefix to indicate that the item is a member of the class. - [StyleCop Rule: SA1126] The call to _XXX must begin with the 'this.', 'base.', 'object.' or 'YYY' prefix to indicate the intended method call. - ReSharper ArrangeThisQualifier
- string.Compare is culture specific, replace it with string.CompareOrdinal - "clarify" reading
- [StyleCop Rule: SA1201] All properties must be placed after all fields. - [StyleCop Rule: SA1201] All properties must be placed after all interfaces. - [StyleCop Rule: SA1201] All methods must be placed after all properties. - [StyleCop Rule: SA1202] All private fields must be placed after all public fields. - [StyleCop Rule: SA1202] All private methods must be placed after all public methods. - [StyleCop Rule: SA1204] All static public methods must be placed before all non-static public methods. - [StyleCop Rule: SA1206] The 'static' keyword must come before the 'other' keyword in the element declaration.
- [StyleCop Rule: SA1400] The class must have an access modifier. - [StyleCop Rule: SA1401] Fields must be declared with private access. Use properties to expose fields.
- [StyleCop Rule: SA1650] The documentation text within the remarks tag contains incorrectly spelled words: XXX
- move "using ..." after namespaces declaration
- so we are not tempted to use c#6 syntactic sugars / features
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
👋
Multiple cosmetic proposals: