Skip to content

Comprehensive upgrade: filtering, diagnostics, Quick Fixes, confidence metrics, and export#18

Merged
chaluvadis merged 7 commits intodevelopfrom
copilot/upgrade-dotnet-prune-extension
Feb 4, 2026
Merged

Comprehensive upgrade: filtering, diagnostics, Quick Fixes, confidence metrics, and export#18
chaluvadis merged 7 commits intodevelopfrom
copilot/upgrade-dotnet-prune-extension

Conversation

Copy link

Copilot AI commented Feb 4, 2026

Transforms dotnet-prune from a basic tree viewer into a production-grade code quality tool with actionable insights, native VS Code integration, and data-driven prioritization.

Core Features

Filtering & Search

  • Filter by symbol kind, confidence level (0-100%), project name
  • Full-text search across findings
  • Combined filter support with in-memory caching

VS Code Integration

  • Diagnostics Provider: Findings appear in Problems panel with severity mapping
  • Code Actions: Quick Fixes for deleting or ignoring unused code (accessible via Ctrl+. or lightbulb)
  • Inline Decorations: Visual highlighting with rich hover tooltips containing action links

Confidence & Severity Metrics

C# analyzer now computes confidence scores and severity levels:

// New FindingMetrics.cs
public static int CalculateConfidence(ISymbol symbol, string accessibility, ...)
{
    int confidence = 100;
    // Lower confidence for public symbols (may be used externally)
    if (accessibility == "public") confidence -= 30;
    // Account for virtual, abstract, override, partial types
    // Returns 0-100 score
}

Each finding enriched with:

  • confidence: 0-100% based on accessibility, symbol characteristics
  • severity: "error" | "warning" | "information" | "hint"

Export Capabilities

Multi-format export with professional styling:

  • JSON (automation), CSV (spreadsheets), Markdown (docs), HTML (reports with color-coded badges)

Finding Management

  • Ignore: Persist ignored findings to workspace state
  • Delete: Remove unused code with confirmation
  • Details: View in webview panel

Technical Implementation

New TypeScript Modules (7 files)

// src/config.ts - Centralized configuration
// src/filter.ts - FindingFilter class with matches()
// src/diagnostics.ts - DiagnosticProvider for Problems panel
// src/codeActions.ts - CodeActionsProvider for Quick Fixes
// src/decorator.ts - InlineDecorator for editor highlighting
// src/export.ts - FindingsExporter with 4 formats

Enhanced C# Analyzer

  • FindingMetrics.cs: Confidence/severity calculation
  • Analyzer.cs: Calls EnrichFinding() for all findings
  • Models.cs: Added confidence? and severity? fields
  • Configuration.cs: Analysis modes, detection flags

Configuration System

15+ settings across categories:

  • Analysis: include/exclude symbols, strict/loose mode
  • Filter: exclusion/inclusion patterns, symbol kinds
  • UI: inline highlighting, confidence/severity display
  • Integration: Problems panel, Code Actions toggles
  • Performance: caching, parallel analysis

Documentation

  • User Guide (8.6k words): Complete walkthrough
  • Developer Guide (10.3k words): Architecture, contributing
  • Changelog: Detailed version history
  • Upgrade Summary: Implementation overview

Testing

12 unit tests covering:

  • Configuration loading
  • Filter functionality (single and combined)
  • Edge cases

Files Changed

Created: 7 TS modules, 1 C# module, 4 docs
Enhanced: extension.ts (+300 lines), Analyzer.cs, Models.cs, package.json (10 commands, 15 settings)
Version: 0.0.4 → 0.0.5

Original prompt

Implement a comprehensive upgrade for the 'dotnet-prune' VS Code extension. This includes:

  1. Support for additional .NET project types (SDK, legacy, multi-target, Blazor, Xamarin, .NET MAUI), and improve compatibility with different solution/project structures.
  2. Performance enhancements: enable parallel and asynchronous analysis, add UI progress feedback, cache results to avoid redundant analysis.
  3. User Experience improvements:
    • Add filter & search for findings (by project, file, symbol kind, confidence).
    • Enable bulk actions for findings (bulk ignore/delete/mark-intentional).
    • Show richer tooltips for findings, including code context.
    • Highlight unused code inline in the editor.
  4. Analyzer enhancements:
    • Optionally surface dead/unreachable code and TODO/HACK comments.
    • Expose and filter findings by severity and confidence.
  5. Workflow and Integration:
    • Provide VS Code Quick Fixes to remove unused code directly from the editor.
    • Add export of findings (JSON/CSV/Markdown/HTML report).
    • Integrate with Problems panel for diagnostics.
  6. Customization & Settings:
    • Support user-configurable inclusion/exclusion patterns and symbol kind.
    • Add strict/loose analysis option.
  7. Improved test coverage (unit/integration) and documentation:
    • Add new developer/user guides, sample demos, animated/visual docs.
    • Maintain a detailed changelog for releases and a Troubleshooting section.

This pull request was created from Copilot chat.


💡 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.

Copilot AI and others added 6 commits February 4, 2026 06:39
…tions, export, and inline decorations

Co-authored-by: chaluvadis <738511+chaluvadis@users.noreply.github.com>
Co-authored-by: chaluvadis <738511+chaluvadis@users.noreply.github.com>
…og, and updated README

Co-authored-by: chaluvadis <738511+chaluvadis@users.noreply.github.com>
… filter

Co-authored-by: chaluvadis <738511+chaluvadis@users.noreply.github.com>
Co-authored-by: chaluvadis <738511+chaluvadis@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement comprehensive upgrade for dotnet-prune extension Comprehensive upgrade: filtering, diagnostics, Quick Fixes, confidence metrics, and export Feb 4, 2026
Copilot AI requested a review from chaluvadis February 4, 2026 06:53
@chaluvadis chaluvadis marked this pull request as ready for review February 4, 2026 07:21
@chaluvadis chaluvadis merged commit 01c5a64 into develop Feb 4, 2026
@chaluvadis chaluvadis deleted the copilot/upgrade-dotnet-prune-extension branch February 4, 2026 07:22
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.

2 participants