❇️ Add rcs1200 analyzer#121
Merged
vdebellabre merged 3 commits intoMay 20, 2026
Merged
Conversation
60cfb6c to
3f758d4
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Creedengo analyzer (GCI98) to detect LINQ sort chains where OrderBy/OrderByDescending is used after an existing sort, and provides an automated code fix to switch to ThenBy/ThenByDescending. It also adds a small sandbox project to exercise the rule and a dedicated test suite to validate analyzer + fixer behavior.
Changes:
- Added GCI98 analyzer + code fix (
UseThenByInsteadOfOrderBy/UseThenByInsteadOfOrderByFixer). - Added MSTest-based verification coverage for the new analyzer/fixer.
- Added a
Creedengo.Sandboxconsole project (wired into the solution) with a sample triggering the rule.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Creedengo.Tests/Tests/GCI98.UseThenByInsteadOfOrderBy.Tests.cs | Adds analyzer + code-fix tests for GCI98 scenarios. |
| src/Creedengo.Sandbox/RCS1200Sandbox.cs | Adds a sample LINQ chain intended to trigger the new rule. |
| src/Creedengo.Sandbox/Program.cs | Adds sandbox entry point. |
| src/Creedengo.Sandbox/Creedengo.Sandbox.csproj | Adds sandbox project referencing Creedengo.Core as an analyzer. |
| src/Creedengo.Core/Models/Rule.cs | Adds the new rule ID constant and reformats the file. |
| src/Creedengo.Core/Analyzers/GCI98.UseThenByInsteadOfOrderBy.Fixer.cs | Implements the code fix to replace OrderBy* with ThenBy* in sort chains. |
| src/Creedengo.Core/Analyzers/GCI98.UseThenByInsteadOfOrderBy.cs | Implements the analyzer detecting OrderBy* calls after a prior sort call. |
| creedengo-csharp.slnx | Adds the sandbox project to the solution. |
| .claude/settings.local.json | Adds local Claude permission settings for build/test commands. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vdebellabre
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.