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.
- Diagnostics
Provider - Diagnostics provider
- Related
Information - Related information for a diagnostic.
Enums§
- Diagnostic
Severity - Severity level for diagnostics.
- Diagnostic
Tag - 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.