(s string)
| 54 | } |
| 55 | |
| 56 | func runShellCheck(s string) error { |
| 57 | cmd := exec.Command("shellcheck", "-s", "bash", "-", "-e", |
| 58 | "SC2034", // PREFIX appears unused. Verify it or export it. |
| 59 | ) |
| 60 | cmd.Stderr = os.Stderr |
| 61 | cmd.Stdout = os.Stdout |
| 62 | |
| 63 | stdin, err := cmd.StdinPipe() |
| 64 | if err != nil { |
| 65 | return err |
| 66 | } |
| 67 | go func() { |
| 68 | _, err := stdin.Write([]byte(s)) |
| 69 | CheckErr(err) |
| 70 | |
| 71 | stdin.Close() |
| 72 | }() |
| 73 | |
| 74 | return cmd.Run() |
| 75 | } |
| 76 | |
| 77 | // World worst custom function, just keep telling you to enter hello! |
| 78 | const bashCompletionFunc = `__root_custom_func() { |
no test coverage detected