Ask an environment finding where its value would differ - #29
Merged
Merged
Conversation
A hardcoded-value review or consider that rests only on a value changing between environments is asked, once its value or constant is named and with the code that uses it, where the value would differ: each installation or the author's own account keeps it; the same value in every copy on purpose, a fallback used only when configuration gives none, or code no deployment runs, at 0.80, make it a note. The Choice that names a file's constant lists the lines that use each one. Labeled such findings went from 17 right and 36 wrong to 15 right and 19 wrong.
A path check left undecided after its trace and recheck is asked, with the functions that call it, where the paths come from: the program's own directories or configuration, the command line or settings of the person running a local program, a whole path its caller gives, or another party's input. The program's own or the local user's clear it: 74 units on the corpus, for about $0.02.
Parameters in a path, URL or redirect were a note once a check found them, but stayed uncertain while the check was undecided. Once the Choice that settles the check was asked and does not lean toward another party's input, such a unit is a note naming the path, URL or redirect: 450 injection units had stayed uncertain that way.
A test whose hollow checks stay undecided once its recheck is asked is clear when they lean below 0.50. Labeled from the code, 4 of 43 such tests below 0.50 were hollow, against 10 of 35 above; undecided tests on the corpus went from 792 to 156, with nothing asked again.
Undecided units on the corpus went from 1.39% to 0.83% of judged units with these changes and the environment Choice before them; no review or consider changed.
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.
Stacked on #28. After #28, the weakest reviews were hardcoded values' "fixes a value that differs between deployments": about a third of the labeled ones were right.
What changes
A hardcoded-value review or consider that rests only on the environment question is asked where its value would differ. It's asked once the locate names the value or constant, with the function around the value or the lines that use the constant.
The constants locate now lists each constant's use lines, as #28 added
elsewherelines for values.Results
Labeled findings on the tuned and fresh projects, #28 → this branch:
/usr/binpaths, a mock's base URL, and a generator's install template.Review notes