Skip to content

refactor(plugins): replace guarded force-unwraps with optional binding#1735

Merged
datlechin merged 3 commits into
mainfrom
fix/plugin-guarded-force-unwraps
Jun 20, 2026
Merged

refactor(plugins): replace guarded force-unwraps with optional binding#1735
datlechin merged 3 commits into
mainfrom
fix/plugin-guarded-force-unwraps

Conversation

@datlechin

Copy link
Copy Markdown
Member

Rewrites 6 ternary-guarded force-unwraps (cond ? value! : fallback) to optional.flatMap { $0.isEmpty ? nil : $0 } ?? fallback. Each was safe at runtime but violated the no-force-unwrap rule. Behavior is identical: a non-empty value wins, otherwise the fallback.

  • BigQuery: BigQueryAuth (3 project-id resolutions), BigQueryQueryBuilder (2 search-column selections)
  • MSSQL: MSSQLPlugin schema default

No CHANGELOG (internal, no user-facing change). No new tests: behavior is unchanged and the resolution sites are plugin-bundle internals the test target cannot link.

@datlechin datlechin merged commit aafb621 into main Jun 20, 2026
3 of 4 checks passed
@datlechin datlechin deleted the fix/plugin-guarded-force-unwraps branch June 20, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant