Skip to content

Commit aa3c040

Browse files
committed
Tweak README
1 parent 5cd5219 commit aa3c040

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,17 +283,14 @@ You can override the name of the extension class by setting `ExtensionClassName`
283283

284284
_NetEscapades.EnumGenerators_ includes optional analyzers that encourage the use of the generated extension methods instead of the built-in `System.Enum` methods. These analyzers can help improve performance by suggesting the faster, generated, alternatives like `ToStringFast()`, `HasFlagFast()`, and `TryParse()`.
285285

286-
### Enabling the analyzers
286+
Alternatively, [add a `.globalconfig` file](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/configuration-files#global-analyzerconfig) to your project with the following content:
287287

288-
The usage analyzers are disabled by default. To enable them, set the `EnumGenerator_EnableUsageAnalyzers` MSBuild property to `true` in your project:
289-
290-
```xml
291-
<PropertyGroup>
292-
<EnumGenerator_EnableUsageAnalyzers>true</EnumGenerator_EnableUsageAnalyzers>
293-
</PropertyGroup>
288+
```ini
289+
is_global = true
290+
build_property.EnumGenerator_EnableUsageAnalyzers = true
294291
```
295292

296-
After adding this configuration, the analyzers in your project should be enabled with the default severity of `Warning`.
293+
After using one of these configuration options, the analyzers in your project should be enabled with the default severity of `Warning`.
297294

298295
### Configuring analyzer severity (optional)
299296

src/NetEscapades.EnumGenerators/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,14 @@ The usage analyzers are disabled by default. To enable them, set the `EnumGenera
314314
</PropertyGroup>
315315
```
316316

317-
After adding this configuration, the analyzers in your project should be enabled with the default severity of `Warning`.
317+
Alternatively, [add a `.globalconfig` file](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/configuration-files#global-analyzerconfig) to your project with the following content:
318+
319+
```ini
320+
is_global = true
321+
build_property.EnumGenerator_EnableUsageAnalyzers = true
322+
```
323+
324+
After using one of these configuration options, the analyzers in your project should be enabled with the default severity of `Warning`.
318325

319326
### Configuring analyzer severity (optional)
320327

0 commit comments

Comments
 (0)