Preparing report...

Report for github.com/cubefs/cubefs

(v2.5.2+incompatible)

A+    Excellent!    Found 71 issues across 324 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!


gofmt85%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo89%

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.

    • metanode/partition_fsm.go
    • Line 38: warning: cyclomatic complexity 50 of function (*metaPartition).Apply() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 18 of function (*metaPartition).ApplySnapshot() is high (> 15) (gocyclo)
    • metanode/partition_item.go
    • Line 143: warning: cyclomatic complexity 18 of function newMetaItemIterator() is high (> 15) (gocyclo)
    • Line 262: warning: cyclomatic complexity 16 of function (*MetaItemIterator).Next() is high (> 15) (gocyclo)
    • cmd/cmd.go
    • Line 119: warning: cyclomatic complexity 23 of function main() is high (> 15) (gocyclo)
    • master/server.go
    • Line 147: warning: cyclomatic complexity 33 of function (*Server).checkConfig() is high (> 15) (gocyclo)
    • authnode/api_service.go
    • Line 192: warning: cyclomatic complexity 25 of function (*Server).apiAccessEntry() is high (> 15) (gocyclo)
    • Line 357: warning: cyclomatic complexity 17 of function (*Server).osCapsOp() is high (> 15) (gocyclo)
    • metanode/partition_delete_extents.go
    • Line 169: warning: cyclomatic complexity 32 of function (*metaPartition).deleteExtentsFromList() is high (> 15) (gocyclo)
    • Line 68: warning: cyclomatic complexity 20 of function (*metaPartition).appendDelExtentsToFile() is high (> 15) (gocyclo)
    • master/user.go
    • Line 147: warning: cyclomatic complexity 21 of function (*User).updateKey() is high (> 15) (gocyclo)
    • cli/cmd/vol.go
    • Line 169: warning: cyclomatic complexity 20 of function newVolSetCmd() is high (> 15) (gocyclo)
    • objectnode/fs_volume.go
    • Line 1984: warning: cyclomatic complexity 74 of function (*Volume).CopyFile() is high (> 15) (gocyclo)
    • Line 418: warning: cyclomatic complexity 40 of function (*Volume).PutObject() is high (> 15) (gocyclo)
    • Line 1654: warning: cyclomatic complexity 39 of function (*Volume).recursiveScan() is high (> 15) (gocyclo)
    • Line 884: warning: cyclomatic complexity 21 of function (*Volume).CompleteMultipart() is high (> 15) (gocyclo)
    • Line 1804: warning: cyclomatic complexity 17 of function (*Volume).supplyListFileInfo() is high (> 15) (gocyclo)
    • Line 1248: warning: cyclomatic complexity 17 of function (*Volume).ObjectMeta() is high (> 15) (gocyclo)
    • Line 1183: warning: cyclomatic complexity 16 of function (*Volume).ReadFile() is high (> 15) (gocyclo)
    • datanode/wrap_operator.go
    • Line 59: warning: cyclomatic complexity 31 of function (*DataNode).OperatePacket() is high (> 15) (gocyclo)
    • Line 409: warning: cyclomatic complexity 18 of function (*DataNode).handleWritePacket() is high (> 15) (gocyclo)
    • proto/packet.go
    • Line 241: warning: cyclomatic complexity 77 of function (*Packet).GetOpMsg() is high (> 15) (gocyclo)
    • Line 400: warning: cyclomatic complexity 16 of function (*Packet).GetResultMsg() is high (> 15) (gocyclo)
    • Line 549: warning: cyclomatic complexity 16 of function (*Packet).ReadFromConn() is high (> 15) (gocyclo)
    • master/cluster.go
    • Line 967: warning: cyclomatic complexity 24 of function (*Cluster).chooseTargetDataNodes() is high (> 15) (gocyclo)
    • Line 2072: warning: cyclomatic complexity 18 of function (*Cluster).chooseTargetMetaHosts() is high (> 15) (gocyclo)
    • Line 805: warning: cyclomatic complexity 17 of function (*Cluster).isFaultDomain() is high (> 15) (gocyclo)
    • Line 1268: warning: cyclomatic complexity 17 of function (*Cluster).migrateDataPartition() is high (> 15) (gocyclo)
    • Line 1724: warning: cyclomatic complexity 16 of function (*Cluster).migrateMetaNode() is high (> 15) (gocyclo)
    • Line 1171: warning: cyclomatic complexity 16 of function (*Cluster).migrateDataNode() is high (> 15) (gocyclo)
    • master/cluster_task.go
    • Line 361: warning: cyclomatic complexity 17 of function (*Cluster).removeMetaPartitionRaftMember() is high (> 15) (gocyclo)
    • Line 87: warning: cyclomatic complexity 16 of function (*Cluster).migrateMetaPartition() is high (> 15) (gocyclo)
    • objectnode/api_handler_object.go
    • Line 41: warning: cyclomatic complexity 65 of function (*ObjectNode).getObjectHandler() is high (> 15) (gocyclo)
    • Line 634: warning: cyclomatic complexity 32 of function (*ObjectNode).copyObjectHandler() is high (> 15) (gocyclo)
    • Line 334: warning: cyclomatic complexity 31 of function (*ObjectNode).headObjectHandler() is high (> 15) (gocyclo)
    • Line 1100: warning: cyclomatic complexity 21 of function (*ObjectNode).putObjectHandler() is high (> 15) (gocyclo)
    • Line 950: warning: cyclomatic complexity 19 of function (*ObjectNode).getBucketV2Handler() is high (> 15) (gocyclo)
    • sdk/meta/api.go
    • Line 404: warning: cyclomatic complexity 25 of function (*MetaWrapper).Rename_ll() is high (> 15) (gocyclo)
    • Line 335: warning: cyclomatic complexity 19 of function (*MetaWrapper).Delete_ll() is high (> 15) (gocyclo)
    • metanode/inode.go
    • Line 332: warning: cyclomatic complexity 18 of function (*Inode).UnmarshalValue() is high (> 15) (gocyclo)
    • Line 270: warning: cyclomatic complexity 16 of function (*Inode).MarshalValue() is high (> 15) (gocyclo)
    • metanode/manager.go
    • Line 100: warning: cyclomatic complexity 48 of function (*metadataManager).HandleMetadataOperation() is high (> 15) (gocyclo)
    • Line 271: warning: cyclomatic complexity 19 of function (*metadataManager).loadPartitions() is high (> 15) (gocyclo)
    • master/topology.go
    • Line 283: warning: cyclomatic complexity 18 of function (*nodeSetGrpManager).checkGrpState() 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!