Skip to content

Conversation

@iSazonov
Copy link
Collaborator

@iSazonov iSazonov commented Jul 25, 2018

PR Summary

Related #4708.

The .editorconfig file can be used by various editors and tools like Visual Studio and CodeFormatter.

The .editorconfig comes from Roslyn and CoreFX repositories:
https://github.com/dotnet/corefx/blob/master/.editorconfig
https://github.com/dotnet/roslyn/blob/master/.editorconfig

Description http://EditorConfig.org

Options https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference

PR Checklist

.editorconfig Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify? We have in the guideline:

Use _camelCase to name internal and private fields and use readonly where possible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must have misread the guidance. Resolved

@TravisEz13
Copy link
Member

some of these conflict with style cop rules. It would be good to make them consistent (disable the conflicting rules)

@iSazonov
Copy link
Collaborator Author

I believe we have already gained experience with StyleCop and we can turn off a few more rules. But first I would like to make some PR with CodeFormatting and style fixes so that we see the state of things more clearly. Also I guess CodeFormatter will use the .editorconfig file.

@TravisEz13
Copy link
Member

Many of the naming rules, especially for non-public fields, conflict with the style cop rules. I believe those rules should be disabled before we add a file that defines conflicting rules.

@stale
Copy link

stale bot commented Aug 29, 2018

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

@stale stale bot added the Stale label Aug 29, 2018
@iSazonov
Copy link
Collaborator Author

@SteveL-MSFT Could you please share plans about fixing style issues?
My suggetion is to spend 1-2 weeks and fix as many style issues as we need, adjust and approve StyleCop and .editorconfig rules, reformat all code with CodeFormatter. After that we can return to normal contributing process with minimal style issue pressure.

@stale stale bot removed the Stale label Aug 30, 2018
@SteveL-MSFT
Copy link
Member

@iSazonov I think after GA of 6.1 would be the best time to bulk address style issues to have consistency. We're still targeting mid Sept for GA, so perhaps we can postpone this until then.

@anmenaga
Copy link

@SteveL-MSFT GA shipped; it's time to look at this. :)

@iSazonov
Copy link
Collaborator Author

Rebased to update CIs.

.editorconfig Outdated
# (Please don't specify an indent_size here; that has too many unintended consequences.)

# Code files
[*.{cs,csx,vb,vbx}]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have any vb code, but we do have cpp.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

.editorconfig Outdated
charset = utf-8

# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about ps1xml files? Should we remove extensions we don't use in this repo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added resx,ps1xml. Removed unused.

@iSazonov
Copy link
Collaborator Author

@TravisEz13 Can we merge? Or we should address

some of these conflict with style cop rules. It would be good to make them consistent (disable the conflicting rules)

If .editorconfig rules is ok we could continue with style cop rules in follow PRs.

@TravisEz13 TravisEz13 merged commit 3b9f758 into PowerShell:master Oct 1, 2018
@iSazonov iSazonov deleted the add-editorconfig branch October 2, 2018 03:16
xtqqczze added a commit to xtqqczze/PowerShell-PowerShell that referenced this pull request Jan 19, 2020
Enable support for EditorConfig in OmniSharp. Since omnisharp-roslyn version 1.33.0, OmniSharp has had this support.

* https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1330---2019-07-01
* PowerShell#7357
* OmniSharp/omnisharp-roslyn#1526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants