Preparing report...

Report for github.com/drallgood/audiobookshelf-hardcover-sync

(v1.6.1)

B    Not bad!    Found 32 issues across 56 files

Tweet

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!


gofmt48%

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


gocyclo78%

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.

    • main.go
    • Line 70: warning: cyclomatic complexity 54 of function main() is high (> 15) (gocyclo)
    • audiobookshelf.go
    • Line 96: warning: cyclomatic complexity 53 of function fetchUserProgress() is high (> 15) (gocyclo)
    • Line 468: warning: cyclomatic complexity 48 of function fetchAudiobookShelfStats() is high (> 15) (gocyclo)
    • Line 686: warning: cyclomatic complexity 22 of function isBookLikelyFinished() is high (> 15) (gocyclo)
    • Line 791: warning: cyclomatic complexity 20 of function fetchRecentListeningSessions() is high (> 15) (gocyclo)
    • Line 1175: warning: cyclomatic complexity 18 of function fetchAudiobookShelfStatsEnhanced() is high (> 15) (gocyclo)
    • edition_cli.go
    • Line 288: warning: cyclomatic complexity 25 of function createEditionWithPrepopulation() is high (> 15) (gocyclo)
    • Line 13: warning: cyclomatic complexity 21 of function createEditionCommand() is high (> 15) (gocyclo)
    • Line 481: warning: cyclomatic complexity 20 of function enhanceExistingTemplate() is high (> 15) (gocyclo)
    • mismatch.go
    • Line 262: warning: cyclomatic complexity 24 of function convertMismatchToEditionInput() is high (> 15) (gocyclo)
    • Line 542: warning: cyclomatic complexity 20 of function processNarratorsWithLookup() is high (> 15) (gocyclo)
    • edition_creator.go
    • Line 667: warning: cyclomatic complexity 20 of function prepopulateFromHardcoverBook() is high (> 15) (gocyclo)
    • hardcover.go
    • Line 929: warning: cyclomatic complexity 19 of function getOwnedBooks() is high (> 15) (gocyclo)
    • Line 119: warning: cyclomatic complexity 18 of function checkExistingUserBook() is high (> 15) (gocyclo)
    • Line 318: warning: cyclomatic complexity 17 of function checkExistingUserBookRead() is high (> 15) (gocyclo)
    • sync.go
    • Line 19: warning: cyclomatic complexity 152 of function syncToHardcover() is high (> 15) (gocyclo)
    • Line 919: warning: cyclomatic complexity 35 of function runSync() is high (> 15) (gocyclo)
    • owned_flag_test.go
    • Line 52: warning: cyclomatic complexity 16 of function TestOwnedFlagSyncLogic() is high (> 15) (gocyclo)

ineffassign96%

IneffAssign detects ineffectual assignments in Go code.

    • sync.go
    • Line 336: warning: ineffectual assignment to targetStatusId (ineffassign)
    • Line 336: warning: ineffectual assignment to targetStatusId (ineffassign)

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!