Skip to main content

Crate perl_lsp_diagnostics

Crate perl_lsp_diagnostics 

Source
Expand description

LSP diagnostics provider for Perl

This crate provides diagnostic generation and linting functionality for Perl code.

§Features

  • Diagnostic generation from AST
  • Linting for common mistakes
  • Deprecated feature detection
  • Strict warnings
  • Security anti-pattern detection

§Usage

use perl_lsp_diagnostics::DiagnosticsProvider;

let provider = DiagnosticsProvider::new();
let diagnostics = provider.generate_diagnostics(&ast, source, Some(&workspace_index))?;

Modules§

common_mistakes
Common mistakes lint checks
deprecated
Deprecated syntax lint checks
missing_module
Missing module detection (PL701) Missing module detection lint
package_subroutine
Package and subroutine diagnostics (PL200, PL201, PL300) Package and subroutine diagnostic lint checks
security
Security-focused lint checks
strict_warnings
Strict and warnings pragma lint checks
unreachable_code
Unreachable code detection (PL406) Unreachable code detection (PL406)
unused_imports
Unused import detection Unused import detection lint
version_compat
Perl version compatibility warnings (PL900) Perl version compatibility lint (PL900)

Structs§

Diagnostic
A diagnostic message.
DiagnosticsProvider
Diagnostics provider
RelatedInformation
Related information for a diagnostic.

Enums§

DiagnosticSeverity
Severity level for diagnostics.
DiagnosticTag
Tags for diagnostics.

Functions§

detect_dead_code
Detect dead code using workspace-wide symbol analysis
detect_heredoc_antipatterns
Detect heredoc anti-patterns in Perl source code.