Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
whonion committed Jun 21, 2023
1 parent 37347a7 commit b99af0f
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ coverage-go-routine: ## Run coverage for go-routine.go
$(GOCMD) tool cover -func profile-go-routine.cov

## Lint:
Lint: lint-go lint-dockerfile lint-yaml ## Run all available lint
Lint: lint-dockerfile lint-yaml lint-go ## Run all available lint

lint-dockerfile: ## Lint your Dockerfile
# If the Dockerfile is present, we lint it.
# If the Dockerfile is present, we lint it.
ifeq ($(shell test -e ./Dockerfile && echo -n yes),yes)
$(eval CONFIG_OPTION = $(shell [ -e $(shell pwd)/.hadolint.yaml ] && echo "-v $(shell pwd)/.hadolint.yaml:/root/.config/hadolint.yaml" || echo "" ))
$(eval OUTPUT_OPTIONS = $(shell [ "${EXPORT_RESULT}" == "true" ] && echo "--format checkstyle" || echo "" ))
Expand All @@ -79,7 +79,7 @@ endif

lint-go: ## Use golangci-lint in your project
$(eval OUTPUT_OPTIONS = $(shell [ "${EXPORT_RESULT}" == "true" ] && echo "--out-format checkstyle ./... | tee /dev/tty > checkstyle-report.xml" || echo "" ))
docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:latest-alpine golangci-lint run --deadline=65s $(OUTPUT_OPTIONS)
docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:latest-alpine golangci-lint run --deadline=65s $(OUTPUT_OPTIONS) main.go go-routine.go

lint-yaml: ## Use yamllint in the yaml files of your projects
ifeq ($(EXPORT_RESULT), true)
Expand All @@ -89,17 +89,6 @@ endif
docker run --rm -v $(shell pwd):/data cytopia/yamllint -f parsable $(shell git ls-files '*.yml' '*.yaml') $(OUTPUT_OPTIONS)


## Docker:
docker-build: ## Use the dockerfile to build the container
docker build --rm --tag $(BINARY_NAME) .

docker-release: ## Release the container with tag latest and version
docker tag $(BINARY_NAME) $(DOCKER_REGISTRY)$(BINARY_NAME):latest
docker tag $(BINARY_NAME) $(DOCKER_REGISTRY)$(BINARY_NAME):$(VERSION)
# Push the docker images
docker push $(DOCKER_REGISTRY)$(BINARY_NAME):latest
docker push $(DOCKER_REGISTRY)$(BINARY_NAME):$(VERSION)

## Help:
help: ## Show this help.
@echo ''
Expand Down

0 comments on commit b99af0f

Please sign in to comment.