332 questions
Score of 0
0 answers
109 views
Visual Studio modifies .csproj files on branch switch (possible .editorconfig / Code Cleanup issue)
I added an .editorconfig file to the solution. The linter is CodeLens, the analyzer is SonarQube, and Code Cleanup automatically applies rules (profile 2). After some time, other developers started ...
Tooling
1
vote
1
replies
123
views
C# style rules defined in .editorconfig are ignored in Razor code blocks
I am setting up an .editorconfig file to enforce certain conventions and code styles.
I have noticed that C# style rules only seem to apply to *.cs files and not Razor C# code blocks.
Take, as an ...
Score of 0
1 answer
195 views
editorconfig rule to enforce that namespace is set in all C# files
I want to set a rule in .editorconfig so that all C# files where namespace is not explicitly set should render an error.
I've added these:
dotnet_diagnostic.IDE0130.severity = error # Namespace does ...
Score of 0
1 answer
120 views
Angular syntax, VS Code and editorConfig issue
When I format the page in VS Code, @if and @else, for example, are not formatted properly. That is, we get something like this:
<div>
@if {
<div>something</div>
}
@...
Score of 1
1 answer
133 views
How can I configure editors to follow Go's conventions for indentation with tabs & alignment with spaces?
I've read that Go uses
tabs for indentation
spaces for alignment
and this sounds like a great idea to resolve the tabs-versus-spaces fight and get the benefits that tabs promise without the problems ...
Score of 1
0 answers
221 views
.editorconfig Support in Windsurf IDE for C# Formatting
I've been trying to get automatic code formatting working with my .editorconfig settings in Windsurf IDE for my C# codebase.
I tried the Prettier extension, but found it doesn't support C#. I also ...
Score of 2
1 answer
213 views
How to fix poor C# pattern formatting e.g. using editorconfig
I have the following code:
internal class Program
{
private static bool IsMatchingThing1(IThing thing)
{
return thing is
AThing {
Children: [
...
Score of 1
0 answers
86 views
IntelliJ not using editorconfig: "Found illegal descriptor: {}"
IntelliJ's log has several lines like this one:
2025-04-24 09:52:05,878 [ 14206] WARN - #org.editorconfig.language.schema.parser.EditorConfigJsonSchemaParser - Found illegal descriptor: {}
I have ...
Score of 1
1 answer
667 views
.editorconfig ignored in one Visual Studio project in the solution
I have a solution with multiple c# projects the .editorconfig is working fine except for one Project.
The csproj file of the effected project is the is the legacy csproj formate.
I tried:
to copy the ...
Score of 6
1 answer
336 views
Visual Studio editorconfig exclusion.dic randomly stops working
In my solution I have an .editorconfig file with the following section:
[*.cs;*.md]
spelling_languages = en-us
spelling_checkable_types = strings, identifiers, comments
spelling_exclusion_path = ./....
Score of 0
0 answers
164 views
editorconfig and placement of close brace for object initializers
In JetBrains Rider, the following code:
var p = new
{
companyId,
includeHistory,
getDescriptions,
includeFlexiFields,
includeRelatedValues,
};
formats like this:
var p = new
{
...
Score of 0
1 answer
108 views
Does EditorConfig has a rule to recognize Todo Comments?
I am working on a C# .NET Code Base, where a Custom Roslyn Analyzer is involved that analyze Existence of Todo Comments. We work with the IDE JetBrains Rider 2024.2.4.
Recently we integrated ...
Score of 0
1 answer
130 views
What is overriding my .editorconfig rules?
I am currently facing a scenario where I have an .editorconfig file in the root directory with
[{*Test.cs,*Tests.cs}]
dotnet_diagnostic.CA1707.severity = none
This rule should disable the warning (...
Score of 1
0 answers
400 views
Why is header generation using `file_header_template` in editorconfig in Visual Studio 2022 ignored?
I have a project that I have been adding several class files. It's a pain to stop and add the standard header because I'm in thought about what I'm coding and don;t want to break the flow of thought.
...
Score of 5
1 answer
935 views
How to use EditorConfig with Xcode?
With the release of Xcode 16 apple added support for EditorConfig:
Added support for EditorConfig. The editor now respects indentation
settings given in .editorconfig files. Xcode supports the ...