repochecker: Revert binary file checks
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3fa53bc877
commit
9cf33ee755
@ -21,7 +21,7 @@ import (
|
||||
var (
|
||||
ignoreBinaryFileUnder = 1500000
|
||||
skipFileChecks = false
|
||||
strictBinaryFile = false
|
||||
skipBinaryFileCheck = false
|
||||
)
|
||||
|
||||
func formatFileSize(size int) string {
|
||||
@ -85,10 +85,10 @@ func searchBinaryInGit(edir string) (ret []string) {
|
||||
}
|
||||
continue
|
||||
} else if fsize, err = strconv.Atoi(fields[3]); err == nil && fsize < ignoreBinaryFileUnder {
|
||||
if _, ok := alreadySeen[fname]; !ok || !strictBinaryFile {
|
||||
if _, ok := alreadySeen[fname]; !ok || skipBinaryFileCheck {
|
||||
continue
|
||||
}
|
||||
} else if _, ok := alreadySeen[fname]; !ok && !strictBinaryFile {
|
||||
} else if _, ok := alreadySeen[fname]; !ok && skipBinaryFileCheck {
|
||||
alreadySeen[fname] = fmt.Sprintf("%s (commit %s) (size %s)", fname, commit[:7], formatFileSize(fsize))
|
||||
continue
|
||||
}
|
||||
@ -168,7 +168,7 @@ func main() {
|
||||
flag.BoolVar(&fic.StrongDigest, "strongdigest", fic.StrongDigest, "Are BLAKE2b digests required or is SHA-1 good enough?")
|
||||
flag.BoolVar(&skipFileChecks, "skipfiledigests", skipFileChecks, "Don't perform DIGESTS checks on file to speed up the checks")
|
||||
flag.BoolVar(&sync.LogMissingResolution, "skipresolution", sync.LogMissingResolution, "Don't fail if resolution.mp4 is absent")
|
||||
flag.BoolVar(&strictBinaryFile, "strict-binary-file", strictBinaryFile, "In Git-LFS check, don't warn files")
|
||||
flag.BoolVar(&skipBinaryFileCheck, "skip-binary-file", skipBinaryFileCheck, "In Git-LFS check, don't warn files")
|
||||
flag.IntVar(&ignoreBinaryFileUnder, "skip-binary-files-under", ignoreBinaryFileUnder, "In Git-LFS check, don't warn files under this size")
|
||||
flag.Parse()
|
||||
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
const version = 11
|
||||
const version = 12
|
||||
|
||||
func init() {
|
||||
go checkUpdate()
|
||||
|
Loading…
Reference in New Issue
Block a user