glaciers-in-archives/snowman

View on GitHub
internal/utils/utils.go

Summary

Maintainability
A
1 hr
Test Coverage

Function CountFilesRecursive has 5 return statements (exceeds 4 allowed).
Open

func CountFilesRecursive(dir string) (int, error) {
    if _, err := os.Stat(dir); os.IsNotExist(err) {
        return 0, nil
    }

Severity: Major
Found in internal/utils/utils.go - About 35 mins to fix

    Function ValidatePathSection has 5 return statements (exceeds 4 allowed).
    Open

    func ValidatePathSection(path string) error {
        // throw an error if the path contains illegal characters
        if illegalPath.MatchString(path) {
            return errors.New("Illegal characters in path: " + path)
        }
    Severity: Major
    Found in internal/utils/utils.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status