Preparing report...

Report for github.com/lemoony/snipkit

(v0.0.0-20220111171639-a27b8384025e)

A+    Excellent!    Found 36 issues across 81 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!


gocyclo100%

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.

No problems detected. Good job!


golint55%

Golint is a linter for Go source code.

    • internal/app/app.go
    • Line 14: warning: exported var ErrNoSnippetsAvailable should have comment or be unexported (golint)
    • Line 16: warning: exported type App should have comment or be unexported (golint)
    • Line 63: warning: exported function NewApp should have comment or be unexported (golint)
    • internal/utils/system/errors.go
    • Line 9: warning: exported type ErrFileSystem should have comment or be unexported (golint)
    • Line 15: warning: exported function NewErrFileSystem should have comment or be unexported (golint)
    • Line 23: warning: exported method ErrFileSystem.Is should have comment or be unexported (golint)
    • internal/providers/snippetslab/urls.go
    • Line 59: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 73: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • internal/providers/fslibrary/provider.go
    • Line 28: warning: exported type Provider should have comment or be unexported (golint)
    • Line 53: warning: exported function WithConfig should have comment or be unexported (golint)
    • Line 59: warning: exported function NewProvider should have comment or be unexported (golint)
    • Line 76: warning: exported method Provider.Info should have comment or be unexported (golint)
    • Line 102: warning: exported method Provider.GetSnippets should have comment or be unexported (golint)
    • internal/ui/config.go
    • Line 10: warning: exported type Config should have comment or be unexported (golint)
    • Line 14: warning: exported type NamedTheme should have comment or be unexported (golint)
    • Line 19: warning: exported type ThemeValues should have comment or be unexported (golint)
    • Line 47: warning: exported method Config.GetSelectedTheme should have comment or be unexported (golint)
    • Line 66: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 72: warning: exported function ApplyConfig should have comment or be unexported (golint)
    • themes/data.go
    • Line 5: warning: comment on exported var Files should be of the form "Files ..." (golint)
    • internal/parser/parser.go
    • Line 43: warning: exported function ParseParameters should have comment or be unexported (golint)
    • Line 48: warning: exported function CreateSnippet should have comment or be unexported (golint)
    • internal/ui/form.go
    • Line 12: warning: exported type OkButton should have comment or be unexported (golint)
    • Line 15: warning: exported const OkButtonExecute should have comment (or a comment on this block) or be unexported (golint)
    • internal/model/language.go
    • Line 3: warning: exported type Language should have comment or be unexported (golint)
    • Line 6: warning: exported const LanguageUnknown should have comment (or a comment on this block) or be unexported (golint)
    • internal/model/provider.go
    • Line 3: warning: exported type ProviderInfo should have comment or be unexported (golint)
    • Line 7: warning: exported type ProviderLine should have comment or be unexported (golint)
    • internal/utils/assertutil/assert_util.go
    • Line 15: warning: exported function AssertExists should have comment or be unexported (golint)
    • Line 22: warning: exported function AssertSnippetsEqual should have comment or be unexported (golint)
    • Line 38: warning: exported function AssertPanicsWithError should have comment or be unexported (golint)
    • internal/providers/snippetslab/constants.go
    • Line 21: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 29: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 42: warning: exported const SnippetTitle should have comment (or a comment on this block) or be unexported (golint)
    • internal/config/config.go
    • Line 8: warning: exported type VersionWrapper should have comment or be unexported (golint)
    • Line 13: warning: exported type Config should have comment or be unexported (golint)
    • internal/utils/stringutil/string_set.go
    • Line 3: warning: exported type StringSet should have comment or be unexported (golint)
    • Line 5: warning: exported method StringSet.Add should have comment or be unexported (golint)
    • Line 9: warning: exported method StringSet.Keys should have comment or be unexported (golint)
    • Line 19: warning: exported method StringSet.Contains should have comment or be unexported (golint)
    • internal/utils/system/system.go
    • Line 18: warning: exported type System should have comment or be unexported (golint)
    • Line 75: warning: exported function NewSystem should have comment or be unexported (golint)
    • Line 85: warning: exported method System.UserDataHome should have comment or be unexported (golint)
    • Line 92: warning: exported method System.UserConfigDirs should have comment or be unexported (golint)
    • Line 99: warning: exported method System.UserContainersHome should have comment or be unexported (golint)
    • Line 106: warning: exported method System.UserContainerPreferences should have comment or be unexported (golint)
    • Line 111: warning: exported method System.ConfigPath should have comment or be unexported (golint)
    • Line 115: warning: exported method System.ThemesDir should have comment or be unexported (golint)
    • Line 119: warning: exported method System.HomeDir should have comment or be unexported (golint)
    • Line 132: warning: exported method System.Remove should have comment or be unexported (golint)
    • Line 138: warning: exported method System.RemoveAll should have comment or be unexported (golint)
    • Line 144: warning: exported method System.DirExists should have comment or be unexported (golint)
    • Line 152: warning: exported method System.IsEmpty should have comment or be unexported (golint)
    • Line 174: warning: exported method System.WriteFile should have comment or be unexported (golint)
    • Line 180: warning: exported method System.ReadFile should have comment or be unexported (golint)
    • internal/utils/logutil/log_util.go
    • Line 20: warning: exported function ConfigureDefaultLogger should have comment or be unexported (golint)
    • Line 35: warning: exported function SetDefaultLogLevel should have comment or be unexported (golint)
    • Line 43: warning: exported function AllLevelsAsString should have comment or be unexported (golint)
    • internal/ui/terminal.go
    • Line 51: warning: exported type Terminal should have comment or be unexported (golint)
    • Line 66: warning: exported function NewTerminal should have comment or be unexported (golint)
    • internal/ui/themes.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 28: warning: exported var ErrInvalidTheme should have comment or be unexported (golint)
    • Line 218: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • internal/ui/uimsg/uimsg.go
    • Line 5: warning: exported function NoConfig should have comment or be unexported (golint)
    • Line 9: warning: exported function ConfigFileCreate should have comment or be unexported (golint)
    • Line 15: warning: exported function ConfigFileDeleted should have comment or be unexported (golint)
    • Line 19: warning: exported function ThemesDeleted should have comment or be unexported (golint)
    • Line 23: warning: exported function ThemesNotDeleted should have comment or be unexported (golint)
    • Line 27: warning: exported function ConfigNotDeleted should have comment or be unexported (golint)
    • Line 31: warning: exported function ConfigNotFound should have comment or be unexported (golint)
    • Line 35: warning: exported function HomeDirectoryStillExists should have comment or be unexported (golint)
    • Line 40: warning: exported function ConfirmRecreateConfigFile should have comment or be unexported (golint)
    • Line 44: warning: exported function ConfirmCreateConfigFile should have comment or be unexported (golint)
    • Line 48: warning: exported function ConfirmDeleteConfigFile should have comment or be unexported (golint)
    • Line 52: warning: exported function ConfirmDeleteThemesDir should have comment or be unexported (golint)
    • internal/model/snippet.go
    • Line 8: warning: exported type Snippet should have comment or be unexported (golint)
    • Line 18: warning: exported method Snippet.GetTitle should have comment or be unexported (golint)
    • Line 26: warning: exported method Snippet.SetTitle should have comment or be unexported (golint)
    • Line 30: warning: exported method Snippet.GetContent should have comment or be unexported (golint)
    • Line 38: warning: exported method Snippet.GetLanguage should have comment or be unexported (golint)
    • internal/app/app_lookup.go
    • Line 15: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • internal/config/errors.go
    • Line 9: warning: exported var ErrInvalidConfig should have comment or be unexported (golint)
    • Line 11: warning: exported type ErrConfigNotFound should have comment or be unexported (golint)
    • Line 19: warning: exported method ErrConfigNotFound.Is should have comment or be unexported (golint)
    • internal/providers/snippetslab/provider.go
    • Line 14: warning: exported type Provider should have comment or be unexported (golint)
    • Line 38: warning: exported function WithConfig should have comment or be unexported (golint)
    • Line 44: warning: exported function NewProvider should have comment or be unexported (golint)
    • Line 63: warning: exported method Provider.Info should have comment or be unexported (golint)
    • Line 93: warning: exported method Provider.GetSnippets should have comment or be unexported (golint)
    • Line 103: warning: if block ends with a return statement, so drop this else and outdent its block (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!