Skip to content

KristofferStrube/EditorConfigWizard

Repository files navigation

EditorConfig Wizard

This is a EditorConfig Wizard written in Blazor WASM. The current goal is to support all the standard C#/.NET EditorConfig rules.

Try it out

All options that have currently been registered can be seen at: https://kristofferstrube.github.io/EditorConfigWizard/

The Wizard itself can be seen at: https://kristofferstrube.github.io/EditorConfigWizard/wizard

Goals

  • Define all Rules and be able to present them.
  • Be able to parse an existing EditorConfig file.
  • Be able to edit an EditorConfig file.
  • Be able to generate new EditorConfig files.
  • Be able to compare two EditorConfig files and present their differences.

Example

An EditorConfig file could have the following content:

[*.{cs,vb}]
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
dotnet_diagnostic.IDE0048.severity = suggestion

The first line specifies that this applies to .cs and .vb files.

The second line specifies that the editor will try to always have parenthesis around arithmetic sub expressions where it could be confusing to know which would be calculated first like in 1 + 2 * 3 which might be read like (1 + 2) * 3 if you are not trained in the precedence of arithmetic operators whereas it would be more clear to write 1 + (2 * 3). The other possible value for this option is never_if_unnecessary which obviously has the opposite effect.

(dotnet_style_parentheses_in_arithmetic_binary_operators is a part of the rule with Id IDE0048)

The third line specifies that this rule should be prompted to the user in the form of a suggestion. We could likewise have chosen to have it appear as a warning or an error or have hidden or disabled it with silent or none.

We would like to be able to present a sample for this which could be the following so that people can make a qualified choice with a quick glance.

always_for_clarity

Prefer parentheses to clarify arithmetic operator precedence.

var v = a + (b * c);

never_if_unnecessary

Prefer no parentheses when arithmetic operator precedence is obvious.

var v = a + b * c;

Sample EditorConfigs out in the wild

While exploring this I have found some prominent examples used by professionals in the industry and big open source projects. Here are a few:

We would like to eventually make it possible to cover many of the same rules that they use and to compare ones own config to theirs.

Issues

Feel free to open issues on the repository if you find any errors with the project or have wishes for features.

Related articles

Checklist for rules

Code quality rules

Design rules

  • unquantified

Documentation rules

  • unquantified

Gloablization rules

  • unquantified

Portability and interopability rules

  • unquantified

Maintainability rules rules

  • unquantified

Naming rules

  • unquantified

Performance rules

  • unquantified

SingleFile rules

  • unquantified

Reliability rules

  • unquantified

Security rules

  • unquantified

Uage rules

  • unquantified

Code style rules

Language rules

  • IDE0003
  • IDE0049
  • IDE0036
  • IDE0040
  • IDE0044
  • IDE0062
  • IDE0047
  • IDE0048
  • IDE0010
  • IDE0017
  • IDE0018
  • IDE0028
  • IDE0032
  • IDE0033
  • IDE0034
  • IDE0037
  • IDE0039
  • IDE0042
  • IDE0045
  • IDE0046
  • IDE0054
  • IDE0056
  • IDE0057
  • IDE0070
  • IDE0071
  • IDE0072
  • IDE0074
  • IDE0075
  • IDE0082
  • IDE0090
  • IDE0180
  • IDE0160
  • IDE0161
  • IDE0016
  • IDE0029
  • IDE0030
  • IDE0031
  • IDE0041
  • IDE0150
  • IDE1005
  • IDE0007
  • IDE0008
  • IDE0021
  • IDE0022
  • IDE0023
  • IDE0024
  • IDE0025
  • IDE0026
  • IDE0027
  • IDE0053
  • IDE0061
  • IDE0019
  • IDE0020
  • IDE0038
  • IDE0066
  • IDE0078
  • IDE0083
  • IDE0084
  • IDE0170
  • IDE0011
  • IDE0063
  • IDE0065
  • IDE0073
  • IDE0130

Unnecesary code rules

  • IDE0001
  • IDE0002
  • IDE0004
  • IDE0005
  • IDE0035
  • IDE0051
  • IDE0052
  • IDE0058
  • IDE0059
  • IDE0060
  • IDE0079
  • IDE0080
  • IDE0081
  • IDE0100
  • IDE0110
  • IDE0140

Miscelllaneous rules

  • IDE0076
  • IDE0077

Formatting rules

  • IDE0055

About

A Wizard for creating and editing EditorConfig files.

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •