331 questions
Tooling
0
votes
0
replies
32
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 ...
0
votes
1
answer
70
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 ...
0
votes
1
answer
85
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>
}
@...
1
vote
1
answer
95
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 ...
1
vote
0
answers
163
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 ...
2
votes
1
answer
162
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: [
...
0
votes
0
answers
63
views
How to control formatting of attributes with explicit expressions in Razor components using Rider with editor config setup
I can't for the life of me figure out how to do this, if possible.
When using explicit expressions as values for EventHandlers or actions on components, is there a way to define how you want them ...
1
vote
0
answers
55
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 ...
1
vote
1
answer
406
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 ...
4
votes
0
answers
228
views
Visual Studio 2022 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 = ./....
0
votes
0
answers
118
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
{
...
0
votes
1
answer
94
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 ...
0
votes
1
answer
89
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 (...
1
vote
0
answers
293
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.
...
2
votes
1
answer
693
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 ...