feat: add 6 validators (batch 4/5) - iec_size, fq_codel_size, int, job_mode, reboot_parameter, unit_mounts_for#451
Merged
Conversation
…ot_parameter, unit_mounts_for (Resolves #450) Batch 4/5. Each grammar mirrors the systemd C parser: - config_parse_iec_size: parse_size IEC byte (existing BYTES grammar) - config_parse_fq_codel_size (QDISC_KIND_FQ_CODEL): same parse_size shape - config_parse_int: signed 32-bit integer (DEFINE_PARSER + safe_atoi) - config_parse_job_mode: enum from job_mode_table (10 entries) - config_parse_reboot_parameter: printable ASCII length 1..255 - config_parse_unit_mounts_for: whitespace-separated absolute paths (specifier-aware) OptionValueTest missing-function count drops 382 -> 376; found-key count rises 1846 -> 1870. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
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.
Summary
Batch 4 of 5.
config_parse_iec_size(0)shared/conf-parser.c:974parse_sizeIEC byte (reusesBYTES)config_parse_fq_codel_size(QDISC_KIND_FQ_CODEL)network/tc/fq-codel.c:267parse_sizeshapeconfig_parse_int(0)shared/conf-parser.c:959(DEFINE_PARSER(int, ..., safe_atoi))config_parse_job_mode(0)load-fragment.c:144(DEFINE_CONFIG_PARSE_ENUM(... job_mode ...))job_mode_table(10 entries)config_parse_reboot_parameter(0)load-fragment.c:353→reboot_parameter_is_validconfig_parse_unit_mounts_for(0)load-fragment.c:3111Resolves #450. Stacked on #449 (batch 3).
Results
OptionValueTestmissing functions: 382 → 376 (−6)Skipped
config_parse_string(0)(4 uses) — C accepts any string with ltype=0; a validator here would just be aNullOptionValuegaming the burn-down without helping users.config_parse_hw_addrs(0),config_parse_socket_listen(SOCKET_SOCKET),config_parse_dhcp_option_tlv(0),config_parse_unit_condition_string(CONDITION_VERSION)— non-trivial syntax variants, may revisit in batch 5 or later.Test plan
OptionValueTestandSemanticDataRepositoryTestpass🤖 Generated with Claude Code