Skip to content

Commit 3993404

Browse files
authored
Add shellcheck (#1857)
* add shellcheck * fix /test/e2e/v1beta1/scripts/run-e2e-experiment.sh * fix test/e2e/v1beta1/scripts/setup-katib.sh * fix pkg/apis/manager/[v1beta1|health]/build.sh * fix scripts/v1beta1/deploy.sh * fix scripts/v1beta1/release.sh * fix scripts/v1beta1/update-images.sh * fix scripts/v1beta1/undeploy.sh * fix hack/update-openapigen.sh * update boilerplate * fix hack/gen-python-sdk/gen-sdk.sh * fix hack/update-codegen.sh * fix hack/update-mockgen.sh * use /usr/bin/env bash * add path to update-boilerplate.sh * fix script to update boilerplate * fix comment
1 parent 9924827 commit 3993404

File tree

267 files changed

+641
-345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+641
-345
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Shellcheck
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
test:
9+
name: Test
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v2
15+
16+
- name: Run shellcheck
17+
run: make shellcheck

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
HAS_LINT := $(shell command -v golangci-lint;)
2+
HAS_SHELLCHECK := $(shell command shellcheck --version)
23
COMMIT := v1beta1-$(shell git rev-parse --short=7 HEAD)
34
KATIB_REGISTRY := docker.io/kubeflowkatib
45
CPU_ARCH ?= amd64
@@ -28,6 +29,13 @@ endif
2829
vet:
2930
go vet ./pkg/... ./cmd/...
3031

32+
shellcheck:
33+
ifndef HAS_SHELLCHECK
34+
bash hack/install-shellcheck.sh
35+
echo "shellcheck has been installed"
36+
endif
37+
hack/verify-shellcheck.sh
38+
3139
update:
3240
hack/update-gofmt.sh
3341

@@ -50,8 +58,8 @@ ifndef GOPATH
5058
endif
5159
go generate ./pkg/... ./cmd/...
5260
hack/gen-python-sdk/gen-sdk.sh
53-
cd ./pkg/apis/manager/v1beta1 && ./build.sh
54-
cd ./pkg/apis/manager/health && ./build.sh
61+
pkg/apis/manager/v1beta1/build.sh
62+
pkg/apis/manager/health/build.sh
5563

5664
# Build images for the Katib v1beta1 components.
5765
build: generate

cmd/cert-generator/v1beta1/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2021 The Kubeflow Authors.
2+
Copyright 2022 The Kubeflow Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

cmd/db-manager/v1beta1/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2021 The Kubeflow Authors.
2+
Copyright 2022 The Kubeflow Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

cmd/db-manager/v1beta1/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2021 The Kubeflow Authors.
2+
Copyright 2022 The Kubeflow Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

cmd/earlystopping/medianstop/v1beta1/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021 The Kubeflow Authors.
1+
# Copyright 2022 The Kubeflow Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cmd/katib-controller/v1beta1/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2021 The Kubeflow Authors.
2+
Copyright 2022 The Kubeflow Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

cmd/metricscollector/v1beta1/file-metricscollector/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2021 The Kubeflow Authors.
2+
Copyright 2022 The Kubeflow Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

cmd/metricscollector/v1beta1/tfevent-metricscollector/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021 The Kubeflow Authors.
1+
# Copyright 2022 The Kubeflow Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cmd/new-ui/v1beta1/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2021 The Kubeflow Authors.
2+
Copyright 2022 The Kubeflow Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)