https://github.com/twisterrob/ghlint-contrib-dev
Development playground for contributor CI
https://github.com/twisterrob/ghlint-contrib-dev
Last synced: 10 months ago
JSON representation
Development playground for contributor CI
- Host: GitHub
- URL: https://github.com/twisterrob/ghlint-contrib-dev
- Owner: TWiStErRob
- Created: 2024-06-02T16:38:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-02T20:40:43.000Z (about 2 years ago)
- Last Synced: 2025-07-04T02:47:39.281Z (about 1 year ago)
- Language: Kotlin
- Homepage: https://github.com/TWiStErRob/net.twisterrob.ghlint/issues/286
- Size: 237 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
Awesome Lists containing this project
README
# GitHub Actions validator
This is a CLI utility to **semantically** validate GitHub Actions workflows files.
## Why?
There are many [other tools](#alternatives) checking the syntax of YAML files,
or validating against the [SchemaStore github-workflow shema][schemastore-workflow],
but none of them are tailored for easily writable custom semantic rules.
This tool aims to fill the gap.
It is heavily inspired by
[detekt](https://detekt.dev/),
[PSI](https://plugins.jetbrains.com/docs/intellij/psi.html),
and [Object Calisthenics](https://www.google.com/?q=Object%20Calisthenics).
## Features
* [x] Validate the syntax of the workflow YAML files via JSON-schema
(this is required for other steps).
* [x] Hand-crafted semantic rules and strongly typed object model.
* [ ] Opinionated workflow file formatter.
* [x] GitHub Action to make it easier to select which files.
* [ ] Support for the full workflow syntax.
Hopefully via generated code based on the JSON-schema.
* [ ] Custom third-party rules (plugins)
* [x] action.yml validator via JSON-schema
* [x] action.yml semantic rules
* [ ] support for other types (e.g. issue templates/forms)
## Usage
* See [Usage documentation][usage] for a quick start.
* See [CLI documentation][cli] for advanced usages.
* See [GitHub Actions documentation][gha] for integration in CI.
[usage]: https://ghlint.twisterrob.net/usage/
[cli]: https://ghlint.twisterrob.net/usage/cli/
[gha]: https://ghlint.twisterrob.net/usage/gha/
## Alternatives
* [mpalmer/action-validator](https://github.com/mpalmer/action-validator)
is a JSON schema validator for GitHub Actions including some additional checks, like glob validation.
* [yamllint](https://github.com/adrienverge/yamllint)
is a syntax and formatting checker for YAML files.
* _If you know any others, feel free to PR._
[schemastore-workflow]: https://json.schemastore.org/github-workflow.json