File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ import (
6
6
)
7
7
8
8
func nogoValidation (args []string ) error {
9
+ if len (args ) != 3 {
10
+ return fmt .Errorf ("usage: nogovalidation <validation_output> <log_file> <fix_file>\n \t got: %v+" , args )
11
+ }
9
12
validationOutput := args [0 ]
10
13
logFile := args [1 ]
11
14
fixFile := args [2 ]
12
-
13
15
// Always create the output file and only fail if the log file is non-empty to
14
16
// avoid an "action failed to create outputs" error.
15
17
logContent , err := os .ReadFile (logFile )
@@ -20,7 +22,6 @@ func nogoValidation(args []string) error {
20
22
if err != nil {
21
23
return err
22
24
}
23
-
24
25
if len (logContent ) > 0 {
25
26
fixContent , err := os .ReadFile (fixFile )
26
27
if err != nil {
@@ -30,10 +31,9 @@ func nogoValidation(args []string) error {
30
31
if len (fixContent ) > 0 {
31
32
// Format the message in a clean and clear way
32
33
fixMessage = fmt .Sprintf (`
33
- -------------------Suggested Fix-------------------
34
+ -------------------Suggested Fix---------------------
34
35
%s
35
36
-----------------------------------------------------
36
-
37
37
To apply the suggested fix, run the following command:
38
38
$ patch -p1 < %s
39
39
` , fixContent , fixFile )
You can’t perform that action at this time.
0 commit comments