Fix Copilot review findings on the naming pass - #376
Merged
Conversation
worldgen.importance's own parameter was named importance, shadowing the function itself. Also renames three test functions left over from the naming pass whose names still referenced pre-rename identifiers (TestCheckMishap, TestSizeAt, TestRogueFixedCCChosenOnce), for consistent grep-based navigation. Co-Authored-By: Claude
There was a problem hiding this comment.
Pull request overview
Renames a few identifiers introduced/left stale by the naming pass (#375), addressing Copilot review findings and aligning test/function names with the updated terminology without changing behavior.
Changes:
- Rename
worldgen.importance’s parameter to avoid shadowing theimportancefunction. - Update stale test names to match renamed identifiers (Rogue fixed controlling characteristic, mishap evaluation, benchmark size lookup).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/worldgen/world.go | Renames importance helper parameter (importance → value) to avoid name shadowing. |
| internal/task/mishap_test.go | Renames test TestCheckMishap → TestEvaluateMishap to match EvaluateMishap. |
| internal/chargen/rogue_test.go | Renames test TestRogueFixedCCChosenOnce → TestRogueFixedControllingCharChosenOnce to match FixedControllingChar terminology. |
| internal/benchmark/benchmark_test.go | Renames test TestSizeAt → TestSize to match the Size lookup function name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
worldgen.importance's own parameter was namedimportance, shadowing the function itself — renamed tovalue.TestRogueFixedCCChosenOncestill referenced the pre-renameFixedCCidentifier — renamed toTestRogueFixedControllingCharChosenOnce.TestCheckMishap→TestEvaluateMishap,TestSizeAt→TestSize), since Copilot's rationale applies equally to those.Test plan
task checkgreengo test ./cmd/...: goldens/READMEs byte-identical, no-update