Loading...
ConfigCat's .NET SDK plays well with ASP.NET Core's dependency injection and configuration system. FlagShark ships a Roslyn analyzer that detects every `GetValueAsync` call at compile time and maps it to your ConfigCat dashboard.
FlagShark generates a PR that removes the dead branch and keeps only the winning code path
[ApiController]
[Route("api/[controller]")]
public class DashboardController : ControllerBase
{
private readonly IConfigCatClient _configCat;
public DashboardController(IConfigCatClient configCat) => _configCat = configCat;
[HttpGet]
public async Task<IActionResult> GetDashboard()
{
var user = new User(User.Identity!.Name!) { Email = User.FindFirst("email")?.Value };
var showAnalytics = await _configCat.GetValueAsync("dashboard_analytics", false, user);
if (showAnalytics)
return Ok(await _analyticsService.GetDashboardDataAsync());
return Ok(await _basicDashboardService.GetDataAsync());
}
}[ApiController]
[Route("api/[controller]")]
public class DashboardController : ControllerBase
{
[HttpGet]
public async Task<IActionResult> GetDashboard()
{
return Ok(await _analyticsService.GetDashboardDataAsync());
}
}FlagShark uses Roslyn analyzers for .NET SDK pattern detection to find every call to getValue(), getValueDetails(), getAllKeys()across your .NET, ASP.NET Core codebase.
Each detected flag key is matched against your ConfigCat project to check rollout status, last evaluation date, and whether the flag is archived or still active.
For each stale flag, FlagShark creates a pull request that removes the SDK call, eliminates the dead code branch, and preserves the winning path. Every PR includes a before/after diff you can review.
ConfigCat's .NET client is registered via `services.AddConfigCat()` in `Program.cs` — removing the last flag means you should also remove the service registration and the `ConfigCat.Client` NuGet package, but the DI container won't warn you if you forget.
Grep misses flags behind abstractions. AST-level scanning catches SDK calls that regex can't.
Every cleanup goes through code review. No surprises, no broken builds.
Only flags at 100% rollout for your configured threshold are suggested for removal.
New stale flags are detected automatically. Your codebase stays clean without manual audits.
getValue()getValueDetails()getAllKeys()Plus custom patterns you define in .flagshark.yaml
FlagShark provides a Roslyn analyzer that detects `GetValueAsync`, `GetValueSync`, and `GetValueDetailsAsync` calls on `IConfigCatClient`. It traces the client through ASP.NET Core's DI container and reports flag keys at build time.
Yes. FlagShark detects `@inject IConfigCatClient` in Razor components and traces flag evaluation through component lifecycle methods like `OnInitializedAsync`.
FlagShark scans `IHostedService` and `BackgroundService` implementations for flag checks. It warns when removing a flag would change the behavior of long-running background processing.
Connect your repo, see stale flags in minutes, and get cleanup PRs automatically.
Free tier available • No credit card required • 5-minute setup
Detect and remove stale ConfigCat feature flags from React and Node.js TypeScript projects.
Find and remove stale ConfigCat flags from Django, FastAPI, and Flask Python applications.
Find and safely remove stale ConfigCat feature flags from Spring Boot and Java enterprise applications.