feat(actions): annotate findings from terraform fmt, terraform-docs, and check-jsonschema - #26
Merged
Merged
Conversation
…and check-jsonschema - Add `annotations_enabled` (default `true`) to the three remaining check actions on the same pattern as validate, tflint, and actionlint - `terraform.fmt` reads the file and hunk line from the diff it captured; `terraform.docs` reads the stale file from its `is out of date` line; both prefix `target_dir` since the tools print module-relative paths - `github-actions.check-jsonschema` re-runs with `--output-format json`; schema validation has no line numbers, so the annotation points at the file and names the failing JSON path
GitHub Actions Integration
✅ All 1 passed. |
Member
Author
|
Runner verification: #27 (closed) ran the three actions from this branch against failing fixtures, run https://github.com/tedilabs/github-actions/actions/runs/35524249993. Annotations recorded on the job:
fmt ran a second time with |
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.
👋 Background
terraform.validate,terraform.tflint, andgithub-actions.actionlintline annotations with the tool named in the title. This PR brings the remaining three check actions onmainonto the sameannotations_enabledinterface. The Packer and Ansible checks follow in feat: add Packer composite actions and integration workflow #1.🔗 Related Issues
⚙️ Description
All three gain
annotations_enabled(defaulttrue) and anAnnotate Findingsstep that runs only after a failure and never fails the action.terraform.fmt+++ new/<file>names the file,@@ -a,b +c,d @@the first changed line of each hunkterraform fmt · Not formattedterraform.docsError: <path> is out of dateline (only withcheck: true)terraform-docs · Out of dategithub-actions.check-jsonschema--output-format json;errors[].filenameandpathcheck-jsonschema · <schema_type>with the JSON path in the messagetarget_diris prefixed; check-jsonschema reports the repository-relative files it was given.terraform.fmtandterraform.docsneed no re-run since the captured output already carries the information.Verification
$.jobs.xand the schema message.🚨 To Reviewers
terraform-docsstops at the first stale file, so at most one annotation per check run.