Repository navigation
refactor: shared FS helpers, simpler CLI option parsing, and core API docs - #27
Merged
Merged
Conversation
Move path normalization, whole-file reads, Pascal source detection, readability probing, and symlink checks into the leaf unit PasWeave.FS. Parser, discovery, Lazarus, output, and symbol conversion now share one definition of each helper instead of carrying local copies. Directory walkers stay specialized because their filtering and pruning semantics differ. No behavior changes. Verified: make test (CLI and functional suites) and byte-identical checked-in example output.
Add XMLDoc comments to the Parser public API (input error, discovery options, and the BuildProject overloads), the FPCAdapter.ParseUnitFile contract, and the complete CLI exit-code contract.
Replace the repeated --name and --name=value branch pairs with the MatchValueOption helper, which also advances the argument index for the separated form. ParseCommandLine drops from about 223 to 111 lines and the value syntax is handled in one place; all error messages and precedence are unchanged. Verified: make test (CLI and functional suites) and byte-identical checked-in example output.
Add XMLDoc comments to the Comments unit (comment forms, style parsing, documentation extraction) and the Compiler unit (TCompilerOptions behavior, target normalization, and validation errors).
Add XMLDoc comments to the model types, fields, constants, and helper functions, including stable ID/anchor behavior, relationship resolution state, and the branding validators.
Describe each public renderer function and the page sites written by WriteHTMLDocumentation and WriteMarkdownDocumentation.
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
Follow-up polish pass: shared filesystem helpers, a simpler CLI option parser, and API documentation across the core units.
Commits
refactor(fs): add a shared filesystem helper unitPasWeave.FS(src/support/) owns path normalization, whole-file reads, Pascal source detection, build-input extension detection, readability probing, and symlink checks. Duplicates removed from Parser, FPCAdapter.Symbols, Lazarus.Support, Compiler, Incremental, and Output.refactor(cli): centralize option value handlingMatchValueOptionhelper handles--name valueand--name=valuein one place;ParseCommandLinedrops from ~223 to ~111 lines with identical messages and precedence.docs(api): ...(four commits)FPCAdapter.ParseUnitFile, CLI exit codes, Comments, Compiler options, the Model, and the HTML/Markdown renderer entry points.Directory walkers intentionally remain specialized: discovery prunes excluded directories mid-walk, incremental fingerprints root-relative paths, and package scanning filters
.lpk, so merging them would change pruning and ordering semantics. (PasWeave.FSdocuments this in the changelog entry.)Verification
make testpasses (CLI suite + functional suites) after every commit.scripts/check-docs-links.ps1passes (62 files).