fix: finalize structured output only on success; docs facelift + em-dash normalize#17
Merged
Merged
Conversation
…ash normalize Code: - main.go: move out.Finish() off defer to just before the success "return 0". Previously the deferred finalizer ran on every exit path, so an early error (e.g. wildcard detection without -force) emitted an empty JSON array in -format json. Text mode is unchanged (Finish is a no-op for text). The file flush/close defer still runs after Finish, so buffered JSON/CSV is persisted before the file closes. - internal/output: add TestWriterJSONFinishGatesOutput documenting that structured output is emitted only by Finish (no Finish = no spurious array). Docs: - docs/index.md: refreshed to the 0.6.0 feature set with cards for Output Formats (-format), Rate Limiting (-rate), Record Types (-type), and Recursive Enumeration (-recursive/-depth), matching the README Feature Matrix. - Normalized em dashes to hyphens across docs/ (index, ARCHITECTURE, DEVELOPER_GUIDE, _config.yml, default.html). Arrows and code identifiers left intact; changelog history untouched. Logged under CHANGELOG [Unreleased]. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Part A cosmetic patch (logged under CHANGELOG [Unreleased]).
Code:
Docs:
Made with Cursor