✨ - add cli tool to quickly check relevance conflicts #1554
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.
Rather than having to individually check for relevance score conflicts with the
developer.html
UI, this PR introduces a Node program to check for relevance score conflicts programmatically, all at once, displaying results in the terminal.To run the check:
node test/detect/checkAutoDetectResults.js
If there are no conflicts:
The tool distinguishes between moderate and severe conflicts, where moderate conflicts are when the expected language is returned as the
second_best
result, and severe conflicts are when the expected language was out-scored by both the primary andsecond_best
results.Moderate conflicts:
Severe conflicts:
The goal of this tool is to make it easier to understand relevance, as well as give faster feedback to developers about where their language is over-relevant.
The tool should be invoked after building the project, and works best when doing a full, uncompressed build, ie
node tools/build.js -n
. In compressed mode,relevance
doesn't seem to be returned, or at least not in the same way, so I coded around that.(To capture above screenshots, I arbitrarily spiked relevance in Typescript, Javascript, and Clojure, then discarded the changes. Don't worry 😉 )