Preparing report...

Report for github.com/siongui/gopalilib

A+    Excellent!    Found 43 issues across 78 files

Tweet

gofmt97%

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!


gocyclo94%

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.


golint64%

Golint is a linter for Go source code.

    • gopalilib/lib/filter.go
    • Line 7: warning: exported type IdExp should have comment or be unexported (golint)
    • Line 12: warning: exported function BookIdWordExps2IdExpsAccordingToSetting should have comment or be unexported (golint)
    • gopalilib/lib/dicmgr/data.go
    • Line 15: warning: exported function ReadFile should have comment or be unexported (golint)
    • Line 23: warning: exported function MapKeys should have comment or be unexported (golint)
    • gopalilib/dicutil/onedic.go
    • Line 83: warning: exported function SaveCsv should have comment or be unexported (golint)
    • Line 101: warning: exported function GetOneDictionay should have comment or be unexported (golint)
    • gopalilib/libfrontend/setting/setting.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 11: warning: exported function SetStorageKeyName should have comment or be unexported (golint)
    • Line 15: warning: exported function SavePaliSetting should have comment or be unexported (golint)
    • Line 20: warning: exported function LoadPaliSetting should have comment or be unexported (golint)
    • Line 25: warning: exported function SetupPaliSetting should have comment or be unexported (golint)
    • gopalilib/libfrontend/locale.go
    • Line 4: warning: should not use dot imports (golint)
    • Line 8: warning: exported function GetFinalShowLocale should have comment or be unexported (golint)
    • Line 19: warning: exported function TranslateDocument should have comment or be unexported (golint)
    • gopalilib/lib/dictionary/url.go
    • Line 27: warning: exported const RootPage should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: comment on exported function StripRootPathAndCurrentLocaleInUrlPath should be of the form "StripRootPathAndCurrentLocaleInUrlPath ..." (golint)
    • Line 95: warning: comment on exported function AddRootPathAndCurrentLocaleToUrlPath should be of the form "AddRootPathAndCurrentLocaleToUrlPath ..." (golint)
    • gopalilib/dicutil/po2json.go
    • Line 14: warning: comment on exported function PO2JSONBytes should be of the form "PO2JSONBytes ..." (golint)
    • Line 48: warning: exported function EmbedPOJSONInGoCode should have comment or be unexported (golint)
    • gopalilib/tpkutil/downloadtpk.go
    • Line 16: warning: exported function PrintTreeInfo should have comment or be unexported (golint)
    • Line 21: warning: exported function DownloadAndParseXml should have comment or be unexported (golint)
    • Line 36: warning: exported function ParseXmlTree should have comment or be unexported (golint)
    • Line 60: warning: exported function GetAllXml should have comment or be unexported (golint)
    • gopalilib/libfrontend/urlhandle.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 9: warning: exported function ActionXmlUrl should have comment or be unexported (golint)
    • Line 13: warning: exported function GetXslUrl should have comment or be unexported (golint)
    • Line 17: warning: exported function HttpWordJsonPath should have comment or be unexported (golint)
    • Line 24: warning: exported function IsOffline should have comment or be unexported (golint)
    • Line 28: warning: exported function DictionarySuttaWordUrl should have comment or be unexported (golint)
    • gopalilib/libfrontend/xslt/xslt.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 10: warning: exported function GetXSLTProcessor should have comment or be unexported (golint)
    • Line 14: warning: exported function SetupXSLTProcessor should have comment or be unexported (golint)
    • gopalilib/lib/dictionary.go
    • Line 189: warning: comment on exported type BookIdWordExps should be of the form "BookIdWordExps ..." (with optional leading article) (golint)
    • Line 209: warning: exported type BookNameWordExp should have comment or be unexported (golint)
    • Line 214: warning: exported function IdExps2BookNameWordExps should have comment or be unexported (golint)
    • gopalilib/tpkutil/buildtpktree.go
    • Line 30: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 38: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 54: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign64%

IneffAssign detects ineffectual assignments in Go code.

    • gopalilib/util/xmlutf16.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import golang.org/x/net/html/charset (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import golang.org/x/net/html/charset (invalid package name: "") (ineffassign)
    • gopalilib/dicutil/po2json.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/siongui/gopalilib/lib/gettext (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/siongui/gopalilib/lib/gettext (invalid package name: "") (ineffassign)
    • gopalilib/libfrontend/locale.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/siongui/godom (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/siongui/gopalilib/lib/jsgettext (invalid package name: "") (ineffassign)
    • Line 10: warning: undeclared name: Window (ineffassign)
    • Line 12: warning: undeclared name: Document (ineffassign)
    • Line 20: warning: undeclared name: Document (ineffassign)
    • Line 4: warning: "github.com/siongui/godom" imported but not used (ineffassign)
    • gopalilib/libfrontend/urlhandle.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/siongui/gopalilib/lib/dictionary (invalid package name: "") (ineffassign)
    • Line 25: warning: undeclared name: Window (ineffassign)
    • Line 25: warning: undeclared name: Window (ineffassign)
    • Line 5: warning: "github.com/siongui/godom" imported but not used (ineffassign)
    • gopalilib/tpkutil/buildtpktree.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/siongui/gopalilib/util (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/siongui/gopalilib/util (invalid package name: "") (ineffassign)
    • gopalilib/lib/trie/trie.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/siongui/go-succinct-data-structure-trie (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/siongui/go-succinct-data-structure-trie (invalid package name: "") (ineffassign)
    • gopalilib/dicutil/bookparser.go
    • Line 17: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 17: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import github.com/siongui/gopalilib/util (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import github.com/siongui/gopalilib/util (invalid package name: "") (ineffassign)
    • gopalilib/util/zawgyi.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/winhtaikaung/Rabbit-Go/rabbit (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/winhtaikaung/Rabbit-Go/rabbit (invalid package name: "") (ineffassign)
    • gopalilib/libfrontend/xslt/xslt.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import github.com/siongui/godom (invalid package name: "") (ineffassign)
    • Line 8: warning: undeclared name: XSLTProcessor (ineffassign)
    • Line 10: warning: undeclared name: XSLTProcessor (ineffassign)
    • Line 15: warning: undeclared name: NewXSLTProcessor (ineffassign)
    • Line 18: warning: undeclared name: NewXMLHttpRequest (ineffassign)
    • Line 5: warning: "github.com/siongui/godom" imported but not used (ineffassign)
    • gopalilib/dicutil/triebuild.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/siongui/gopalilib/lib/trie (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/siongui/gopalilib/lib/trie (invalid package name: "") (ineffassign)
    • gopalilib/libfrontend/setting/setting.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import github.com/siongui/godom (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 17: warning: undeclared name: LocalStorage (ineffassign)
    • Line 21: warning: undeclared name: LocalStorage (ineffassign)
    • Line 26: warning: undeclared name: Document (ineffassign)
    • Line 27: warning: undeclared name: Document (ineffassign)
    • Line 28: warning: undeclared name: Document (ineffassign)
    • Line 29: warning: undeclared name: Document (ineffassign)
    • Line 30: warning: undeclared name: Document (ineffassign)
    • Line 31: warning: undeclared name: Document (ineffassign)
    • Line 32: warning: undeclared name: Document (ineffassign)
    • Line 36: warning: undeclared name: LocalStorage (ineffassign)
    • Line 38: warning: undeclared name: LocalStorage (ineffassign)
    • Line 54: warning: undeclared name: Event (ineffassign)
    • Line 59: warning: undeclared name: Event (ineffassign)
    • Line 63: warning: undeclared name: Event (ineffassign)
    • Line 67: warning: undeclared name: Event (ineffassign)
    • Line 71: warning: undeclared name: Event (ineffassign)
    • Line 75: warning: undeclared name: Event (ineffassign)
    • Line 79: warning: undeclared name: Event (ineffassign)
    • Line 5: warning: "github.com/siongui/godom" imported but not used (ineffassign)
    • gopalilib/libfrontend/everyword/everyword.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/siongui/godom (invalid package name: "") (ineffassign)
    • Line 20: warning: undeclared name: Object (ineffassign)
    • Line 38: warning: undeclared name: Object (ineffassign)
    • Line 22: warning: undeclared name: Document (ineffassign)
    • Line 29: warning: undeclared name: Event (ineffassign)
    • Line 61: warning: undeclared name: Document (ineffassign)
    • Line 9: warning: "github.com/siongui/godom" imported but not used (ineffassign)
    • gopalilib/lib/jsgettext/jsgettext.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/siongui/gopalilib/lib/gettext (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/siongui/gopalilib/lib/gettext (invalid package name: "") (ineffassign)
    • gopalilib/dicutil/embedmetadata.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/siongui/goef (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/siongui/goef (invalid package name: "") (ineffassign)
    • gopalilib/dicutil/symlink.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/siongui/gopalilib/lib/dictionary (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/siongui/gopalilib/lib/dictionary (invalid package name: "") (ineffassign)
    • gopalilib/util/chineseconvert.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/siongui/gojianfan (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/siongui/gojianfan (invalid package name: "") (ineffassign)
    • gopalilib/libfrontend/treeview/treeview.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/siongui/godom (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 10: warning: undeclared name: Object (ineffassign)
    • Line 12: warning: undeclared name: Document (ineffassign)
    • Line 15: warning: undeclared name: Document (ineffassign)
    • Line 18: warning: undeclared name: Document (ineffassign)
    • Line 25: warning: undeclared name: Document (ineffassign)
    • Line 32: warning: undeclared name: Event (ineffassign)
    • Line 42: warning: undeclared name: Document (ineffassign)
    • Line 48: warning: undeclared name: Document (ineffassign)
    • Line 51: warning: undeclared name: Document (ineffassign)
    • Line 54: warning: undeclared name: Event (ineffassign)
    • Line 84: warning: undeclared name: Document (ineffassign)
    • Line 87: warning: undeclared name: Document (ineffassign)
    • Line 96: warning: undeclared name: Document (ineffassign)
    • Line 6: warning: "github.com/siongui/godom" imported but not used (ineffassign)
    • gopalilib/lib/tipitaka/url.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/siongui/gopalilib/lib/tipitaka/toc (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/siongui/gopalilib/lib/tipitaka/toc (invalid package name: "") (ineffassign)
    • gopalilib/lib/dicmgr/manager.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/siongui/go-succinct-data-structure-trie (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/siongui/gopalilib/lib/trie (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/siongui/go-succinct-data-structure-trie (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/siongui/gopalilib/lib (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/siongui/gopalilib/lib/trie (invalid package name: "") (ineffassign)

misspell98%

Misspell Finds commonly misspelled English words