Is your feature request related to a problem? Please describe.
I noticed that diffsitter returns 0 when the two files have the same AST, which is awesome. However, it still produces output if there are nonfunctional changes. Example programs:
package main
import "fmt"
func main() {
a := "string"
fmt.Println(a)
}
package main
import "fmt"
// comments in the file
func main() {
b := "string"
fmt.Println(b)
}
Produces:
diffsitter a/main.go b/main.go main
a/main.go -> b/main.go
======================
4:
--
+ // comments in the file
6 - 7:
------
+ b := "string"
+ fmt.Println(b)
5 - 6:
------
- a := "string"
- fmt.Println(a)
In the event that you have something like a mass refactor which you expect not to have functional changes, if one ends up showing up you are not easily able to find it.
Describe the solution you'd like
I would like it if there were a setting which, when enabled, would make diffsitter print only the changes which meaningfully alter the AST.
Describe alternatives you've considered
I thought about writing my own but it would only support Go. This project seems like a great base to bring this to many languages.
Additional context
I am not sure but I would suspect the various different semantics between languages may make this a somewhat complicated request (I don't know off the top of my head but I suspect, software being the way it is, that there may exist a language or framework where merely changing a variable name has functional impacts).
Is your feature request related to a problem? Please describe.
I noticed that diffsitter returns
0when the two files have the same AST, which is awesome. However, it still produces output if there are nonfunctional changes. Example programs:Produces:
In the event that you have something like a mass refactor which you expect not to have functional changes, if one ends up showing up you are not easily able to find it.
Describe the solution you'd like
I would like it if there were a setting which, when enabled, would make
diffsitterprint only the changes which meaningfully alter the AST.Describe alternatives you've considered
I thought about writing my own but it would only support Go. This project seems like a great base to bring this to many languages.
Additional context
I am not sure but I would suspect the various different semantics between languages may make this a somewhat complicated request (I don't know off the top of my head but I suspect, software being the way it is, that there may exist a language or framework where merely changing a variable name has functional impacts).