Make bpfix not modify the input tree
Make a new object called Fixer to hold the state of the tree, and make a copy of the input tree so the original doesn't get modified. Test: bpfix_test.go Change-Id: I1dc6fd99158c8b0e1db029df99e6cf72699a5e63
This commit is contained in:
@@ -75,7 +75,8 @@ func processFile(filename string, in io.Reader, out io.Writer, fixRequest bpfix.
|
||||
}
|
||||
|
||||
// compute and apply any requested fixes
|
||||
err = bpfix.FixTree(file, fixRequest)
|
||||
fixer := bpfix.NewFixer(file)
|
||||
file, err = fixer.Fix(fixRequest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user