Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Define the Code analysis ProjectRuleSet file #501

Open
aboimpinto opened this issue Oct 10, 2018 · 2 comments
Open

Define the Code analysis ProjectRuleSet file #501

aboimpinto opened this issue Oct 10, 2018 · 2 comments

Comments

@aboimpinto
Copy link
Contributor

Now that CodeAnalysis is successful installed in NeoSharp, it's time to define what rules the team want to see enforce by this process.

CoZ doesn't have a RuleSet defined then this could be a great opportunity to envolve @AshRolls to help choose this rules for this project and for all C# projects that CoZ support.

@gubanotorious as NeoSharp project mananger should be involved too and all the member of the team.

This task is a follow up of the #499 and after this should be created a task where the team should clean all the warning.
When the application is clean and without warnings we should change CodeAnalys behavior to create compile errors.

@aboimpinto
Copy link
Contributor Author

aboimpinto commented Oct 18, 2018

I would like to discuss the rule SA 1309: FieldNamesMustNotBeginWithUnderscore

Or we use the underscore to prefix the private fields or we use the prefix "this"
StyleCop disallows the use of underscores, m_, etc., to mark local class fields, in favor of the ‘this.’ prefix
anyone can read the justification on the link
http://stylecop.soyuz5.com/SA1309.html

@aboimpinto
Copy link
Contributor Author

Another question is regarding the usage of #Region
The StyleCop indicate that using #region could hide code and because of that this rules suggest to remove it.

Personally I like the regions because I can group implementations of a interface, all the public methods and all the private methods together (for example) and this can be very helpful to understand the code.

aboimpinto added a commit to aboimpinto/neo-sharp that referenced this issue Oct 22, 2018
shargon pushed a commit that referenced this issue Oct 23, 2018
* add CodeAnalysis to the solution

* add symbolic link to the NeoSharp.Core project

* merge with development.

* Project Rule Set file defined and added to the projects. #501

* Ignoring failing tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant