Preparing report...

Report for github.com/bitorscanner/bitor/backend

(v0.0.0-20250624215907-504e6a8d4825)

A    Great!    Found 67 issues across 148 files

Tweet

gofmt64%

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


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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo82%

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.

    • services/finding_manager.go
    • Line 551: warning: cyclomatic complexity 31 of function (*FindingManager).ProcessFindingsBatch() is high (> 15) (gocyclo)
    • Line 45: warning: cyclomatic complexity 18 of function (*FindingManager).ProcessFinding() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 17 of function (*FindingManager).updateRollup() is high (> 15) (gocyclo)
    • scan/utils/ansible.go
    • Line 211: warning: cyclomatic complexity 24 of function ExecuteAnsiblePlaybook() is high (> 15) (gocyclo)
    • Line 115: warning: cyclomatic complexity 17 of function (*realTimeLogger).flushLogs() is high (> 15) (gocyclo)
    • users/invite.go
    • Line 91: warning: cyclomatic complexity 23 of function RegisterRoutes() is high (> 15) (gocyclo)
    • routes/routes.go
    • Line 30: warning: cyclomatic complexity 40 of function InitNotificationService() is high (> 15) (gocyclo)
    • middleware/permissions.go
    • Line 15: warning: cyclomatic complexity 36 of function RequirePermission() is high (> 15) (gocyclo)
    • Line 145: warning: cyclomatic complexity 29 of function HasPermission() is high (> 15) (gocyclo)
    • main.go
    • Line 121: warning: cyclomatic complexity 19 of function main() is high (> 15) (gocyclo)
    • findings/handlers.go
    • Line 65: warning: cyclomatic complexity 39 of function HandleGroupedFindings() is high (> 15) (gocyclo)
    • Line 393: warning: cyclomatic complexity 16 of function HandleVulnerabilitiesByClient() is high (> 15) (gocyclo)
    • setup/setup.go
    • Line 122: warning: cyclomatic complexity 38 of function initNotificationService() is high (> 15) (gocyclo)
    • Line 29: warning: cyclomatic complexity 23 of function SetupEncryption() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!