Closed ya0guang closed 4 months ago
The readme is probably out of date then, sometimes tree sitter updates change node types. Diffsitter is just checking whether the string you pass matches the node type string as reported by the tree sitter library, which can be annoying because of stuff like this but the alternative would be for me to maintain my own mappings/aliases which I think would be a lot of maintenance burden.
I'll update the docs to make a note of this
Describe the bug I found that
"exclude-kinds": ["string"]
does not work for Python strings (e.g., doc string and strings in assignments). Please correct me if my configuration is incorrect.To Reproduce
old.py
:new.py
:Comparing them with the config file to exclude strings
Expected behavior
No diff should be found.
Log output/screenshots
Platform: OS: Linux
Additional context
After diving deep into the source code, I tried to add debug output in function
should_include_node
atinput_processing.rs
. I add a line to print thekind
out:The log looks like this:
It looks like there is no kind
string
for the nodes, and changingstring
tostring_content
in the config file leads me to the expected output. I'm not sure if this is the expected behavior, but I assume it's not, as the README specifiesstring
to be excluded.Please let me know if further information is needed. Thanks!