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

Remove unnecessary fmt Makefile target #2246

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
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
29 changes: 1 addition & 28 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,6 @@ concurrency:
cancel-in-progress: true

jobs:
vet-and-fmt:
name: vet and fmt
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout the pull request code
uses: actions/checkout@v4
- name: Read properties from versions.yaml
run: |
go_version="$(yq '.tools.golang' src/cloud-api-adaptor/versions.yaml)"
[ -n "$go_version" ]
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
- name: Setup Golang version ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: "**/go.sum"
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libvirt-dev
- name: check
run: |
make fmt
cd src/cloud-api-adaptor/ && make vet

golangci-lint:
name: golangci-lint
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -83,7 +56,7 @@ jobs:
contents: read
security-events: write
needs:
- vet-and-fmt
- golangci-lint
uses: "./.github/workflows/lib-codeql.yaml"

shellcheck:
Expand Down
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include Makefile.defaults

.PHONY: check fmt
.PHONY: check

SHELL = bash -o pipefail

Expand All @@ -24,11 +24,7 @@ help: ## Display this help.

## Run formatters and linters against the code.
.PHONY: check
check: fmt golangci-lint shellcheck tidy-check govulncheck packer-check terraform-check

.PHONY: fmt
fmt: ## Run go fmt against code.
find . -name '*.go' -print0 | xargs -0 gofmt -l -s -w
check: golangci-lint shellcheck tidy-check govulncheck packer-check terraform-check

.PHONY: shellcheck
shellcheck: ## Run shellcheck against shell scripts.
Expand Down
6 changes: 1 addition & 5 deletions src/cloud-api-adaptor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include Makefile.defaults

.PHONY: all build vet clean image deploy delete
.PHONY: all build clean image deploy delete

SHELL = bash -o pipefail

Expand Down Expand Up @@ -109,10 +109,6 @@ else
$(error CLOUD_PROVIDER is not set)
endif

.PHONY: vet
vet: .git-commit ## Run go vet against code.
go vet $(GOFLAGS) $(PACKAGES)

.PHONY: clean
clean: ## Remove binaries.
rm -fr $(BINARIES) \
Expand Down