better heuristics for baseline matching #134
-
Currently it's just +/- 50 lines, what if the following information was used for matching:
Other Ideas:
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 10 replies
-
Could it also use version control history where available? eg. to determine which lines have changed since the baseline was generated, and which lines have just moved due to other changes |
Beta Was this translation helpful? Give feedback.
-
And as a workaround if this is going to take a while to fix, maybe a switch to ignore line numbers (but still check that there aren't new errors) |
Beta Was this translation helpful? Give feedback.
-
if basedmypy was git aware it could just filter out any errors that aren't on new code without the need for a baseline file. instead there could be a file that maps commit hashes to new flags (ie. from this commit onwards, these are the rules) |
Beta Was this translation helpful? Give feedback.
-
What about an option to display partial matches, such as:
I sometimes find that after making changes, basedmypy tells me there are errors in code I haven't touched, and I run with The false negatives usually occur due to newly introduced errors matching the code of an old error, where the line number offset of the new error is within 50 of the baselined error's offset, and the new error is before the old one in the file. The false positives occur either because of the baselined errors being incorrectly matched with new ones, or because the offset changes by more than 50 lines. |
Beta Was this translation helpful? Give feedback.
-
Locations of errors stored in baseline file are currently using filename and line number within that file. Sometimes, making a change such as adding a new function to a file moves the other lines within the file far enough that they are not recognised (If I remember correctly, they can move up to 50 lines and still be recognised). Would it be possible to also record the class / function(s), and an offset relative to the function |
Beta Was this translation helpful? Give feedback.
-
now that the src code is stored in the baseline file, i think when a function is moved from one file to another it should match as long as the source code is the same |
Beta Was this translation helpful? Give feedback.
-
Mostly addressed in #415, we now use the source line as a metric, and everything seems based. Not to say this problem is resolved, I don't think it is possible, but we are now in a much better place. I'm resolving this, any follow up should be done in a new discussion/issue. |
Beta Was this translation helpful? Give feedback.
Mostly addressed in #415, we now use the source line as a metric, and everything seems based. Not to say this problem is resolved, I don't think it is possible, but we are now in a much better place. I'm resolving this, any follow up should be done in a new discussion/issue.