Cover the additions that shipped this month without specs - #2172
Open
bbatsov wants to merge 1 commit into
Open
Conversation
Instrumenting the suite - advising every defun and running all 1474 specs - put function coverage at 87.8%, with 102 functions never called. Four of the misses were mine, added over the past week: the `go.work' parser, the two sibling wrapper commands, and the dispatch wrapper that translates the search switches. Writing the first of those specs turned up a bug in the parser it was covering. A `go.work' names its modules as `./api', and the leading `./' survived into the subproject name, which then matched none of the project's file paths: `projectile-find-file-in-subproject' offered nothing whatsoever in a Go monorepo. Expanded members are now spelled relative to the project root, whatever the manifest wrote - the pnpm, npm and Cargo manifests never produced such a spelling, which is why their specs passed and Go had none. Coverage is 88.3% after this, and the specs the other three needed are the kind that would have caught it.
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.
I measured function-level coverage by instrumenting the suite - advising every
defunand running all the specs. 87.8%, with 102 functions never called. Four of those were mine, added over the past week: thego.workparser, the two sibling wrapper commands, and the dispatch wrapper that translates the search switches.Writing the first spec found a bug in the very parser it was covering. A
go.worknames its modules as./api, and that leading./survived into the subproject name, which then matched none of the project's file paths - soprojectile-find-file-in-subprojectoffered nothing in a Go monorepo:Expanded members are now spelled relative to the project root whatever the manifest wrote. The pnpm, npm and Cargo manifests never produce that spelling, which is exactly why their specs passed and Go - having none - shipped broken.
88.3% after this.