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
This was referenced Dec 19, 2025
This was referenced Jan 3, 2026
wengwalker added a commit to wengwalker/Items-shop that referenced this pull request Jan 10, 2026
Updated
[Meziantou.Analyzer](https://github.com/meziantou/Meziantou.Analyzer)
from 2.0.257 to 2.0.272.

<details>
<summary>Release notes</summary>

_Sourced from [Meziantou.Analyzer's
releases](https://github.com/meziantou/Meziantou.Analyzer/releases)._

## 2.0.272

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.272>

## What's Changed
* Extend MA0182 to all types by @​meziantou in
meziantou/Meziantou.Analyzer#957


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.271...2.0.272

## 2.0.271

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.271>

## What's Changed
* Add MA0182: Detect unused internal classes with correct handling of
generic type arguments and typeof references by @​Copilot in
meziantou/Meziantou.Analyzer#956


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.270...2.0.271

## 2.0.270

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.270>

## What's Changed
* Apply repository configuration by @​meziantou in
meziantou/Meziantou.Analyzer#954


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.269...2.0.270

## 2.0.269

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.269>

## What's Changed
* Apply repository configuration by @​meziantou in
meziantou/Meziantou.Analyzer#953


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.268...2.0.269

## 2.0.268

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.268>

**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.267...2.0.268

## 2.0.267

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.267>

## What's Changed
* Add MA0181 - Report use of explicit casts by @​Copilot in
meziantou/Meziantou.Analyzer#952


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.266...2.0.267

## 2.0.266

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.266>

**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.265...2.0.266

## 2.0.265

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.265>

## What's Changed
* Add refactoring: convert interpolated string to Format call by
@​meziantou in meziantou/Meziantou.Analyzer#948


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.264...2.0.265

## 2.0.264

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.264>

## What's Changed
* Lower global_level from -1 to -100 in editorconfig files by @​Copilot
in meziantou/Meziantou.Analyzer#944


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.263...2.0.264

## 2.0.263

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.263>

## What's Changed
* Add MA0180: Detect ILogger<T> type parameter mismatch with containing
class by @​Copilot in
meziantou/Meziantou.Analyzer#941


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.262...2.0.263

## 2.0.262

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.262>

## What's Changed
* Make DocumentationGenerator ignore trailing whitespace differences by
@​Copilot in meziantou/Meziantou.Analyzer#942


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.261...2.0.262

## 2.0.261

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.261>

## What's Changed
* Add MA0179: Detect inefficient attribute existence checks by @​Copilot
in meziantou/Meziantou.Analyzer#939


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.260...2.0.261

## 2.0.260

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.260>

## What's Changed
* Add concurrency control to serialize CI runs on main branch by
@​Copilot in meziantou/Meziantou.Analyzer#938


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.259...2.0.260

## 2.0.259

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.259>

## What's Changed
* Add opt-in configuration for MA0153 to detect logging of types
containing DataClassification members by @​Copilot in
meziantou/Meziantou.Analyzer#936


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.258...2.0.259

## 2.0.258

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.258>

**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.257...2.0.258

Commits viewable in [compare
view](meziantou/Meziantou.Analyzer@2.0.257...2.0.272).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Meziantou.Analyzer&package-manager=nuget&previous-version=2.0.257&new-version=2.0.272)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
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