Fix call to make_finding with wrong detail value type#188
Fix call to make_finding with wrong detail value type#188RyanJarv wants to merge 2 commits intopeteromallet:mainfrom
Conversation
Follow-up to 385a7527f5df921622ae8987012ae94993e945b3. Keep make_finding/show signature behavior unchanged while fixing the source of the mismatch: tree-sitter responsibility cohesion now emits dict detail, with tests asserting the new fields.
| if not isinstance(pattern, str) or not isinstance(hidden_by_detector, dict): | ||
| return 0 |
There was a problem hiding this comment.
Seems there was only one call to make_finding with a string, so this fix was a bit simpler. The mypy config should catch calls with incorrect types to make_finding now.
There was a problem hiding this comment.
hmm, this isn't backwards compatible. Not sure if that matters for .desloppify/state-go.json?
There was a problem hiding this comment.
latest commit normalizes the old state now
There was a problem hiding this comment.
I switched this to a draft because I'm not particularly confident this is handled the right way. Besides that though, it works.
|
Thanks for catching this — really appreciate the bug report and fix. The detail-as-string crash in |
The make_finding call signature takes a dict for the detail arg not a string.
This comes up when running
desloppify show ./dir: