{"id":15292462,"url":"https://github.com/clintjedwards/hclvet","last_synced_at":"2025-10-07T04:32:27.921Z","repository":{"id":57632422,"uuid":"411401467","full_name":"clintjedwards/hclvet","owner":"clintjedwards","description":"Simple, pluggable HCL linter.","archived":true,"fork":false,"pushed_at":"2022-11-04T06:51:54.000Z","size":532,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-04T11:17:20.803Z","etag":null,"topics":["go","golang","hashicorp","hcl2","linter","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clintjedwards.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-28T18:45:15.000Z","updated_at":"2023-08-25T03:54:29.000Z","dependencies_parsed_at":"2022-08-31T16:31:21.082Z","dependency_job_id":null,"html_url":"https://github.com/clintjedwards/hclvet","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clintjedwards%2Fhclvet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clintjedwards%2Fhclvet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clintjedwards%2Fhclvet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clintjedwards%2Fhclvet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clintjedwards","download_url":"https://codeload.github.com/clintjedwards/hclvet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235593342,"owners_count":19015137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","hashicorp","hcl2","linter","terraform"],"created_at":"2024-09-30T16:18:01.149Z","updated_at":"2025-10-07T04:32:22.610Z","avatar_url":"https://github.com/clintjedwards.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HCL Vet (hclvet)\n\nHCL vet is a simplistic, pluggable HCL linter.\n\n[![Go Report Card](https://goreportcard.com/badge/gojp/goreportcard)](https://goreportcard.com/report/github.com/clintjedwards/hclvet)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/clintjedwards/hclvet/blob/main/LICENSE)\n\n\u003ca href=\"https://asciinema.org/a/m4wZebEQZOfsLTcVHgZDTapFz\"\u003e\n    \u003cimg src=\"demo.gif\" /\u003e\n\u003c/a\u003e\n\n## Features\n\n- Pluggable and configurable rules.\n- Write simple, testable rules in golang, using simple data structures.\n- Simple, intuitive command line interface.\n\n## Install\n\n### Download the binary:\n\n- **Linux:** `wget https://github.com/clintjedwards/hclvet/releases/latest/download/hclvet`\n\n### Go Install:\n\n1. `git clone https://github.com/clintjedwards/hclvet \u0026\u0026 cd hclvet`\n2. `go install`\n\n### Build manually:\n\n1. `git clone https://github.com/clintjedwards/hclvet \u0026\u0026 cd hclvet`\n2. `go build -o \u003cyour_path_here\u003e`\n\n## How it works\n\nHCLvet allows you to lint HCL files using pluggable rules written in golang. It's meant to offer\na simple, configurable interface that makes it easy to write and retrieve rules for.\n\n### 1) Add a ruleset\n\nRules are packages into \"rulesets\" which can be added via the command line.\n\n`$ hclvet ruleset add github.com/clintjedwards/hclvet-ruleset-example`\n\nRulesets usually package one or more linting rules and can be added from a variety of sources. You create\na local ruleset on your specific machine or download one from a remote source.\n\nThe example ruleset above contains a few rules that are used for testing.\n\n### 2) Start linting files!\n\n`$ hclvet lint`\n\nBy default hclvet looks into the local directory on run to find hcl files. This is easily changed by\nadding a path or multiple paths. The path argument allows for file globbing:\n\n`$ hclvet lint ./internal/testdata/*`\n\n## How to create rules\n\nRules are grouped into packaging called rulesets. These rulesets can be added and removed from your local\nhclvet linter as you see fit.\n\nFind [how to create a new ruleset here.](sdk/README.md)\n\nYou can find an [example ruleset here.](https://github.com/clintjedwards/hclvet-ruleset-example)\n\n## Application structure\n\n- **internal**: All packages inside here are not meant to be consumed as a library.\n  - **cli**: Main logic of the program; contains all logic that controls command line manipulation.\n  - **config**: Controls application level environment variables.\n  - **plugin**: Provides the go-plugin related structures that allow rules to act as plugins.\n  - **testdata**: Contains artifacts used for testing.\n  - **utils**: Common directory for piece of code used throughout.\n- **sdk**: The software development toolkit that assists with creating rulesets and rules.\n\n## Drawbacks\n\n- The lint rules are designed to only consume one file at a time, they cannot alert on project wide errors.\n\n## Author\n\n- **Clint Edwards** - [Github](https://github.com/clintjedwards)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjedwards%2Fhclvet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclintjedwards%2Fhclvet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjedwards%2Fhclvet/lists"}