Skip to content

Conversation

@ANcpLua
Copy link
Owner

@ANcpLua ANcpLua commented Feb 7, 2026

Summary

  • Bug fix: Unreachable switch arm in Extractor.csReturnsError(ErrorType, string) was always falling into the custom error path. Fixed by checking TypeKind.Enum on args[0].Type
  • Solution fix: Added ErrorOrX.Integration.Tests to solution file (was missing, 9 tests not running)
  • Documentation fixes: Removed phantom EOE055 from CHANGELOG, fixed README analyzer count (38 to 41), corrected CLAUDE.md dependency versions
  • Version bump: 3.3.0 to 3.4.0
  • Generator cleanup: Code simplification from previous commits (net -47 lines)

Audit

12-agent parallel audit (exodia mega-swarm) found:

  • 0 P0 blockers remaining (all fixed)
  • Architecture, security, API contracts: clean
  • 455 tests pass (446 generator/runtime + 9 integration), 0 failures, 0 warnings

Verification

  • Build: 0 warnings, 0 errors
  • Tests: 455 passed, 0 failed
  • Integration tests now included in solution

🤖 Generated with Claude Code

ANcpLua and others added 2 commits February 6, 2026 13:08
Remove Verify.SourceGenerators dependency (lacks net10.0 TFM, caused
IDE resolution failures on every restart). Remove 7 redundant tests
that were strictly weaker than existing snapshot coverage. Extract
shared attributes boilerplate from 72 snapshot files into a single
dedicated test, reducing per-snapshot noise by ~108 lines each
(-7,823 lines total).

Test cleanup:
- Remove 3 assertion-only diagnostic tests from ParameterBindingTests
  (EOE006/EOE010/EOE014 already covered by DiagnosticTests snapshots)
- Remove 3 trivial .NotBeEmpty() tests from GeneratorCachingTests
- Remove redundant middleware chain test from MiddlewareEmissionTests
- Add Generator_Emits_Shared_Attributes_File as single source of truth

Dependency updates:
- ANcpLua.Roslyn.Utilities 1.28.0 -> 1.30.2
- ANcpLua.NET.Sdk 2.0.0 -> 2.0.4
- Suppress RS1038 in generator project

446 tests pass, 0 failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix unreachable switch arm in Extractor.cs (ReturnsError enum vs int
  disambiguation now uses TypeKind.Enum check instead of pattern matching)
- Add ErrorOrX.Integration.Tests to solution file
- Remove phantom EOE055 from CHANGELOG (EOE032 covers it)
- Bump version to 3.4.0
- Fix README analyzer count (38 → 41)
- Fix CLAUDE.md dependency versions
- Generator code cleanup from previous commits

Build: 0 warnings, 455 tests pass (446 + 9 integration)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 7, 2026 21:33
@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

Warning

Rate limit exceeded

@ANcpLua has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 32 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/test-cleanup-and-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @ANcpLua, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on stabilizing and improving the ErrorOrX project by addressing a critical bug in error attribute extraction, integrating previously missing integration tests, and updating various documentation files for accuracy. A substantial cleanup of the generator's internal codebase has also been performed, streamlining its logic and reducing complexity, all while bumping the project version to 3.4.0.

Highlights

  • Bug Fix: Resolved an issue in Extractor.cs where the ReturnsError attribute's ErrorType enum was incorrectly handled, causing it to always fall into the custom error path. The fix ensures correct identification by checking TypeKind.Enum.
  • Test Suite Enhancement: The ErrorOrX.Integration.Tests project, containing 9 integration tests, has been added to the solution, ensuring these critical tests are now executed.
  • Documentation Accuracy: Updated CHANGELOG.md to remove a phantom diagnostic entry, corrected the analyzer count in README.md from 38 to 41, and fixed dependency versions in CLAUDE.md.
  • Version Bump: The project version has been updated from 3.3.0 to 3.4.0.
  • Generator Code Cleanup: Significant refactoring and simplification of the generator's internal code, including removal of unused properties, constants, and diagnostic pragmas, resulting in a net reduction of 47 lines of code.
Changelog
  • .editorconfig
    • Added generator-specific diagnostic suppressions for IDE0130 and AL0029 with detailed explanations.
  • CHANGELOG.md
    • Updated to include version 3.4.0 with details on test suite cleanup, dependency updates, generator code cleanup, integration test addition, and documentation fixes.
    • Removed a phantom diagnostic entry.
  • CLAUDE.md
    • Updated ANcpLua.Roslyn.Utilities dependency version to 1.30.2.
  • Directory.Build.props
    • Updated ANcpLuaRoslynUtilitiesVersion to 1.30.2.
  • Directory.Packages.props
    • Updated ANcpLua.Roslyn.Utilities to 1.30.2.
    • Removed Verify.SourceGenerators package reference.
  • ErrorOrX.slnx
    • Added the ErrorOrX.Integration.Tests.csproj to the solution file.
  • README.md
    • Corrected the analyzer count from 38 to 41.
  • global.json
    • Updated ANcpLua.NET.Sdk versions to 2.0.4.
  • samples/DiagnosticsDemos/Demos/EOE001_InvalidReturnType.cs
    • Added a blank line for minor formatting.
  • src/ErrorOrX.Generators/Analyzers/AotSafetyAnalyzer.cs
    • Removed an unused private helper method GetFirstStringArgument.
  • src/ErrorOrX.Generators/Analyzers/ErrorOrEndpointAnalyzer.cs
    • Refactored brace formatting for consistency.
    • Updated the logic for ReturnsError attribute extraction to correctly differentiate between ErrorType enum and integer status codes, removing AL0029 pragmas.
  • src/ErrorOrX.Generators/Core/ErrorOrEndpointGenerator.Analyzer.cs
    • Minor brace formatting adjustment.
  • src/ErrorOrX.Generators/Core/ErrorOrEndpointGenerator.Emitter.cs
    • Minor brace formatting adjustment.
  • src/ErrorOrX.Generators/Core/ErrorOrEndpointGenerator.Extractor.cs
    • Cleaned up AL0029 warning suppressions.
    • Improved ReturnsError attribute parsing logic to correctly handle enum vs. int arguments, fixing a bug where ErrorType was always falling into the custom error path.
  • src/ErrorOrX.Generators/Core/ErrorOrEndpointGenerator.ParameterBinding.cs
    • Simplified CreateParameterMeta, ClassifyFromFormParameter, and ClassifyFromRouteParameter methods by removing unused parameters and ReSharper suppressions.
  • src/ErrorOrX.Generators/Emitters/GroupEmitter.cs
    • Adjusted comment alignment for clarity.
  • src/ErrorOrX.Generators/ErrorOrX.Generators.csproj
    • Added RS1038 to NoWarn and included detailed comments explaining NU5128 and RS1038 suppressions.
  • src/ErrorOrX.Generators/Models/ParameterSource.cs
    • Refactored ParameterSource class by simplifying constructors and removing unused boolean properties, reducing code complexity.
  • src/ErrorOrX.Generators/OpenApiTransformerGenerator.cs
    • Added a space for array creation for consistency.
  • src/ErrorOrX.Generators/Polyfills.cs
    • Removed IDE0130 pragma, as the issue is now handled by .editorconfig.
  • src/ErrorOrX.Generators/TypeResolution/WellKnownTypes.cs
    • Removed ReSharper suppressions and several unused constant string fields related to ErrorType, ProblemDetails, TypedResults, and validation attributes.
  • tests/ErrorOrX.Generators.Tests/ErrorOrX.Generators.Tests.csproj
    • Removed Verify.SourceGenerators package reference.
  • tests/ErrorOrX.Generators.Tests/GeneratorCachingTests.cs
    • Refactored caching tests, removing redundant endpoint tests and adding a specific test for shared attribute file emission.
  • tests/ErrorOrX.Generators.Tests/GeneratorTestBase.cs
    • Updated snapshot verification logic to exclude the shared attributes file, improving test focus.
  • tests/ErrorOrX.Generators.Tests/MiddlewareEmissionTests.cs
    • Removed a test case for Authorize_And_RateLimiting_Chain_Correctly.
  • tests/ErrorOrX.Generators.Tests/ModuleInitializer.cs
    • Removed VerifySourceGenerators.Initialize() call.
  • tests/ErrorOrX.Generators.Tests/ParameterBindingTests.cs
    • Removed several validation diagnostic tests (Multiple_Body_Sources_Emits_EOE006, Invalid_FromRoute_Type_Emits_EOE010, Invalid_FromHeader_Type_Emits_EOE014).
  • tests/ErrorOrX.Generators.Tests/Snapshots/...
    • Numerous snapshot files were updated to reflect changes in generated output and test exclusions.
  • version.props
    • Bumped the project version from 3.3.0 to 3.4.0.
Activity
  • A comprehensive 12-agent parallel audit was conducted, confirming no P0 blockers and clean architecture, security, and API contracts.
  • All 455 tests (446 generator/runtime + 9 integration) passed with 0 failures and 0 warnings.
  • The build process completed with 0 warnings and 0 errors.
  • Integration tests are now properly included in the solution, ensuring comprehensive testing.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

- ANcpLua.Roslyn.Utilities 1.30.2 → 1.31.0
- ANcpLua.Roslyn.Utilities.Testing 1.28.0 → 1.31.0
- ANcpLua.NET.Sdk 2.0.4 → 2.0.5
- Verify.XunitV3 31.9.4 → 31.10.0
- Removed Verify.SourceGenerators (lacks net10.0 TFM)

Build: 0 warnings, 455 tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ANcpLua ANcpLua merged commit 569c0bf into main Feb 7, 2026
2 checks passed
@ANcpLua ANcpLua deleted the chore/test-cleanup-and-deps branch February 7, 2026 21:35
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request prepares for the v3.4.0 release by addressing a critical bug in Extractor.cs where a switch arm was unreachable, ensuring correct handling of ReturnsErrorAttribute overloads. It also includes substantial code and test suite cleanup, such as removing the Verify.SourceGenerators dependency, simplifying the ParameterSource model, and refactoring tests to be more concise. Dependency versions and documentation have been updated accordingly. The changes are well-executed and improve both the correctness and maintainability of the project. I have one minor suggestion to improve code formatting for better readability.

Comment on lines 72 to 76
else
// Simple group without versioning
// Simple group without versioning
{
code.AppendLine($" var {groupVarName} = app.MapGroup(\"{group.GroupPath}\");");
}

Choose a reason for hiding this comment

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

medium

The formatting of this else block is a bit unconventional. The comment // Simple group without versioning seems to apply to the code inside the block, but it's placed outside and at a different indentation level. For better readability and consistency with standard C# formatting, it would be clearer to place the comment inside the block.

        else
        {
            // Simple group without versioning
            code.AppendLine($"            var {groupVarName} = app.MapGroup(\"{group.GroupPath}\");");
        }

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Prepares the v3.4.0 release by bumping versioning, updating docs/changelog, updating dependency pins/SDK versions, tightening generator/test infrastructure (notably snapshot output changes), and ensuring integration tests are included in the solution.

Changes:

  • Bump package version to 3.4.0 and add 3.4.0 CHANGELOG entry.
  • Simplify generator/test setup (exclude shared attributes file from most snapshots; remove Verify.SourceGenerators usage) and apply small generator cleanups.
  • Update documentation + dependency pins and include ErrorOrX.Integration.Tests in the solution.

Reviewed changes

Copilot reviewed 95 out of 100 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
version.props Bumps VersionPrefix to 3.4.0.
tests/ErrorOrX.Generators.Tests/Snapshots/RouteConstraintTests.Supports_Multiple_Constraints.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/RouteConstraintTests.Routes_With_Different_Constraints_Are_Not_Duplicates.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/RouteConstraintTests.CatchAll_Routes_Are_Normalized_Correctly.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/RouteConstraintTests.AsParameters_Constructor_Params_Bind_Route_Parameters.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DuplicateRouteTests.Reports_Duplicate_Route_With_Different_Parameter_Names.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DuplicateRouteTests.Reports_Duplicate_Route_Across_Classes.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.Valid_Service_Type_Inferred.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.Valid_Route_Parameter_Bound.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.Valid_Complex_Type_With_FromBody_On_Post.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.Valid_Complex_Type_With_AsParameters.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE041_No_Diagnostic_When_ProblemDetails_Present.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE041_Missing_ProblemDetails_In_JsonContext.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE039_Validation_Attribute_On_Parameter.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE039_Multiple_Validation_Attributes.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE033_Method_Name_With_Underscore.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE033_Method_Name_Snake_Case.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE033_Method_Name_Lowercase_Start.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE025_With_CamelCase_Policy_No_Diagnostic.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE025_Missing_CamelCase_Policy.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE024_Undocumented_Interface_Call.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE024_Interface_Call_With_ProducesError_No_Diagnostic.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE023_Unknown_Error_Factory.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE022_Too_Many_Result_Types.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE021_Complex_Type_On_Get_Without_Binding.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE021_Complex_Type_On_Delete_Without_Binding.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE020_Int_Constraint_With_String_Parameter.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE020_Guid_Constraint_With_Int_Parameter.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE019_Generic_Type_Parameter.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE018_Private_Return_Type.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE017_Nullable_AsParameters.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE016_Nested_AsParameters.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE015_Anonymous_Return_Type.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE014_Invalid_FromHeader_Type_Complex.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE013_AsParameters_No_Constructor.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE012_Invalid_AsParameters_Type_Primitive.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE011_Invalid_FromQuery_Type_Complex.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE010_Invalid_FromRoute_Type_Complex.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE007_Type_Not_In_Json_Context.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE006_Multiple_Body_Sources_Stream_And_FromBody.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE006_Multiple_Body_Sources_FromBody_And_FromForm.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE005_Unmatched_Close_Brace.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE005_Unclosed_Brace_In_Route.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE005_Empty_Parameter_Name.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE003_Route_Parameter_With_Constraint_Not_Bound.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/DiagnosticTests.EOE003_Route_Parameter_Not_Bound.verified.txt Snapshot updated (GeneratedSources now empty).
tests/ErrorOrX.Generators.Tests/Snapshots/BugRegressionTests.Combined_Local_Variables_In_Route_Group.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/BugRegressionTests.BUG005_Route_Group_With_Valid_Endpoint_Works.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/BugRegressionTests.BUG004_Duplicate_Route_Parameter_Names_First_Wins.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/BugRegressionTests.BUG001_Multiple_Local_Variables_With_Different_Errors.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/BugRegressionTests.BUG001_Local_Variable_Error_Factory_Does_Not_Crash.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.Single_ApiVersion_On_Class_Emits_HasApiVersion.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.No_Versioning_Attributes_Generates_No_Version_Calls.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.Multiple_MapToApiVersion_On_Method_Emits_All_Mappings.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.Multiple_ApiVersions_On_Class_Emits_All_Versions.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.MapToApiVersion_On_Method_Emits_MapToApiVersion.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.Deprecated_ApiVersion_Emits_HasDeprecatedApiVersion.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.ApiVersion_Major_Only_Emits_Single_Parameter_Constructor.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.ApiVersionNeutral_On_Method_Overrides_Class_Version.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.ApiVersionNeutral_On_Class_Emits_IsApiVersionNeutral.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningTests.ApiVersionNeutral_On_Class_Applies_To_All_Methods.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningDiagnosticTests.Valid_ApiVersion_Formats_Do_Not_Report_Diagnostics.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningDiagnosticTests.Multiple_Valid_MapToApiVersion_No_Diagnostics.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningDiagnosticTests.EOE030_No_Diagnostic_When_No_Versioned_Endpoints.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningDiagnosticTests.EOE030_No_Diagnostic_When_ApiVersionNeutral.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningDiagnosticTests.EOE029_ApiVersioning_Package_Not_Referenced_Reports_Warning.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/Snapshots/ApiVersioningDiagnosticTests.ApiVersion_With_Status_Suffix_Is_Valid.verified.txt Snapshot updated to exclude shared attributes source.
tests/ErrorOrX.Generators.Tests/ParameterBindingTests.cs Removes redundant assertion-style tests (coverage moved to snapshots elsewhere).
tests/ErrorOrX.Generators.Tests/ModuleInitializer.cs Simplifies Verify setup; removes Verify.SourceGenerators initialization.
tests/ErrorOrX.Generators.Tests/MiddlewareEmissionTests.cs Removes a redundant combined-middleware assertion test.
tests/ErrorOrX.Generators.Tests/GeneratorTestBase.cs Filters shared attributes generated file out of Verify snapshots.
tests/ErrorOrX.Generators.Tests/GeneratorCachingTests.cs Adds a dedicated snapshot test for the shared attributes generated file.
tests/ErrorOrX.Generators.Tests/ErrorOrX.Generators.Tests.csproj Drops Verify.SourceGenerators dependency.
src/ErrorOrX.Generators/TypeResolution/WellKnownTypes.cs Removes unused constants / analyzer suppression comments.
src/ErrorOrX.Generators/Polyfills.cs Removes local IDE0130 pragma; suppression moved to .editorconfig.
src/ErrorOrX.Generators/OpenApiTransformerGenerator.cs Minor cleanup in XML doc parsing helper return.
src/ErrorOrX.Generators/Models/ParameterSource.cs Simplifies ParameterSource by removing unused ctor parameters/flags.
src/ErrorOrX.Generators/ErrorOrX.Generators.csproj Documents and suppresses NU5128 + RS1038 for generator/analyzer packaging.
src/ErrorOrX.Generators/Emitters/GroupEmitter.cs Minor formatting/cleanup in group declaration emission.
src/ErrorOrX.Generators/Core/ErrorOrEndpointGenerator.ParameterBinding.cs Cleanup: remove unused placeholders; simplify FromForm classifier signature.
src/ErrorOrX.Generators/Core/ErrorOrEndpointGenerator.Emitter.cs Minor formatting cleanup in emission loops.
src/ErrorOrX.Generators/Core/ErrorOrEndpointGenerator.Analyzer.cs Minor formatting cleanup in analysis loop.
src/ErrorOrX.Generators/Analyzers/ErrorOrEndpointAnalyzer.cs Fixes indentation/bracing for clarity (no behavioral change expected).
src/ErrorOrX.Generators/Analyzers/AotSafetyAnalyzer.cs Removes an unused helper method.
samples/DiagnosticsDemos/Demos/EOE001_InvalidReturnType.cs Minor edits in demo (currently introduces extra blank lines).
global.json Updates ANcpLua MSBuild SDK versions to 2.0.4.
README.md Updates analyzer count from 38 to 41.
ErrorOrX.slnx Adds ErrorOrX.Integration.Tests project to the solution.
Directory.Packages.props Bumps ANcpLua.Roslyn.Utilities to 1.30.2 and removes Verify.SourceGenerators version pin.
Directory.Build.props Updates ANcpLuaRoslynUtilitiesVersion to 1.30.2.
CLAUDE.md Updates documented dependency version for ANcpLua.Roslyn.Utilities.
CHANGELOG.md Adds 3.4.0 release notes; removes phantom EOE055 entry.
.editorconfig Adds generator-specific suppressions (IDE0130 for Polyfills; AL0029 for Extractor).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 34 to 37
return "valid response";


}
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

There are two consecutive blank lines inside GetValidSync() after the return statement. This looks accidental and adds noise in the demo file; consider removing the extra empty lines so the method body matches the surrounding style.

Copilot uses AI. Check for mistakes.
Comment on lines 198 to 213
foreach (var attr in param.GetAttributes())
{
if (attr.AttributeClass is null)
continue;

// Check if the attribute inherits from ValidationAttribute
if (InheritsFrom(attr.AttributeClass, validationAttributeType))
{
context.ReportDiagnostic(Diagnostic.Create(
Descriptors.ValidationUsesReflection,
param.Locations.FirstOrDefault() ?? method.Locations.FirstOrDefault(),
param.Name,
method.Name));
break; // Only report once per parameter
if (attr.AttributeClass is null)
continue;

// Check if the attribute inherits from ValidationAttribute
if (InheritsFrom(attr.AttributeClass, validationAttributeType))
{
context.ReportDiagnostic(Diagnostic.Create(
Descriptors.ValidationUsesReflection,
param.Locations.FirstOrDefault() ?? method.Locations.FirstOrDefault(),
param.Name,
method.Name));
break; // Only report once per parameter
}
}
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.

Copilot uses AI. Check for mistakes.
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.

1 participant