File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1717 uses : actions/setup-go@v2
1818 with :
1919 go-version : ' 1.24.4'
20- - name : Generate CLI
20+ - name : Generate CLI and run tests
2121 env :
2222 GOPRIVATE : github.com/phrase/phrase-go
2323 run : |
2727 go mod edit -replace github.com/phrase/phrase-go/v4=../go
2828 npm run generate.cli
2929 go build .
30+ go test -v ./...
3031 - name : License check
3132 uses : phrase/actions/lawa-ci@v1
3233 with :
Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ func (cmd *InitCommand) configureSources() error {
308308
309309 err = paths .Validate (pushPath , cmd .FileFormat .ApiName , cmd .FileFormat .Extension )
310310 if err != nil {
311- print .Failure (err .Error ())
311+ print .Failure ("%s" , err .Error ())
312312 } else {
313313 break
314314 }
@@ -339,7 +339,7 @@ func (cmd *InitCommand) configureTargets() error {
339339
340340 err = paths .Validate (pullPath , cmd .FileFormat .ApiName , cmd .FileFormat .Extension )
341341 if err != nil {
342- print .Failure (err .Error ())
342+ print .Failure ("%s" , err .Error ())
343343 } else {
344344 break
345345 }
@@ -375,12 +375,12 @@ func (cmd *InitCommand) writeConfig() error {
375375 return err
376376 }
377377
378- print .Success ("We created the following configuration file for you: " + filename )
378+ print .Success ("We created the following configuration file for you: %s" , filename )
379379
380380 fmt .Println ()
381381 fmt .Println (string (yamlBytes ))
382382
383- print .Success ("For advanced configuration options, take a look at the documentation: " + shared .DocsConfigUrl )
383+ print .Success ("For advanced configuration options, take a look at the documentation: %s" , shared .DocsConfigUrl )
384384 print .Success ("You can now use the push & pull commands in your workflow:" )
385385 fmt .Println ()
386386 fmt .Println ("$ phrase push" )
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ func (source *Source) CheckPreconditions() error {
142142
143143 if len (duplicatedPlaceholders ) > 0 {
144144 dups := strings .Join (duplicatedPlaceholders , ", " )
145- return fmt .Errorf (fmt . Sprintf ( "%s can only occur once in a file pattern!" , dups ) )
145+ return fmt .Errorf ("%s can only occur once in a file pattern!" , dups )
146146 }
147147
148148 return nil
You can’t perform that action at this time.
0 commit comments