Preparing report...

Report for github.com/assetto-corsa-web/acweb

A    Great!    Found 37 issues across 41 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo97%

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.


golint12%

Golint is a linter for Go source code.

    • acweb/config/model.go
    • Line 3: warning: exported type Track should have comment or be unexported (golint)
    • Line 10: warning: exported type Car should have comment or be unexported (golint)
    • acweb/instance/delete_logfile.go
    • Line 13: warning: exported function DeleteLogFile should have comment or be unexported (golint)
    • Line 22: warning: exported function DeleteAllLogFiles should have comment or be unexported (golint)
    • acweb/util/date.go
    • Line 8: warning: don't use underscores in Go names; const date_format should be dateFormat (golint)
    • Line 11: warning: exported function ParseMySQLTimestamp should have comment or be unexported (golint)
    • acweb/session/mem_provider.go
    • Line 18: warning: comment on exported function NewMemProvider should be of the form "NewMemProvider ..." (golint)
    • Line 26: warning: comment on exported method MemProvider.Init should be of the form "Init ..." (golint)
    • Line 92: warning: comment on exported method MemProvider.Destroy should be of the form "Destroy ..." (golint)
    • Line 111: warning: comment on exported method MemProvider.GC should be of the form "GC ..." (golint)
    • acweb/tools/extractor.go
    • Line 20: warning: exported type Track should have comment or be unexported (golint)
    • Line 27: warning: exported type UITrack should have comment or be unexported (golint)
    • Line 31: warning: exported type Car should have comment or be unexported (golint)
    • Line 38: warning: don't use underscores in Go names; var ac_dir should be acDir (golint)
    • acweb/model/user.go
    • Line 9: warning: don't use underscores in Go names; const mysql_user_save should be mysqlUserSave (golint)
    • Line 10: warning: don't use underscores in Go names; const mysql_user_update should be mysqlUserUpdate (golint)
    • Line 11: warning: don't use underscores in Go names; const mysql_user_delete should be mysqlUserDelete (golint)
    • Line 12: warning: don't use underscores in Go names; const mysql_user_get_login_email_pwd should be mysqlUserGetLoginEmailPwd (golint)
    • Line 13: warning: don't use underscores in Go names; const mysql_user_get_id should be mysqlUserGetID (golint)
    • Line 14: warning: don't use underscores in Go names; const mysql_find_user_login_email should be mysqlFindUserLoginEmail (golint)
    • Line 15: warning: don't use underscores in Go names; const mysql_user_get_all should be mysqlUserGetAll (golint)
    • Line 17: warning: don't use underscores in Go names; const postgres_user_save should be postgresUserSave (golint)
    • Line 18: warning: don't use underscores in Go names; const postgres_user_update should be postgresUserUpdate (golint)
    • Line 19: warning: don't use underscores in Go names; const postgres_user_delete should be postgresUserDelete (golint)
    • Line 20: warning: don't use underscores in Go names; const postgres_user_get_login_email_pwd should be postgresUserGetLoginEmailPwd (golint)
    • Line 21: warning: don't use underscores in Go names; const postgres_user_get_id should be postgresUserGetID (golint)
    • Line 22: warning: don't use underscores in Go names; const postgres_find_user_login_email should be postgresFindUserLoginEmail (golint)
    • Line 23: warning: don't use underscores in Go names; const postgres_user_get_all should be postgresUserGetAll (golint)
    • Line 26: warning: exported type User should have comment or be unexported (golint)
    • Line 35: warning: exported method User.Save should have comment or be unexported (golint)
    • Line 82: warning: exported method User.Remove should have comment or be unexported (golint)
    • Line 98: warning: exported function GetUserByLoginOrEmailAndPassword should have comment or be unexported (golint)
    • Line 114: warning: exported function GetUserById should have comment or be unexported (golint)
    • Line 130: warning: exported function FindUserByLoginOrEmail should have comment or be unexported (golint)
    • Line 146: warning: exported function GetAllUser should have comment or be unexported (golint)
    • acweb/util/md5.go
    • Line 9: warning: comment on exported function Md5base64 should be of the form "Md5base64 ..." (golint)
    • acweb/util/err.go
    • Line 3: warning: comment on exported type OpError should be of the form "OpError ..." (with optional leading article) (golint)
    • acweb/model/configuraton_sql.go
    • Line 4: warning: don't use underscores in Go names; const mysql_configuration_save should be mysqlConfigurationSave (golint)
    • Line 141: warning: don't use underscores in Go names; const mysql_configuration_update should be mysqlConfigurationUpdate (golint)
    • Line 210: warning: don't use underscores in Go names; const mysql_weather_save should be mysqlWeatherSave (golint)
    • Line 221: warning: don't use underscores in Go names; const mysql_weather_update should be mysqlWeatherUpdate (golint)
    • Line 231: warning: don't use underscores in Go names; const mysql_cars_save should be mysqlCarsSave (golint)
    • Line 243: warning: don't use underscores in Go names; const mysql_cars_update should be mysqlCarsUpdate (golint)
    • Line 253: warning: don't use underscores in Go names; const mysql_weather_delete_configuration should be mysqlWeatherDeleteConfiguration (golint)
    • Line 254: warning: don't use underscores in Go names; const mysql_cars_delete_configuration should be mysqlCarsDeleteConfiguration (golint)
    • Line 255: warning: don't use underscores in Go names; const mysql_configuration_delete should be mysqlConfigurationDelete (golint)
    • Line 256: warning: don't use underscores in Go names; const mysql_weather_delete should be mysqlWeatherDelete (golint)
    • Line 257: warning: don't use underscores in Go names; const mysql_cars_delete should be mysqlCarsDelete (golint)
    • Line 258: warning: don't use underscores in Go names; const mysql_weather_get_configuration should be mysqlWeatherGetConfiguration (golint)
    • Line 259: warning: don't use underscores in Go names; const mysql_cars_get_configuration should be mysqlCarsGetConfiguration (golint)
    • Line 260: warning: don't use underscores in Go names; const mysql_configuration_get_all should be mysqlConfigurationGetAll (golint)
    • Line 261: warning: don't use underscores in Go names; const mysql_configuration_get_id should be mysqlConfigurationGetID (golint)
    • Line 263: warning: don't use underscores in Go names; const postgres_configuration_save should be postgresConfigurationSave (golint)
    • Line 400: warning: don't use underscores in Go names; const postgres_configuration_update should be postgresConfigurationUpdate (golint)
    • Line 469: warning: don't use underscores in Go names; const postgres_weather_save should be postgresWeatherSave (golint)
    • Line 480: warning: don't use underscores in Go names; const postgres_weather_update should be postgresWeatherUpdate (golint)
    • Line 490: warning: don't use underscores in Go names; const postgres_cars_save should be postgresCarsSave (golint)
    • Line 502: warning: don't use underscores in Go names; const postgres_cars_update should be postgresCarsUpdate (golint)
    • Line 512: warning: don't use underscores in Go names; const postgres_weather_delete_configuration should be postgresWeatherDeleteConfiguration (golint)
    • Line 513: warning: don't use underscores in Go names; const postgres_cars_delete_configuration should be postgresCarsDeleteConfiguration (golint)
    • Line 514: warning: don't use underscores in Go names; const postgres_configuration_delete should be postgresConfigurationDelete (golint)
    • Line 515: warning: don't use underscores in Go names; const postgres_weather_delete should be postgresWeatherDelete (golint)
    • Line 516: warning: don't use underscores in Go names; const postgres_cars_delete should be postgresCarsDelete (golint)
    • Line 517: warning: don't use underscores in Go names; const postgres_weather_get_configuration should be postgresWeatherGetConfiguration (golint)
    • Line 518: warning: don't use underscores in Go names; const postgres_cars_get_configuration should be postgresCarsGetConfiguration (golint)
    • Line 519: warning: don't use underscores in Go names; const postgres_configuration_get_all should be postgresConfigurationGetAll (golint)
    • Line 520: warning: don't use underscores in Go names; const postgres_configuration_get_id should be postgresConfigurationGetID (golint)
    • acweb/session/middleware.go
    • Line 7: warning: comment on exported type RedirectFunc should be of the form "RedirectFunc ..." (with optional leading article) (golint)
    • Line 11: warning: comment on exported type HandlerFunc should be of the form "HandlerFunc ..." (with optional leading article) (golint)
    • Line 14: warning: comment on exported function AccessMiddleware should be of the form "AccessMiddleware ..." (golint)
    • acweb/instance/config.go
    • Line 16: warning: exported const ServerIni should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported function GetConfigPath should have comment or be unexported (golint)
    • Line 25: warning: exported function GetServerCfgPath should have comment or be unexported (golint)
    • Line 29: warning: exported function GetEntryListPath should have comment or be unexported (golint)
    • Line 61: warning: exported function ServerConfigToIniString should have comment or be unexported (golint)
    • Line 193: warning: exported function EntryListToIniString should have comment or be unexported (golint)
    • acweb/instance/get.go
    • Line 15: warning: don't use underscores in Go names; const max_log_size should be maxLogSize (golint)
    • Line 18: warning: exported function GetAllInstanceLogs should have comment or be unexported (golint)
    • Line 46: warning: exported function GetInstanceLog should have comment or be unexported (golint)
    • acweb/user/get.go
    • Line 10: warning: exported function GetAllUser should have comment or be unexported (golint)
    • Line 21: warning: exported function GetUser should have comment or be unexported (golint)
    • acweb/util/row_scanner.go
    • Line 3: warning: comment on exported type RowScanner should be of the form "RowScanner ..." (with optional leading article) (golint)
    • acweb/resp/resp.go
    • Line 10: warning: exported const SUCCESS should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: comment on exported var Log should be of the form "Log ..." (golint)
    • Line 20: warning: comment on exported var SuccessHttpCode should be of the form "SuccessHttpCode ..." (golint)
    • Line 23: warning: exported var FailureHttpCode should have comment or be unexported (golint)
    • Line 27: warning: comment on exported type Resp should be of the form "Resp ..." (with optional leading article) (golint)
    • Line 45: warning: comment on exported function Success should be of the form "Success ..." (golint)
    • Line 51: warning: comment on exported function Failure should be of the form "Failure ..." (golint)
    • Line 61: warning: comment on exported function Error should be of the form "Error ..." (golint)
    • acweb/instance/mgn.go
    • Line 23: warning: exported function GetAllInstances should have comment or be unexported (golint)
    • Line 27: warning: exported function StartInstance should have comment or be unexported (golint)
    • Line 149: warning: exported function StopInstance should have comment or be unexported (golint)
    • acweb/util/sha256.go
    • Line 9: warning: comment on exported function Sha256base64 should be of the form "Sha256base64 ..." (golint)
    • acweb/api/api.go
    • Line 19: warning: exported function UserHandler should have comment or be unexported (golint)
    • Line 33: warning: exported function SettingsHandler should have comment or be unexported (golint)
    • Line 41: warning: exported function ConfigurationHandler should have comment or be unexported (golint)
    • Line 60: warning: exported function InstanceHandler should have comment or be unexported (golint)
    • Line 70: warning: exported function InstanceLogHandler should have comment or be unexported (golint)
    • Line 87: warning: exported function CheckSession should have comment or be unexported (golint)
    • Line 110: warning: exported function Login should have comment or be unexported (golint)
    • Line 152: warning: exported function Logout should have comment or be unexported (golint)
    • Line 170: warning: exported function AddEditUser should have comment or be unexported (golint)
    • Line 205: warning: exported function RemoveUser should have comment or be unexported (golint)
    • Line 227: warning: exported function GetAllUser should have comment or be unexported (golint)
    • Line 244: warning: exported function GetUser should have comment or be unexported (golint)
    • Line 266: warning: exported function SaveSettings should have comment or be unexported (golint)
    • Line 291: warning: exported function GetSettings should have comment or be unexported (golint)
    • Line 297: warning: exported function AddEditConfiguration should have comment or be unexported (golint)
    • Line 318: warning: exported function RemoveConfiguration should have comment or be unexported (golint)
    • Line 340: warning: exported function GetAllConfigurations should have comment or be unexported (golint)
    • Line 351: warning: exported function GetConfiguration should have comment or be unexported (golint)
    • Line 427: warning: exported function GetAvailableTracks should have comment or be unexported (golint)
    • Line 438: warning: exported function GetAvailableCars should have comment or be unexported (golint)
    • Line 449: warning: exported function StartInstance should have comment or be unexported (golint)
    • Line 475: warning: exported function StopInstance should have comment or be unexported (golint)
    • Line 497: warning: exported function GetAllInstances should have comment or be unexported (golint)
    • Line 503: warning: exported function GetAllInstanceLogs should have comment or be unexported (golint)
    • Line 513: warning: exported function GetInstanceLog should have comment or be unexported (golint)
    • acweb/model/configuration.go
    • Line 9: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 84: warning: exported type Weather should have comment or be unexported (golint)
    • Line 98: warning: exported type Car should have comment or be unexported (golint)
    • Line 113: warning: comment on exported method Configuration.Join should be of the form "Join ..." (golint)
    • Line 133: warning: exported method Configuration.Save should have comment or be unexported (golint)
    • Line 361: warning: exported method Configuration.Remove should have comment or be unexported (golint)
    • Line 419: warning: exported method Weather.Remove should have comment or be unexported (golint)
    • Line 431: warning: exported method Car.Remove should have comment or be unexported (golint)
    • Line 443: warning: exported function GetWeatherByConfiguration should have comment or be unexported (golint)
    • Line 459: warning: exported function GetCarsByConfiguration should have comment or be unexported (golint)
    • Line 475: warning: exported function GetAllConfigurations should have comment or be unexported (golint)
    • Line 491: warning: exported function GetConfigurationById should have comment or be unexported (golint)
    • acweb/main.go
    • Line 19: warning: don't use underscores in Go names; const static_dir should be staticDir (golint)
    • Line 20: warning: don't use underscores in Go names; const static_dir_prefix should be staticDirPrefix (golint)
    • Line 21: warning: don't use underscores in Go names; const build_js should be buildJs (golint)
    • Line 22: warning: don't use underscores in Go names; const build_js_prefix should be buildJsPrefix (golint)
    • Line 23: warning: don't use underscores in Go names; const index_file should be indexFile (golint)
    • Line 24: warning: don't use underscores in Go names; const root_dir_prefix should be rootDirPrefix (golint)
    • Line 25: warning: don't use underscores in Go names; const robots_txt should be robotsTxt (golint)
    • Line 27: warning: don't use underscores in Go names; const session_cookie_name should be sessionCookieName (golint)
    • Line 28: warning: don't use underscores in Go names; const session_cookie_lifetime should be sessionCookieLifetime (golint)
    • acweb/session/manager.go
    • Line 23: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 45: warning: comment on exported function NewSession should be of the form "NewSession ..." (golint)
    • Line 79: warning: comment on exported function GetSession should be of the form "GetSession ..." (golint)
    • Line 102: warning: comment on exported function GetCurrentSession should be of the form "GetCurrentSession ..." (golint)
    • acweb/session/provider.go
    • Line 7: warning: comment on exported type Provider should be of the form "Provider ..." (with optional leading article) (golint)
    • acweb/session/session.go
    • Line 21: warning: comment on exported method Session.Save should be of the form "Save ..." (golint)
    • Line 31: warning: comment on exported method Session.Destroy should be of the form "Destroy ..." (golint)
    • Line 45: warning: comment on exported method Session.Renew should be of the form "Renew ..." (golint)
    • Line 51: warning: comment on exported method Session.Token should be of the form "Token ..." (golint)
    • Line 56: warning: comment on exported method Session.Active should be of the form "Active ..." (golint)
    • Line 61: warning: comment on exported method Session.Get should be of the form "Get ..." (golint)
    • Line 96: warning: comment on exported method Session.Set should be of the form "Set ..." (golint)
    • Line 108: warning: comment on exported method Session.Remove should be of the form "Remove ..." (golint)
    • acweb/config/get.go
    • Line 16: warning: don't use underscores in Go names; const track_file should be trackFile (golint)
    • Line 17: warning: don't use underscores in Go names; const car_file should be carFile (golint)
    • Line 20: warning: exported function GetAllConfigurations should have comment or be unexported (golint)
    • Line 31: warning: exported function GetConfiguration should have comment or be unexported (golint)
    • Line 47: warning: exported function GetAvailableTracks should have comment or be unexported (golint)
    • Line 64: warning: exported function GetAvailableCars should have comment or be unexported (golint)
    • acweb/model/db.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 14: warning: don't use underscores in Go names; const default_db_type should be defaultDbType (golint)
    • Line 15: warning: don't use underscores in Go names; const connect_timeout should be connectTimeout (golint)
    • Line 22: warning: comment on exported function Connect should be of the form "Connect ..." (golint)
    • Line 76: warning: comment on exported function Get should be of the form "Get ..." (golint)
    • Line 81: warning: comment on exported function GetDBType should be of the form "GetDBType ..." (golint)
    • acweb/model/settings.go
    • Line 4: warning: don't use underscores in Go names; const mysql_settings_save should be mysqlSettingsSave (golint)
    • Line 5: warning: don't use underscores in Go names; const mysql_settings_update should be mysqlSettingsUpdate (golint)
    • Line 6: warning: don't use underscores in Go names; const mysql_settings_get should be mysqlSettingsGet (golint)
    • Line 8: warning: don't use underscores in Go names; const postgres_settings_save should be postgresSettingsSave (golint)
    • Line 9: warning: don't use underscores in Go names; const postgres_settings_update should be postgresSettingsUpdate (golint)
    • Line 10: warning: don't use underscores in Go names; const postgres_settings_get should be postgresSettingsGet (golint)
    • Line 13: warning: exported type Settings should have comment or be unexported (golint)
    • Line 20: warning: exported method Settings.Save should have comment or be unexported (golint)
    • Line 64: warning: exported function GetSettings should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words