How afony10/cadence-workflow-linter works
Cadence Workflow Linter scans Go and Java projects for workflow patterns that can break deterministic replay, then emits machine-readable findings or editor diagnostics. The main path is project selection → rule loading and language dispatch → analysis and workflow-reachability filtering → issue normalization and output. The Go analyzer builds a workflow registry before running detectors; Java analysis is a separate adapter. The README also documents a VS Code client. Some extension and output wiring is represented from documented capabilities and visible entry points; unsampled internals are not expanded.
Main entry points: main.go Linter CLI · scanner.go Go Scanner · extension.ts Extension · detectors Go Detectors
Components 20
CLI and Dispatch
- Linter CLI
cmd/cadence-linter/main.go
Language Analysis
- Go Scanner
adapters/go/analyzer/scanner.go - Module Resolver
adapters/go/analyzer/modutils/module_parser.go - Workflow Registry
adapters/go/analyzer/registry/workflow_registry.go - Go Detectors
adapters/go/analyzer/detectors - Java Scanner
adapters/java/analyzer/scanner.go
Rules and Results
- Rule YAML
config/rules.yaml - Rule Loader
config/loader.go - Issue Model
core/issue.go - Rule Overrides
core/rules.go - JSON YAML Emitters
core/emit.go - SARIF Emitter
core/sarif.go
VS Code Client
- Extension
vscode-extension/src/extension.ts - CLI Integration
vscode-extension/src/cli.ts - Extension Context
vscode-extension/src/context.ts - Editor Diagnostics
vscode-extension/src/diagnostics.ts
Other components
- Engineer
- Target Project
- Lint Findings
- VS Code User
Connections 27
- Engineer → Linter CLI: runs
- Target Project → Linter CLI: scans
- Linter CLI → Rule Loader: loads rules
- Rule YAML → Rule Loader: read rules
- Linter CLI → Go Scanner: dispatches Go
- Linter CLI → Java Scanner: dispatches Java
- Go Scanner → Module Resolver: resolves modules
- Go Scanner → Workflow Registry: builds reachability
- Go Scanner → Go Detectors: runs visitors
- Go Scanner → Issue Model: returns findings
- Java Scanner → Issue Model: returns findings
- Rule Loader → Go Detectors: provides rules
- Rule Loader → Java Scanner: provides rules
- Go Detectors → Workflow Registry: checks reachability
- Go Detectors → Issue Model: creates findings
- Linter CLI → Rule Overrides: applies overrides
- Issue Model → Rule Overrides: normalizes findings
- Linter CLI → JSON YAML Emitters: emits JSON YAML
- Linter CLI → SARIF Emitter: emits SARIF
- JSON YAML Emitters → Lint Findings: serializes
- SARIF Emitter → Lint Findings: serializes
- VS Code User → Extension: uses
- Extension → CLI Integration: invokes
- CLI Integration → Linter CLI: runs CLI
- Extension → Extension Context: initializes
- Extension → Editor Diagnostics: publishes findings
- Lint Findings → Editor Diagnostics: consumes SARIF