Skip to content

chore(scripts): improve shell scripts with shellcheck fixes and better practices#4046

Merged
kakkoyun merged 3 commits into
mainfrom
kakkoyun/unify_checks
Oct 15, 2025
Merged

chore(scripts): improve shell scripts with shellcheck fixes and better practices#4046
kakkoyun merged 3 commits into
mainfrom
kakkoyun/unify_checks

Conversation

@kakkoyun

@kakkoyun kakkoyun commented Oct 14, 2025

Copy link
Copy Markdown
Member

Follow-up on #4042

What does this PR do?

This PR enhances the shell scripts in the scripts/ directory by:

  • Unified mode selection logic in lint.sh to properly check flags instead of argument count
  • Made shellcheck.sh parametric to accept custom script locations with local binary fallback
  • Removed all shellcheck disable directives and introduced fixes instead

All scripts now pass shellcheck validation cleanly with zero warnings.

Motivation

Improving code quality and maintainability of the shell scripts by addressing shellcheck warnings and enhancing script robustness.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running ./scripts/lint.sh locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

Signed-off-by: Kemal Akkoyun [email protected]
Co-Authored-By: Claude [email protected]

@github-actions github-actions Bot added the apm:ecosystem contrib/* related feature requests or bugs label Oct 14, 2025
@kakkoyun

kakkoyun commented Oct 14, 2025

Copy link
Copy Markdown
Member Author

@mdb I'd appreciate a thorough review on this if you have time.

@pr-commenter

pr-commenter Bot commented Oct 14, 2025

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2025-10-15 10:06:38

Comparing candidate commit aa57513 in PR branch kakkoyun/unify_checks with baseline commit e0e3157 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 0 unstable metrics.

@kakkoyun
kakkoyun force-pushed the kakkoyun/unify_checks branch 2 times, most recently from 14d16d4 to dcc091b Compare October 15, 2025 07:43
@kakkoyun
kakkoyun marked this pull request as ready for review October 15, 2025 07:59
@kakkoyun
kakkoyun requested review from a team as code owners October 15, 2025 07:59
@kakkoyun
kakkoyun requested a review from mtoffl01 October 15, 2025 07:59
@kakkoyun

Copy link
Copy Markdown
Member Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Oct 15, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-10-15 08:41:18 UTC ℹ️ Start processing command /merge


2025-10-15 08:41:28 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-10-15 09:59:27 UTC ⚠️ MergeQueue: This merge request was unqueued

[email protected] unqueued this merge request

@kakkoyun

Copy link
Copy Markdown
Member Author

/merge --skip-checks --reason="Only file formatting changes, nothing functional"

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Oct 15, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-10-15 09:58:37 UTC ℹ️ Start processing command /merge --skip-checks --reason="Only file formatting changes, nothing functional"


2025-10-15 09:58:40 UTC ❌ MergeQueue

PR already in the queue with status waiting

@kakkoyun

Copy link
Copy Markdown
Member Author

/merge -c

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Oct 15, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-10-15 09:59:18 UTC ℹ️ Start processing command /merge -c

@kakkoyun

Copy link
Copy Markdown
Member Author

/merge --skip-checks --reason="Only file formatting changes, nothing functional"

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Oct 15, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-10-15 09:59:35 UTC ℹ️ Start processing command /merge --skip-checks --reason="Only file formatting changes, nothing functional"


2025-10-15 09:59:45 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-10-15 10:04:30 UTC ⚠️ MergeQueue: This merge request was unqueued

[email protected] unqueued this merge request

kakkoyun and others added 3 commits October 15, 2025 12:01
…r practices

This commit enhances the shell scripts in the scripts/ directory by:

- Unified mode selection logic in lint.sh to properly check flags instead of argument count
- Made shellcheck.sh parametric to accept custom script locations with local binary fallback
- Removed all shellcheck disable directives and introduced fixes instead

All scripts now pass shellcheck validation cleanly with zero warnings.

Signed-off-by: Kemal Akkoyun <[email protected]>
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Kemal Akkoyun <[email protected]>
@kakkoyun
kakkoyun force-pushed the kakkoyun/unify_checks branch from 1dceaad to aa57513 Compare October 15, 2025 10:01
@kakkoyun

Copy link
Copy Markdown
Member Author

/remove

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Oct 15, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-10-15 10:04:20 UTC ℹ️ Start processing command /remove


2025-10-15 10:04:23 UTC ℹ️ Devflow: /remove

@kakkoyun

Copy link
Copy Markdown
Member Author

/merge --skip-checks --reason="Only file formatting changes, nothing functional"

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Oct 15, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-10-15 10:04:32 UTC ℹ️ Start processing command /merge --skip-checks --reason="Only file formatting changes, nothing functional"


2025-10-15 10:04:41 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-10-15 11:11:37 UTC ⚠️ MergeQueue: This merge request was unqueued

[email protected] unqueued this merge request

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Oct 15, 2025

Copy link
Copy Markdown

⚠️ Tests

⚠️ Warnings

❄️ 1 New flaky test detected

TestUnshallowGitRepository from github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils (Datadog) (✨ Fix with BitsAI)
Failed

=== RUN   TestUnshallowGitRepository
    git_test.go:80: 
        	Error Trace:	/home/runner/work/dd-trace-go/dd-trace-go/internal/civisibility/utils/git_test.go:80
        	Error:      	Received unexpected error:
        	            	civisibility.unshallow: error: exit status 128
        	            	fatal: shallow file has changed since we read it
        	Test:       	TestUnshallowGitRepository
--- FAIL: TestUnshallowGitRepository (1.70s)

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: aa57513 | Docs | Was this helpful? Give us feedback!

@kakkoyun

Copy link
Copy Markdown
Member Author

/remove

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Oct 15, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-10-15 11:11:29 UTC ℹ️ Start processing command /remove


2025-10-15 11:11:31 UTC ℹ️ Devflow: /remove

@kakkoyun
kakkoyun enabled auto-merge (squash) October 15, 2025 11:11
@kakkoyun
kakkoyun disabled auto-merge October 15, 2025 11:11
@kakkoyun
kakkoyun merged commit ce31114 into main Oct 15, 2025
267 of 273 checks passed
@kakkoyun
kakkoyun deleted the kakkoyun/unify_checks branch October 15, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs mergequeue-status: removed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants