Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use golangci-lint to lint zerolog #2524

Merged
merged 1 commit into from
Oct 4, 2023
Merged
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
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ linters:
- gofumpt
- errorlint
- forbidigo
- zerologlint

run:
timeout: 5m
Expand Down
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ install-tools: ## Install development tools
@hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest; \
fi ; \
hash lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go install github.com/rs/zerolog/cmd/lint@latest; \
fi ; \
hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go install mvdan.cc/gofumpt@latest; \
fi ; \
Expand All @@ -139,10 +136,6 @@ ui-dependencies: ## Install UI dependencies
lint: install-tools ## Lint code
@echo "Running golangci-lint"
golangci-lint run --timeout 15m
@echo "Running zerolog linter"
lint github.com/woodpecker-ci/woodpecker/cmd/agent
lint github.com/woodpecker-ci/woodpecker/cmd/cli
lint github.com/woodpecker-ci/woodpecker/cmd/server

lint-ui: ## Lint UI code
(cd web/; pnpm install)
Expand Down