Skip to content

Commit

Permalink
Tune pre-commit
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Kosegi <[email protected]>
  • Loading branch information
rkosegi committed Oct 26, 2024
1 parent 0436c4a commit f23911e
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 17 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Install lint tools
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install golang.org/x/tools/cmd/goimports@latest
- name: Set up Helm
Expand All @@ -45,6 +45,8 @@ jobs:
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: pre-commit/[email protected]

- name: Go build
Expand Down
17 changes: 8 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ repos:
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
- repo: https://github.com/golangci/golangci-lint
rev: v1.61.0
- id: end-of-file-fixer
- id: mixed-line-ending
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.24
hooks:
- id: golangci-lint
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-mod-tidy
- id: go-fmt

# - id: golangci-lint
- id: goimports
- id: gofmt
- id: helmlint
1 change: 0 additions & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ The following table lists the configurable parameters of the Hetzner-inventory-e

---
_Documentation generated by [Frigate](https://frigate.readthedocs.io)._

2 changes: 0 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,3 @@ serviceMonitor:
scrape_config: |
- port: metrics
interval: 5m
1 change: 1 addition & 0 deletions internal/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package internal

import (
"context"

"github.com/hetznercloud/hcloud-go/hcloud"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
1 change: 1 addition & 0 deletions internal/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package internal

import (
"context"

"github.com/hetznercloud/hcloud-go/hcloud"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
1 change: 1 addition & 0 deletions internal/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package internal

import (
"context"

"github.com/hetznercloud/hcloud-go/hcloud"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
1 change: 1 addition & 0 deletions internal/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package internal

import (
"context"

"github.com/hetznercloud/hcloud-go/hcloud"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
1 change: 1 addition & 0 deletions internal/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package internal

import (
"context"

"github.com/hetznercloud/hcloud-go/hcloud"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
1 change: 1 addition & 0 deletions internal/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package internal

import (
"context"

"github.com/hetznercloud/hcloud-go/hcloud"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
9 changes: 5 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ package main

import (
"fmt"
"net/http"
"os"
"strings"
"time"

"github.com/alecthomas/kingpin/v2"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/client_golang/prometheus/collectors/version"
"github.com/rkosegi/hetzner-inventory-exporter/internal"
"gopkg.in/yaml.v3"
"net/http"
"os"
"strings"
"time"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
Expand Down

0 comments on commit f23911e

Please sign in to comment.