-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix restoring of Autofix backup (#18)
* Fix restoring of backup Signed-off-by: Akshit Garg <[email protected]> * Bump version Signed-off-by: Akshit Garg <[email protected]> --------- Signed-off-by: Akshit Garg <[email protected]>
- Loading branch information
1 parent
0327832
commit 2a9c9b8
Showing
11 changed files
with
106 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package code | ||
|
||
var foo int = 10 | ||
|
||
func bar() { | ||
a := 10 | ||
a = a | ||
} | ||
|
||
func baz() { | ||
a := 10 | ||
a = a | ||
} | ||
|
||
func lorem() { | ||
_ = 10 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
files = "*.go" | ||
comment_prefix = ["//"] | ||
|
||
[autofix] | ||
script = """ | ||
cat main.go.golden > main.go | ||
exit 0 | ||
""" | ||
interpreter = "sh" | ||
output_file = "analysis_result.json" | ||
|
||
[processor] | ||
skip_processing = false | ||
script = """ | ||
cat $INPUT_FILE | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["main.go"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/deepsourcelabs/SCATR/testdata/autofix/go_restore | ||
|
||
go 1.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package main | ||
|
||
var foo int = 10 | ||
|
||
func bar() { | ||
a := 10 | ||
a = a | ||
} | ||
|
||
func baz() { | ||
a := 10 | ||
a = a | ||
} | ||
|
||
func lorem() { | ||
a := 10 | ||
a = a | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package main | ||
|
||
func bar() { | ||
a := 10 | ||
a = a | ||
} | ||
|
||
func baz() { | ||
a := 10 | ||
a = a | ||
} | ||
|
||
func lorem() { | ||
a := 10 | ||
a = a | ||
} |