diff --git a/.github/workflows/ci-lint-checks.yaml b/.github/workflows/ci-lint-checks.yaml index 37bd9024284..9de71b05382 100644 --- a/.github/workflows/ci-lint-checks.yaml +++ b/.github/workflows/ci-lint-checks.yaml @@ -66,7 +66,7 @@ jobs: python-version: '3.x' - name: Run DCO check - run: python3 scripts/dco_check.py -b main -v --exclude-pattern '@users\.noreply\.github\.com' + run: python3 scripts/lint/dco_check.py -b main -v --exclude-pattern '@users\.noreply\.github\.com' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index a5757700bc3..20d412d35f5 100644 --- a/Makefile +++ b/Makefile @@ -134,18 +134,18 @@ cover: nocover .PHONY: nocover nocover: @echo Verifying that all packages have test files to count in coverage - @scripts/check-test-files.sh $(ALL_PKGS) + @scripts/lint/check-test-files.sh $(ALL_PKGS) .PHONY: fmt fmt: $(GOFUMPT) @echo Running import-order-cleanup on ALL_SRC ... - @./scripts/import-order-cleanup.py -o inplace -t $(ALL_SRC) + @./scripts/lint/import-order-cleanup.py -o inplace -t $(ALL_SRC) @echo Running gofmt on ALL_SRC ... @$(GOFMT) -e -s -l -w $(ALL_SRC) @echo Running gofumpt on ALL_SRC ... @$(GOFUMPT) -e -l -w $(ALL_SRC) @echo Running updateLicense.py on ALL_SRC ... - @./scripts/updateLicense.py $(ALL_SRC) $(SCRIPTS_SRC) + @./scripts/lint/updateLicense.py $(ALL_SRC) $(SCRIPTS_SRC) .PHONY: lint lint: lint-license lint-imports lint-semconv lint-goversion lint-goleak lint-go @@ -153,7 +153,7 @@ lint: lint-license lint-imports lint-semconv lint-goversion lint-goleak lint-go .PHONY: lint-license lint-license: @echo Verifying that all files have license headers - @./scripts/updateLicense.py $(ALL_SRC) $(SCRIPTS_SRC) > $(FMT_LOG) + @./scripts/lint/updateLicense.py $(ALL_SRC) $(SCRIPTS_SRC) > $(FMT_LOG) @[ ! -s "$(FMT_LOG)" ] || (echo "License check failures, run 'make fmt'" | cat - $(FMT_LOG) && false) .PHONY: lint-nocommit @@ -169,21 +169,21 @@ lint-nocommit: .PHONY: lint-imports lint-imports: @echo Verifying that all Go files have correctly ordered imports - @./scripts/import-order-cleanup.py -o stdout -t $(ALL_SRC) > $(IMPORT_LOG) + @./scripts/lint/import-order-cleanup.py -o stdout -t $(ALL_SRC) > $(IMPORT_LOG) @[ ! -s "$(IMPORT_LOG)" ] || (echo "Import ordering failures, run 'make fmt'" | cat - $(IMPORT_LOG) && false) .PHONY: lint-semconv lint-semconv: - ./scripts/check-semconv-version.sh + ./scripts/lint/check-semconv-version.sh .PHONY: lint-goversion lint-goversion: - ./scripts/check-go-version.sh + ./scripts/lint/check-go-version.sh .PHONY: lint-goleak lint-goleak: @echo Verifying that all packages with tests have goleak in their TestMain - @scripts/check-goleak-files.sh $(ALL_PKGS) + @scripts/lint/check-goleak-files.sh $(ALL_PKGS) .PHONY: lint-go lint-go: $(LINT) diff --git a/scripts/check-go-version.sh b/scripts/lint/check-go-version.sh similarity index 100% rename from scripts/check-go-version.sh rename to scripts/lint/check-go-version.sh diff --git a/scripts/check-goleak-files.sh b/scripts/lint/check-goleak-files.sh similarity index 100% rename from scripts/check-goleak-files.sh rename to scripts/lint/check-goleak-files.sh diff --git a/scripts/check-semconv-version.sh b/scripts/lint/check-semconv-version.sh similarity index 89% rename from scripts/check-semconv-version.sh rename to scripts/lint/check-semconv-version.sh index e5ed500a1ff..0acf7316a05 100755 --- a/scripts/check-semconv-version.sh +++ b/scripts/lint/check-semconv-version.sh @@ -22,6 +22,6 @@ if [ "$count" -gt 1 ]; then printf "%-70s | %s\n" "$file_name" "$version" done < <(find_files) printf "Error: %d different semconv versions detected.\n" "$count" - echo "Run ./scripts/update-semconv-version.sh to update semconv to latest version." + echo "Run ./scripts/lint/update-semconv-version.sh to update semconv to latest version." exit 1 fi diff --git a/scripts/check-test-files.sh b/scripts/lint/check-test-files.sh similarity index 100% rename from scripts/check-test-files.sh rename to scripts/lint/check-test-files.sh diff --git a/scripts/dco_check.py b/scripts/lint/dco_check.py similarity index 100% rename from scripts/dco_check.py rename to scripts/lint/dco_check.py diff --git a/scripts/import-order-cleanup.py b/scripts/lint/import-order-cleanup.py similarity index 100% rename from scripts/import-order-cleanup.py rename to scripts/lint/import-order-cleanup.py diff --git a/scripts/replace_license_headers.py b/scripts/lint/replace_license_headers.py similarity index 100% rename from scripts/replace_license_headers.py rename to scripts/lint/replace_license_headers.py diff --git a/scripts/update-semconv-version.sh b/scripts/lint/update-semconv-version.sh similarity index 100% rename from scripts/update-semconv-version.sh rename to scripts/lint/update-semconv-version.sh diff --git a/scripts/updateLicense.py b/scripts/lint/updateLicense.py similarity index 100% rename from scripts/updateLicense.py rename to scripts/lint/updateLicense.py