Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Pattern GuardNew to Visual Studio Code? Get it now.
Pattern Guard

Pattern Guard

Shakeel Ahmad

|
1 install
| (0) | Free
Detects anti-patterns in Dart/Flutter projects
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pattern Guard

Pattern Guard is a powerful VS Code extension designed specifically for Dart and Flutter developers. It scans your workspace or individual files for 7 major architectural anti-patterns based on industry-standard reference literature, helping you reduce technical debt and maintain a clean, scalable codebase.

Features

Pattern Guard detects the following 7 anti-patterns:

  1. Copy-Paste Programming: Flags duplicate code blocks (≥ 8 lines).
  2. Spaghetti Code: Flags functions with deep nesting depth (> 4 levels).
  3. Non-Functional Requirements: Detects missing documentation/comments on public declarations.
  4. God Object: Flags classes with too many methods (> 20) or files that are too long (> 500 lines).
  5. Shotgun Surgery: Detects magic literals (URLs, tokens, etc.) scattered across 3+ files instead of being in a centralized constants file.
  6. Lava Flow: Detects leftover TODO, FIXME comments and blocks of commented-out code.
  7. Golden Hammer: Flags over-reliance on a single custom package or widget that dominates your project files.

How to Use

  1. Open your Dart/Flutter project in VS Code.
  2. Click the Pattern Guard shield icon in the left Activity Bar to open the dashboard.
  3. Click ▶ Analyze Project to scan your entire workspace, or click File to scan only the currently active .dart file.
  4. Click on any of the 7 anti-pattern cards to view the detected issues.
  5. Click ↗ open on any issue to jump straight to the exact file and line in your code!

Extension Commands

You can also run Pattern Guard from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

  • Pattern Guard: Scan Project
  • Pattern Guard: Analyze Active File
  • Pattern Guard: Open Dashboard

Requirements

  • VS Code 1.85.0 or higher.
  • A Dart or Flutter workspace.

Release Notes

0.1.0

  • Initial release.
  • Added all 7 core detectors.
  • Beautiful, responsive dashboard with interactive file navigation.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft