Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,17 @@ jobs:
${{ env.LINT_CACHE_DIR }}
key: golangci-lint-${{ runner.os }}-${{ hashFiles('**/*.go') }}
restore-keys: |
golangci-lint-${{ runner.os }}-
golangci-lint-${{ runner.os }}-

fmt:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/setup-go@v5
with:
go-version: 1.22.8
- name: make fmt
run: make fmt
- name: Check for unstaged files
run: ./scripts/check_unstaged.sh
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ gen:

.PHONY: clean-testdata
clean-testdata:
git clean -xfd testdata
git clean -xfd testdata

.PHONY: fmt
fmt:
gofmt -w .
2 changes: 1 addition & 1 deletion types/diagnostics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestDiagnosticExtra(t *testing.T) {
// The `parent` wrapped is lost here, so calling `SetDiagnosticExtra` is
// lossy. In practice, we only call this once, so it's ok.
// TODO: Fix SetDiagnosticExtra to maintain the parents
// if the DiagnosticExtra already exists in the chain.
// if the DiagnosticExtra already exists in the chain.
func TestDiagnosticExtraExisting(t *testing.T) {
diag := &hcl.Diagnostic{
Severity: hcl.DiagWarning,
Expand Down
Loading