I want to use VKCOM/noverify to analyse code. Calling it from the command-line (windows dos shell) using this command works
noverify.exe -exclude-checks arraySyntax,phpdocLint
-output result.txt
C:\Dev\PHP\ResourceSpace_9_0_13357\include
The trouble is that i am unable to pass arguments to cmnd := exec.Command("noverify.exe", args)
options := " -exclude-checks arraySyntax, PHPDoc"
pathToCode := "C:\\Dev\\PHP\\ResourceSpace_9_0_13357\\include"
// this works
cmnd := exec.Command("noverify.exe", pathToCode)
args := []string{options, pathToCode}
arg := strings.Join(args, "")
// passing options does not work
// cmnd := exec.Command("noverify.exe", arg)
b, err := cmnd.CombinedOutput()
What have i tried
You can find my source code in this gist It seems that args are joined as a string seperated by ,
despite that the separator is empty above.
Questions
- How to pass multiple arguments to
exec.Comman("yourFoo.exe", cmdArgs...)
- Why is my attempt not working on windows?