Repository navigation
fix(no-floating-promises): respect safe-call declaration sources - #1261
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Shorthand property references still use the wrong declaration source, breaking file-qualified deprecation allowances.
Review effort: Balanced
Findings: 1
What changed in this PR
Fixes #1260 by checking declaration sources for qualified safe-call allowances in the shared matcher.
Changes:
- Resolves imported aliases before checking file, library, or package provenance.
- Updates both rule callers to pass the type checker.
- Adds safe-call regression tests and diagnostic snapshots.
| File | Description |
|---|---|
| internal/utils/type_matches_specifier.go | Checks value-symbol declaration sources. |
| internal/rules/no_floating_promises/no_floating_promises.go | Passes the checker to the matcher. |
| internal/rules/no_floating_promises/no_floating_promises_test.go | Adds source-qualified allowance tests. |
| internal/rules/no_deprecated/no_deprecated.go | Updates the shared matcher call. |
| internal/rule_tester/__snapshots__/no-floating-promises.snap | Records regression diagnostics. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f79536f67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Merge activity
|
File-qualified `allowForKnownSafeCalls` entries currently exempt unrelated local functions with the same name, even when the configured file does not exist. Match the value symbol's declaration source for file, library, and package specifiers, resolving imported aliases before checking provenance. Bare-name allowances retain their existing behavior. Use the value symbol rather than its type symbol so the shared matcher also preserves `no-deprecated` allowances for primitive-valued declarations. Regression tests cover exact and missing files, imported aliases, library selectors, and name-only allowances. Fixes #1260
7d49e73 to
24b18b4
Compare

File-qualified
allowForKnownSafeCallsentries currently exempt unrelated local functions with the same name, even when the configured file does not exist. Match the value symbol's declaration source for file, library, and package specifiers, resolving imported aliases before checking provenance. Bare-name allowances retain their existing behavior.Use the value symbol rather than its type symbol so the shared matcher also preserves
no-deprecatedallowances for primitive-valued declarations. Regression tests cover exact and missing files, imported aliases, library selectors, and name-only allowances.Fixes #1260