Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

score: clean up debug output #663

Merged
merged 1 commit into from
Oct 19, 2023
Merged

score: clean up debug output #663

merged 1 commit into from
Oct 19, 2023

Conversation

keegancsmith
Copy link
Member

This commit does the following to the debug output:

  • consistent fmt string for chunk and line matches
  • do not include in debug if 0 score
  • trim ", " suffix on final score string

Test Plan: debug output is more succinct :)

This commit does the following to the debug output:
- consistent fmt string for chunk and line matches
- do not include in debug if 0 score
- trim ", " suffix on final score string

Test Plan: debug output is more succinct :)
@keegancsmith keegancsmith requested a review from a team October 19, 2023 08:32
@@ -33,7 +33,7 @@ import (
const maxUInt16 = 0xffff

func (m *FileMatch) addScore(what string, s float64, debugScore bool) {
if debugScore {
if s != 0 && debugScore {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this. s==0 means that we actually found a symbol kind but didn't give it a score, no? This seems useful to show because it points to gap in our scoring. How else would we figure out such a gap just by looking at the debug output?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my other or making us default to a factor of 1 for unknown symbols

@keegancsmith keegancsmith merged commit 4f21415 into main Oct 19, 2023
8 checks passed
@keegancsmith keegancsmith deleted the k/debug-output branch October 19, 2023 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants