Preparing report...

Report for github.com/spatialmodel/inmap

A+    Excellent!    Found 91 issues across 199 files

Tweet

gofmt85%

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!


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.

    • inmap/cloud/client_test.go
    • Line 201: warning: cyclomatic complexity 26 of function TestClient_fakeCOARDS() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 25 of function TestClient_fake() is high (> 15) (gocyclo)
    • inmap/sr/sr.go
    • Line 262: warning: cyclomatic complexity 26 of function (*SR).Save() is high (> 15) (gocyclo)
    • Line 491: warning: cyclomatic complexity 24 of function (*SR).createOrOpenOutputFile() is high (> 15) (gocyclo)
    • Line 371: warning: cyclomatic complexity 16 of function (*SR).results() is high (> 15) (gocyclo)
    • Line 121: warning: cyclomatic complexity 16 of function (*SR).Start() is high (> 15) (gocyclo)
    • inmap/vargrid_test.go
    • Line 56: warning: cyclomatic complexity 275 of function (*InMAP).TestCellAlignment1() is high (> 15) (gocyclo)
    • Line 531: warning: cyclomatic complexity 58 of function (*InMAP).TestCellAlignment2() is high (> 15) (gocyclo)
    • Line 776: warning: cyclomatic complexity 16 of function TestCombineCTMData() is high (> 15) (gocyclo)
    • inmap/preproc.go
    • Line 651: warning: cyclomatic complexity 46 of function stabilityMixingChemistry() is high (> 15) (gocyclo)
    • Line 1175: warning: cyclomatic complexity 17 of function staggerWorker() is high (> 15) (gocyclo)
    • inmap/vargrid.go
    • Line 266: warning: cyclomatic complexity 24 of function CombineCTMData() is high (> 15) (gocyclo)
    • Line 957: warning: cyclomatic complexity 16 of function (*VarGridConfig).loadPopulationShapefile() is high (> 15) (gocyclo)
    • Line 853: warning: cyclomatic complexity 16 of function (*Cell).loadPopMortalityRate() is high (> 15) (gocyclo)
    • Line 1104: warning: cyclomatic complexity 16 of function (*VarGridConfig).loadMortality() is high (> 15) (gocyclo)
    • inmap/emissions/slca/population.go
    • Line 382: warning: cyclomatic complexity 17 of function (*CSTConfig).loadMortality() is high (> 15) (gocyclo)
    • Line 460: warning: cyclomatic complexity 16 of function (*CSTConfig).interpolatePopulationIncidence() is high (> 15) (gocyclo)
    • Line 318: warning: cyclomatic complexity 16 of function (*CSTConfig).loadPopulation() is high (> 15) (gocyclo)
    • inmap/neighbors.go
    • Line 50: warning: cyclomatic complexity 24 of function (*InMAP).neighbors() is high (> 15) (gocyclo)
    • Line 233: warning: cyclomatic complexity 16 of function (*Cell).dereferenceNeighbors() is high (> 15) (gocyclo)
    • inmap/sr/sr_test.go
    • Line 107: warning: cyclomatic complexity 24 of function TestSR() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 17 of function ncfWithinTol() is high (> 15) (gocyclo)
    • inmap/emissions/slca/spatialresults.go
    • Line 434: warning: cyclomatic complexity 27 of function (*SpatialResults).Table() is high (> 15) (gocyclo)
    • Line 268: warning: cyclomatic complexity 17 of function (*SpatialResults).EdgeHealth() is high (> 15) (gocyclo)
    • Line 195: warning: cyclomatic complexity 16 of function (*SpatialResults).EdgeConcentrations() is high (> 15) (gocyclo)
    • inmap/emissions/aep/srgspec.go
    • Line 352: warning: cyclomatic complexity 38 of function (*readSrgDataSMOKEInput).Run() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 30 of function ReadSrgSpecSMOKE() is high (> 15) (gocyclo)
    • inmap/emissions/aep/wrf.go
    • Line 120: warning: cyclomatic complexity 28 of function (*WRFconfigData).parseWPSnamelist() is high (> 15) (gocyclo)
    • Line 225: warning: cyclomatic complexity 18 of function (*WRFconfigData).parseWRFnamelist() is high (> 15) (gocyclo)
    • inmap/sr/srreader.go
    • Line 63: warning: cyclomatic complexity 25 of function NewReader() is high (> 15) (gocyclo)
    • Line 256: warning: cyclomatic complexity 20 of function (*Reader).Concentrations() is high (> 15) (gocyclo)
    • inmap/emissions/slca/greet/calc.go
    • Line 455: warning: cyclomatic complexity 44 of function addUnits() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 41 of function eval() is high (> 15) (gocyclo)
    • Line 339: warning: cyclomatic complexity 17 of function (*DB).processVal() is high (> 15) (gocyclo)
    • inmap/io.go
    • Line 257: warning: cyclomatic complexity 29 of function FromAEP() is high (> 15) (gocyclo)
    • Line 177: warning: cyclomatic complexity 16 of function ReadEmissionShapefiles() is high (> 15) (gocyclo)
    • inmap/emissions/aep/spatialize_test.go
    • Line 268: warning: cyclomatic complexity 23 of function TestSpatializeRecord() is high (> 15) (gocyclo)
    • Line 171: warning: cyclomatic complexity 22 of function TestCreateSurrogates() is high (> 15) (gocyclo)
    • Line 386: warning: cyclomatic complexity 16 of function TestSpatializeRecord_srgCache() is high (> 15) (gocyclo)

golint89%

Golint is a linter for Go source code.

    • inmap/emissions/aep/srgspec.go
    • Line 41: warning: exported type SrgSpec should have comment or be unexported (golint)
    • Line 96: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 352: warning: receiver name input should be consistent with previous receiver name s for readSrgDataSMOKEInput (golint)
    • inmap/emissions/slca/eieio/gui/map.go
    • Line 33: warning: exported method GUI.LoadMap should have comment or be unexported (golint)
    • Line 61: warning: exported method GUI.LoadGeometry should have comment or be unexported (golint)
    • Line 77: warning: exported method GUI.SetMapColors should have comment or be unexported (golint)
    • inmap/vargrid.go
    • Line 132: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 397: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 428: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 455: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 516: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 780: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 803: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 943: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 957: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 1028: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 1104: warning: receiver name config should be consistent with previous receiver name c for VarGridConfig (golint)
    • Line 1292: warning: receiver name data should be consistent with previous receiver name d for CTMData (golint)
    • inmap/emissions/slca/eieio/ces/IOshares.go
    • Line 285: warning: receiver name c should be consistent with previous receiver name ces for CES (golint)
    • Line 298: warning: receiver name c should be consistent with previous receiver name ces for CES (golint)
    • Line 311: warning: receiver name c should be consistent with previous receiver name ces for CES (golint)
    • Line 333: warning: receiver name c should be consistent with previous receiver name ces for CES (golint)
    • Line 356: warning: receiver name c should be consistent with previous receiver name ces for CES (golint)
    • inmap/emissions/slca/eieio/server.go
    • Line 87: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 827: warning: exported method Server.DefaultSelection should have comment or be unexported (golint)
    • Line 842: warning: exported method Server.Populations should have comment or be unexported (golint)
    • Line 846: warning: exported method Server.Years should have comment or be unexported (golint)
    • inmap/emissions/aep/srgspec_osm.go
    • Line 60: warning: comment on exported function ReadSrgSpecOSM should be of the form "ReadSrgSpecOSM ..." (golint)
    • Line 131: warning: receiver name input should be consistent with previous receiver name sd for readSrgDataOSMInput (golint)
    • inmap/cloud/fakerunner.go
    • Line 111: warning: exported method FakeRPCClient.RunJob should have comment or be unexported (golint)
    • Line 115: warning: exported method FakeRPCClient.Status should have comment or be unexported (golint)
    • Line 119: warning: exported method FakeRPCClient.Output should have comment or be unexported (golint)
    • Line 123: warning: exported method FakeRPCClient.Delete should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell91%

Misspell Finds commonly misspelled English words

    • inmap/emissions/aep/inventory_test.go
    • Line 839: warning: "COMMERICAL" is a misspelling of "COMMERCIAL" (misspell)
    • Line 917: warning: "Confrimed" is a misspelling of "Confirmed" (misspell)
    • Line 1025: warning: "Deparment" is a misspelling of "Department" (misspell)
    • Line 1025: warning: "Deparment" is a misspelling of "Department" (misspell)
    • Line 1141: warning: "Deparment" is a misspelling of "Department" (misspell)
    • Line 1141: warning: "Deparment" is a misspelling of "Department" (misspell)