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

Code style checker before checking in #37

Closed
tg123 opened this issue Oct 21, 2017 · 12 comments
Closed

Code style checker before checking in #37

tg123 opened this issue Oct 21, 2017 · 12 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@tg123
Copy link
Member

tg123 commented Oct 21, 2017

Sadly, C# did not have a go fmt yet.
A check tool before checking in is wanted.

the tool should include, but not limit to, those features:

  • naming convention
  • line coding (crlf / lf)
  • utf8 bom
  • run on all platform (linux, mac, windows, ...)

some candidates:
https://github.com/dotnet/codeformatter
https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md

@tg123 tg123 mentioned this issue Oct 24, 2017
@sesispla
Copy link
Contributor

Maybe StyleCop.Analyzers is what we are looking for. Not sure if it can work with dotnet/cli, but worth to take a look.

StyleCop is the old guy helping us keep code uniform between developers, in the full Visual Studio/Windows world :)

Some config examples

@tg123
Copy link
Member Author

tg123 commented Nov 14, 2017

I will have a look too.

I am porting some tools to .net core

https://github.com/tg123/codeformatter
https://github.com/tg123/editorconfig-core-net

and working on a .net core version of eclint to combine those tools together.

@rahulrai-in
Copy link

Is this issue still open? I can see that .editorconfig file is present in the code. Is there anything else that needs to be done?

@tg123
Copy link
Member Author

tg123 commented Jul 4, 2018

please see #187
Will/May apply resharper code style checker

@rahulrai-in
Copy link

Why do we need to apply Resharper code style check? Would we like do away with .editorconfig?

@tg123
Copy link
Member Author

tg123 commented Jul 4, 2018

.editorconfig is a place to store policy
a tool (resharper or something else) is need to enforce policies wthin .editorconfig are applied to all files

those policies might be a battle between

func {
}

and

func
{
}

unluckily, there is no go fmt for dotnet at the moment.

@rahulrai-in
Copy link

Just wanted to make sure that I understand this correctly. Do we want to execute R# using the editorconfig on the solution then?

@tg123
Copy link
Member Author

tg123 commented Jul 4, 2018

@rahulrai-in sorry for the unclear
Resharper would be one choice for code style checking tools
but it does not support .editorconfig as I know

I just want to use Resharper to act as code style checking tools via VSTS and the polices might be defined somewhere else.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 24, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 24, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants