mirror of
https://github.com/outbackdingo/terraform-libvirt-talos.git
synced 2026-01-27 10:20:31 +00:00
lint the source code
This commit is contained in:
32
.github/workflows/lint.yml
vendored
Normal file
32
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Lint
|
||||
on: [push]
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache the plugins directory
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.tflint.d/plugins
|
||||
key: tflint-${{ hashFiles('.tflint.hcl') }}
|
||||
- uses: terraform-linters/setup-tflint@v3
|
||||
name: Setup
|
||||
with:
|
||||
# see https://github.com/terraform-linters/tflint/releases
|
||||
tflint_version: v0.48.0
|
||||
- name: Init
|
||||
run: tflint --init
|
||||
env:
|
||||
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
- name: Lint
|
||||
run: tflint --format compact
|
||||
fmt:
|
||||
name: terraform fmt check
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: terraform fmt check
|
||||
run: terraform fmt -check -diff
|
||||
1
.tflint.hcl
Normal file
1
.tflint.hcl
Normal file
@@ -0,0 +1 @@
|
||||
# NB the terraform plugin is built into tflint, so no need to declare it here.
|
||||
@@ -1,5 +1,7 @@
|
||||
# About
|
||||
|
||||
[](https://github.com/rgl/terraform-libvirt-talos/actions/workflows/lint.yml)
|
||||
|
||||
An example Talos Linux Kubernetes cluster in libvirt QEMU/KVM Virtual Machines using terraform.
|
||||
|
||||
# Usage (Ubuntu 22.04 host)
|
||||
|
||||
Reference in New Issue
Block a user