Repository navigation
docs(skills): order declarations by reach - #188
Merged
Merged
Conversation
Within each sequence a file already has, put declarations from the widest reach to the narrowest: other packages, other files, then the namespace. A private helper may stay right after its adjacent users. Fields follow the same order with no exception. The struct field convention now points here, and the list of observable orders gains iota, omitted const expressions, side-effecting var initializers and init functions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply the authoring skill's new ordering to the repository itself. Only declarations and fields move; no code changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
=======================================
Coverage 99.02% 99.02%
=======================================
Files 50 50
Lines 4214 4214
=======================================
Hits 4173 4173
Misses 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
declscope-authoringgains an "Order by reach" section. Within each sequence a file already has, declarations go from the widest reach to the narrowest: other packages, other files of the package, then the namespace. Scope decides the reach, not the case of the first letter.iota,constspecs with the expression omitted,varinitializers with side effects, andinitfunctions.decorder,funcorder) take precedence. Test files and generated files are out of scope. declscope does not check this order.Verification
mise x -- ./test_all.shpasses. Coverage is 99.0% in total. The spec stage was not run locally, sincefslcwas not on PATH.🤖 Generated with Claude Code