Skip to content

Commit f3d7e8c

Browse files
authored
Merge pull request #613 from andyzhangx/codespell-shellcheck
test: add codespell shellcheck github actions
2 parents fa6a7d2 + 5fa36cc commit f3d7e8c

File tree

11 files changed

+59
-13
lines changed

11 files changed

+59
-13
lines changed

.github/workflows/codespell.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# GitHub Action to automate the identification of common misspellings in text files.
2+
# https://github.com/codespell-project/actions-codespell
3+
# https://github.com/codespell-project/codespell
4+
name: codespell
5+
on: [push, pull_request]
6+
jobs:
7+
codespell:
8+
name: Check for spelling errors
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: codespell-project/actions-codespell@master
13+
with:
14+
check_filenames: true
15+
skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum,./release-tools/prow.sh,./pkg/lib/iscsi/
16+
ignore_words_list: "AKS,aks"

.github/workflows/shellcheck.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: ShellCheck
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
branches:
7+
- master
8+
- release-*
9+
pull_request:
10+
branches:
11+
- master
12+
- release-*
13+
14+
jobs:
15+
shellcheck:
16+
name: Shellcheck
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Run ShellCheck
21+
uses: ludeeus/action-shellcheck@master
22+
env:
23+
SHELLCHECK_OPTS: -e SC2034
24+
with:
25+
severity: warning
26+
check_together: 'yes'
27+
disable_matcher: false
28+
ignore_paths: vendor release-tools hack
29+
format: gcc

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ follow guide [here](./docs/install-driver-on-aks.md)
3131
- This option depends on [cloud provider config file](https://github.com/kubernetes/cloud-provider-azure/blob/master/docs/cloud-provider-config.md), usually it's `/etc/kubernetes/azure.json` on agent nodes deployed by [AKS](https://docs.microsoft.com/en-us/azure/aks/) or [aks-engine](https://github.com/Azure/aks-engine), here is [azure.json example](./deploy/example/azure.json). <details> <summary>specify a different cloud provider config file</summary></br>create `azure-cred-file` configmap before driver installation, e.g. for OpenShift, it's `/etc/kubernetes/cloud.conf` (make sure config file path is in the `volumeMounts.mountPath`)
3232
</br><pre>```kubectl create configmap azure-cred-file --from-literal=path="/etc/kubernetes/cloud.conf" --from-literal=path-windows="C:\\k\\cloud.conf" -n kube-system```</pre></details>
3333

34-
- This driver also supports [read cloud config from kuberenetes secret](./docs/read-from-secret.md) as first priority
34+
- This driver also supports [read cloud config from kubernetes secret](./docs/read-from-secret.md) as first priority
3535
- Make sure identity used by driver has `Contributor` role on node resource group
3636
- [How to set up CSI driver on Azure RedHat OpenShift(ARO)](https://github.com/ezYakaEagle442/aro-pub-storage/blob/master/setup-store-CSI-driver-azure-blob.md)
3737

pkg/blob/blob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ type Driver struct {
154154
subnetLockMap *util.LockMap
155155
// a map storing all volumes created by this driver <volumeName, accountName>
156156
volMap sync.Map
157-
// a timed cache storing acount search history (solve account list throttling issue)
157+
// a timed cache storing account search history (solve account list throttling issue)
158158
accountSearchCache *azcache.TimedCache
159159
}
160160

pkg/blob/nodeserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
260260
return nil, status.Error(codes.Internal, fmt.Sprintf("volume(%s) mount %q on %q failed with %v", volumeID, source, targetPath, err))
261261
}
262262

263-
// set permisssions for NFSv3 root folder
263+
// set permissions for NFSv3 root folder
264264
if err := os.Chmod(targetPath, os.FileMode(d.mountPermissions)); err != nil {
265265
return nil, status.Error(codes.Internal, fmt.Sprintf("Chmod(%s) failed with %v", targetPath, err))
266266
}

pkg/util/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ const (
3030
tagKeyValueDelimiter = "="
3131
)
3232

33-
// RoundUpBytes rounds up the volume size in bytes upto multiplications of GiB
33+
// RoundUpBytes rounds up the volume size in bytes up to multiplications of GiB
3434
// in the unit of Bytes
3535
func RoundUpBytes(volumeSizeBytes int64) int64 {
3636
return roundUpSize(volumeSizeBytes, GiB) * GiB
3737
}
3838

39-
// RoundUpGiB rounds up the volume size in bytes upto multiplications of GiB
39+
// RoundUpGiB rounds up the volume size in bytes up to multiplications of GiB
4040
// in the unit of GiB
4141
func RoundUpGiB(volumeSizeBytes int64) int64 {
4242
return roundUpSize(volumeSizeBytes, GiB)

test/integration/run-test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ function cleanup {
2222
pkill -f blobplugin
2323
}
2424

25-
readonly volname="citest-$(date +%s)"
25+
t=$(date +%s)
26+
readonly volname="citest-$t"
2627
readonly volsize="2147483648"
2728
readonly expanded_vol_size="2147483650"
2829
readonly endpoint="$1"

test/sanity/run-tests-all-clouds.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ apt update && apt install libfuse2 -y
5151
if [[ -z "$(command -v csi-sanity)" ]]; then
5252
install_csi_sanity_bin
5353
fi
54-
test/sanity/run-test.sh "$nodeid"
54+
test/sanity/run-test.sh

test/utils/blob_log.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
# Copyright 2020 The Kubernetes Authors.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,8 +14,6 @@
1214
# See the License for the specific language governing permissions and
1315
# limitations under the License.
1416

15-
#!/bin/bash
16-
1717
set -e
1818

1919
NS=kube-system

test/utils/check_driver_pods_restart.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
# Copyright 2020 The Kubernetes Authors.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,8 +14,6 @@
1214
# See the License for the specific language governing permissions and
1315
# limitations under the License.
1416

15-
#!/bin/bash
16-
1717
set -e
1818

1919
echo "check the driver pods if restarts ..."

0 commit comments

Comments
 (0)