Preparing report...

Report for github.com/libragen/felix

A+    Excellent!    Found 72 issues across 125 files

Tweet

gofmt96%

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!


gocyclo96%

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.

    • felix/util/html2md.go
    • Line 216: warning: cyclomatic complexity 53 of function walk() is high (> 15) (gocyclo)
    • Line 70: warning: cyclomatic complexity 27 of function table() is high (> 15) (gocyclo)

golint45%

Golint is a linter for Go source code.

    • felix/flx/stats.go
    • Line 16: warning: exported type FSInfo should have comment or be unexported (golint)
    • Line 22: warning: exported type NetIntfInfo should have comment or be unexported (golint)
    • Line 42: warning: exported type CPUInfo should have comment or be unexported (golint)
    • Line 54: warning: exported type Stats should have comment or be unexported (golint)
    • Line 401: warning: exported function ShowHardwareInfo should have comment or be unexported (golint)
    • Line 409: warning: exported function FetchHardwareInfo should have comment or be unexported (golint)
    • felix/model/m_task.go
    • Line 8: warning: exported type Task should have comment or be unexported (golint)
    • Line 16: warning: exported const TimeLayout should have comment or be unexported (golint)
    • Line 18: warning: exported function TaskAdd should have comment or be unexported (golint)
    • Line 33: warning: exported function TaskAll should have comment or be unexported (golint)
    • Line 43: warning: exported function TaskRm should have comment or be unexported (golint)
    • Line 49: warning: exported function TaskUpdate should have comment or be unexported (golint)
    • felix/model/m_wslog_hook.go
    • Line 12: warning: exported type WslogHook should have comment or be unexported (golint)
    • Line 20: warning: exported method WslogHook.Create should have comment or be unexported (golint)
    • Line 33: warning: comment on exported method WslogHook.Update should be of the form "Update ..." (golint)
    • Line 42: warning: exported method WslogHook.All should have comment or be unexported (golint)
    • Line 47: warning: exported method WslogHook.Delete should have comment or be unexported (golint)
    • Line 53: warning: exported method WslogHook.One should have comment or be unexported (golint)
    • Line 68: warning: exported function WslogHookCheckToken should have comment or be unexported (golint)
    • felix/util/ssh_shell_conn.go
    • Line 45: warning: comment on exported type SshConn should be of the form "SshConn ..." (with optional leading article) (golint)
    • Line 66: warning: comment on exported function NewSshConn should be of the form "NewSshConn ..." (golint)
    • Line 104: warning: exported method SshConn.Close should have comment or be unexported (golint)
    • Line 112: warning: receiver name ssConn should be consistent with previous receiver name s for SshConn (golint)
    • Line 156: warning: exported method SshConn.SendComboOutput should have comment or be unexported (golint)
    • Line 156: warning: receiver name ssConn should be consistent with previous receiver name s for SshConn (golint)
    • Line 178: warning: exported method SshConn.SessionWait should have comment or be unexported (golint)
    • Line 178: warning: receiver name ssConn should be consistent with previous receiver name s for SshConn (golint)
    • felix/ginbro/resouce.go
    • Line 9: warning: exported type Property should have comment or be unexported (golint)
    • Line 24: warning: exported type Resource should have comment or be unexported (golint)
    • felix/ssh2ws/internal/h_comment.go
    • Line 10: warning: exported function CommentAll should have comment or be unexported (golint)
    • Line 23: warning: exported function CommentCreate should have comment or be unexported (golint)
    • Line 46: warning: exported function CommentAction should have comment or be unexported (golint)
    • Line 64: warning: exported function CommentDelete should have comment or be unexported (golint)
    • felix/ssh2ws/internal/h_ginbro.go
    • Line 19: warning: exported function GinbroAll should have comment or be unexported (golint)
    • Line 32: warning: exported function GinbroGen should have comment or be unexported (golint)
    • Line 53: warning: exported function GinbroDb should have comment or be unexported (golint)
    • Line 66: warning: exported function GinbroDownload should have comment or be unexported (golint)
    • Line 129: warning: exported function GinbroModel should have comment or be unexported (golint)
    • felix/ssh2ws/internal/h_wslog_hook.go
    • Line 9: warning: exported function WslogHookCreate should have comment or be unexported (golint)
    • Line 27: warning: exported function WslogHookAll should have comment or be unexported (golint)
    • Line 41: warning: exported function WslogHookDelete should have comment or be unexported (golint)
    • Line 54: warning: exported function WslogHookUpdate should have comment or be unexported (golint)
    • Line 67: warning: exported function WsLogHookApi should have comment or be unexported (golint)
    • felix/model/j_slack_msg.go
    • Line 8: warning: exported type SlackMsg should have comment or be unexported (golint)
    • Line 29: warning: exported method SlackMsg.Value should have comment or be unexported (golint)
    • Line 34: warning: exported method SlackMsg.Scan should have comment or be unexported (golint)
    • felix/model/l_ssh_ws_session.go
    • Line 49: warning: exported type LogicSshWsSession should have comment or be unexported (golint)
    • Line 60: warning: exported function NewLogicSshWsSession should have comment or be unexported (golint)
    • Line 115: warning: exported method LogicSshWsSession.Start should have comment or be unexported (golint)
    • Line 203: warning: exported method LogicSshWsSession.Wait should have comment or be unexported (golint)
    • Line 210: warning: exported method LogicSshWsSession.LogString should have comment or be unexported (golint)
    • felix/model/db.go
    • Line 11: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 28: warning: exported function CreateSQLiteDb should have comment or be unexported (golint)
    • Line 43: warning: exported function FlushSqliteDb should have comment or be unexported (golint)
    • felix/model/m_machine.go
    • Line 9: warning: comment on exported type Machine should be of the form "Machine ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported function MachineAdd should be of the form "MachineAdd ..." (golint)
    • Line 28: warning: exported function MachineAll should have comment or be unexported (golint)
    • Line 38: warning: exported function MachineFind should have comment or be unexported (golint)
    • Line 44: warning: exported function MachineDelete should have comment or be unexported (golint)
    • Line 49: warning: exported function MachineDeleteAll should have comment or be unexported (golint)
    • Line 54: warning: exported function MachineUpdate should have comment or be unexported (golint)
    • Line 61: warning: exported function MachineDuplicate should have comment or be unexported (golint)
    • Line 73: warning: exported method Machine.One should have comment or be unexported (golint)
    • Line 91: warning: comment on exported method Machine.Create should be of the form "Create ..." (golint)
    • Line 105: warning: exported method Machine.ChangeUpdateTime should have comment or be unexported (golint)
    • felix/fssh/server.go
    • Line 19: warning: exported function LoadOrCreateKey should have comment or be unexported (golint)
    • Line 27: warning: exported function Run should have comment or be unexported (golint)
    • felix/ssh2ws/internal/h_user.go
    • Line 8: warning: exported function UserAll should have comment or be unexported (golint)
    • Line 22: warning: exported function RegisterCommenter should have comment or be unexported (golint)
    • Line 35: warning: exported function UserUpdate should have comment or be unexported (golint)
    • Line 48: warning: exported function UserDelete should have comment or be unexported (golint)
    • felix/model/j_array_uint.go
    • Line 9: warning: exported type JsonArrayUint should have comment or be unexported (golint)
    • Line 11: warning: exported method JsonArrayUint.Value should have comment or be unexported (golint)
    • Line 16: warning: exported method JsonArrayUint.Scan should have comment or be unexported (golint)
    • Line 28: warning: exported method JsonArrayUint.MarshalJSONArrayUint should have comment or be unexported (golint)
    • Line 28: warning: receiver name m should be consistent with previous receiver name o for JsonArrayUint (golint)
    • Line 32: warning: exported method JsonArrayUint.UnmarshalJSONArrayUint should have comment or be unexported (golint)
    • Line 32: warning: receiver name m should be consistent with previous receiver name o for JsonArrayUint (golint)
    • Line 35: warning: exported method JsonArrayUint.IsNull should have comment or be unexported (golint)
    • Line 35: warning: receiver name j should be consistent with previous receiver name o for JsonArrayUint (golint)
    • Line 39: warning: exported method JsonArrayUint.Equals should have comment or be unexported (golint)
    • Line 39: warning: receiver name j should be consistent with previous receiver name o for JsonArrayUint (golint)
    • Line 53: warning: exported method JsonArrayUint.AppendOrRemove should have comment or be unexported (golint)
    • Line 53: warning: receiver name j should be consistent with previous receiver name o for JsonArrayUint (golint)
    • felix/util/ssh.go
    • Line 22: warning: exported function SshRemoteRunCommand should have comment or be unexported (golint)
    • Line 38: warning: exported function NewSshClientConfig should have comment or be unexported (golint)
    • felix/ginbro/schema_sqlite.go
    • Line 27: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • felix/spiderhn/hacknews.go
    • Line 70: warning: exported function SpiderHackNews should have comment or be unexported (golint)
    • Line 94: warning: exported function ParsemarkdownHacknews should have comment or be unexported (golint)
    • Line 134: warning: exported function SpiderHackShows should have comment or be unexported (golint)
    • felix/flx/ternimal.go
    • Line 17: warning: exported type SSHTerminal should have comment or be unexported (golint)
    • Line 28: warning: exported function RunSshTerminal should have comment or be unexported (golint)
    • felix/model/m_ginbro.go
    • Line 3: warning: exported type Ginbro should have comment or be unexported (golint)
    • Line 20: warning: comment on exported method Ginbro.Create should be of the form "Create ..." (golint)
    • Line 26: warning: comment on exported method Ginbro.All should be of the form "All ..." (golint)
    • felix/ssh2ws/internal/h_hacknew.go
    • Line 8: warning: exported function HackNewAll should have comment or be unexported (golint)
    • Line 21: warning: exported function HackNewUpdate should have comment or be unexported (golint)
    • Line 33: warning: exported function HackNewRm should have comment or be unexported (golint)
    • felix/ssh2ws/internal/h_login.go
    • Line 9: warning: exported function LoginAdmin should have comment or be unexported (golint)
    • Line 23: warning: exported function LoginCommenter should have comment or be unexported (golint)
    • Line 37: warning: exported function Meta should have comment or be unexported (golint)
    • felix/util/crypt_des.go
    • Line 10: warning: exported function ZeroPadding should have comment or be unexported (golint)
    • Line 16: warning: exported function ZeroUnPadding should have comment or be unexported (golint)
    • Line 23: warning: exported function DesEncrypt should have comment or be unexported (golint)
    • Line 43: warning: exported function DesDecrypt should have comment or be unexported (golint)
    • felix/model/m_hacknews.go
    • Line 20: warning: exported type HackNewQ should have comment or be unexported (golint)
    • Line 25: warning: exported method HackNewQ.SearchAll should have comment or be unexported (golint)
    • Line 41: warning: exported type HackNew should have comment or be unexported (golint)
    • Line 49: warning: comment on exported method HackNew.Delete should be of the form "Delete ..." (golint)
    • Line 66: warning: exported method HackNew.CreateOrUpdate should have comment or be unexported (golint)
    • Line 88: warning: exported method HackNew.TodayRowBy should have comment or be unexported (golint)
    • Line 100: warning: exported function TranslateCh2En should have comment or be unexported (golint)
    • Line 112: warning: exported function TranslateEn2Ch should have comment or be unexported (golint)
    • felix/model/m_users.go
    • Line 14: warning: comment on exported type User should be of the form "User ..." (with optional leading article) (golint)
    • Line 32: warning: exported method User.AfterFind should have comment or be unexported (golint)
    • Line 38: warning: comment on exported method User.One should be of the form "One ..." (golint)
    • Line 43: warning: comment on exported method User.All should be of the form "All ..." (golint)
    • Line 50: warning: comment on exported method User.Update should be of the form "Update ..." (golint)
    • Line 56: warning: comment on exported method User.CreateUserOfRole should be of the form "CreateUserOfRole ..." (golint)
    • Line 64: warning: comment on exported method User.Delete should be of the form "Delete ..." (golint)
    • Line 72: warning: comment on exported method User.Login should be of the form "Login ..." (golint)
    • Line 106: warning: exported function CreateGodUser should have comment or be unexported (golint)
    • felix/model/m_wslog_msg.go
    • Line 3: warning: exported type WslogMsg should have comment or be unexported (golint)
    • Line 11: warning: exported method WslogMsg.Create should have comment or be unexported (golint)
    • Line 16: warning: comment on exported method WslogMsg.Update should be of the form "Update ..." (golint)
    • Line 21: warning: exported method WslogMsg.All should have comment or be unexported (golint)
    • Line 27: warning: exported method WslogMsg.Delete should have comment or be unexported (golint)
    • Line 34: warning: exported method WslogMsg.Truncate should have comment or be unexported (golint)
    • felix/wslog/hub.go
    • Line 21: warning: exported function NewHub should have comment or be unexported (golint)
    • Line 30: warning: exported method Hub.Run should have comment or be unexported (golint)
    • Line 53: warning: exported method Hub.AddMsg should have comment or be unexported (golint)
    • felix/fssh/token.go
    • Line 18: warning: exported function TokenGenerate should have comment or be unexported (golint)
    • Line 32: warning: exported function TokenToSession should have comment or be unexported (golint)
    • felix/cronjob/core.go
    • Line 16: warning: comment on exported function ChangeLoc should be of the form "ChangeLoc ..." (golint)
    • Line 21: warning: comment on exported const MAXJOBNUM should be of the form "MAXJOBNUM ..." (golint)
    • Line 24: warning: exported type Job should have comment or be unexported (golint)
    • Line 52: warning: comment on exported function NewJob should be of the form "NewJob ..." (golint)
    • Line 93: warning: comment on exported method Job.Do should be of the form "Do ..." (golint)
    • Line 133: warning: comment on exported method Job.At should be of the form "At ..." (golint)
    • Line 210: warning: comment on exported method Job.Second should be of the form "Second ..." (golint)
    • Line 219: warning: comment on exported method Job.Seconds should be of the form "Seconds ..." (golint)
    • Line 225: warning: comment on exported method Job.Minute should be of the form "Minute ..." (golint)
    • Line 234: warning: comment on exported method Job.Minutes should be of the form "Minutes ..." (golint)
    • Line 240: warning: comment on exported method Job.Hour should be of the form "Hour ..." (golint)
    • Line 249: warning: comment on exported method Job.Hours should be of the form "Hours ..." (golint)
    • Line 255: warning: comment on exported method Job.Day should be of the form "Day ..." (golint)
    • Line 264: warning: comment on exported method Job.Days should be of the form "Days ..." (golint)
    • Line 270: warning: comment on exported method Job.Monday should be of the form "Monday ..." (golint)
    • Line 281: warning: comment on exported method Job.Tuesday should be of the form "Tuesday ..." (golint)
    • Line 291: warning: comment on exported method Job.Wednesday should be of the form "Wednesday ..." (golint)
    • Line 301: warning: comment on exported method Job.Thursday should be of the form "Thursday ..." (golint)
    • Line 311: warning: comment on exported method Job.Friday should be of the form "Friday ..." (golint)
    • Line 321: warning: comment on exported method Job.Saturday should be of the form "Saturday ..." (golint)
    • Line 331: warning: comment on exported method Job.Sunday should be of the form "Sunday ..." (golint)
    • Line 341: warning: comment on exported method Job.Weeks should be of the form "Weeks ..." (golint)
    • Line 347: warning: comment on exported type Scheduler should be of the form "Scheduler ..." (with optional leading article) (golint)
    • Line 370: warning: comment on exported function NewScheduler should be of the form "NewScheduler ..." (golint)
    • Line 376: warning: don't use underscores in Go names; method result running_jobs should be runningJobs (golint)
    • Line 393: warning: comment on exported method Scheduler.NextRun should be of the form "NextRun ..." (golint)
    • Line 402: warning: comment on exported method Scheduler.Every should be of the form "Every ..." (golint)
    • Line 410: warning: comment on exported method Scheduler.RunPending should be of the form "RunPending ..." (golint)
    • Line 421: warning: comment on exported method Scheduler.RunAll should be of the form "RunAll ..." (golint)
    • Line 428: warning: comment on exported method Scheduler.RunAllwithDelay should be of the form "RunAllwithDelay ..." (golint)
    • Line 452: warning: comment on exported method Scheduler.Clear should be of the form "Clear ..." (golint)
    • Line 486: warning: comment on exported function Every should be of the form "Every ..." (golint)
    • Line 491: warning: comment on exported function RunPending should be of the form "RunPending ..." (golint)
    • Line 502: warning: comment on exported function RunAll should be of the form "RunAll ..." (golint)
    • Line 507: warning: comment on exported function RunAllwithDelay should be of the form "RunAllwithDelay ..." (golint)
    • Line 516: warning: comment on exported function Start should be of the form "Start ..." (golint)
    • Line 521: warning: comment on exported function Clear should be of the form "Clear ..." (golint)
    • Line 526: warning: comment on exported function Remove should be of the form "Remove ..." (golint)
    • felix/ssh2ws/internal/h_ssh.go
    • Line 9: warning: exported function SshAll should have comment or be unexported (golint)
    • Line 28: warning: exported function SshOne should have comment or be unexported (golint)
    • Line 48: warning: exported function SshCreate should have comment or be unexported (golint)
    • Line 61: warning: exported function SshUpdate should have comment or be unexported (golint)
    • Line 74: warning: exported function SshDelete should have comment or be unexported (golint)
    • felix/model/m_jwt.go
    • Line 12: warning: exported var AppSecret should have comment or be unexported (golint)
    • Line 13: warning: exported var AppIss should have comment or be unexported (golint)
    • Line 14: warning: exported var ExpireTime should have comment or be unexported (golint)
    • Line 58: warning: comment on exported function JwtParseUser should be of the form "JwtParseUser ..." (golint)
    • felix/util/html2md.go
    • Line 385: warning: exported type Option should have comment or be unexported (golint)
    • Line 405: warning: exported function ParseUrlPage should have comment or be unexported (golint)
    • Line 467: warning: exported function ParseUrlPageJianshu should have comment or be unexported (golint)
    • Line 529: warning: exported function ParseUrlPageLibraGen should have comment or be unexported (golint)
    • felix/ginbro/app.go
    • Line 15: warning: exported type GinbroApp should have comment or be unexported (golint)
    • Line 21: warning: exported function Run should have comment or be unexported (golint)
    • Line 45: warning: comment on exported function RunModels should be of the form "RunModels ..." (golint)
    • Line 124: warning: exported method GinbroApp.ListAppFileTree should have comment or be unexported (golint)
    • felix/ginbro/schema_common.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 38: warning: exported function FetchDbColumn should have comment or be unexported (golint)
    • felix/spiderhn/command.go
    • Line 9: warning: exported type Cmd should have comment or be unexported (golint)
    • Line 14: warning: exported function RunCmds should have comment or be unexported (golint)
    • felix/util/crypt_aes.go
    • Line 10: warning: comment on exported function AesEncrypt should be of the form "AesEncrypt ..." (golint)
    • Line 36: warning: exported function AesDecrypt should have comment or be unexported (golint)
    • Line 62: warning: comment on exported function PKCS7Padding should be of the form "PKCS7Padding ..." (golint)
    • Line 69: warning: comment on exported function PKCS7UnPadding should be of the form "PKCS7UnPadding ..." (golint)
    • felix/plugin/plugin_bad_docter.go
    • Line 13: warning: exported type BadNastyDoctor should have comment or be unexported (golint)
    • Line 15: warning: exported method BadNastyDoctor.HealthCheck should have comment or be unexported (golint)
    • Line 28: warning: comment on exported var Doctor should be of the form "Doctor ..." (golint)
    • felix/ssh2ws/internal/h_ssh_log.go
    • Line 8: warning: exported function SshLogAll should have comment or be unexported (golint)
    • Line 21: warning: exported function SshLogUpdate should have comment or be unexported (golint)
    • Line 34: warning: exported function SshLogDelete should have comment or be unexported (golint)
    • felix/model/m_ssh_log.go
    • Line 8: warning: exported type SshLog should have comment or be unexported (golint)
    • Line 22: warning: exported type SshLogQ should have comment or be unexported (golint)
    • Line 29: warning: exported method SshLogQ.Search should have comment or be unexported (golint)
    • Line 42: warning: exported method SshLog.AfterFind should have comment or be unexported (golint)
    • Line 46: warning: comment on exported method SshLog.One should be of the form "One ..." (golint)
    • Line 51: warning: comment on exported method SshLog.All should be of the form "All ..." (golint)
    • Line 59: warning: comment on exported method SshLog.Update should be of the form "Update ..." (golint)
    • Line 67: warning: comment on exported method SshLog.Create should be of the form "Create ..." (golint)
    • Line 73: warning: comment on exported method SshLog.Delete should be of the form "Delete ..." (golint)
    • felix/model/m_comment.go
    • Line 8: warning: exported type CommentQ should have comment or be unexported (golint)
    • Line 13: warning: exported method CommentQ.SearchAll should have comment or be unexported (golint)
    • Line 27: warning: exported type Comment should have comment or be unexported (golint)
    • Line 40: warning: exported method Comment.AfterFind should have comment or be unexported (golint)
    • Line 44: warning: comment on exported method Comment.One should be of the form "One ..." (golint)
    • Line 49: warning: exported method Comment.Action should have comment or be unexported (golint)
    • Line 73: warning: comment on exported method Comment.Create should be of the form "Create ..." (golint)
    • Line 82: warning: comment on exported method Comment.Delete should be of the form "Delete ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!