diff --git a/.github/scripts/check-javaagent-suppression-keys.sh b/.github/scripts/check-javaagent-suppression-keys.sh index 0501ee6a3f4f..23528e194983 100755 --- a/.github/scripts/check-javaagent-suppression-keys.sh +++ b/.github/scripts/check-javaagent-suppression-keys.sh @@ -1,6 +1,5 @@ #!/bin/bash -e -# shellcheck disable=SC2044 for file in $(find instrumentation -name "*Module.java"); do if ! grep -q "extends InstrumentationModule" "$file"; then @@ -11,9 +10,7 @@ for file in $(find instrumentation -name "*Module.java"); do continue fi - # shellcheck disable=SC2001 module_name=$(echo "$file" | sed 's#.*/\([^/]*\)/javaagent/src/.*#\1#') - # shellcheck disable=SC2001 simple_module_name=$(echo "$module_name" | sed 's/-[0-9.]*$//') if [[ "$simple_module_name" == *jaxrs* ]]; then diff --git a/.github/scripts/check-package-names.sh b/.github/scripts/check-package-names.sh index 6db819de2342..ebb7afae7468 100755 --- a/.github/scripts/check-package-names.sh +++ b/.github/scripts/check-package-names.sh @@ -1,7 +1,5 @@ #!/bin/bash -e -# shellcheck disable=SC2001 - for dir in $(find instrumentation -name "*.java" | grep library/src/main/java | sed 's#/[^/]*$##' | sort -u); do module_name=$(echo "$dir" | sed 's#.*/\([^/]*\)/library/src/main/java/.*#\1#') diff --git a/.github/scripts/diff-suppression-keys-with-docs.sh b/.github/scripts/diff-suppression-keys-with-docs.sh index 64c5308e7d05..5b4791003920 100755 --- a/.github/scripts/diff-suppression-keys-with-docs.sh +++ b/.github/scripts/diff-suppression-keys-with-docs.sh @@ -9,7 +9,6 @@ curl https://raw.githubusercontent.com/open-telemetry/opentelemetry.io/main/cont comm -3 \ <( - # shellcheck disable=SC2016 # "Expressions don't expand in single quotes" sed -n '/----------------------/,${p;/^$/q}' agent-config.md \ | sed '1d;$d' \ | cut -d '|' -f 3 \ diff --git a/.github/scripts/generate-release-contributors.sh b/.github/scripts/generate-release-contributors.sh index f684e84e65a4..988f6c5cb08e 100755 --- a/.github/scripts/generate-release-contributors.sh +++ b/.github/scripts/generate-release-contributors.sh @@ -15,7 +15,6 @@ from=$(git log --reverse --pretty=format:"%cI" "$from_version..HEAD" | head -1) # get the last commit on main that was included in the release to=$(git merge-base origin/main HEAD | xargs git log -1 --pretty=format:"%cI") -# shellcheck disable=SC2016 # "Expressions don't expand in single quotes" contributors1=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query=' query($q: String!, $endCursor: String) { search(query: $q, type: ISSUE, first: 100, after: $endCursor) { @@ -53,7 +52,6 @@ query($q: String!, $endCursor: String) { # this query captures authors of issues which have had PRs in the current range reference the issue # but not necessarily through closingIssuesReferences (e.g. addressing just a part of an issue) -# shellcheck disable=SC2016 # "Expressions don't expand in single quotes" contributors2=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query=' query($q: String!, $endCursor: String) { search(query: $q, type: ISSUE, first: 100, after: $endCursor) { diff --git a/.github/scripts/static-import-semconv-constants.sh b/.github/scripts/static-import-semconv-constants.sh index 776b68b51fb5..4428e7d79809 100644 --- a/.github/scripts/static-import-semconv-constants.sh +++ b/.github/scripts/static-import-semconv-constants.sh @@ -1,6 +1,5 @@ #!/bin/bash -e -# shellcheck disable=SC2044 for file in $(find instrumentation instrumentation-api -name '*Test.java'); do echo "Processing $file" diff --git a/.github/workflows/build-daily.yml b/.github/workflows/build-daily.yml index 5910780870fd..40ad73fdeeb3 100644 --- a/.github/workflows/build-daily.yml +++ b/.github/workflows/build-daily.yml @@ -25,9 +25,6 @@ jobs: muzzle: uses: ./.github/workflows/reusable-muzzle.yml - shell-script-check: - uses: ./.github/workflows/reusable-shell-script-check.yml - link-check: uses: ./.github/workflows/reusable-link-check.yml diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 8a22c2d248ce..55781a700939 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -40,9 +40,6 @@ jobs: with: cache-read-only: true - shell-script-check: - uses: ./.github/workflows/reusable-shell-script-check.yml - # this is not a required check to avoid blocking pull requests if external links break markdown-check: # release branches are excluded because the README.md javaagent download link has to be updated @@ -66,7 +63,6 @@ jobs: needs: - common - muzzle - - shell-script-check - markdown-lint-check runs-on: ubuntu-latest if: always() @@ -77,7 +73,6 @@ jobs: !startsWith(github.base_ref, 'release/') && ( needs.muzzle.result != 'success' || - needs.shell-script-check.result != 'success' || needs.markdown-lint-check.result != 'success' ) ) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 107c2baad2e7..a701e9b85a89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,11 +34,6 @@ jobs: if: "!startsWith(github.ref_name, 'release/')" uses: ./.github/workflows/reusable-muzzle.yml - shell-script-check: - # release branches are excluded to avoid unnecessary maintenance if new shell checks are added - if: "!startsWith(github.ref_name, 'release/')" - uses: ./.github/workflows/reusable-shell-script-check.yml - link-check: # release branches are excluded to avoid unnecessary maintenance if external links break # (and also because the README.md javaagent download link has to be updated on release branches diff --git a/.github/workflows/reusable-shell-script-check.yml b/.github/workflows/reusable-shell-script-check.yml deleted file mode 100644 index f0b5ce3ba25d..000000000000 --- a/.github/workflows/reusable-shell-script-check.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Reusable - Shell script check - -on: - workflow_call: - -permissions: - contents: read - -jobs: - shell-script-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - - name: Install shell check - run: wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv - - - name: Run shellcheck - run: find -name '*.sh' | xargs shellcheck-stable/shellcheck --format=gcc diff --git a/instrumentation-docs/ci-collect.sh b/instrumentation-docs/ci-collect.sh index 1d3414d0f93a..700d87d928d6 100755 --- a/instrumentation-docs/ci-collect.sh +++ b/instrumentation-docs/ci-collect.sh @@ -5,7 +5,6 @@ set -euo pipefail -# shellcheck source=instrumentation-docs/instrumentations.sh source "$(dirname "$0")/instrumentations.sh" # Collect standard and colima tasks (without testLatestDeps) diff --git a/instrumentation-docs/collect.sh b/instrumentation-docs/collect.sh index 34d92bebeb0f..bb2207ace2ae 100755 --- a/instrumentation-docs/collect.sh +++ b/instrumentation-docs/collect.sh @@ -6,7 +6,6 @@ set -euo pipefail -# shellcheck source=instrumentation-docs/instrumentations.sh source "$(dirname "$0")/instrumentations.sh" readonly TELEMETRY_DIR_NAME=".telemetry" diff --git a/instrumentation-docs/instrumentations.sh b/instrumentation-docs/instrumentations.sh index 65a852123fec..c28902f1ae80 100755 --- a/instrumentation-docs/instrumentations.sh +++ b/instrumentation-docs/instrumentations.sh @@ -4,7 +4,6 @@ set -euo pipefail # This file is sourced by collect.sh and ci-collect.sh -# shellcheck disable=SC2034 readonly INSTRUMENTATIONS=( # : : [ gradle-task-suffix ] "activej-http-6.0:javaagent:test" @@ -222,7 +221,6 @@ readonly INSTRUMENTATIONS=( # Some instrumentation test suites don't run ARM, so we use colima to run them in an x86_64 # container. -# shellcheck disable=SC2034 readonly COLIMA_INSTRUMENTATIONS=( "elasticsearch:elasticsearch-rest-5.0:javaagent:test" "elasticsearch:elasticsearch-rest-5.0:javaagent:testStableSemconv" @@ -236,7 +234,6 @@ readonly COLIMA_INSTRUMENTATIONS=( # Some instrumentation test suites need to run with -PtestLatestDeps=true to collect # metrics telemetry or test against latest library versions. -# shellcheck disable=SC2034 readonly TEST_LATEST_DEPS_INSTRUMENTATIONS=( "kafka:kafka-clients:kafka-clients-0.11:javaagent:test" "kafka:kafka-clients:kafka-clients-0.11:javaagent:testExperimental"