Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

The current global_level = -1 setting makes it difficult for consumers to inject intermediate configuration layers between the package defaults and their own settings.

Changes

  • Modified DocumentationGenerator/Program.cs to set global_level = -100 instead of -1
  • Regenerated none.editorconfig and default.editorconfig with the new value

Impact

Consumers can now layer configurations using intermediate levels (e.g., -50, -20) between the package defaults (-100) and standard configuration (0):

# Consumer's intermediate config at level -50
is_global = true
global_level = -50

# Custom overrides for specific rules
dotnet_diagnostic.MA0001.severity = warning

This provides the flexibility requested in the Microsoft docs: EditorConfig global levels

Original prompt

This section details on the original issue you should resolve

<issue_title>Would it be possible to lower global_level in .editorconfig?</issue_title>
<issue_description>Hello,

I would like to piggyback on this great analyzer package and ship a default configuration to my consumers.
I see that src/Meziantou.Analyzer.Pack/configuration/none.editorconfig and src/Meziantou.Analyzer.Pack/configuration/default.editorconfig sets the global_level to -1. Since the default value for global_level is 0, this makes it somewhat tricky for me to inject a layer of configuration in between
See: In two global AnalyzerConfig files

Would it be possible to lower the two global_level settings? I would think that something like -100 would work fine.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Lower global level in .editorconfig settings Lower global_level from -1 to -100 in editorconfig files Dec 19, 2025
Copilot AI requested a review from meziantou December 19, 2025 15:53
@meziantou meziantou marked this pull request as ready for review December 19, 2025 15:54
@meziantou meziantou merged commit 366b6d4 into main Dec 19, 2025
13 checks passed
@meziantou meziantou deleted the copilot/lower-global-level-editorconfig branch December 19, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Would it be possible to lower global_level in .editorconfig?

2 participants