Preparing report...

Report for github.com/schollz/find

A+    Excellent!    Found 12 issues across 28 files

Tweet

gofmt92%

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!


golint78%

Golint is a linter for Go source code.

    • find/fingerprint_ffjson.go
    • Line 14: warning: exported method Fingerprint.MarshalJSON should have comment or be unexported (golint)
    • Line 26: warning: exported method Fingerprint.MarshalJSONBuf should have comment or be unexported (golint)
    • Line 69: warning: don't use underscores in Go names; const ffj_t_Fingerprintbase should be ffjTFingerprintbase (golint)
    • Line 70: warning: don't use underscores in Go names; const ffj_t_Fingerprintno_such_key should be ffjTFingerprintnoSuchKey (golint)
    • Line 72: warning: don't use underscores in Go names; const ffj_t_Fingerprint_Group should be ffjTFingerprintGroup (golint)
    • Line 74: warning: don't use underscores in Go names; const ffj_t_Fingerprint_Username should be ffjTFingerprintUsername (golint)
    • Line 76: warning: don't use underscores in Go names; const ffj_t_Fingerprint_Location should be ffjTFingerprintLocation (golint)
    • Line 78: warning: don't use underscores in Go names; const ffj_t_Fingerprint_Timestamp should be ffjTFingerprintTimestamp (golint)
    • Line 80: warning: don't use underscores in Go names; const ffj_t_Fingerprint_WifiFingerprint should be ffjTFingerprintWifiFingerprint (golint)
    • Line 83: warning: don't use underscores in Go names; var ffj_key_Fingerprint_Group should be ffjKeyFingerprintGroup (golint)
    • Line 85: warning: don't use underscores in Go names; var ffj_key_Fingerprint_Username should be ffjKeyFingerprintUsername (golint)
    • Line 87: warning: don't use underscores in Go names; var ffj_key_Fingerprint_Location should be ffjKeyFingerprintLocation (golint)
    • Line 89: warning: don't use underscores in Go names; var ffj_key_Fingerprint_Timestamp should be ffjKeyFingerprintTimestamp (golint)
    • Line 91: warning: don't use underscores in Go names; var ffj_key_Fingerprint_WifiFingerprint should be ffjKeyFingerprintWifiFingerprint (golint)
    • Line 93: warning: exported method Fingerprint.UnmarshalJSON should have comment or be unexported (golint)
    • Line 93: warning: receiver name uj should be consistent with previous receiver name mj for Fingerprint (golint)
    • Line 98: warning: exported method Fingerprint.UnmarshalJSONFFLexer should have comment or be unexported (golint)
    • Line 98: warning: receiver name uj should be consistent with previous receiver name mj for Fingerprint (golint)
    • Line 400: warning: don't use underscores in Go names; var tmp_uj__WifiFingerprint should be tmpUjWifiFingerprint (golint)
    • Line 463: warning: exported method Router.MarshalJSON should have comment or be unexported (golint)
    • Line 475: warning: exported method Router.MarshalJSONBuf should have comment or be unexported (golint)
    • Line 493: warning: don't use underscores in Go names; const ffj_t_Routerbase should be ffjTRouterbase (golint)
    • Line 494: warning: don't use underscores in Go names; const ffj_t_Routerno_such_key should be ffjTRouternoSuchKey (golint)
    • Line 496: warning: don't use underscores in Go names; const ffj_t_Router_Mac should be ffjTRouterMac (golint)
    • Line 498: warning: don't use underscores in Go names; const ffj_t_Router_Rssi should be ffjTRouterRssi (golint)
    • Line 501: warning: don't use underscores in Go names; var ffj_key_Router_Mac should be ffjKeyRouterMac (golint)
    • Line 503: warning: don't use underscores in Go names; var ffj_key_Router_Rssi should be ffjKeyRouterRssi (golint)
    • Line 505: warning: exported method Router.UnmarshalJSON should have comment or be unexported (golint)
    • Line 505: warning: receiver name uj should be consistent with previous receiver name mj for Router (golint)
    • Line 510: warning: exported method Router.UnmarshalJSONFFLexer should have comment or be unexported (golint)
    • Line 510: warning: receiver name uj should be consistent with previous receiver name mj for Router (golint)
    • find/mqtt.go
    • Line 208: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • find/parameters_ffjson.go
    • Line 15: warning: exported method FullParameters.MarshalJSON should have comment or be unexported (golint)
    • Line 27: warning: exported method FullParameters.MarshalJSONBuf should have comment or be unexported (golint)
    • Line 128: warning: don't use underscores in Go names; const ffj_t_FullParametersbase should be ffjTFullParametersbase (golint)
    • Line 129: warning: don't use underscores in Go names; const ffj_t_FullParametersno_such_key should be ffjTFullParametersnoSuchKey (golint)
    • Line 131: warning: don't use underscores in Go names; const ffj_t_FullParameters_NetworkMacs should be ffjTFullParametersNetworkMacs (golint)
    • Line 133: warning: don't use underscores in Go names; const ffj_t_FullParameters_NetworkLocs should be ffjTFullParametersNetworkLocs (golint)
    • Line 135: warning: don't use underscores in Go names; const ffj_t_FullParameters_MacVariability should be ffjTFullParametersMacVariability (golint)
    • Line 137: warning: don't use underscores in Go names; const ffj_t_FullParameters_MacCount should be ffjTFullParametersMacCount (golint)
    • Line 139: warning: don't use underscores in Go names; const ffj_t_FullParameters_MacCountByLoc should be ffjTFullParametersMacCountByLoc (golint)
    • Line 141: warning: don't use underscores in Go names; const ffj_t_FullParameters_UniqueLocs should be ffjTFullParametersUniqueLocs (golint)
    • Line 143: warning: don't use underscores in Go names; const ffj_t_FullParameters_UniqueMacs should be ffjTFullParametersUniqueMacs (golint)
    • Line 145: warning: don't use underscores in Go names; const ffj_t_FullParameters_Priors should be ffjTFullParametersPriors (golint)
    • Line 147: warning: don't use underscores in Go names; const ffj_t_FullParameters_Results should be ffjTFullParametersResults (golint)
    • Line 149: warning: don't use underscores in Go names; const ffj_t_FullParameters_Loaded should be ffjTFullParametersLoaded (golint)
    • Line 152: warning: don't use underscores in Go names; var ffj_key_FullParameters_NetworkMacs should be ffjKeyFullParametersNetworkMacs (golint)
    • Line 154: warning: don't use underscores in Go names; var ffj_key_FullParameters_NetworkLocs should be ffjKeyFullParametersNetworkLocs (golint)
    • Line 156: warning: don't use underscores in Go names; var ffj_key_FullParameters_MacVariability should be ffjKeyFullParametersMacVariability (golint)
    • Line 158: warning: don't use underscores in Go names; var ffj_key_FullParameters_MacCount should be ffjKeyFullParametersMacCount (golint)
    • Line 160: warning: don't use underscores in Go names; var ffj_key_FullParameters_MacCountByLoc should be ffjKeyFullParametersMacCountByLoc (golint)
    • Line 162: warning: don't use underscores in Go names; var ffj_key_FullParameters_UniqueLocs should be ffjKeyFullParametersUniqueLocs (golint)
    • Line 164: warning: don't use underscores in Go names; var ffj_key_FullParameters_UniqueMacs should be ffjKeyFullParametersUniqueMacs (golint)
    • Line 166: warning: don't use underscores in Go names; var ffj_key_FullParameters_Priors should be ffjKeyFullParametersPriors (golint)
    • Line 168: warning: don't use underscores in Go names; var ffj_key_FullParameters_Results should be ffjKeyFullParametersResults (golint)
    • Line 170: warning: don't use underscores in Go names; var ffj_key_FullParameters_Loaded should be ffjKeyFullParametersLoaded (golint)
    • Line 172: warning: exported method FullParameters.UnmarshalJSON should have comment or be unexported (golint)
    • Line 172: warning: receiver name uj should be consistent with previous receiver name mj for FullParameters (golint)
    • Line 177: warning: exported method FullParameters.UnmarshalJSONFFLexer should have comment or be unexported (golint)
    • Line 177: warning: receiver name uj should be consistent with previous receiver name mj for FullParameters (golint)
    • Line 446: warning: don't use underscores in Go names; var tmp_uj__NetworkMacs should be tmpUjNetworkMacs (golint)
    • Line 517: warning: don't use underscores in Go names; var tmp_tmp_uj__NetworkMacs should be tmpTmpUjNetworkMacs (golint)
    • Line 639: warning: don't use underscores in Go names; var tmp_uj__NetworkLocs should be tmpUjNetworkLocs (golint)
    • Line 710: warning: don't use underscores in Go names; var tmp_tmp_uj__NetworkLocs should be tmpTmpUjNetworkLocs (golint)
    • Line 832: warning: don't use underscores in Go names; var tmp_uj__MacVariability should be tmpUjMacVariability (golint)
    • Line 941: warning: don't use underscores in Go names; var tmp_uj__MacCount should be tmpUjMacCount (golint)
    • Line 1050: warning: don't use underscores in Go names; var tmp_uj__MacCountByLoc should be tmpUjMacCountByLoc (golint)
    • Line 1121: warning: don't use underscores in Go names; var tmp_tmp_uj__MacCountByLoc should be tmpTmpUjMacCountByLoc (golint)
    • Line 1236: warning: don't use underscores in Go names; var tmp_uj__UniqueLocs should be tmpUjUniqueLocs (golint)
    • Line 1309: warning: don't use underscores in Go names; var tmp_uj__UniqueMacs should be tmpUjUniqueMacs (golint)
    • Line 1384: warning: don't use underscores in Go names; var tmp_uj__Priors should be tmpUjPriors (golint)
    • Line 1484: warning: don't use underscores in Go names; var tmp_uj__Results should be tmpUjResults (golint)
    • Line 1612: warning: exported method PriorParameters.MarshalJSON should have comment or be unexported (golint)
    • Line 1624: warning: exported method PriorParameters.MarshalJSONBuf should have comment or be unexported (golint)
    • Line 1675: warning: don't use underscores in Go names; const ffj_t_PriorParametersbase should be ffjTPriorParametersbase (golint)
    • Line 1676: warning: don't use underscores in Go names; const ffj_t_PriorParametersno_such_key should be ffjTPriorParametersnoSuchKey (golint)
    • Line 1678: warning: don't use underscores in Go names; const ffj_t_PriorParameters_P should be ffjTPriorParametersP (golint)
    • Line 1680: warning: don't use underscores in Go names; const ffj_t_PriorParameters_NP should be ffjTPriorParametersNP (golint)
    • Line 1682: warning: don't use underscores in Go names; const ffj_t_PriorParameters_MacFreq should be ffjTPriorParametersMacFreq (golint)
    • Line 1684: warning: don't use underscores in Go names; const ffj_t_PriorParameters_NMacFreq should be ffjTPriorParametersNMacFreq (golint)
    • Line 1686: warning: don't use underscores in Go names; const ffj_t_PriorParameters_Special should be ffjTPriorParametersSpecial (golint)
    • Line 1689: warning: don't use underscores in Go names; var ffj_key_PriorParameters_P should be ffjKeyPriorParametersP (golint)
    • Line 1691: warning: don't use underscores in Go names; var ffj_key_PriorParameters_NP should be ffjKeyPriorParametersNP (golint)
    • Line 1693: warning: don't use underscores in Go names; var ffj_key_PriorParameters_MacFreq should be ffjKeyPriorParametersMacFreq (golint)
    • Line 1695: warning: don't use underscores in Go names; var ffj_key_PriorParameters_NMacFreq should be ffjKeyPriorParametersNMacFreq (golint)
    • Line 1697: warning: don't use underscores in Go names; var ffj_key_PriorParameters_Special should be ffjKeyPriorParametersSpecial (golint)
    • Line 1699: warning: exported method PriorParameters.UnmarshalJSON should have comment or be unexported (golint)
    • Line 1699: warning: receiver name uj should be consistent with previous receiver name mj for PriorParameters (golint)
    • Line 1704: warning: exported method PriorParameters.UnmarshalJSONFFLexer should have comment or be unexported (golint)
    • Line 1704: warning: receiver name uj should be consistent with previous receiver name mj for PriorParameters (golint)
    • Line 1897: warning: don't use underscores in Go names; var tmp_uj__P should be tmpUjP (golint)
    • Line 1968: warning: don't use underscores in Go names; var tmp_tmp_uj__P should be tmpTmpUjP (golint)
    • Line 2037: warning: don't use underscores in Go names; var tmp_tmp_tmp_uj__P should be tmpTmpTmpUjP (golint)
    • Line 2132: warning: don't use underscores in Go names; var tmp_uj__NP should be tmpUjNP (golint)
    • Line 2203: warning: don't use underscores in Go names; var tmp_tmp_uj__NP should be tmpTmpUjNP (golint)
    • Line 2272: warning: don't use underscores in Go names; var tmp_tmp_tmp_uj__NP should be tmpTmpTmpUjNP (golint)
    • Line 2367: warning: don't use underscores in Go names; var tmp_uj__MacFreq should be tmpUjMacFreq (golint)
    • Line 2438: warning: don't use underscores in Go names; var tmp_tmp_uj__MacFreq should be tmpTmpUjMacFreq (golint)
    • Line 2555: warning: don't use underscores in Go names; var tmp_uj__NMacFreq should be tmpUjNMacFreq (golint)
    • Line 2626: warning: don't use underscores in Go names; var tmp_tmp_uj__NMacFreq should be tmpTmpUjNMacFreq (golint)
    • Line 2743: warning: don't use underscores in Go names; var tmp_uj__Special should be tmpUjSpecial (golint)
    • Line 2845: warning: exported method ResultsParameters.MarshalJSON should have comment or be unexported (golint)
    • Line 2857: warning: exported method ResultsParameters.MarshalJSONBuf should have comment or be unexported (golint)
    • Line 2916: warning: don't use underscores in Go names; const ffj_t_ResultsParametersbase should be ffjTResultsParametersbase (golint)
    • Line 2917: warning: don't use underscores in Go names; const ffj_t_ResultsParametersno_such_key should be ffjTResultsParametersnoSuchKey (golint)
    • Line 2919: warning: don't use underscores in Go names; const ffj_t_ResultsParameters_Accuracy should be ffjTResultsParametersAccuracy (golint)
    • Line 2921: warning: don't use underscores in Go names; const ffj_t_ResultsParameters_TotalLocations should be ffjTResultsParametersTotalLocations (golint)
    • Line 2923: warning: don't use underscores in Go names; const ffj_t_ResultsParameters_CorrectLocations should be ffjTResultsParametersCorrectLocations (golint)
    • Line 2925: warning: don't use underscores in Go names; const ffj_t_ResultsParameters_Guess should be ffjTResultsParametersGuess (golint)
    • Line 2928: warning: don't use underscores in Go names; var ffj_key_ResultsParameters_Accuracy should be ffjKeyResultsParametersAccuracy (golint)
    • Line 2930: warning: don't use underscores in Go names; var ffj_key_ResultsParameters_TotalLocations should be ffjKeyResultsParametersTotalLocations (golint)
    • Line 2932: warning: don't use underscores in Go names; var ffj_key_ResultsParameters_CorrectLocations should be ffjKeyResultsParametersCorrectLocations (golint)
    • Line 2934: warning: don't use underscores in Go names; var ffj_key_ResultsParameters_Guess should be ffjKeyResultsParametersGuess (golint)
    • Line 2936: warning: exported method ResultsParameters.UnmarshalJSON should have comment or be unexported (golint)
    • Line 2936: warning: receiver name uj should be consistent with previous receiver name mj for ResultsParameters (golint)
    • Line 2941: warning: exported method ResultsParameters.UnmarshalJSONFFLexer should have comment or be unexported (golint)
    • Line 2941: warning: receiver name uj should be consistent with previous receiver name mj for ResultsParameters (golint)
    • Line 3120: warning: don't use underscores in Go names; var tmp_uj__Accuracy should be tmpUjAccuracy (golint)
    • Line 3229: warning: don't use underscores in Go names; var tmp_uj__TotalLocations should be tmpUjTotalLocations (golint)
    • Line 3338: warning: don't use underscores in Go names; var tmp_uj__CorrectLocations should be tmpUjCorrectLocations (golint)
    • Line 3447: warning: don't use underscores in Go names; var tmp_uj__Guess should be tmpUjGuess (golint)
    • Line 3518: warning: don't use underscores in Go names; var tmp_tmp_uj__Guess should be tmpTmpUjGuess (golint)
    • find/rf.go
    • Line 19: warning: exported function RandomString should have comment or be unexported (golint)
    • find/server.go
    • Line 53: warning: exported var BuildTime should have comment or be unexported (golint)
    • Line 54: warning: exported var Build should have comment or be unexported (golint)
    • find/svm.go
    • Line 34: warning: exported type Svm should have comment or be unexported (golint)

gocyclo75%

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.

    • find/posterior.go
    • Line 12: warning: cyclomatic complexity 16 of function calculatePosterior() is high (> 15) (gocyclo)
    • find/parameters_ffjson.go
    • Line 177: warning: cyclomatic complexity 236 of function (*FullParameters).UnmarshalJSONFFLexer() is high (> 15) (gocyclo)
    • Line 1704: warning: cyclomatic complexity 194 of function (*PriorParameters).UnmarshalJSONFFLexer() is high (> 15) (gocyclo)
    • Line 2941: warning: cyclomatic complexity 118 of function (*ResultsParameters).UnmarshalJSONFFLexer() is high (> 15) (gocyclo)
    • Line 27: warning: cyclomatic complexity 18 of function (*FullParameters).MarshalJSONBuf() is high (> 15) (gocyclo)
    • find/fingerprint_ffjson.go
    • Line 98: warning: cyclomatic complexity 69 of function (*Fingerprint).UnmarshalJSONFFLexer() is high (> 15) (gocyclo)
    • Line 510: warning: cyclomatic complexity 41 of function (*Router).UnmarshalJSONFFLexer() is high (> 15) (gocyclo)
    • find/priors.go
    • Line 198: warning: cyclomatic complexity 52 of function calculatePriors() is high (> 15) (gocyclo)
    • find/priorsThreaded.go
    • Line 65: warning: cyclomatic complexity 33 of function optimizePriorsThreaded() is high (> 15) (gocyclo)
    • Line 245: warning: cyclomatic complexity 24 of function optimizePriorsThreadedNot() is high (> 15) (gocyclo)

ineffassign75%

IneffAssign detects ineffectual assignments in Go code.

    • find/posterior.go
    • Line 45: warning: ineffectual assignment to weight (ineffassign)
    • Line 46: warning: ineffectual assignment to nweight (ineffassign)
    • Line 115: warning: ineffectual assignment to weight (ineffassign)
    • Line 116: warning: ineffectual assignment to nweight (ineffassign)
    • find/api.go
    • Line 111: warning: ineffectual assignment to err (ineffassign)
    • Line 133: warning: ineffectual assignment to err (ineffassign)
    • Line 173: warning: ineffectual assignment to err (ineffassign)
    • find/fingerprint_ffjson.go
    • Line 99: warning: ineffectual assignment to err (ineffassign)
    • Line 418: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 434: warning: ineffectual assignment to state (ineffassign)
    • Line 511: warning: ineffectual assignment to err (ineffassign)
    • find/parameters_ffjson.go
    • Line 178: warning: ineffectual assignment to err (ineffassign)
    • Line 464: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 535: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 657: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 728: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 850: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 959: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 1068: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 1139: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 1254: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 1327: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 1402: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 1446: warning: ineffectual assignment to state (ineffassign)
    • Line 1502: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 1546: warning: ineffectual assignment to state (ineffassign)
    • Line 1705: warning: ineffectual assignment to err (ineffassign)
    • Line 1915: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 1986: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2055: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2150: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2221: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2290: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2385: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2456: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2573: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2644: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2761: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 2942: warning: ineffectual assignment to err (ineffassign)
    • Line 3138: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 3247: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 3356: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 3465: warning: ineffectual assignment to wantVal (ineffassign)
    • Line 3536: warning: ineffectual assignment to wantVal (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell82%

Misspell Finds commonly misspelled English words

    • find/mqtt.go
    • Line 65: warning: "successfuly" is a misspelling of "successfully" (misspell)
    • Line 131: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 131: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 151: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 152: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 153: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 154: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 156: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 157: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • find/server.go
    • Line 74: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 77: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 77: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 77: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 87: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 87: warning: "mosquitto" is a misspelling of "mosquito" (misspell)
    • Line 87: warning: "mosquitto" is a misspelling of "mosquito" (misspell)