diff --git a/appveyor.yml b/appveyor.yml index 0787e592..e2149840 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,8 +23,7 @@ install: - go get -u golang.org/x/tools/cmd/vet - go get -u github.com/fzipp/gocyclo - go get -u github.com/remyoudompheng/go-misc/deadcode - - go get -u github.com/alecthomas/gometalinter - - go get -u github.com/client9/misspell + - go get -u github.com/client9/misspell/cmd/misspell # to run your custom scripts instead of automatic MSBuild build_script: @@ -33,7 +32,7 @@ build_script: - gofmt -s -l pkg - golint . - golint github.com/minio/mc/pkg... - - gometalinter --disable-all --linter='misspell:misspell ./*.go:PATH:LINE:COL:MESSAGE' --enable=misspell ./... + - misspell . - gocyclo -over 40 pkg - deadcode - go test -race . diff --git a/rm-main.go b/rm-main.go index 4c0b946c..bf0c65a2 100644 --- a/rm-main.go +++ b/rm-main.go @@ -113,6 +113,7 @@ func checkRmSyntax(ctx *cli.Context) { // Set command flags from context. isForce := ctx.Bool("force") isRecursive := ctx.Bool("recursive") + isFake := ctx.Bool("fake") if !ctx.Args().Present() { exitCode := 1 @@ -120,7 +121,7 @@ func checkRmSyntax(ctx *cli.Context) { } // For all recursive operations make sure to check for 'force' flag. - if isRecursive && !isForce { + if isRecursive && !isForce && !isFake { fatalIf(errDummy().Trace(), "Recursive removal requires --force option. Please review carefully before performing this *DANGEROUS* operation.") } @@ -202,7 +203,7 @@ func mainRm(ctx *cli.Context) { // Support multiple targets. for _, url := range ctx.Args() { targetAlias, targetURL, _ := mustExpandAlias(url) - if isRecursive && isForce { + if isRecursive && isForce || isFake { rmAll(targetAlias, targetURL, isRecursive, isIncomplete, isFake) } else { if err := rm(targetAlias, targetURL, isIncomplete, isFake); err != nil {