Preparing report...

Report for github.com/gyuho/linux-inspect

A+    Excellent!    Found 19 issues across 72 files

Tweet

gofmt98%

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!


golint86%

Golint is a linter for Go source code.

    • linux-inspect/proc/net_tcp.go
    • Line 36: warning: exported const TypeTCP should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: don't use underscores in Go names; const net_tcp_idx_sl should be netTCPIdxSl (golint)
    • Line 55: warning: don't use underscores in Go names; const net_tcp_idx_local_address should be netTCPIdxLocalAddress (golint)
    • Line 56: warning: don't use underscores in Go names; const net_tcp_idx_remote_address should be netTCPIdxRemoteAddress (golint)
    • Line 57: warning: don't use underscores in Go names; const net_tcp_idx_st should be netTCPIdxSt (golint)
    • Line 58: warning: don't use underscores in Go names; const net_tcp_idx_tx_queue_rx_queue should be netTCPIdxTxQueueRxQueue (golint)
    • Line 59: warning: don't use underscores in Go names; const net_tcp_idx_tr_tm_when should be netTCPIdxTrTmWhen (golint)
    • Line 60: warning: don't use underscores in Go names; const net_tcp_idx_retrnsmt should be netTCPIdxRetrnsmt (golint)
    • Line 61: warning: don't use underscores in Go names; const net_tcp_idx_uid should be netTCPIdxUID (golint)
    • Line 62: warning: don't use underscores in Go names; const net_tcp_idx_timeout should be netTCPIdxTimeout (golint)
    • Line 63: warning: don't use underscores in Go names; const net_tcp_idx_inode should be netTCPIdxInode (golint)
    • linux-inspect/top/parse.go
    • Line 85: warning: don't use underscores in Go names; const command_output_row_idx_pid should be commandOutputRowIdxPid (golint)
    • Line 86: warning: don't use underscores in Go names; const command_output_row_idx_user should be commandOutputRowIdxUser (golint)
    • Line 87: warning: don't use underscores in Go names; const command_output_row_idx_pr should be commandOutputRowIdxPr (golint)
    • Line 88: warning: don't use underscores in Go names; const command_output_row_idx_ni should be commandOutputRowIdxNi (golint)
    • Line 89: warning: don't use underscores in Go names; const command_output_row_idx_virt should be commandOutputRowIdxVirt (golint)
    • Line 90: warning: don't use underscores in Go names; const command_output_row_idx_res should be commandOutputRowIdxRes (golint)
    • Line 91: warning: don't use underscores in Go names; const command_output_row_idx_shr should be commandOutputRowIdxShr (golint)
    • Line 92: warning: don't use underscores in Go names; const command_output_row_idx_s should be commandOutputRowIdxS (golint)
    • Line 93: warning: don't use underscores in Go names; const command_output_row_idx_cpu should be commandOutputRowIdxCPU (golint)
    • Line 94: warning: don't use underscores in Go names; const command_output_row_idx_mem should be commandOutputRowIdxMem (golint)
    • Line 95: warning: don't use underscores in Go names; const command_output_row_idx_time should be commandOutputRowIdxTime (golint)
    • Line 96: warning: don't use underscores in Go names; const command_output_row_idx_command should be commandOutputRowIdxCommand (golint)
    • linux-inspect/proc/load_avg.go
    • Line 15: warning: don't use underscores in Go names; const load_avg_idx_load_avg_1_minute should be loadAvgIdxLoadAvg1Minute (golint)
    • Line 16: warning: don't use underscores in Go names; const load_avg_idx_load_avg_5_minute should be loadAvgIdxLoadAvg5Minute (golint)
    • Line 17: warning: don't use underscores in Go names; const load_avg_idx_load_avg_15_minute should be loadAvgIdxLoadAvg15Minute (golint)
    • Line 18: warning: don't use underscores in Go names; const load_avg_idx_kernel_scheduling_entities_with_slash should be loadAvgIdxKernelSchedulingEntitiesWithSlash (golint)
    • Line 19: warning: don't use underscores in Go names; const load_avg_idx_pid should be loadAvgIdxPid (golint)
    • linux-inspect/proc/net_dev.go
    • Line 19: warning: don't use underscores in Go names; const net_dev_idx_interface should be netDevIdxInterface (golint)
    • Line 21: warning: don't use underscores in Go names; const net_dev_idx_receive_bytes should be netDevIdxReceiveBytes (golint)
    • Line 22: warning: don't use underscores in Go names; const net_dev_idx_receive_packets should be netDevIdxReceivePackets (golint)
    • Line 23: warning: don't use underscores in Go names; const net_dev_idx_receive_errs should be netDevIdxReceiveErrs (golint)
    • Line 24: warning: don't use underscores in Go names; const net_dev_idx_receive_drop should be netDevIdxReceiveDrop (golint)
    • Line 25: warning: don't use underscores in Go names; const net_dev_idx_receive_fifo should be netDevIdxReceiveFifo (golint)
    • Line 26: warning: don't use underscores in Go names; const net_dev_idx_receive_frame should be netDevIdxReceiveFrame (golint)
    • Line 27: warning: don't use underscores in Go names; const net_dev_idx_receive_compressed should be netDevIdxReceiveCompressed (golint)
    • Line 28: warning: don't use underscores in Go names; const net_dev_idx_receive_multicast should be netDevIdxReceiveMulticast (golint)
    • Line 30: warning: don't use underscores in Go names; const net_dev_idx_transmit_bytes should be netDevIdxTransmitBytes (golint)
    • Line 31: warning: don't use underscores in Go names; const net_dev_idx_transmit_packets should be netDevIdxTransmitPackets (golint)
    • Line 32: warning: don't use underscores in Go names; const net_dev_idx_transmit_errs should be netDevIdxTransmitErrs (golint)
    • Line 33: warning: don't use underscores in Go names; const net_dev_idx_transmit_drop should be netDevIdxTransmitDrop (golint)
    • Line 34: warning: don't use underscores in Go names; const net_dev_idx_transmit_fifo should be netDevIdxTransmitFifo (golint)
    • Line 35: warning: don't use underscores in Go names; const net_dev_idx_transmit_colls should be netDevIdxTransmitColls (golint)
    • Line 36: warning: don't use underscores in Go names; const net_dev_idx_transmit_carrier should be netDevIdxTransmitCarrier (golint)
    • linux-inspect/etc/mtab.go
    • Line 17: warning: don't use underscores in Go names; const idx_file_system should be idxFileSystem (golint)
    • Line 18: warning: don't use underscores in Go names; const idx_mounted_on should be idxMountedOn (golint)
    • Line 19: warning: don't use underscores in Go names; const idx_file_system_type should be idxFileSystemType (golint)
    • Line 20: warning: don't use underscores in Go names; const idx_options should be idxOptions (golint)
    • Line 21: warning: don't use underscores in Go names; const idx_dump should be idxDump (golint)
    • Line 22: warning: don't use underscores in Go names; const idx_pass should be idxPass (golint)
    • linux-inspect/df/df.go
    • Line 95: warning: don't use underscores in Go names; const command_output_row_idx_file_system should be commandOutputRowIdxFileSystem (golint)
    • Line 96: warning: don't use underscores in Go names; const command_output_row_idx_mounted_on should be commandOutputRowIdxMountedOn (golint)
    • Line 97: warning: don't use underscores in Go names; const command_output_row_idx_file_system_type should be commandOutputRowIdxFileSystemType (golint)
    • Line 98: warning: don't use underscores in Go names; const command_output_row_idx_file should be commandOutputRowIdxFile (golint)
    • Line 99: warning: don't use underscores in Go names; const command_output_row_idx_inodes should be commandOutputRowIdxInodes (golint)
    • Line 100: warning: don't use underscores in Go names; const command_output_row_idx_ifree should be commandOutputRowIdxIfree (golint)
    • Line 101: warning: don't use underscores in Go names; const command_output_row_idx_iused should be commandOutputRowIdxIused (golint)
    • Line 102: warning: don't use underscores in Go names; const command_output_row_idx_iused_percent should be commandOutputRowIdxIusedPercent (golint)
    • Line 103: warning: don't use underscores in Go names; const command_output_row_idx_total_blocks should be commandOutputRowIdxTotalBlocks (golint)
    • Line 104: warning: don't use underscores in Go names; const command_output_row_idx_available_blocks should be commandOutputRowIdxAvailableBlocks (golint)
    • Line 105: warning: don't use underscores in Go names; const command_output_row_idx_used_blocks should be commandOutputRowIdxUsedBlocks (golint)
    • Line 106: warning: don't use underscores in Go names; const command_output_row_idx_used_blocks_percentage should be commandOutputRowIdxUsedBlocksPercentage (golint)
    • linux-inspect/proc/diskstats.go
    • Line 16: warning: don't use underscores in Go names; const diskstats_idx_major_number should be diskstatsIdxMajorNumber (golint)
    • Line 17: warning: don't use underscores in Go names; const diskstats_idx_minor_number should be diskstatsIdxMinorNumber (golint)
    • Line 18: warning: don't use underscores in Go names; const diskstats_idx_device_name should be diskstatsIdxDeviceName (golint)
    • Line 20: warning: don't use underscores in Go names; const diskstats_idx_reads_completed should be diskstatsIdxReadsCompleted (golint)
    • Line 21: warning: don't use underscores in Go names; const diskstats_idx_reads_merged should be diskstatsIdxReadsMerged (golint)
    • Line 22: warning: don't use underscores in Go names; const diskstats_idx_sectors_read should be diskstatsIdxSectorsRead (golint)
    • Line 23: warning: don't use underscores in Go names; const diskstats_idx_time_spent_on_reading_ms should be diskstatsIdxTimeSpentOnReadingMs (golint)
    • Line 25: warning: don't use underscores in Go names; const diskstats_idx_writes_completed should be diskstatsIdxWritesCompleted (golint)
    • Line 26: warning: don't use underscores in Go names; const diskstats_idx_writes_merged should be diskstatsIdxWritesMerged (golint)
    • Line 27: warning: don't use underscores in Go names; const diskstats_idx_sectors_written should be diskstatsIdxSectorsWritten (golint)
    • Line 28: warning: don't use underscores in Go names; const diskstats_idx_time_spent_on_writing_ms should be diskstatsIdxTimeSpentOnWritingMs (golint)
    • Line 30: warning: don't use underscores in Go names; const diskstats_idx_ios_in_progress should be diskstatsIdxIosInProgress (golint)
    • Line 31: warning: don't use underscores in Go names; const diskstats_idx_time_spent_on_ios_ms should be diskstatsIdxTimeSpentOnIosMs (golint)
    • Line 32: warning: don't use underscores in Go names; const diskstats_idx_weighted_time_spent_on_ios_ms should be diskstatsIdxWeightedTimeSpentOnIosMs (golint)
    • linux-inspect/pkg/timeutil/timeutil.go
    • Line 11: warning: exported function NowPST should have comment or be unexported (golint)
    • Line 19: warning: exported function HumanizeDurationMs should have comment or be unexported (golint)
    • Line 27: warning: exported function HumanizeDurationSecond should have comment or be unexported (golint)
    • linux-inspect/pkg/fileutil/fileutil.go
    • Line 6: warning: exported function OpenToRead should have comment or be unexported (golint)
    • Line 14: warning: exported function OpenToAppend should have comment or be unexported (golint)
    • Line 22: warning: exported function OpenToOverwrite should have comment or be unexported (golint)
    • Line 30: warning: exported function ToFile should have comment or be unexported (golint)

gocyclo83%

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.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


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!