diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 62d9e62..56a07c8 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -5,6 +5,21 @@ name: tests on: push jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.22.x + cache: true + - name: Lint + uses: golangci/golangci-lint-action@v8 + with: + version: v2.1 + test-action: runs-on: ubuntu-latest steps: diff --git a/Makefile b/Makefile index 02482d7..419a183 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ run: go build -o $(BINARY_NAME) ./cmd ./$(BINARY_NAM) +lint: + golangci-lint run + clean: go clean rm ${BINARY_NAME} diff --git a/cmd/main.go b/cmd/main.go index 87c0e49..807dd4c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -9,10 +9,6 @@ import ( "github.com/rs/zerolog/log" ) -func toPtrBool(b bool) *bool { - return &b -} - var CLI struct { LogLevel string `help:"Set the log level." enum:"trace,debug,info,warn,error" default:"info"` LogFormat string `enum:"json,text" default:"text" help:"Set the log format. (json, text)"`