File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ import (
4040)
4141
4242type lintFlagsCollection struct {
43- WarningsAsErrors bool `default:"false" flag:"warnings-as-errors" info:"Treat warnings as errors"`
43+ WarningsAsErrors bool `default:"false" flag:"warnings-as-errors" info:"Treat warnings as errors"`
44+ BaseDir string `default:"" flag:"base-dir" info:"Directory to search for .cdc files (defaults to current directory)"`
4445}
4546
4647type fileResult struct {
@@ -88,8 +89,12 @@ func lint(
8889) (command.Result , error ) {
8990 var filePaths []string
9091 if len (args ) == 0 {
92+ baseDir := "."
93+ if lintFlags .BaseDir != "" {
94+ baseDir = lintFlags .BaseDir
95+ }
9196 var err error
92- filePaths , err = findAllCadenceFiles ("." )
97+ filePaths , err = findAllCadenceFiles (baseDir )
9398 if err != nil {
9499 return nil , fmt .Errorf ("error finding Cadence files: %w" , err )
95100 }
You can’t perform that action at this time.
0 commit comments