Preparing report...

Report for github.com/united-manufacturing-hub/united-manufacturing-hub

A+    Excellent!    Found 14 issues across 22 files

Tweet

gofmt95%

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!


gocyclo72%

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.

    • united-manufacturing-hub/golang/cmd/factoryinsight/http.go
    • Line 283: warning: cyclomatic complexity 29 of function getDataHandler() is high (> 15) (gocyclo)
    • Line 500: warning: cyclomatic complexity 22 of function processAggregatedStatesRequest() is high (> 15) (gocyclo)
    • Line 1887: warning: cyclomatic complexity 16 of function processAverageChangeoverTimeRequest() is high (> 15) (gocyclo)
    • Line 973: warning: cyclomatic complexity 16 of function processOEERequest() is high (> 15) (gocyclo)
    • Line 1745: warning: cyclomatic complexity 16 of function processAverageCleaningTimeRequest() is high (> 15) (gocyclo)
    • united-manufacturing-hub/golang/cmd/mqtt-to-postgresql/database.go
    • Line 369: warning: cyclomatic complexity 26 of function storeItemsIntoDatabaseProcessValue() is high (> 15) (gocyclo)
    • Line 540: warning: cyclomatic complexity 26 of function storeItemsIntoDatabaseCount() is high (> 15) (gocyclo)
    • Line 198: warning: cyclomatic complexity 26 of function storeItemsIntoDatabaseProcessValueFloat64() is high (> 15) (gocyclo)
    • Line 1079: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseShift() is high (> 15) (gocyclo)
    • Line 115: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseRecommendation() is high (> 15) (gocyclo)
    • Line 1735: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseAddMaintenanceActivity() is high (> 15) (gocyclo)
    • Line 1515: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseStartOrder() is high (> 15) (gocyclo)
    • Line 969: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseUniqueProduct() is high (> 15) (gocyclo)
    • Line 1625: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseEndOrder() is high (> 15) (gocyclo)
    • Line 1406: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseAddOrder() is high (> 15) (gocyclo)
    • Line 1190: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseUniqueProductScrap() is high (> 15) (gocyclo)
    • Line 849: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseScrapCount() is high (> 15) (gocyclo)
    • Line 1297: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseAddProduct() is high (> 15) (gocyclo)
    • Line 740: warning: cyclomatic complexity 17 of function storeItemsIntoDatabaseState() is high (> 15) (gocyclo)

golint90%

Golint is a linter for Go source code.

    • united-manufacturing-hub/golang/pkg/datamodel/stateModel.go
    • Line 79: warning: comment on exported const EquipmentFailureStateWelder should be of the form "EquipmentFailureStateWelder ..." (golint)
    • Line 82: warning: comment on exported const EquipmentFailureStateExpender should be of the form "EquipmentFailureStateExpender ..." (golint)
    • Line 85: warning: comment on exported const EquipmentFailureStatePalletizer should be of the form "EquipmentFailureStatePalletizer ..." (golint)
    • Line 88: warning: comment on exported const EquipmentFailureStateUnderbody should be of the form "EquipmentFailureStateUnderbody ..." (golint)
    • Line 91: warning: comment on exported const EquipmentFailureStateTopcover should be of the form "EquipmentFailureStateTopcover ..." (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!


misspell59%

Misspell Finds commonly misspelled English words

    • united-manufacturing-hub/golang/cmd/factoryinsight/dataprocessing.go
    • Line 62: warning: "Inspektion" is a misspelling of "Inspection" (misspell)
    • Line 645: warning: "Theoratically" is a misspelling of "Theoretically" (misspell)
    • Line 1315: warning: "occurances" is a misspelling of "occurrences" (misspell)
    • Line 1319: warning: "occurances" is a misspelling of "occurrences" (misspell)
    • Line 1323: warning: "occurances" is a misspelling of "occurrences" (misspell)
    • Line 1326: warning: "occurances" is a misspelling of "occurrences" (misspell)
    • Line 1496: warning: "htere" is a misspelling of "there" (misspell)
    • Line 1514: warning: "htere" is a misspelling of "there" (misspell)
    • Line 1618: warning: "occurances" is a misspelling of "occurrences" (misspell)