Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "sh", Short: "sh validates shell files with both shellcheck and shfmt", Run: func(cmd *cobra.Command, args []string) { var fail bool files, err := zglob.Glob(`**/*.*sh`) if err != nil { fmt.Println(err) os.Exit(1) } for _, file := range files { if err := check(file); err != nil { fail = true } } if fail { fmt.Printf("\nsome checks failed. check output above.\n") os.Exit(1) } }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.