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

Ruleset editor equivalent for .editorconfig. #40365

Closed
JohanLarsson opened this issue Dec 13, 2019 · 14 comments · Fixed by #51069
Closed

Ruleset editor equivalent for .editorconfig. #40365

JohanLarsson opened this issue Dec 13, 2019 · 14 comments · Fixed by #51069
Assignees
Labels
Area-IDE Feature Request Need Design Review The end user experience design needs to be reviewed and approved.
Milestone

Comments

@JohanLarsson
Copy link

JohanLarsson commented Dec 13, 2019

The ruleset editor is very useful for example when disabling an entire category. This is useful when disabling StyleCop documentation analyzers in test projects for example.

image

@vatsalyaagrawal vatsalyaagrawal added Area-IDE Feature Request Need Design Review The end user experience design needs to be reviewed and approved. labels Dec 19, 2019
@vatsalyaagrawal vatsalyaagrawal added this to In Queue in IDE: Design review via automation Dec 19, 2019
@vatsalyaagrawal vatsalyaagrawal added this to the Backlog milestone Dec 19, 2019
@xperiandri
Copy link

As I understand this is covered by https://github.com/madskristensen/EditorConfigLanguage/ but not yet for rules.
@madskristensen right?

@madskristensen
Copy link

@xperiandri No, the repo you linked provides the language service only and no other UI for dealing with .editorconfig files.

@mavasani
Copy link
Contributor

mavasani commented Feb 5, 2020

@JohanLarsson You can now do this operation with a single .editorconfig entry, see #38886 (comment)

@mavasani
Copy link
Contributor

mavasani commented Feb 5, 2020

Tagging @mikadumont for the more generic request for a UI over .editorconfig.

@mavasani
Copy link
Contributor

mavasani commented Feb 5, 2020

NOTE: You can find a rule's category by looking at the "Category" column in error list, which is hidden by default.

@JohanLarsson
Copy link
Author

JohanLarsson commented Feb 6, 2020

image

Looks like the category column shows something else.

@mavasani
Copy link
Contributor

mavasani commented Feb 6, 2020

@sharwell you want to fix this in StyleCop analyzers to have the correct category?

@JohanLarsson
Copy link
Author

Pretty sure StyleCop does it right. I think the bug is in the error list UI.

@mavasani
Copy link
Contributor

mavasani commented Feb 6, 2020

Ah, I didn’t notice your diagnostics were from build, not Intellisense. Unfortunately, the diagnostics shown from explicit build cannot find the category as the build output does not have this data. Switching to Build + Intellisense should show the correct values.

@sharwell
Copy link
Member

sharwell commented Feb 6, 2020

For transparency, we've discussed the option of an editorconfig UI a few times internally. While no decisions have been made, there are two important recurring themes:

  1. The custom UI is "challenging" to create and maintain. Aside from the obvious time it takes for design work and the relatively high amount of work that UI testing takes, we have extremely strict requirements for accessibility that must be met. For anything we can deliver as a text editor, the latter two points are resolved automatically so we can put all the real work into the design. The current rule set editor has been hit particularly hard by accessibility issues.
  2. We want to find a way to deliver the EditorConfig Language Service as a default installation item for Visual Studio, and then work to improve the user experience when working with this extension.

@jmarolf
Copy link
Contributor

jmarolf commented Jul 13, 2020

Editorconfig UI Proposal

Entry points

View -> Other Windows

image

Analyzer Project Node in Solution Explorer

image

Right click in .editorconfig file

image

Ctrl+Q Search

Shows up in search for editor config in the ctrl+q search.

Features

Minimum UI Proposal

  • Search
  • Set editorconfig values
  • Filter based on columns

image

Maximal UI Proposal

Additional Features:

  • Categorized sections
    • Code Style
    • Naming Style
    • IDE Analyzers
    • Analyzers
  • Access to editors from Tools->Options
    • Show previews of style settings
    • Allows editing of nameing styles

image

@sharwell sharwell moved this from In Queue to Next meeting in IDE: Design review Jul 13, 2020
@allisonchou
Copy link
Contributor

Notes from today's design meeting (7/13):
It was determined that we need a more complete proposal. Some questions to be answered:

  • How will we support 3rd party analyzers?
  • LSP? We should have higher confidence that this would be able to translate well to the LSP world.

@allisonchou allisonchou removed the Need Design Review The end user experience design needs to be reviewed and approved. label Jul 13, 2020
@allisonchou allisonchou moved this from Next meeting to Need Proposal in IDE: Design review Jul 13, 2020
@allisonchou allisonchou added the Need Design Review The end user experience design needs to be reviewed and approved. label Jul 13, 2020
@jmarolf jmarolf moved this from Need Proposal to Next meeting in IDE: Design review Jul 20, 2020
@jmarolf
Copy link
Contributor

jmarolf commented Jul 20, 2020

Overview

Three sections:

  • Category Tree
    • List all editorconfig files that apply to the solution
    • Lists all the categories under each editorconfig
    • Selecting a category updates the Tabular Data Control section
  • Tabular Data Control
    • Whitespace
    • Code Style
    • Naming Style
    • Analyzers
  • Setting Application Sample
    • The same as tools -> options. Shows what the setting will do once applied

image

Whitespace

Description Preference

image

Code Style

Columns:

Description Preference Severity

image

Naming Style

Reoder Specification Required Style Severity (Remove)

image

Analyzers

ID Description Severity

image

@huoyaoyuan
Copy link
Member

Side note:
RuleSet designer resets comments in ruleset file. Editorconfig designer should preserve them.

@ghost ghost closed this as completed in #51069 Mar 29, 2021
@jmarolf jmarolf moved this from Need Update to Complete in IDE: Design review Sep 20, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Feature Request Need Design Review The end user experience design needs to be reviewed and approved.
Projects
Archived in project
IDE: Design review
  
Complete
Development

Successfully merging a pull request may close this issue.

9 participants