Skip to content

Add Usage Analyzers documentation to README#216

Merged
andrewlock merged 3 commits intomainfrom
copilot/update-readme-usage-analyzers
Jan 3, 2026
Merged

Add Usage Analyzers documentation to README#216
andrewlock merged 3 commits intomainfrom
copilot/update-readme-usage-analyzers

Conversation

Copy link
Contributor

Copilot AI commented Jan 3, 2026

Documents the optional usage analyzers (NEEG004-NEEG011) that suggest replacing System.Enum methods with generated alternatives for better performance.

Changes

  • Enabling analyzers: Add .globalconfig with netescapades.enumgenerators.usage_analyzers.enable = true
  • Configuring severity: Use .editorconfig to set individual analyzer severities:
    [*.{cs,vb}]
    # NEEG004: Use ToStringFast() instead of ToString()
    dotnet_diagnostic.NEEG004.severity = warning
    # NEEG005: Use HasFlagFast() instead of HasFlag()
    dotnet_diagnostic.NEEG005.severity = warning
    # ... (NEEG006-NEEG011 for IsDefined, Parse, GetNames, GetValues, GetValuesAsUnderlyingType, TryParse)
  • Code fixes: Notes that automatic fixes are available for all analyzers

Section placed after "Enabling interception" and before "Embedding the attributes in your project".

Original prompt

This section details on the original issue you should resolve

<issue_title>Update READMe about Usage Analyzers</issue_title>
<issue_description>We have added some analyzers that help to encourage the use of the generated methods (found in the src/NetEscapades.EnumGenerators/Diagnostics/UsageAnalyzers folder).

  • Add an additional section to the README describing these analyzers
  • Be brief, giving only the information required to get started.
  • We should explain how to enable the analyzers, by adding a .globalconfig file (as can be found in tests/NetEscapades.EnumGenerators.IntegrationTests/.globalconfig)
  • We should explain how to (optionally) change the severity (after enabling the analyzers), using an .editorconfig file (as can be found in tests/NetEscapades.EnumGenerators.IntegrationTests/.editorconfig)
  • Explain that code fixes are available (I'll add some screenshots later)</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.

Co-authored-by: andrewlock <18755388+andrewlock@users.noreply.github.com>
Copilot AI changed the title [WIP] Update README to include usage analyzers information Add Usage Analyzers documentation to README Jan 3, 2026
Copilot AI requested a review from andrewlock January 3, 2026 23:17
Copy link
Owner

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andrewlock andrewlock marked this pull request as ready for review January 3, 2026 23:28
@andrewlock andrewlock merged commit 07b3fac into main Jan 3, 2026
3 checks passed
@andrewlock andrewlock deleted the copilot/update-readme-usage-analyzers branch January 4, 2026 11:24
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.

Update README about Usage Analyzers

2 participants