feat: add diagnostic kill switch to VS Code and GoLand extensions (#19)#20
Merged
willibrandon merged 5 commits intomainfrom Aug 4, 2025
Merged
feat: add diagnostic kill switch to VS Code and GoLand extensions (#19)#20willibrandon merged 5 commits intomainfrom
willibrandon merged 5 commits intomainfrom
Conversation
- Add diagnostic IDs (MTLOG001-008) for all analyzer checks - Add --disable-all flag for global kill switch - Add --suppress flag for selective diagnostic suppression - Add environment variable support (MTLOG_SUPPRESS) for VS Code - Update VS Code extension with suppression management UI - Add status bar with diagnostic counts and Problems panel toggle - Add tests for suppression functionality
- Implement suppression via MTLOG_SUPPRESS environment variable - Add manage suppressed diagnostics dialog with checkboxes - Add suppress diagnostic action to annotation popup menu - Fix WriteCommandAction deadlock in TemplateArgumentQuickFix - Fix severity parsing for diagnostics with [MTLOGXXX] prefix - Add plain text stderr parsing for go vet output
…tus bar - Add status bar widget to toggle analyzer on/off with visual state indicator - Add notification service for analyzer active state with Disable/Settings actions - Implement diagnostic suppression with immediate UI updates (no edit required) - Fix template argument quick fix deadlock during preview generation - Add diagnostic ID extraction and filtering in parser - Clear both service and annotator caches on suppression changes - Enable inspection by default for better user experience - Add tests for notification service functionality
There was a problem hiding this comment.
Pull Request Overview
This PR implements a comprehensive diagnostic kill switch system for both VS Code and GoLand extensions, enabling users to quickly disable/enable mtlog-analyzer diagnostics or suppress specific diagnostic types. The implementation provides <2 click disable/enable functionality with persistent state across IDE restarts.
- Added global kill switch and granular diagnostic suppression via environment variables and flags
- Implemented status bar widgets and command palette integration for easy access
- Added diagnostic suppression management UI with quick fixes and intention actions
Reviewed Changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| vscode-extension/mtlog-analyzer/src/extension.ts | Adds toggle commands, suppression management, status bar integration, and environment variable support |
| vscode-extension/mtlog-analyzer/package.json | Registers new commands, keybindings, and configuration schema for diagnostic management |
| goland-plugin/src/main/kotlin/com/mtlog/analyzer/statusbar/* | Implements status bar widget with play/pause icons for visual state indication |
| goland-plugin/src/main/kotlin/com/mtlog/analyzer/service/MtlogProjectService.kt | Adds suppression state management and environment variable integration |
| goland-plugin/src/main/kotlin/com/mtlog/analyzer/quickfix/SuppressDiagnosticQuickFix.kt | Provides quick fix actions for diagnostic suppression |
| cmd/mtlog-analyzer/analyzer/analyzer.go | Implements core suppression logic with diagnostic IDs and environment variable support |
Comments suppressed due to low confidence (1)
goland-plugin/src/main/kotlin/com/mtlog/analyzer/service/MtlogProjectService.kt:278
- Logging the entire stderr output at WARN level could impact performance and log readability. Consider truncating or using DEBUG level for large outputs.
LOG.debug("Analyzer stderr (${errors.length} chars): $errors")
goland-plugin/src/main/kotlin/com/mtlog/analyzer/service/MtlogProjectService.kt
Show resolved
Hide resolved
goland-plugin/src/main/kotlin/com/mtlog/analyzer/quickfix/TemplateArgumentQuickFix.kt
Show resolved
Hide resolved
- Fix non-working binary download URLs in VS Code extension - Add constants to eliminate magic numbers across components - Extract helper functions to reduce code duplication - Fix potential data loss in config parsing - Add truncateForLog function for debug output limiting - Extract write action logic to separate method
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.
Description
Implements a diagnostic kill switch for both VS Code and GoLand extensions, allowing users to quickly disable enable mtlog-analyzer diagnostics when needed. This addresses user frustration when diagnostics become disruptive during debugging, legacy code work, or tight deadlines.
VS Code Changes
GoLand Changes
Type of change
Checklist
go test ./...)golangci-lint run)Additional notes
Fixes #19