Coder Social home page Coder Social logo

rehansaeed / editorconfig Goto Github PK

View Code? Open in Web Editor NEW
617.0 617.0 171.0 104 KB

A very generic .editorconfig file supporting .NET, C#, VB and web technologies.

License: MIT License

csharp dotnet editorconfig editorconfig-settings stylecop visual-studio web

editorconfig's Introduction

Muhammad Rehan Saeed's Youtube Muhammad Rehan Saeed's Twitch Muhammad Rehan Saeed's Twitter Muhammad Rehan Saeed's Mastadon Muhammad Rehan Saeed's GitHub Muhammad Rehan Saeed's StackOverflow Muhammad Rehan Saeed's LinkedIn Muhammad Rehan Saeed's RSS Feed

I am a professional Software Developer at Microsoft and blogger at RehanSaeed.com. Although I work for Microsoft, my opinions are my own. If it’s written in C# or .NET, I have probably written something using it in anger!

I live stream my software development escapades on Youtube and Twitch twice a week. Feel free to join me live and ask questions.

Youtube views ‏‏‎ ‎ Youtube subscribers

You can see some of the open source projects that I have started and maintained in my portfolio. There are many others I have contributed to which you can see in my GitHub profile and of course there are other commercial projects that I cannot disclose.

GitHub followers ‏‏‎ ‎ GitHub followers ‏‏‎ ‎ GitHub stars

Muhammad Rehan Saeed's GitHub statistics Muhammad Rehan Saeed's GitHub statistics

I have been fairly active on StackOverflow. You can view my Stack Overflow profile and see my contribution to the community.

Stack Overflow profile

Before I joined Microsoft, I was a Microsoft Most Valuable Professional (MVP) for three years. This gave me inside information into the work Microsoft was doing. Once I joined Microsoft, I had to give up this award.

Microsoft Most Valuable Professional (MVP)

Microsoft Most Valuable Professional (MVP) Alumni

Here are some of the awards I have been given for my work as a software engineer in open source or elsewhere:

Open UK Honours 2022

Open UK Honours 2022 Open UK Honours 2021 Open UK Honours 2020

Do you have questions or comments about my work? Please feel free to contact me.

editorconfig's People

Contributors

ddieppa avatar graue70 avatar henrygab avatar jpawlowski avatar kirkone avatar loynoir avatar muiriswoulfe avatar rehansaeed avatar rpf3 avatar vannevelj avatar xeevis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

editorconfig's Issues

New Settings in VS 16.11

Edit: Moved these settings to: #76. More settings listed below.

See dotnet/roslyn#50358

# IDE2000, AllowMultipleBlankLines
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
# IDE2001, AllowEmbeddedStatementsOnSameLine
csharp_style_allow_embedded_statements_on_same_line_experimental = false:warning
# IDE2002, AllowBlankLinesBetweenConsecutiveBraces
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:warning
# IDE2003, AllowStatementImmediatelyAfterBlock
dotnet_style_allow_statement_immediately_after_block_experimental = false:warning
# IDE2004, AllowBlankLineAfterColonInConstructorInitializer
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false:warning

Is there a way to enforce const to be real Pascal Case only?

Currently, there is no way to prevent the const fields to use all upper case. Even though in .editorconfig, already defined to be pascal_case only, but it doesn't seem to be able to differentiate all_upper vs pascal_case. Any workaround for this?

Adding .editorconfig breaks TreatWarningsAsErrors

Describe the bug

Adding the .editorconfig file from repo main breaks TreatWarningsAsErrors

To Reproduce

  1. Download the attached project ErrorsTest.zip
  2. Set build configuration to Release and build.
  3. StyleCop warnings are not treated as errors and do not cause the build to fail.
  4. Remove .editorconfig file and rebuild. Build will fail.

Expected behaviour

When the build configuration is set to release the build should fail.

Rules

Provide links to any rules in question.

New Settings in VS 16.10

VS 16.10 adds new settings. Settings are suffixed with _experimental. Wait for it to be released before adding.

See dotnet/roslyn#50358

# IDE2000, AllowMultipleBlankLines
dotnet_style_allow_multiple_blank_lines_experimental = true
# IDE2001, AllowEmbeddedStatementsOnSameLine
csharp_style_allow_embedded_statements_on_same_line_experimental = true
# IDE2002, AllowBlankLinesBetweenConsecutiveBraces
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
# IDE2003, AllowStatementImmediatelyAfterBlock
dotnet_style_allow_statement_immediately_after_block_experimental = true
# IDE2004, AllowBlankLineAfterColonInConstructorInitializer
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true

See dotnet/roslyn#49990

dotnet_style_namespace_match_folder

See dotnet/roslyn#55005

csharp_style_prefer_null_check_over_type_check

New Formerly Experimental Settings

Describe the feature

Several settings are currently experimental but will soon be published formerly:

When this happens, update the .editorconfig.

Rules

# IDE2000, AllowMultipleBlankLines
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
# IDE2001, AllowEmbeddedStatementsOnSameLine
csharp_style_allow_embedded_statements_on_same_line_experimental = false:warning
# IDE2002, AllowBlankLinesBetweenConsecutiveBraces
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:warning
# IDE2003, AllowStatementImmediatelyAfterBlock
dotnet_style_allow_statement_immediately_after_block_experimental = false:warning
# IDE2004, AllowBlankLineAfterColonInConstructorInitializer
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false:warning

Version 4.1.0 still says "4.0.0" on the file header

Describe the bug

Latest version on the project is 4.1.0 as per https://github.com/RehanSaeed/EditorConfig/releases , however when looking at the file's contents, the header still says it is version 4.0.0:

# Version: 4.0.0 (Using https://semver.org/)
# Updated: 2021-10-12

Aparently, the update date also doesn't match with the newest version.

Expected behaviour

File version should match the release version to avoid confusion for consumers.

Support for .razor files

Maybe I did something wrong but is there a way to be able to use all the c# settings also in *.razor files?

Improved .editorconfig compliance with .NET guidelines

This is a somewhat long post, expanding somewhat on Dotnet-Boxed/Framework#22.

TLDR;

  1. Split naming rules into those specified by the .NET naming guidelines, and those which are user-preference.
  2. Make it clearer where users can add customizations and overrides without stepping on the .NET naming guidelines.
  3. Make it annoying to use public fields that are disallowed by the .NET Design Guidelines.

Foundational Background

Because of the above, the state for a given field is defined by:

  • {true|false} field type allowed by the .NET design guidelines
  • {null|pascal} naming convention specified by the naming guidelines

The recommendation is to split field name formatting as follows:

  1. {true, pascal} == public const, protected const
  2. {true, pascal} == public static readonly, protected static readonly
  3. user-specified rules for private, internal, and protected fields
  4. {true, null} == catch-all for private, internal, and protected internal fields
  5. {false, *} == any other type of field not in above categories

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.