Expand description
Analysis of Workflow Description Language (WDL) documents.
An analyzer can be used to implement the Language Server Protocol (LSP).
§Examples
use url::Url;
use wdl_analysis::Analyzer;
#[tokio::main]
async fn main() {
let analyzer = Analyzer::default();
// Add a docuement to the analyzer
analyzer
.add_document(Url::parse("file:///path/to/file.wdl").unwrap())
.await
.unwrap();
let results = analyzer.analyze(()).await.unwrap();
// Process the results
for result in results {
// Do something
}
}
§Rules
This table documents all implemented wdl
analysis rules implemented on the main
branch of the stjude-rust-labs/wdl
repository. Note that the information may
be out of sync with released packages.
§Analysis Rules
Name | Description |
---|---|
UnnecessaryFunctionCall | Ensures that function calls are necessary. |
UnusedCall | Ensures that outputs of a call statement are used in the declaring workflow. |
UnusedDeclaration | Ensures that private declarations in tasks or workspaces are used within the declaring task or workspace. |
UnusedImport | Ensures that import namespaces are used in the importing document. |
UnusedInput | Ensures that task or workspace inputs are used within the declaring task or workspace. |
Re-exports§
pub use document::Document;
Modules§
- diagnostics
- Module for all diagnostic creation functions.
- document
- Representation of analyzed WDL documents.
- eval
- Representation of evaluation graphs.
- handlers
- Language server protocol handlers.
- stdlib
- Representation of WDL standard library functions.
- types
- Representation of the WDL type system.
Structs§
- Analysis
Result - Represents the result of an analysis.
- Analyzer
- Represents a Workflow Description Language (WDL) document analyzer.
- Config
- Configuration for
wdl-analysis
. - Diagnostics
- Represents a collection of validation diagnostics.
- Diagnostics
Config - Configuration for analysis diagnostics.
- Incremental
Change - Represents an incremental change to a document.
- Source
Edit - Represents an edit to a document’s source.
- Source
Position - Represents a position in a document’s source.
- Unnecessary
Function Call - Represents the unnecessary call rule.
- Unused
Call Rule - Represents the unused call rule.
- Unused
Declaration Rule - Represents the unused declaration rule.
- Unused
Import Rule - Represents the unused import rule.
- Unused
Input Rule - Represents the unused input rule.
- Using
Fallback Version - Represents the using fallback version rule.
- Validator
- Implements an AST validator.
Enums§
- Progress
Kind - Represents the kind of analysis progress being reported.
- Source
Position Encoding - Represents the encoding of a source position.
- Visit
Reason - Represents the reason an AST node has been visited.
Constants§
- EXCEPT_
COMMENT_ PREFIX - The prefix of
except
comments. - UNNECESSARY_
FUNCTION_ CALL - The rule identifier for unnecessary function call warnings.
- UNUSED_
CALL_ RULE_ ID - The rule identifier for unused call warnings.
- UNUSED_
DECL_ RULE_ ID - The rule identifier for unused declaration warnings.
- UNUSED_
IMPORT_ RULE_ ID - The rule identifier for unused import warnings.
- UNUSED_
INPUT_ RULE_ ID - The rule identifier for unused input warnings.
- USING_
FALLBACK_ VERSION - The rule identifier for unsupported version fallback warnings.
Traits§
- Rule
- A trait implemented by analysis rules.
- Syntax
Node Ext - An extension trait for syntax nodes.
- Visitor
- A trait used to implement an AST visitor.
Functions§
- path_
to_ uri - Converts a local file path to a file schemed URI.
- rules
- Gets the list of all analysis rules.