Preparing report...

Report for github.com/omegaup/gitserver

A+    Excellent!    Found 11 issues across 20 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo55%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • gitserver/handler.go
    • Line 505: warning: cyclomatic complexity 64 of function validateUpdateMaster() is high (> 15) (gocyclo)
    • Line 1096: warning: cyclomatic complexity 43 of function validateUpdateReview() is high (> 15) (gocyclo)
    • Line 1467: warning: cyclomatic complexity 26 of function (*gitProtocol).validateUpdate() is high (> 15) (gocyclo)
    • Line 354: warning: cyclomatic complexity 18 of function extractExampleCases() is high (> 15) (gocyclo)
    • gitserver/handler_test.go
    • Line 1851: warning: cyclomatic complexity 16 of function TestExampleCases() is high (> 15) (gocyclo)
    • Line 1218: warning: cyclomatic complexity 16 of function TestPushGitbomb() is high (> 15) (gocyclo)
    • gitserver/cmd/client/main.go
    • Line 187: warning: cyclomatic complexity 26 of function pushToSubdirectory() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 26 of function forcePushToBranch() is high (> 15) (gocyclo)
    • gitserver/cmd/omegaup-translate-problem/main.go
    • Line 306: warning: cyclomatic complexity 23 of function createPackfileFromMergedCommit() is high (> 15) (gocyclo)
    • Line 459: warning: cyclomatic complexity 18 of function unmergeRepository() is high (> 15) (gocyclo)
    • Line 177: warning: cyclomatic complexity 18 of function mergeRepository() is high (> 15) (gocyclo)
    • gitserver/ziphandler.go
    • Line 508: warning: cyclomatic complexity 69 of function CreatePackfile() is high (> 15) (gocyclo)
    • Line 1089: warning: cyclomatic complexity 34 of function ConvertZipToPackfile() is high (> 15) (gocyclo)
    • Line 1424: warning: cyclomatic complexity 31 of function (*zipUploadHandler).handleGitUploadZip() is high (> 15) (gocyclo)

golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words