Skip to content

Buildcheck - .editorconfig seems to be ignored #10684

@JanKrivanek

Description

@JanKrivanek

Context

I came accross a case where .editorconfig settings for chaning checks diagnostics levels are not respected and .editorconfig file is not captured in the binlog - meaning it's probably not recognized at all.

Details

Notice the BC0201 being set to error, but output as warning. Similarly BC0203 is set to error, but not lifted from default message.

PS C:\tmp> dotnet --version
9.0.100-rc.2.24468.2
PS C:\tmp> type .\.editorconfig
root = true

# Buildcheck rules
[*.csproj]
build_check.BC0103.severity=error
build_check.BC0203.severity=error
build_check.BC0203.scope=work_tree_imports
build_check.BC0201.severity=error
PS C:\tmp> dotnet build /check /bl
Obnovení dokončeno (1,4s)
Používáte verzi Preview rozhraní .NET. Viz: https://aka.ms/dotnet-support-policy
  DotUtils.Calculator akce proběhla úspěšně s 1 upozorněním(i). (1,4s) → bin\Debug\net8.0\DotUtils.Calculator.dll
    C:\tmp\DotUtils.Calculator.csproj(8,4): warning BC0201: https://aka.ms/buildcheck/codes#BC0201 - Property: 'xyz' was accessed, but it was never initialized.

Sestavení akce proběhla úspěšně s 1 upozorněním(i). za 5,1s
PS C:\tmp>

I suspect non-US locale might have an impact here?
Relevant info from systeminfo:

OS Name:                   Microsoft Windows 10 Home
OS Version:                10.0.19045 N/A Build 19045
System Locale:             cs;Čeština
Input Locale:              cs;Čeština

Binlog and repro:
ReproAndBinlog.zip

Metadata

Metadata

Assignees

Labels

Area: BuildCheckPriority:1Work that is critical for the release, but we could probably ship withouttriaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions