[WIP] Add lint rule to enforce broad-catch justification - #12569
Draft
dd-apm-ecosystems[bot] wants to merge 3 commits into
Draft
dd-apm-ecosystems[bot] wants to merge 3 commits into
dd-apm-ecosystems[bot] wants to merge 3 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
| Unjustified broad catch (Throwable/Exception ...) that swallows the failure with no logging, no rethrow, and no comment (also swallows JVM-fatal errors like OutOfMemoryError) | 9 (#11639, #12028, #12052, #12247, #12248, #12330, #12346, #12432, #12493, #12527, #12557) | ✅ Yes — mechanically detectable via diff-scoped text/regex analysis, low false-positive risk |
Blocker encountered: All four non-workflow files were committed successfully to branch automated/lint-broad-catch-swallow-20260918. However, writing the actual .github/workflows/*.yaml file was rejected (403 Forbidden: Resource not accessible by integration) because my GitHub write credentials lack the workflow OAuth scope required to create/modify workflow files, and the Dev Agent's create_or_update_pr tool is blocked by policy for this public repository. I opened a draft PR with what could be pushed: #12569
This PR is incomplete — it is missing .github/workflows/enforce-broad-catch-justification.yaml, the file that actually wires the check into CI. A human maintainer needs to either grant workflow-write scope to the automation credentials, or manually add that one file (content is fully specified in the coding session at https://app.datadoghq.com/code/919f3070-a007-40a0-b753-39207804fb44) before this can be considered a complete, mergeable enforcement rule. I'm flagging this explicitly rather than claiming full completion.