Skip to content

Commit e4d5930

Browse files
committed
stylish changes
1 parent 94d719f commit e4d5930

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

go/tools/builders/nogo_validation.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ import (
66
)
77

88
func nogoValidation(args []string) error {
9+
if len(args) != 3 {
10+
return fmt.Errorf("usage: nogovalidation <validation_output> <log_file> <fix_file>\n\tgot: %v+", args)
11+
}
912
validationOutput := args[0]
1013
logFile := args[1]
1114
fixFile := args[2]
12-
1315
// Always create the output file and only fail if the log file is non-empty to
1416
// avoid an "action failed to create outputs" error.
1517
logContent, err := os.ReadFile(logFile)
@@ -20,7 +22,6 @@ func nogoValidation(args []string) error {
2022
if err != nil {
2123
return err
2224
}
23-
2425
if len(logContent) > 0 {
2526
fixContent, err := os.ReadFile(fixFile)
2627
if err != nil {
@@ -30,10 +31,9 @@ func nogoValidation(args []string) error {
3031
if len(fixContent) > 0 {
3132
// Format the message in a clean and clear way
3233
fixMessage = fmt.Sprintf(`
33-
-------------------Suggested Fix-------------------
34+
-------------------Suggested Fix---------------------
3435
%s
3536
-----------------------------------------------------
36-
3737
To apply the suggested fix, run the following command:
3838
$ patch -p1 < %s
3939
`, fixContent, fixFile)

0 commit comments

Comments
 (0)