Skip to content
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

Add StyleCop to project #57

Open
phantomtypist opened this issue Jun 21, 2017 · 2 comments
Open

Add StyleCop to project #57

phantomtypist opened this issue Jun 21, 2017 · 2 comments

Comments

@phantomtypist
Copy link
Contributor

The Why

Verbiage from the actual StyleCop

The goal is to define guidelines to enforce consistent style and formatting and help developers avoid common pitfalls and mistakes.

StyleCop contributes to this maintainability by encouraging consistency of style, which in turn makes it easier for developers to pick up existing code and work with it productively, and by encouraging plenty of documentation for future developers to read thereby improving the long term maintainability of the source.

I understand that everybody has their own style in how they code, but I think it's beneficial for open source projects like this one to settle on a set of styles and conventions with regards to code. StyleCop rules by default follow most of the standard guidelines set forth for C#. I am not opposed to adding specific rules to conform to something that already exists in this project because I understand it was a port from the Java client and there may be some vestigial styles that came from the Java world.

References:

@TheHokieCoder
Copy link
Contributor

@phantomtypist I stumbled across this issue just now because I realized that my personal settings for indentation messed up the formatting of code that was merged from my recent pull requests. My initial thought was "Hey, let's set up an editorconfig file for the project" and was going to create a new issue for it. But then I saw you've already suggested something similar.

It appears that the StyleCop extension is no longer recommended/supported for VS 2015+, replaced by the StyleCopAnalyzers project, so I'd recommend we go that route. My knowledge of StyleCop is very limited, so I will defer to you for your preferred configuration and the actual integration with the project.

Q: Do StyleCop and an .editorconfig file have a place together? It seems like StyleCop is a warning/error generator, whereas we could actually set editor defaults with the config file, and thus both help new contributors from the get-go and prevent deviation from the style rules down the road? Hopefully that makes sense...

@phantomtypist
Copy link
Contributor Author

Go ahead and add an EditorConfig now. I'll worry about the StyleCop later on.... ultra-low priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants