Skip to content

fix(config): accept documented lowercase script modes - #964

Merged
bee-san merged 1 commit into
bee-san:masterfrom
rudycelekli:fix/documented-script-config-values-20261028
Nov 4, 2026
Merged

bee-san merged 1 commit into
bee-san:masterfrom
rudycelekli:fix/documented-script-config-values-20261028

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

Problem

The scripting module documents scripts = "none" and scripts = "custom" as configuration alternatives to --scripts. However, ScriptsRequired currently accepts only the capitalized Rust variant names through serde. A config containing the documented lowercase spelling fails TOML deserialization; Config::read aborts on that error.

Change

Accept none, default, and custom as serde aliases. Preserve None, Default, and Custom, reject unknown/empty strings, and leave ScanOrder unchanged.

Tests cover each lowercase spelling, the legacy spellings and invalid inputs. An additional test writes ephemeral config fixtures and calls the real public Config::read(Some(path)) for all three lowercase modes, without changing HOME or running a scan or script.

Verification

Against exact base 937903340aa6266abb26e93ea3241026b3fd8150, native Ubuntu24.04/stable Rust qualification:

  • Original production code plus focused deserialization tests: 1 control passes, 3 lowercase cases fail, zero ignored.
  • Candidate focused tests: 4 pass, zero failures/ignored.
  • Full suite, including the actual public-reader fixture test: 73 library + 6 binary + 2 integration + 8 doctests pass; one existing doctest remains ignored.
  • Both clippy gates with --deny warnings, cargo fmt --check, and required workspace/all-features/private-item docs pass.

Owned qualification run checked out public upstream source and verified candidate tree 47cd6cf506009555fe13c98082bd468ca0c8a93a. This is independent qualification, not an upstream CI result or full platform matrix. Compilation and native tests ran offline in an empty network namespace as an unprivileged user. No scans, DNS requests, or scripts were executed.

Prepared with AI assistance; source and test evidence were independently reviewed before submission.

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@bee-san
bee-san merged commit 521f8bf into bee-san:master Nov 4, 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