Commit 2d0c262b authored by Alex's avatar Alex
Browse files

refactor: group related lines together

parent 56fec4d6
Showing with 10 additions and 10 deletions
+10 -10
......@@ -170,6 +170,16 @@ func test(ctx *TestCommandContext, paths []string, flags TestCommandFlags) error
paths = []string{tempFile.Name()}
}
filesPaths, err := ctx.Reader.FilterFiles(paths)
if err != nil {
return err
}
filesPathsLen := len(filesPaths)
if filesPathsLen == 0 {
noFilesErr := fmt.Errorf("No files detected")
return noFilesErr
}
if flags.Output == "simple" {
ctx.Printer.SetTheme(printer.CreateSimpleTheme())
}
......@@ -186,16 +196,6 @@ func test(ctx *TestCommandContext, paths []string, flags TestCommandFlags) error
}()
}
filesPaths, err := ctx.Reader.FilterFiles(paths)
if err != nil {
return err
}
filesPathsLen := len(filesPaths)
if filesPathsLen == 0 {
noFilesErr := fmt.Errorf("No files detected")
return noFilesErr
}
var _spinner *spinner.Spinner
if isInteractiveMode == true && flags.Output != "simple" {
_spinner = createSpinner(" Loading...", "cyan")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment