Skip to content

Fix setSafeMode ignoring its argument - #29

Merged
daniel-larraz merged 1 commit into
mainfrom
fix-set-safe-mode
Sep 24, 2026
Merged

daniel-larraz merged 1 commit into
mainfrom
fix-set-safe-mode

Conversation

@daniel-larraz

Copy link
Copy Markdown
Contributor

setSafeMode(boolean) always set safeMode to true, so calling setSafeMode(false) still made the API pass --no_include true to Kind 2. As a result, include statements were rejected even with safe mode off. The Kind 2 language server calls setSafeMode(safeMode) on every run, so include statements broke for every user, not only those with KIND2_SAFE_MODE=true.

Changes:

  • setSafeMode now stores the argument it's given.
  • safeMode now defaults to null instead of false, so --no_include is left off unless it's set explicitly. This matches the other options.

🤖 Generated with Claude Code

setSafeMode always set safeMode to true, so any client calling
setSafeMode(false) still passed --no_include true to Kind 2 and had
include statements rejected. Also default safeMode to null so that
--no_include is omitted unless explicitly set, consistent with the
other options.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Jabe03

Jabe03 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Looks good. This was a silly mistake from me.

@daniel-larraz
daniel-larraz merged commit 272e219 into main Sep 24, 2026
1 check passed
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.

2 participants