Repository navigation
fix(input): reject missing values for ordinary string parameters - #34
Draft
Stardust0831 wants to merge 1 commit into
Draft
Stardust0831 wants to merge 1 commit into
Stardust0831 wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Fork review draft based on upstream
developat89595dd29, independent of #33.A supplied string parameter with no value, such as a bare
stru_file, could reach an unchecked first-token access; at EOF without a newline it could instead be silently ignored. Ordinary string readers now use the shared scalar validation to require exactly one token before reading it. Invalid input reports the parameter, the expected value and the corresponding manual link:The fix applies through
read_sync_string, includingstru_file,kpoint_file,suffixanddft_functional. It also rejects extra tokens such asstru_file STRU extra, which were previously ignored. Omitted parameters retain their defaults; custom readers that permit empty values or multiple tokens keep their existing grammar. The developer guide describes the shared string contract.This addresses the missing-value follow-up from upstream #8192, continuing the explicit-input validation work in #7719.
Validation passed: 44 reader/item tests, 30 help tests, three documentation-generator tests, 12 executable input checks, and serial/four-process Si SCF calculations. Coverage includes missing values at EOF, comments, extra tokens, explicit paths, omitted defaults, legal empty values and generated INPUT round trips. The generated reference contains 590 parameters; generated artifacts are not committed.
Build and validation commands
SERIAL_BUILDandMPI_BUILDare Release build directories with MPI disabled/enabled respectively. Both use GCC 13.4, OpenMP enabled, LCAO/ELPA/FLOAT_FFTW disabled, andOMP_NUM_THREADS=1at runtime. Executables reportv3.11.0-beta11.MPI executable checks use normal execution: successful MPI
--check-inputhas an existing finalization issue recorded in #33. Staged governance and whitespace checks passed. Whole-file quality scores are unchanged from the base (48 for the legacy macro header, 92 for the test file); no new macro, global dependency or include is introduced.