Repository navigation
Conversation
Change-Id: I95ae26ae8f7c96ccc4c86ed662d871676172aace
New opt-in `//constable:pure` contract: a pure function has no observable effect beyond its return values. It forbids caller-visible mutation, package-global writes, goroutine spawns, and calls that read the clock, randomness, environment, or perform I/O. Pure functions stay deterministic given their arguments, so they are safe to reorder, parallelize, or test without flaky setup. Change-Id: I9bb748ff549a95d6d4b0de027d1b27ac47a90ffa
Reports unused unexported functions, types, variables, and constants, keeping packages small so less context stays in mind. The check stays precise: methods, struct fields, unused parameters, exported symbols, and `iota`-sensitive constant groups are never reported. `-fix` deletes each reported declaration, including its doc, and removes imports that only the deleted code used. Change-Id: I5cfb5dee4083d8347b84b70548dcdd2e0474bf56
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.
No description provided.