Skip to content

Feat(Compiler): Implement Continuum Linter (Clippy-like checks) #244

@ztripez

Description

@ztripez

Summary

Implement a sophisticated linter for the Continuum DSL that provides warnings and hints for code quality, common pitfalls, and idiomatic patterns. This should leverage the unified IR and visitor pattern established in the compiler refactor.

While we have dsl-lint, it is currently focused on basic parsing and validation. This new "Clippy-like" system will focus on higher-level semantic lints.

Tasks

  • Define core lint architecture (lint registry, lint levels: allow/warn/deny)
  • Implement initial set of lints:
    • Redundant expressions: e.g., x + 0, x * 1, if true { a } else { b }
    • Naming convention violations: e.g., enforcing camelCase for signals or PascalCase for types
    • Performance pitfalls: e.g., using expensive kernels (like complex trig) where simpler approximations exist
    • Phase/Observer boundary violations: Detecting logic that technically compiles but violates the spirit of the observer boundary
    • Unused bindings: Let-bindings or signals that are defined but never read
  • Integrate linter into the CLI toolchain (enhance dsl-lint or create continuum clippy)
  • Surface lints through the LSP as diagnostics

Related

Epic #225

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions