-
Notifications
You must be signed in to change notification settings - Fork 305
Description
Is your feature request related to a problem? Please describe.
When running revive within GitHub Actions workflows, there isn't a built-in formatter that directly produces output compatible with GitHub Actions annotations. This means users need to manually parse the output of existing formatters (like default or json) or use external tools/actions to convert the linting results into annotations that appear directly on pull requests or commit diffs. This adds unnecessary complexity to CI/CD pipelines.
Describe the solution you'd like
Introduce a new formatter specifically for GitHub Actions. This formatter, named github, should output each linting failure in the format required by GitHub Actions workflow commands for annotations: ::{{severity}} file={name},line={line},endLine={endLine},title={title}::{message}
. This will allow GitHub Actions to automatically create annotations in the UI based on revive's output.
Describe alternatives you've considered
- Manual Parsing/Conversion: Could pipe the output of an existing formatter (e.g.,
json
) to a script (e.g., usingjq
or a custom script) that converts it into the GitHub Actions format. This requires extra scripting and maintenance within the workflow. - Third-Party Actions: Using existing marketplace GitHub Actions that wrap
revive
and handle the output formatting (like https://github.com/morphy2k/revive-action). This introduces dependencies on external actions which might have their own limitations or maintenance concerns.
Additional context
N/A