chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.21k stars 896 forks source link

Define the naming conventions and formatting #13

Closed gep13 closed 4 months ago

gep13 commented 9 years ago

Naming conventions are done according to #3096

Formatting is pretty much entirely in keeping with broad .NET ecosystem stylings, with the following notable changes:

Some alterations to editorconfig should be made to disallow alternative patterns to ensure code consistency as well, upgrading many rules from suggestions to warnings or errors, as appropriate.

gep13 commented 9 years ago

@ferventcoder while I am happy to take this on, I should warn you, that in doing so, I am probably going to want to make some changes to the code base. Namely to enable both StyleCop and FxCop. I have found that it is all well and good having a documented naming convention and formatting guide, but if you don't enforce it, it is useless. Are you ok with me adding these steps into the build process?

ferventcoder commented 9 years ago

UppercuT supports those things, but you may need to tweak StyleCop/FxCop as the conventions differ. Right now R# enforces quite a few of those things but not everyone has that installed. So yeah, having builds fail automatically would be beneficial.

On Sunday, January 18, 2015, Gary Ewan Park notifications@github.com wrote:

@ferventcoder https://github.com/ferventcoder while I am happy to take this on, I should warn you, that in doing so, I am probably going to want to make some changes to the code base. Namely to enable both StyleCop and FxCop. I have found that it is all well and good having a documented naming convention and formatting guide, but if you don't enforce it, it is useless. Are you ok with me adding these steps into the build process?

— Reply to this email directly or view it on GitHub https://github.com/chocolatey/choco/issues/13#issuecomment-70403266.

Rob "Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds http://ferventcoder.com http://twitter.com/ferventcoder

ferventcoder commented 9 years ago

Simply put normal recommended conventions differing with:

ferventcoder commented 9 years ago

image

These settings are saved in the chocolatey.sln.DotSettings file so they should be picked up by ReSharper when you open the solution.

gep13 commented 9 years ago

Can we arrange a get together to talk through how UppercuT works? I was planning to just add MSBuild Targets for StyleCop and FxCop, but if you want to add them into UppercuT, I am going to need a crash course :smile_cat:

ferventcoder commented 9 years ago

Sounds good. They are already there. Take a look in the .uppercut file for runners near the bottom.

I also think I yanked then in .build.custom/default.build.replace.

We can do a chat as well. :)

On Sunday, January 18, 2015, Gary Ewan Park notifications@github.com wrote:

Can we arrange a get together to talk through how UppercuT works? I was planning to just add MSBuild Targets for StyleCop and FxCop, but if you want to add them into UppercuT, I am going to need a crash course [image: :smile_cat:]

— Reply to this email directly or view it on GitHub https://github.com/chocolatey/choco/issues/13#issuecomment-70422452.

Rob "Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds http://ferventcoder.com http://twitter.com/ferventcoder

pauby commented 8 months ago

@gep13 can you provide an update to this? Is there a later issue we can reference?

gep13 commented 4 months ago

@pauby said... @gep13 can you provide an update to this? Is there a later issue we can reference?

This issue, at least in part, is being tackled by the work that @vexx32 did here:

https://github.com/chocolatey/choco/pull/3417

This was done under a series of (maint) commits, but I will hook up the issue to the PR so that there is some traceability.

@vexx32 do you think that we are good to close this issue for now, or do you have more work planned?

Would it make sense to add/update a section in the README for this repository, explaining the usage of EditorConfig, etc.?

vexx32 commented 4 months ago

@gep13 I think the only thing that isn't done on this score now is that the namespaces are all still lowercased. Everything else with renaming was done here: https://github.com/chocolatey/choco/issues/3096

Everything else is pretty well done... perhaps it's worth adding a brief note to the readme stating that we use .editorconfig and expect folks to conform to the styles defined in it? Maybe a link to documentation about editorconfig usage, but beyond that I don't see that much value in going into depth about the usage of a very standard tool like that.

gep13 commented 4 months ago

@vexx32 said... perhaps it's worth adding a brief note to the readme stating that we use .editorconfig and expect folks to conform to the styles defined in it? Maybe a link to documentation about editorconfig usage, but beyond that I don't see that much value in going into depth about the usage of a very standard tool like that.

Yes, I think that is a good idea. We don't want/need to explain the intricacies of how .editorconfig files, etc. work, but I think calling out to say that we are using them, and they will be enforced at some point, makes sense to get documented.

Can I get you to put up a PR with this, and we can get this issue closed off. If we need to track the changes to the namespaces, can you also get that added as a separate issue?

gep13 commented 4 months ago

Looking at the original description of this issue, and some of the comments after it, the new naming conventions and formatting aren't the same as what we have settled on. Can you also update the issue description with what has been done?

vexx32 commented 4 months ago

I have filed #3432 to track the namespace renaming in the next major version, as it will be a breaking change for any projects depending on chocolatey.dll.

choco-bot commented 3 months ago

:tada: This issue has been resolved in version 2.3.0 :tada:

The release is available on:

Your GitReleaseManager bot :package: :rocket: