Implements #83 by introducing a new workflow_run rule to check the existence of referenced workflows at that trigger.
This rule is a bit different than others, it will be a singleton instance for the check run (instead of one per file), to allow collecting workflow names from the whole suite.
Because of that, it can only apply when calling LintFiles (nil for other usages of the linter).
It validates that any name reference on workflow_run.workflow exists in another workflow of the same set.
on:
workflow_run:
types: [completed]
workflows:
- build
- test # ERROR: This workflow does not exist, its name is `Tests`
This is my first experience working with Go, feel free to suggest any change regarding code style or best practices.
Implements #83 by introducing a new
workflow_run
rule to check the existence of referenced workflows at that trigger.This rule is a bit different than others, it will be a singleton instance for the check run (instead of one per file), to allow collecting workflow names from the whole suite.
Because of that, it can only apply when calling
LintFiles
(nil
for other usages of the linter). It validates that anyname
reference onworkflow_run.workflow
exists in another workflow of the same set.This is my first experience working with Go, feel free to suggest any change regarding code style or best practices.