Repository navigation
feat: actlint v0.1.0 - kinda works - #1
Merged
Merged
Conversation
Add 77 new tests covering edge cases across all parsing and linting modules:
- Empty YAML files: verify parse-error diagnostic for both parsers
- Comment-only YAML: verify empty-document error path
- Multi-document YAML: verify only first document is parsed
- Binary/non-UTF8 content: verify io-error diagnostic via tempfile
- Deeply nested expressions: lexer handles 100 nested parens,
parser handles 50 nested parens and 50-operand chains
- Expression edge cases: empty ${{ }}, unclosed ${{, nested ${{ }},
whitespace-only expressions, wrapped/unwrapped delimiter handling
- Circular needs: unit tests for self-cycle, 2-node cycle, 3-node cycle,
diamond (no cycle), plus integration test via fixture
- Extremely long lines: 100K char single line, 500-job workflow
- Unexpected YAML types: integer name, boolean description, list root,
null inputs, non-string runs.using, scalar root actions
- Source span boundary cases: line 0, huge line/col, col 0,
unicode content, long single lines, empty content
- Lexer edge cases: empty input, whitespace-only, incomplete operators,
unterminated strings, unexpected chars, very long identifiers
- Detection edge cases: empty/comment-only/list/scalar action.yml,
invalid YAML, unknown using values, multi-document
Adds tempfile as dev-dependency for binary file integration test.
Adds circular-needs.yml and edge-case fixture directory.
Total: 145 unit + 32 integration = 177 tests (was 100).
Wire fuzz-core to fuzz actlint-core with two targets: - parse_document_unstructured: raw bytes as UTF-8 YAML - parse_document_structured: Arbitrary-derived YAML documents fuzz-common is now a library providing Arbitrary types that generate plausible workflow and action YAML (FuzzDocument, FuzzWorkflow, FuzzAction, etc.) with to_yaml() rendering. actlint-core/build.rs scans fuzz-core/regressions/ at compile time and generates #[test] functions using include_bytes!(), closing the feedback loop: every minimized crash becomes a permanent regression test (10 existing regressions now run as unit tests). Fix fuzz-run.sh and fuzz-manage.sh paths (engine/fuzz -> fuzz-core). Fix engine-fuzz references in moon.yml. Add CONTRIBUTING.md with instructions for building, running the CLI locally, testing, linting, formatting, and fuzz testing. Total: 155 unit + 32 integration = 187 tests.
…nt scope - Add file_path() getter to LintDiagnostic; include path in text, JSON, and SARIF output formats - Normalize builtin function lookup to lowercase so fromJSON, toJson, hashFiles, startsWith, endsWith all resolve case-insensitively - Replace the "." default path with config-driven resolve_paths(): when no CLI paths are given, use workflow_paths + action_paths from .actlint.yml (defaults to .github/workflows only), preventing test fixtures from producing false positives - Change action_paths config default from ["."] to [] so zero-config runs stay scoped to .github/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
actlint is a Rust CLI that validates GitHub Actions workflow files and action definition files for metadata correctness. It checks schema structure, expression syntax, context availability, and cross-references.
Phase checklist
SourceFile,LintDiagnostic, line/col mapper)lint,init), schematic config, output formats (text/JSON/SARIF)Verification
cargo buildsucceeds with no warningscargo clippy --workspacepasses with no warningsdprint checkpassescargo test --workspacepasses all 100 tests (76 unit + 24 integration)cargo run -p actlint-cli -- linton valid files exits 0cargo run -p actlint-cli -- linton invalid fixtures exits 1 with diagnosticscargo run -p actlint-cli -- lint --format jsonproduces valid JSONcargo run -p actlint-cli -- initcreates.actlint.ymldevelopcompiles independently