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

Add shellcheck for verifying shell scripts #1552

Merged

Conversation

Vandit1604
Copy link
Contributor

@Vandit1604 Vandit1604 commented Jan 7, 2024

What type of PR is this?

/kind feature
maybe?

What this PR does / why we need it:

We will be able to verify shell scripts using make verify

Which issue(s) this PR fixes:

Fixes #1518

Special notes for your reviewer:

  • Should the make target also contain command to install spellcheck or do we add it in contributing guide.
Upon running "make verify locally," numerous warnings such as these were displayed. Will we cater to them or ignore them?
In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 74:
        kubectl taint nodes $KIND_CLUSTER_NAME-worker3 --overwrite tier=regular:NoSchedule
                            ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        kubectl taint nodes "$KIND_CLUSTER_NAME"-worker3 --overwrite tier=regular:NoSchedule


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 75:
        kubectl taint nodes $KIND_CLUSTER_NAME-worker3 --overwrite company.com/kueue-admission:NoSchedule
                            ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        kubectl taint nodes "$KIND_CLUSTER_NAME"-worker3 --overwrite company.com/kueue-admission:NoSchedule


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 84:
$GINKGO --junit-report=junit.xml --output-dir=$ARTIFACTS -v ./test/e2e/...
                                              ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
$GINKGO --junit-report=junit.xml --output-dir="$ARTIFACTS" -v ./test/e2e/...

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. labels Jan 7, 2024
Copy link

netlify bot commented Jan 7, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 251b860
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/65ec414acee527000870865a

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 7, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @Vandit1604!

It looks like this is your first PR to kubernetes-sigs/kueue 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kueue has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @Vandit1604. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 7, 2024
@Vandit1604 Vandit1604 force-pushed the feat/add-shellcheck-to-makefile branch from ce997c7 to 8ad17ce Compare January 7, 2024 22:07
@mimowo
Copy link
Contributor

mimowo commented Jan 8, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 8, 2024
@Vandit1604
Copy link
Contributor Author

Hey @mimowo Should I install shellcheck via apt install shellcheck ? As it causing a check to fail.

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vandit1604 I would suggest adding a Make target to install shellcheck via the released binary: https://github.com/koalaman/shellcheck/releases/tag/v0.9.0 so that we can perform the verification locally.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 9, 2024
@Vandit1604
Copy link
Contributor Author

Which warnings generated by shellcheck will we ignore?

@Vandit1604
Copy link
Contributor Author

Vandit1604 commented Jan 9, 2024

Because the current stacktrace is filled with many warnings we can suppress the ones that can be disregarded.

find . -type f \( -name '*.sh' \) ! -path '*/vendor/*' | xargs ./shellcheck-v0.9.0/shellcheck -x -s sh
find . -type f \( -name '*.sh' \) ! -path '*/vendor/*' | xargs ./shellcheck-v0.9.0/shellcheck -x -s sh 

In ./test/performance/run-test.sh line 5:
  source .env
  ^---------^ SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.


In ./test/performance/run-test.sh line 13:
DEFAULT_EXPERIMENTS=(
                    ^-- SC3030 (warning): In POSIX sh, arrays are undefined.


In ./test/performance/run-test.sh line 17:
EXPERIMENTS=("${EXPERIMENTS[@]:=${DEFAULT_EXPERIMENTS[@]}}")
            ^-- SC3030 (warning): In POSIX sh, arrays are undefined.
                                ^-----------------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./test/performance/run-test.sh line 28:
export PROMETHEUS_MANIFEST_PATH=$(pwd)/tmp_manifests
       ^----------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                ^----^ SC2046 (warning): Quote this to prevent word splitting.


In ./test/performance/run-test.sh line 32:
if [[ "$USE_KUEUE" == true ]]; then
   ^------------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./test/performance/run-test.sh line 51:
    echo -ne "Test Arguments,"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 52:
    echo -ne "P50 Job Create to start latency (ms),"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 53:
    echo -ne "P90 Job Create to start latency (ms),"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 54:
    echo -ne "P50 Job Start to complete latency (ms),"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 55:
    echo -ne "P90 Job Start to complete latency (ms),"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 56:
    echo -ne "Max Job Throughput (max jobs/s),"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 57:
    echo -ne "Total Jobs,"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 58:
    echo -ne "Total Pods,"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 59:
    echo -ne "Duration (s),"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 60:
    echo -ne "Avg Pod Waiting time (s),"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 61:
    echo -ne "P90 Pod Waiting time (s),"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 62:
    echo -ne "Avg Pod Completion time (s),"
         ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 66:
for item in "${EXPERIMENTS[@]}"; do
             ^---------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./test/performance/run-test.sh line 67:
    IFS=" " read -ra conditions <<<"$item"
                 ^-^ SC3045 (warning): In POSIX sh, read -a is undefined.
                                ^-^ SC3011 (warning): In POSIX sh, here-strings are undefined.


In ./test/performance/run-test.sh line 68:
    export CL2_SMALL_JOBS="${conditions[0]}"
                           ^--------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./test/performance/run-test.sh line 69:
    export CL2_MEDIUM_JOBS="${conditions[1]}"
                            ^--------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./test/performance/run-test.sh line 70:
    export CL2_LARGE_JOBS="${conditions[2]}"
                           ^--------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./test/performance/run-test.sh line 71:
    export CL2_JOB_RUNNING_TIME="${conditions[3]}"
                                 ^--------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./test/performance/run-test.sh line 72:
    export CL2_TEST_TIMEOUT="${conditions[4]}"
                             ^--------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./test/performance/run-test.sh line 73:
    cores="${conditions[5]}"
           ^--------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./test/performance/run-test.sh line 74:
    memory="${conditions[6]}"
            ^--------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./test/performance/run-test.sh line 79:
    if [[ "$USE_KUEUE" == true ]]; then
       ^------------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./test/performance/run-test.sh line 94:
        echo -ne "$CL2_SMALL_JOBS $CL2_MEDIUM_JOBS $CL2_LARGE_JOBS $CL2_JOB_RUNNING_TIME $CL2_TEST_TIMEOUT $cores $memory,"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 95:
        echo -ne "$(jq '.dataItems[] | select(.labels.Metric=="create_to_start").data.Perc50' "$experiment_dir"/JobLifecycleLatency*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 96:
        echo -ne "$(jq '.dataItems[] | select(.labels.Metric=="create_to_start").data.Perc90' "$experiment_dir"/JobLifecycleLatency*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 97:
        echo -ne "$(jq '.dataItems[] | select(.labels.Metric=="start_to_complete").data.Perc50' "$experiment_dir"/JobLifecycleLatency*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 98:
        echo -ne "$(jq '.dataItems[] | select(.labels.Metric=="start_to_complete").data.Perc90' "$experiment_dir"/JobLifecycleLatency*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 99:
        echo -ne "$(jq '.dataItems[0].data.max_job_throughput' "$experiment_dir"/GenericPrometheusQuery*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 100:
        echo -ne "$(jq '.dataItems[0].data.total_jobs_scheduled' "$experiment_dir"/GenericPrometheusQuery*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 101:
        echo -ne "$(jq '.dataItems[0].data.total_pods_scheduled' "$experiment_dir"/GenericPrometheusQuery*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 102:
        echo -ne "$(jq '.dataItems[0].data.job_performance' "$experiment_dir"/Timer*.json)",
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 103:
        echo -ne "$(jq '.dataItems[0].data.avg_pod_waiting_time' "$experiment_dir"/GenericPrometheusQuery*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 104:
        echo -ne "$(jq '.dataItems[0].data.perc_90_pod_waiting_time' "$experiment_dir"/GenericPrometheusQuery*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 105:
        echo -ne "$(jq '.dataItems[0].data.avg_pod_running_time' "$experiment_dir"/GenericPrometheusQuery*.json),"
             ^-^ SC3037 (warning): In POSIX sh, echo flags are undefined.


In ./test/performance/run-test.sh line 108:
    if [[ "$USE_KUEUE" == true ]]; then
       ^------------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./test/performance/run-test.sh line 113:
if [[ "$USE_KUEUE" == true ]]; then
   ^------------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/verify-toc.sh line 19:
set -o pipefail
       ^------^ SC3040 (warning): In POSIX sh, set option pipefail is undefined.


In ./hack/verify-toc.sh line 25:
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
                       ^---------------^ SC3028 (warning): In POSIX sh, BASH_SOURCE is undefined.
                       ^---------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./hack/dump_cache.sh line 21:
set -o pipefail
       ^------^ SC3040 (warning): In POSIX sh, set option pipefail is undefined.


In ./hack/dump_cache.sh line 27:
leader=$(kubectl get lease -n ${NAMESPACE} ${LEASE_NAME} -o jsonpath='{.spec.holderIdentity}' | cut -d '_' -f 1)
                              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                           ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
leader=$(kubectl get lease -n "${NAMESPACE}" "${LEASE_NAME}" -o jsonpath='{.spec.holderIdentity}' | cut -d '_' -f 1)


In ./hack/dump_cache.sh line 30:
if [ -v FOLLOW ]; then
     ^-- SC3016 (warning): In POSIX sh, unary -v (in place of [ -n "${var+x}" ]) is undefined.


In ./hack/dump_cache.sh line 31:
    kubectl logs -n ${NAMESPACE} ${leader} -f --tail=1 &
                    ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    kubectl logs -n "${NAMESPACE}" "${leader}" -f --tail=1 &


In ./hack/dump_cache.sh line 34:
kubectl debug -n ${NAMESPACE} ${leader} --image=${DEBUG_IMAGE} --target=manager --profile=restricted --image-pull-policy=IfNotPresent -- sh -c 'kill -USR2 1'
                 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl debug -n "${NAMESPACE}" "${leader}" --image="${DEBUG_IMAGE}" --target=manager --profile=restricted --image-pull-policy=IfNotPresent -- sh -c 'kill -USR2 1'


In ./hack/multikueue-e2e-test.sh line 19:
set -o pipefail
       ^------^ SC3040 (warning): In POSIX sh, set option pipefail is undefined.


In ./hack/multikueue-e2e-test.sh line 21:
SOURCE_DIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
                                ^---------------^ SC3028 (warning): In POSIX sh, BASH_SOURCE is undefined.
                                ^---------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./hack/multikueue-e2e-test.sh line 23:
export KUSTOMIZE=$ROOT_DIR/bin/kustomize
                 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export KUSTOMIZE="$ROOT_DIR"/bin/kustomize


In ./hack/multikueue-e2e-test.sh line 24:
export GINKGO=$ROOT_DIR/bin/ginkgo
              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export GINKGO="$ROOT_DIR"/bin/ginkgo


In ./hack/multikueue-e2e-test.sh line 25:
export KIND=$ROOT_DIR/bin/kind
            ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export KIND="$ROOT_DIR"/bin/kind


In ./hack/multikueue-e2e-test.sh line 26:
export YQ=$ROOT_DIR/bin/yq
          ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export YQ="$ROOT_DIR"/bin/yq


In ./hack/multikueue-e2e-test.sh line 28:
export MANAGER_KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME}-manager
                                 ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export MANAGER_KIND_CLUSTER_NAME="${KIND_CLUSTER_NAME}"-manager


In ./hack/multikueue-e2e-test.sh line 29:
export WORKER1_KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME}-worker1
                                 ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export WORKER1_KIND_CLUSTER_NAME="${KIND_CLUSTER_NAME}"-worker1


In ./hack/multikueue-e2e-test.sh line 30:
export WORKER2_KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME}-worker2
                                 ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export WORKER2_KIND_CLUSTER_NAME="${KIND_CLUSTER_NAME}"-worker2


In ./hack/multikueue-e2e-test.sh line 32:
source ${SOURCE_DIR}/e2e-common.sh
^-- SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.
       ^-------------------------^ SC1091 (info): Not following: ./e2e-common.sh: openBinaryFile: does not exist (No such file or directory)
       ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
source "${SOURCE_DIR}"/e2e-common.sh


In ./hack/multikueue-e2e-test.sh line 34:
function cleanup {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/multikueue-e2e-test.sh line 35:
    if [ $CREATE_KIND_CLUSTER == 'true' ]
         ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                              ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Did you mean: 
    if [ "$CREATE_KIND_CLUSTER" == 'true' ]


In ./hack/multikueue-e2e-test.sh line 41:
	cluster_cleanup $MANAGER_KIND_CLUSTER_NAME
                        ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cluster_cleanup "$MANAGER_KIND_CLUSTER_NAME"


In ./hack/multikueue-e2e-test.sh line 42:
	cluster_cleanup $WORKER1_KIND_CLUSTER_NAME
                        ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cluster_cleanup "$WORKER1_KIND_CLUSTER_NAME"


In ./hack/multikueue-e2e-test.sh line 43:
	cluster_cleanup $WORKER2_KIND_CLUSTER_NAME
                        ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cluster_cleanup "$WORKER2_KIND_CLUSTER_NAME"


In ./hack/multikueue-e2e-test.sh line 49:
function startup {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/multikueue-e2e-test.sh line 50:
    if [ $CREATE_KIND_CLUSTER == 'true' ]
         ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                              ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Did you mean: 
    if [ "$CREATE_KIND_CLUSTER" == 'true' ]


In ./hack/multikueue-e2e-test.sh line 56:
	cluster_create $MANAGER_KIND_CLUSTER_NAME $SOURCE_DIR/multikueue/manager-cluster.kind.yaml
                       ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                  ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cluster_create "$MANAGER_KIND_CLUSTER_NAME" "$SOURCE_DIR"/multikueue/manager-cluster.kind.yaml


In ./hack/multikueue-e2e-test.sh line 65:
	export GW=$(docker inspect ${MANAGER_KIND_CLUSTER_NAME}-control-plane -f '{{.NetworkSettings.Networks.kind.Gateway}}')
               ^-- SC2155 (warning): Declare and assign separately to avoid masking return values.
                  ^-- SC2046 (warning): Quote this to prevent word splitting.
                                   ^--------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	export GW=$(docker inspect "${MANAGER_KIND_CLUSTER_NAME}"-control-plane -f '{{.NetworkSettings.Networks.kind.Gateway}}')


In ./hack/multikueue-e2e-test.sh line 66:
	$YQ e '.networking.apiServerAddress=env(GW)'  $SOURCE_DIR/multikueue/worker-cluster.kind.yaml > $ARTIFACTS/worker-cluster.yaml
                                                      ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                        ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	$YQ e '.networking.apiServerAddress=env(GW)'  "$SOURCE_DIR"/multikueue/worker-cluster.kind.yaml > "$ARTIFACTS"/worker-cluster.yaml


In ./hack/multikueue-e2e-test.sh line 68:
	cluster_create $WORKER1_KIND_CLUSTER_NAME $ARTIFACTS/worker-cluster.yaml
                       ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                  ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cluster_create "$WORKER1_KIND_CLUSTER_NAME" "$ARTIFACTS"/worker-cluster.yaml


In ./hack/multikueue-e2e-test.sh line 69:
	cluster_create $WORKER2_KIND_CLUSTER_NAME $ARTIFACTS/worker-cluster.yaml
                       ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                  ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cluster_create "$WORKER2_KIND_CLUSTER_NAME" "$ARTIFACTS"/worker-cluster.yaml


In ./hack/multikueue-e2e-test.sh line 72:
	$KIND get kubeconfig --name $WORKER1_KIND_CLUSTER_NAME  > ${ARTIFACTS}/worker1.kubeconfig
                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                  ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	$KIND get kubeconfig --name "$WORKER1_KIND_CLUSTER_NAME"  > "${ARTIFACTS}"/worker1.kubeconfig


In ./hack/multikueue-e2e-test.sh line 73:
	$KIND get kubeconfig --name $WORKER2_KIND_CLUSTER_NAME  > ${ARTIFACTS}/worker2.kubeconfig
                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                  ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	$KIND get kubeconfig --name "$WORKER2_KIND_CLUSTER_NAME"  > "${ARTIFACTS}"/worker2.kubeconfig


In ./hack/multikueue-e2e-test.sh line 74:
	kubectl config use-context kind-${MANAGER_KIND_CLUSTER_NAME}
                                        ^--------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	kubectl config use-context kind-"${MANAGER_KIND_CLUSTER_NAME}"


In ./hack/multikueue-e2e-test.sh line 75:
	kubectl create secret generic multikueue --from-file=${ARTIFACTS}/worker1.kubeconfig --from-file=${ARTIFACTS}/worker2.kubeconfig
                                                             ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                         ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	kubectl create secret generic multikueue --from-file="${ARTIFACTS}"/worker1.kubeconfig --from-file="${ARTIFACTS}"/worker2.kubeconfig


In ./hack/multikueue-e2e-test.sh line 79:
function kind_load {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/multikueue-e2e-test.sh line 80:
    if [ $CREATE_KIND_CLUSTER == 'true' ]
         ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                              ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Did you mean: 
    if [ "$CREATE_KIND_CLUSTER" == 'true' ]


In ./hack/multikueue-e2e-test.sh line 83:
        cluster_kind_load $MANAGER_KIND_CLUSTER_NAME
                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        cluster_kind_load "$MANAGER_KIND_CLUSTER_NAME"


In ./hack/multikueue-e2e-test.sh line 84:
        cluster_kind_load $WORKER1_KIND_CLUSTER_NAME
                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        cluster_kind_load "$WORKER1_KIND_CLUSTER_NAME"


In ./hack/multikueue-e2e-test.sh line 85:
        cluster_kind_load $WORKER2_KIND_CLUSTER_NAME 
                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        cluster_kind_load "$WORKER2_KIND_CLUSTER_NAME" 


In ./hack/multikueue-e2e-test.sh line 89:
function kueue_deploy {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/multikueue-e2e-test.sh line 90:
    (cd config/components/manager && $KUSTOMIZE edit set image controller=$IMAGE_TAG)
                                                                          ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    (cd config/components/manager && $KUSTOMIZE edit set image controller="$IMAGE_TAG")


In ./hack/multikueue-e2e-test.sh line 92:
    cluster_kueue_deploy $MANAGER_KIND_CLUSTER_NAME
                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    cluster_kueue_deploy "$MANAGER_KIND_CLUSTER_NAME"


In ./hack/multikueue-e2e-test.sh line 93:
    cluster_kueue_deploy $WORKER1_KIND_CLUSTER_NAME
                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    cluster_kueue_deploy "$WORKER1_KIND_CLUSTER_NAME"


In ./hack/multikueue-e2e-test.sh line 94:
    cluster_kueue_deploy $WORKER2_KIND_CLUSTER_NAME
                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    cluster_kueue_deploy "$WORKER2_KIND_CLUSTER_NAME"


In ./hack/multikueue-e2e-test.sh line 102:
$GINKGO --junit-report=junit.xml --output-dir=$ARTIFACTS -v ./test/e2e/multikueue/... 
                                              ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
$GINKGO --junit-report=junit.xml --output-dir="$ARTIFACTS" -v ./test/e2e/multikueue/... 


In ./hack/e2e-common.sh line 20:
function cluster_cleanup {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/e2e-common.sh line 21:
	kubectl config use-context kind-$1
                                        ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	kubectl config use-context kind-"$1"


In ./hack/e2e-common.sh line 22:
        $KIND export logs $ARTIFACTS --name $1 || true
                          ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                            ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        $KIND export logs "$ARTIFACTS" --name "$1" || true


In ./hack/e2e-common.sh line 23:
        kubectl describe pods -n kueue-system > $ARTIFACTS/$1-kueue-system-pods.log || true
                                                ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                           ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        kubectl describe pods -n kueue-system > "$ARTIFACTS"/"$1"-kueue-system-pods.log || true


In ./hack/e2e-common.sh line 24:
        kubectl describe pods > $ARTIFACTS/$1-default-pods.log || true
                                ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                           ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        kubectl describe pods > "$ARTIFACTS"/"$1"-default-pods.log || true


In ./hack/e2e-common.sh line 25:
        $KIND delete cluster --name $1
                                    ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        $KIND delete cluster --name "$1"


In ./hack/e2e-common.sh line 30:
function cluster_create {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/e2e-common.sh line 31:
        $KIND create cluster --name $1 --image $E2E_KIND_VERSION --config $2 --wait 1m -v 5  > $ARTIFACTS/$1-create.log 2>&1 \
                                    ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                                               ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                          ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                               ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                          ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        $KIND create cluster --name "$1" --image "$E2E_KIND_VERSION" --config "$2" --wait 1m -v 5  > "$ARTIFACTS"/"$1"-create.log 2>&1 \


In ./hack/e2e-common.sh line 32:
		||  { echo "unable to start the $1 cluster "; cat $ARTIFACTS/$1-create.log ; }
                                                                  ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                             ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		||  { echo "unable to start the $1 cluster "; cat "$ARTIFACTS"/"$1"-create.log ; }


In ./hack/e2e-common.sh line 33:
	kubectl config use-context kind-$1
                                        ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	kubectl config use-context kind-"$1"


In ./hack/e2e-common.sh line 34:
        kubectl get nodes > $ARTIFACTS/$1-nodes.log || true
                            ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                       ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        kubectl get nodes > "$ARTIFACTS"/"$1"-nodes.log || true


In ./hack/e2e-common.sh line 35:
        kubectl describe pods -n kube-system > $ARTIFACTS/$1-system-pods.log || true
                                               ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                          ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        kubectl describe pods -n kube-system > "$ARTIFACTS"/"$1"-system-pods.log || true


In ./hack/e2e-common.sh line 39:
function cluster_kind_load {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/e2e-common.sh line 40:
        $KIND load docker-image $E2E_TEST_IMAGE --name $1
                                ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                       ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        $KIND load docker-image "$E2E_TEST_IMAGE" --name "$1"


In ./hack/e2e-common.sh line 41:
        $KIND load docker-image $IMAGE_TAG --name $1
                                ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                  ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        $KIND load docker-image "$IMAGE_TAG" --name "$1"


In ./hack/e2e-common.sh line 45:
function cluster_kueue_deploy {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/e2e-common.sh line 46:
    kubectl config use-context kind-${1}
                                    ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    kubectl config use-context kind-"${1}"


In ./hack/update-toc.sh line 19:
set -o pipefail
       ^------^ SC3040 (warning): In POSIX sh, set option pipefail is undefined.


In ./hack/update-toc.sh line 25:
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
                       ^---------------^ SC3028 (warning): In POSIX sh, BASH_SOURCE is undefined.
                       ^---------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./hack/cherry_pick_pull.sh line 26:
set -o pipefail
       ^------^ SC3040 (warning): In POSIX sh, set option pipefail is undefined.


In ./hack/cherry_pick_pull.sh line 29:
declare -r REPO_ROOT
^------------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.


In ./hack/cherry_pick_pull.sh line 33:
declare -r STARTINGBRANCH
^-----------------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.


In ./hack/cherry_pick_pull.sh line 34:
declare -r REBASEMAGIC="${REPO_ROOT}/.git/rebase-apply"
^--------------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.


In ./hack/cherry_pick_pull.sh line 42:
if [[ -z ${GITHUB_USER:-} ]]; then
   ^-----------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 52:
if [[ "$#" -lt 2 ]]; then
   ^--------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 77:
if git_status=$(git status --porcelain --untracked=no 2>/dev/null) && [[ -n "${git_status}" ]]; then
                                                                      ^----------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 82:
if [[ -e "${REBASEMAGIC}" ]]; then
   ^-----------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 87:
declare -r BRANCH="$1"
^---------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.


In ./hack/cherry_pick_pull.sh line 89:
declare -r PULLS=( "$@" )
^--------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.
                 ^------^ SC3030 (warning): In POSIX sh, arrays are undefined.


In ./hack/cherry_pick_pull.sh line 91:
function join { local IFS="$1"; shift; echo "$*"; }
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.
                ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In ./hack/cherry_pick_pull.sh line 92:
PULLDASH=$(join - "${PULLS[@]/#/#}") # Generates something like "#12345-#56789"
                   ^-------------^ SC3060 (warning): In POSIX sh, string replacement is undefined.


In ./hack/cherry_pick_pull.sh line 93:
declare -r PULLDASH
^-----------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.


In ./hack/cherry_pick_pull.sh line 94:
PULLSUBJ=$(join " " "${PULLS[@]/#/#}") # Generates something like "#12345 #56789"
                     ^-------------^ SC3060 (warning): In POSIX sh, string replacement is undefined.


In ./hack/cherry_pick_pull.sh line 95:
declare -r PULLSUBJ
^-----------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.


In ./hack/cherry_pick_pull.sh line 107:
declare -r NEWBRANCHREQ
^---------------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.


In ./hack/cherry_pick_pull.sh line 109:
declare -r NEWBRANCH
^------------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.


In ./hack/cherry_pick_pull.sh line 111:
declare -r NEWBRANCHUNIQ
^----------------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.


In ./hack/cherry_pick_pull.sh line 116:
function return_to_kansas {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/cherry_pick_pull.sh line 117:
  if [[ "${gitamcleanup}" == "true" ]]; then
     ^-- SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 124:
  if [[ -z "${DRY_RUN}" ]]; then
     ^-------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 128:
    if [[ -n "${cleanbranch}" ]]; then
       ^-----------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 135:
SUBJECTS=()
         ^-- SC3030 (warning): In POSIX sh, arrays are undefined.


In ./hack/cherry_pick_pull.sh line 136:
function make-a-pr() {
^-- SC2112 (warning): 'function' keyword is non-standard. Delete it.
^-- SC3033 (warning): In POSIX sh, naming functions outside [a-zA-Z_][a-zA-Z0-9_]* is undefined.


In ./hack/cherry_pick_pull.sh line 137:
  local rel
  ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In ./hack/cherry_pick_pull.sh line 142:
  local numandtitle
  ^---------------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In ./hack/cherry_pick_pull.sh line 143:
  numandtitle=$(printf '%s\n' "${SUBJECTS[@]}")
                               ^------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./hack/cherry_pick_pull.sh line 160:
for pull in "${PULLS[@]}"; do
             ^---------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./hack/cherry_pick_pull.sh line 170:
    while unmerged=$(git status --porcelain | grep ^U) && [[ -n ${unmerged} ]] \
                                                          ^------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 171:
      || [[ -e "${REBASEMAGIC}" ]]; do
         ^-----------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 179:
      read -p "+++ Proceed (anything but 'y' aborts the cherry-pick)? [y/n] " -r
           ^-- SC3045 (warning): In POSIX sh, read -p is undefined.


In ./hack/cherry_pick_pull.sh line 181:
      if ! [[ "${REPLY}" =~ ^[yY]$ ]]; then
           ^------------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 187:
    if [[ "${conflicts}" != "true" ]]; then
       ^----------------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 195:
  SUBJECTS+=("#${pull}: ${subject}")
  ^------^ SC3024 (warning): In POSIX sh, += is undefined.
            ^----------------------^ SC3030 (warning): In POSIX sh, arrays are undefined.


In ./hack/cherry_pick_pull.sh line 203:
if [[ -n "${REGENERATE_DOCS}" ]]; then
   ^---------------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 213:
if [[ -n "${DRY_RUN}" ]]; then
   ^-------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/cherry_pick_pull.sh line 246:
read -p "+++ Proceed (anything but 'y' aborts the cherry-pick)? [y/n] " -r
     ^-- SC3045 (warning): In POSIX sh, read -p is undefined.


In ./hack/cherry_pick_pull.sh line 247:
if ! [[ "${REPLY}" =~ ^[yY]$ ]]; then
     ^------------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/update-codegen.sh line 19:
set -o pipefail
       ^------^ SC3040 (warning): In POSIX sh, set option pipefail is undefined.


In ./hack/update-codegen.sh line 22:
KUEUE_ROOT=$(realpath $(dirname ${BASH_SOURCE[0]})/..)
                      ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting.
                                ^---------------^ SC3028 (warning): In POSIX sh, BASH_SOURCE is undefined.
                                ^---------------^ SC3054 (warning): In POSIX sh, array references are undefined.
                                ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
KUEUE_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)


In ./hack/update-codegen.sh line 25:
cd $(dirname ${BASH_SOURCE[0]})/..
   ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting.
             ^---------------^ SC3028 (warning): In POSIX sh, BASH_SOURCE is undefined.
             ^---------------^ SC3054 (warning): In POSIX sh, array references are undefined.
             ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd $(dirname "${BASH_SOURCE[0]}")/..


In ./hack/update-codegen.sh line 27:
source "${CODEGEN_PKG}/kube_codegen.sh"
^-- SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.
       ^-- SC1091 (info): Not following: ./kube_codegen.sh: openBinaryFile: does not exist (No such file or directory)


In ./hack/update-codegen.sh line 40:
  --boilerplate ${KUEUE_ROOT}/hack/boilerplate.go.txt
                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --boilerplate "${KUEUE_ROOT}"/hack/boilerplate.go.txt


In ./hack/update-codegen.sh line 54:
  --boilerplate ${KUEUE_ROOT}/hack/boilerplate.go.txt \
                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --boilerplate "${KUEUE_ROOT}"/hack/boilerplate.go.txt \


In ./hack/update-helm.sh line 36:
find $SRC_VISIBILITY_DIR -name "*.yaml" $(printf "! -name %s " $EXCLUDE_FILES) -exec cp "{}" $DEST_VISIBILITY_DIR \;
                                        ^-- SC2046 (warning): Quote this to prevent word splitting.


In ./hack/update-helm.sh line 37:
find $SRC_RBAC_DIR -name "*.yaml" $(printf "! -name %s " $EXCLUDE_FILES) -exec cp "{}" $DEST_RBAC_DIR \;
                                  ^-- SC2046 (warning): Quote this to prevent word splitting.


In ./hack/update-helm.sh line 65:
for output_file in ${DEST_CRD_DIR}/*.yaml; do
                   ^-------------^ SC2231 (info): Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .


In ./hack/update-helm.sh line 68:
  : >$output_file
     ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  : >"$output_file"


In ./hack/update-helm.sh line 71:
    if [[ $line == "$search_cert_line" ]]; then
       ^-- SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/update-helm.sh line 73:
    elif [[ $line == "$search_webhook_line" ]]; then
         ^-- SC3010 (warning): In POSIX sh, [[ ]] is undefined.


In ./hack/update-helm.sh line 77:
  rm $input_file
     ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  rm "$input_file"


In ./hack/update-helm.sh line 81:
for output_file in ${DEST_RBAC_DIR}/*.yaml; do
                   ^--------------^ SC2231 (info): Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .


In ./hack/update-helm.sh line 82:
  if [ "$(cat $output_file | $YQ '.metadata | has("name")')" = "true" ]; then
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.metadata | has("name")')" = "true" ]; then


In ./hack/update-helm.sh line 83:
    $YQ -N -i '.metadata.name |= "{{ include \"kueue.fullname\" . }}-" + .' $output_file
                                                                            ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.metadata.name |= "{{ include \"kueue.fullname\" . }}-" + .' "$output_file"


In ./hack/update-helm.sh line 85:
  if [ "$(cat $output_file | $YQ '.metadata | has("namespace")')" = "true" ]; then
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.metadata | has("namespace")')" = "true" ]; then


In ./hack/update-helm.sh line 86:
    $YQ -N -i '.metadata.namespace = "{{ .Release.Namespace }}"' $output_file
                                                                 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.metadata.namespace = "{{ .Release.Namespace }}"' "$output_file"


In ./hack/update-helm.sh line 88:
  if [ "$(cat $output_file | $YQ '.roleRef | has("name")')" = "true" ]; then
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.roleRef | has("name")')" = "true" ]; then


In ./hack/update-helm.sh line 89:
    $YQ -N -i '.roleRef.name |= "{{ include \"kueue.fullname\" . }}-" + .' $output_file
                                                                           ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.roleRef.name |= "{{ include \"kueue.fullname\" . }}-" + .' "$output_file"


In ./hack/update-helm.sh line 91:
  if [ "$(cat $output_file | $YQ '.subjects.[] | has("name")')" = "true" ]; then
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.subjects.[] | has("name")')" = "true" ]; then


In ./hack/update-helm.sh line 92:
    $YQ -N -i '.subjects.[].name |= "{{ include \"kueue.fullname\" . }}-" + .' $output_file
                                                                               ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.subjects.[].name |= "{{ include \"kueue.fullname\" . }}-" + .' "$output_file"


In ./hack/update-helm.sh line 94:
  if [ "$(cat $output_file | $YQ '.subjects.[] | has("namespace")')" = "true" ]; then
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.subjects.[] | has("namespace")')" = "true" ]; then


In ./hack/update-helm.sh line 95:
    $YQ -N -i '.subjects.[].namespace = "{{ .Release.Namespace }}"' $output_file
                                                                    ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.subjects.[].namespace = "{{ .Release.Namespace }}"' "$output_file"


In ./hack/update-helm.sh line 100:
for output_file in ${DEST_VISIBILITY_DIR}/*.yaml; do
                   ^--------------------^ SC2231 (info): Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .


In ./hack/update-helm.sh line 102:
  if [ "$(cat $output_file | $YQ '.metadata | has("name")')" = "true" ] &&
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.metadata | has("name")')" = "true" ] &&


In ./hack/update-helm.sh line 103:
    [ "$(cat $output_file | $YQ '.metadata.name | (. == "v1alpha1*")')" = "false" ]; then
             ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    [ "$(cat "$output_file" | $YQ '.metadata.name | (. == "v1alpha1*")')" = "false" ]; then


In ./hack/update-helm.sh line 104:
    $YQ -N -i '.metadata.name |= "{{ include \"kueue.fullname\" . }}-" + .' $output_file
                                                                            ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.metadata.name |= "{{ include \"kueue.fullname\" . }}-" + .' "$output_file"


In ./hack/update-helm.sh line 107:
  if [ "$(cat $output_file | $YQ '.metadata | has("namespace")')" = "true" ] &&
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.metadata | has("namespace")')" = "true" ] &&


In ./hack/update-helm.sh line 108:
    [ "$(cat $output_file | $YQ '.metadata.namespace | (. == "kube-system")')" = "false" ]; then
             ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    [ "$(cat "$output_file" | $YQ '.metadata.namespace | (. == "kube-system")')" = "false" ]; then


In ./hack/update-helm.sh line 109:
    $YQ -N -i '.metadata.namespace = "{{ .Release.Namespace }}"' $output_file
                                                                 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.metadata.namespace = "{{ .Release.Namespace }}"' "$output_file"


In ./hack/update-helm.sh line 111:
  if [ "$(cat $output_file | $YQ '.spec.service | has("name")')" = "true" ]; then
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.spec.service | has("name")')" = "true" ]; then


In ./hack/update-helm.sh line 112:
    $YQ -N -i '.spec.service.name |= "{{ include \"kueue.fullname\" . }}-" + .' $output_file
                                                                                ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.spec.service.name |= "{{ include \"kueue.fullname\" . }}-" + .' "$output_file"


In ./hack/update-helm.sh line 114:
  if [ "$(cat $output_file | $YQ '.spec.service | has("namespace")')" = "true" ]; then
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.spec.service | has("namespace")')" = "true" ]; then


In ./hack/update-helm.sh line 115:
    $YQ -N -i '.spec.service.namespace = "{{ .Release.Namespace }}"' $output_file
                                                                     ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.spec.service.namespace = "{{ .Release.Namespace }}"' "$output_file"


In ./hack/update-helm.sh line 117:
  if [ "$(cat $output_file | $YQ '.subjects.[] | has("namespace")')" = "true" ]; then
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(cat "$output_file" | $YQ '.subjects.[] | has("namespace")')" = "true" ]; then


In ./hack/update-helm.sh line 118:
    $YQ -N -i '.subjects.[].namespace = "{{ .Release.Namespace }}"' $output_file
                                                                    ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    $YQ -N -i '.subjects.[].namespace = "{{ .Release.Namespace }}"' "$output_file"


In ./hack/e2e-test.sh line 19:
set -o pipefail
       ^------^ SC3040 (warning): In POSIX sh, set option pipefail is undefined.


In ./hack/e2e-test.sh line 21:
SOURCE_DIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
                                ^---------------^ SC3028 (warning): In POSIX sh, BASH_SOURCE is undefined.
                                ^---------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./hack/e2e-test.sh line 23:
export KUSTOMIZE=$ROOT_DIR/bin/kustomize
                 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export KUSTOMIZE="$ROOT_DIR"/bin/kustomize


In ./hack/e2e-test.sh line 24:
export GINKGO=$ROOT_DIR/bin/ginkgo
              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export GINKGO="$ROOT_DIR"/bin/ginkgo


In ./hack/e2e-test.sh line 25:
export KIND=$ROOT_DIR/bin/kind
            ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export KIND="$ROOT_DIR"/bin/kind


In ./hack/e2e-test.sh line 28:
source ${SOURCE_DIR}/e2e-common.sh
^-- SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.
       ^-------------------------^ SC1091 (info): Not following: ./e2e-common.sh: openBinaryFile: does not exist (No such file or directory)
       ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
source "${SOURCE_DIR}"/e2e-common.sh


In ./hack/e2e-test.sh line 30:
function cleanup {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/e2e-test.sh line 31:
    if [ $CREATE_KIND_CLUSTER == 'true' ]
         ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                              ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Did you mean: 
    if [ "$CREATE_KIND_CLUSTER" == 'true' ]


In ./hack/e2e-test.sh line 36:
	cluster_cleanup $KIND_CLUSTER_NAME
                        ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cluster_cleanup "$KIND_CLUSTER_NAME"


In ./hack/e2e-test.sh line 41:
function startup {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/e2e-test.sh line 42:
    if [ $CREATE_KIND_CLUSTER == 'true' ]
         ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                              ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Did you mean: 
    if [ "$CREATE_KIND_CLUSTER" == 'true' ]


In ./hack/e2e-test.sh line 47:
	cluster_create $KIND_CLUSTER_NAME  $SOURCE_DIR/kind-cluster.yaml 
                       ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                           ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cluster_create "$KIND_CLUSTER_NAME"  "$SOURCE_DIR"/kind-cluster.yaml 


In ./hack/e2e-test.sh line 51:
function kind_load {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/e2e-test.sh line 52:
    if [ $CREATE_KIND_CLUSTER == 'true' ]
         ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                              ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Did you mean: 
    if [ "$CREATE_KIND_CLUSTER" == 'true' ]


In ./hack/e2e-test.sh line 55:
	cluster_kind_load $KIND_CLUSTER_NAME
                          ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cluster_kind_load "$KIND_CLUSTER_NAME"


In ./hack/e2e-test.sh line 59:
function kueue_deploy {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./hack/e2e-test.sh line 60:
    (cd config/components/manager && $KUSTOMIZE edit set image controller=$IMAGE_TAG)
                                                                          ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    (cd config/components/manager && $KUSTOMIZE edit set image controller="$IMAGE_TAG")


In ./hack/e2e-test.sh line 61:
    cluster_kueue_deploy $KIND_CLUSTER_NAME
                         ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    cluster_kueue_deploy "$KIND_CLUSTER_NAME"


In ./hack/e2e-test.sh line 68:
$GINKGO --junit-report=junit.xml --output-dir=$ARTIFACTS -v ./test/e2e/singlecluster/...
                                              ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
$GINKGO --junit-report=junit.xml --output-dir="$ARTIFACTS" -v ./test/e2e/singlecluster/...


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 19:
set -o pipefail
       ^------^ SC3040 (warning): In POSIX sh, set option pipefail is undefined.


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 21:
SOURCE_DIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
                                ^---------------^ SC3028 (warning): In POSIX sh, BASH_SOURCE is undefined.
                                ^---------------^ SC3054 (warning): In POSIX sh, array references are undefined.


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 23:
export KUSTOMIZE=$ROOT_DIR/bin/kustomize
                 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export KUSTOMIZE="$ROOT_DIR"/bin/kustomize


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 24:
export GINKGO=$ROOT_DIR/bin/ginkgo
              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export GINKGO="$ROOT_DIR"/bin/ginkgo


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 25:
export KIND=$ROOT_DIR/bin/kind
            ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export KIND="$ROOT_DIR"/bin/kind


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 27:
function cleanup {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 28:
	if [ $CREATE_KIND_CLUSTER == 'true' ]; then
             ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                  ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Did you mean: 
	if [ "$CREATE_KIND_CLUSTER" == 'true' ]; then


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 32:
		kubectl logs -n kube-system kube-scheduler-kind-control-plane >$ARTIFACTS/kube-scheduler.log || true
                                                                               ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		kubectl logs -n kube-system kube-scheduler-kind-control-plane >"$ARTIFACTS"/kube-scheduler.log || true


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 33:
		kubectl logs -n kube-system kube-controller-manager-kind-control-plane >$ARTIFACTS/kube-controller-manager.log || true
                                                                                        ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		kubectl logs -n kube-system kube-controller-manager-kind-control-plane >"$ARTIFACTS"/kube-controller-manager.log || true


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 34:
		kubectl logs -n kueue-system deployment/kueue-controller-manager >$ARTIFACTS/kueue-controller-manager.log || true
                                                                                  ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		kubectl logs -n kueue-system deployment/kueue-controller-manager >"$ARTIFACTS"/kueue-controller-manager.log || true


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 35:
		kubectl logs -n kueue-system deployment/kueue-podtaintstolerations >$ARTIFACTS/kueue-controller-manager.log || true
                                                                                    ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		kubectl logs -n kueue-system deployment/kueue-podtaintstolerations >"$ARTIFACTS"/kueue-controller-manager.log || true


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 36:
		kubectl describe pods -n kueue-system >$ARTIFACTS/kueue-system-pods.log || true
                                                       ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		kubectl describe pods -n kueue-system >"$ARTIFACTS"/kueue-system-pods.log || true


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 37:
		$KIND delete cluster --name $KIND_CLUSTER_NAME
                                            ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		$KIND delete cluster --name "$KIND_CLUSTER_NAME"


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 42:
function startup {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 43:
	if [ $CREATE_KIND_CLUSTER == 'true' ]; then
             ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                  ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Did you mean: 
	if [ "$CREATE_KIND_CLUSTER" == 'true' ]; then


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 47:
		$KIND create cluster --name $KIND_CLUSTER_NAME --image $E2E_KIND_VERSION --config $SOURCE_DIR/kind-cluster.yaml --wait 15m -v 5 >$ARTIFACTS/kind-create.log 2>&1 ||
                                            ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                       ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                  ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                                                                 ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		$KIND create cluster --name "$KIND_CLUSTER_NAME" --image "$E2E_KIND_VERSION" --config "$SOURCE_DIR"/kind-cluster.yaml --wait 15m -v 5 >"$ARTIFACTS"/kind-create.log 2>&1 ||


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 50:
				cat $ARTIFACTS/kind-create.log
                                    ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
				cat "$ARTIFACTS"/kind-create.log


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 52:
		kubectl get nodes >$ARTIFACTS/kind-nodes.log || true
                                   ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		kubectl get nodes >"$ARTIFACTS"/kind-nodes.log || true


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 53:
		kubectl describe pods -n kube-system >$ARTIFACTS/kube-system-pods.log || true
                                                      ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		kubectl describe pods -n kube-system >"$ARTIFACTS"/kube-system-pods.log || true


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 57:
function kind_load {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 58:
	$KIND load docker-image $CONTROLLER_IMAGE --name $KIND_CLUSTER_NAME
                                ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                         ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	$KIND load docker-image "$CONTROLLER_IMAGE" --name "$KIND_CLUSTER_NAME"


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 61:
function kueue_deploy {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 65:
function controller_deploy {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 66:
	(cd test/e2e/config && $KUSTOMIZE edit set image controller=$CONTROLLER_IMAGE)
                                                                    ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	(cd test/e2e/config && $KUSTOMIZE edit set image controller="$CONTROLLER_IMAGE")


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 70:
function taint_nodes {
^-- SC2113 (warning): 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 71:
	kubectl taint nodes $KIND_CLUSTER_NAME-worker2 --overwrite tier=spot:NoSchedule
                            ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	kubectl taint nodes "$KIND_CLUSTER_NAME"-worker2 --overwrite tier=spot:NoSchedule


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 72:
	kubectl taint nodes $KIND_CLUSTER_NAME-worker2 --overwrite company.com/kueue-admission:NoSchedule
                            ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	kubectl taint nodes "$KIND_CLUSTER_NAME"-worker2 --overwrite company.com/kueue-admission:NoSchedule


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 74:
	kubectl taint nodes $KIND_CLUSTER_NAME-worker3 --overwrite tier=regular:NoSchedule
                            ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	kubectl taint nodes "$KIND_CLUSTER_NAME"-worker3 --overwrite tier=regular:NoSchedule


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 75:
	kubectl taint nodes $KIND_CLUSTER_NAME-worker3 --overwrite company.com/kueue-admission:NoSchedule
                            ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	kubectl taint nodes "$KIND_CLUSTER_NAME"-worker3 --overwrite company.com/kueue-admission:NoSchedule


In ./cmd/experimental/podtaintstolerations/hack/e2e-test.sh line 84:
$GINKGO --junit-report=junit.xml --output-dir=$ARTIFACTS -v ./test/e2e/...
                                              ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
$GINKGO --junit-report=junit.xml --output-dir="$ARTIFACTS" -v ./test/e2e/...

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2112 -- 'function' keyword is non-standar...
  https://www.shellcheck.net/wiki/SC2113 -- 'function' keyword is non-standar...
make: *** [Makefile:204: shell-lint] Error 123

@Vandit1604
Copy link
Contributor Author

The make target works fine locally. Does the testing suite not wait for the wget command to download the binary?

Makefile Outdated
Comment on lines 198 to 200
| wget -qi -
# extracting tar.gz file
tar -xvf shellcheck-v0.9.0.linux.x86_64.tar.xz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we download the binary to $PROJECT_DIR/bin as well as other tools?

kueue/Makefile

Lines 297 to 301 in 4593b42

PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
GOLANGCI_LINT = $(PROJECT_DIR)/bin/golangci-lint
.PHONY: golangci-lint
golangci-lint: ## Download golangci-lint locally if necessary.
@GOBIN=$(PROJECT_DIR)/bin GO111MODULE=on $(GO_CMD) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2

And then, should we call the $PROJECT_DIR/bin/shellcheck in the Make shell-lint target?

Makefile Outdated
# removing previous shellcheck files if shellcheck give errors and warnings it wouldn't remove the downloaded files
rm -rf shellcheck-v0.9.0*
@echo "Installing ShellCheck"
curl -s https://api.github.com/repos/koalaman/shellcheck/releases/latest \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should have such an automation logic.
Should we just download a binary using https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.darwin.x86_64.tar.xz?

Makefile Outdated
rm -rf shellcheck-v0.9.0*
@echo "Installing ShellCheck"
curl -s https://api.github.com/repos/koalaman/shellcheck/releases/latest \
| grep "browser_download_url.*linux.x86_64.tar.xz" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you obtain the OS and CPU arch from go env, and then download the binary for dedicated the OS and CPU arch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use https://github.com/dvershinin/lastversion to download the latest stable release. It downloads the binary release specific to the OS.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we should use the latest version. We should use a specified version as well as other tools.
Here, the specified version means v0.9.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The utility downloads the latest stable version not the stable version. I tried getting the URL according to the OS and architecture but it didn't work.

.gitignore Outdated Show resolved Hide resolved
@tenzen-y
Copy link
Member

Because the current stacktrace is filled with many warnings we can suppress the ones that can be disregarded.

find . -type f ( -name '.sh' ) ! -path '/vendor/*' | xargs ./shellcheck-v0.9.0/shellcheck -x -s sh

Oh, there are many warnings :(
Can we fix all warnings in this PR?

@Vandit1604
Copy link
Contributor Author

Oh, there are many warnings :( Can we fix all warnings in this PR?

I believe so, though it would take about two days. Are we not ignoring any warnings or errors?

@Vandit1604
Copy link
Contributor Author

Ah. Finally got it. The test is failing locally too but after giving the output of shellcheck. As the line which is giving the error is originating from the same line make: *** [Makefile:192: shell-lint] Error 123
Line 192 has

	cd $(PROJECT_BIN); \

Makefile Outdated
shell-lint: | $(PROJECT_BIN)
cd $(PROJECT_BIN); \
if [ ! -d "shellcheck" ]; then \
DOWNLOAD_URL=$$(curl -s https://api.github.com/repos/koalaman/shellcheck/releases/latest | grep "browser_download_url.*linux.x86_64.tar.xz" | cut -d : -f 2,3 | tr -d \" ); \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we statically set the download URL, not dynamically?
I meant like the following:

GOOS = $(shell go env GOOS)
GOARCH = $(shell go env GOARCH)

...

ifeq ($(GOOS),arm64)
OS = aarch64
else
OS = $(GOOS)
endif
shell-lint:
    wget -q -O /bin/shellcheck.tar.gz https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.$(OS).$(GOARCH).tar.xz

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late response. I tried creating the URL statically
This is the output of GOOS and GOARCH on my computer

>> go env GOOS  
linux
>> go env GOARCH
amd64

This is the URL I got but it didn't download the binary as we expected.

https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.linux.amd64.tar.xz

I'll try something like this


GOOS = $(shell go env GOOS)
GOARCH = $(shell go env GOARCH)

ifeq ($(GOOS),darwin)
	URL := https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.darwin.x86_64.tar.xz
else
	ARCH = aarch64
	ifeq ($(GOARCH),arm64)
	else
		ARCH = armv6hf
	endif
	# another condition
endif

.PHONY: shell-lint
shell-lint:
	wget -q -O /bin/shellcheck.tar.gz $(URL)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have pushed some changes downloading the release binary statically.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated
@@ -186,12 +186,29 @@ run-test-multikueue-e2e-%: FORCE
@echo Running multikueue e2e for k8s ${K8S_VERSION}
E2E_KIND_VERSION="kindest/node:v$(K8S_VERSION)" KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) CREATE_KIND_CLUSTER=$(CREATE_KIND_CLUSTER) ARTIFACTS="$(ARTIFACTS)/$@" IMAGE_TAG=$(IMAGE_TAG) ./hack/multikueue-e2e-test.sh

PROJECT_BIN := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/bin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have already defined in

kueue/Makefile

Line 314 in 1a482fd

PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried using PROJECT_BIN but the target was returning error for undefined variable. I'll try again.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 20, 2024
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 27, 2024
@Vandit1604 Vandit1604 force-pushed the feat/add-shellcheck-to-makefile branch from ea3c636 to c16ad57 Compare March 9, 2024 09:42
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 9, 2024
@Vandit1604
Copy link
Contributor Author

Cleaned up the commit history where I tried downloading shellcheck statically.

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly lgtm

Makefile Outdated Show resolved Hide resolved
hack/verify-shellcheck.sh Outdated Show resolved Hide resolved
hack/multikueue-e2e-test.sh Outdated Show resolved Hide resolved
Vandit1604 and others added 3 commits March 9, 2024 15:36
Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove shell-check from Makefile?

verify: gomod-verify vet ci-lint fmt-verify toc-verify manifests generate update-helm generate-apiref prepare-release-branch

@Vandit1604
Copy link
Contributor Author

Apologies. Might've removed it accidentally while cleaning up the git history.

@tenzen-y
Copy link
Member

tenzen-y commented Mar 9, 2024

Apologies. Might've removed it accidentally while cleaning up the git history.

No worries, finding your mistake is my responsibility :)

@Vandit1604
Copy link
Contributor Author

Hmm. There's no actual error message logging, but the tests fail.

hack/verify-shellcheck.sh Outdated Show resolved Hide resolved
Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@Vandit1604
Copy link
Contributor Author

Vandit1604 commented Mar 9, 2024

After running make verify I have some changes from update-helm rule. I'll commit them too.

Edit: nvm, ran make verify again. False alarm.

@tenzen-y
Copy link
Member

tenzen-y commented Mar 9, 2024

After running make verify I have some changes from update-helm rule. I'll commit them too.

Edit: nvm, ran make verify again. False alarm.

Alright, let us wait for the result of CI.

@tenzen-y
Copy link
Member

tenzen-y commented Mar 9, 2024

All passed!
@Vandit1604 This is a significant contribution! I'd appreciate all your efforts!
I'd be looking forward to your next PR!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 9, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c3ca2c9e54d37eafddb23436f5657ca443317b82

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y, Vandit1604

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2024
@k8s-ci-robot k8s-ci-robot merged commit 6e8d9ca into kubernetes-sigs:main Mar 9, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.7 milestone Mar 9, 2024
@Vandit1604
Copy link
Contributor Author

Thanks @tenzen-y for the kind words. I'll start working addressing disabled errors soon.
I have a question, tho. Do we have a Slack channel for kueue?

@tenzen-y
Copy link
Member

tenzen-y commented Mar 9, 2024

Thanks @tenzen-y for the kind words. I'll start working addressing disabled errors soon. I have a question, tho. Do we have a Slack channel for kueue?

There is #wg-batch.

@Vandit1604 Vandit1604 deleted the feat/add-shellcheck-to-makefile branch March 26, 2024 21:48
vsoch pushed a commit to researchapps/kueue that referenced this pull request Apr 18, 2024
* create a seperate shellscript for shellcheck and enclose complete paths whereever i haven't and remove unused variables

* allow docker cli

* change year and revert change in run-test.sh

* disable issues that will be taken care of in another PR

* enclose some variables in quotes

* Remove unnecessary env

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

* Update hack/verify-shellcheck.sh

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

* convert to single line export and declaration

* add shell-lint in verify rule

* execute shellcheck recursivly from ROOT of repository

* Update hack/verify-shellcheck.sh

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

---------

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verify shcellscript by shellcheck
5 participants