Preparing report...

Report for github.com/jchv/go-webview2

(v0.0.0-20220126072650-e310c94fa7fe)

A+    Excellent!    Found 22 issues across 34 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!


golint41%

Golint is a linter for Go source code.

    • pkg/edge/ICoreWebView2Settings.go
    • Line 31: warning: exported type ICoreWebView2Settings should have comment or be unexported (golint)
    • Line 35: warning: exported method ICoreWebView2Settings.AddRef should have comment or be unexported (golint)
    • Line 40: warning: exported method ICoreWebView2Settings.GetIsScriptEnabled should have comment or be unexported (golint)
    • Line 53: warning: exported method ICoreWebView2Settings.PutIsScriptEnabled should have comment or be unexported (golint)
    • Line 66: warning: exported method ICoreWebView2Settings.GetIsWebMessageEnabled should have comment or be unexported (golint)
    • Line 79: warning: exported method ICoreWebView2Settings.PutIsWebMessageEnabled should have comment or be unexported (golint)
    • Line 92: warning: exported method ICoreWebView2Settings.GetAreDefaultScriptDialogsEnabled should have comment or be unexported (golint)
    • Line 105: warning: exported method ICoreWebView2Settings.PutAreDefaultScriptDialogsEnabled should have comment or be unexported (golint)
    • Line 118: warning: exported method ICoreWebView2Settings.GetIsStatusBarEnabled should have comment or be unexported (golint)
    • Line 131: warning: exported method ICoreWebView2Settings.PutIsStatusBarEnabled should have comment or be unexported (golint)
    • Line 144: warning: exported method ICoreWebView2Settings.GetAreDevToolsEnabled should have comment or be unexported (golint)
    • Line 157: warning: exported method ICoreWebView2Settings.PutAreDevToolsEnabled should have comment or be unexported (golint)
    • Line 169: warning: exported method ICoreWebView2Settings.GetAreDefaultContextMenusEnabled should have comment or be unexported (golint)
    • Line 182: warning: exported method ICoreWebView2Settings.PutAreDefaultContextMenusEnabled should have comment or be unexported (golint)
    • Line 194: warning: exported method ICoreWebView2Settings.GetAreHostObjectsAllowed should have comment or be unexported (golint)
    • Line 207: warning: exported method ICoreWebView2Settings.PutAreHostObjectsAllowed should have comment or be unexported (golint)
    • Line 220: warning: exported method ICoreWebView2Settings.GetIsZoomControlEnabled should have comment or be unexported (golint)
    • Line 233: warning: exported method ICoreWebView2Settings.PutIsZoomControlEnabled should have comment or be unexported (golint)
    • Line 246: warning: exported method ICoreWebView2Settings.GetIsBuiltInErrorPageEnabled should have comment or be unexported (golint)
    • Line 259: warning: exported method ICoreWebView2Settings.PutIsBuiltInErrorPageEnabled should have comment or be unexported (golint)
    • pkg/edge/ICoreWebView2WebResourceRequestedEventArgs.go
    • Line 18: warning: exported type ICoreWebView2WebResourceRequestedEventArgs should have comment or be unexported (golint)
    • Line 22: warning: exported method ICoreWebView2WebResourceRequestedEventArgs.AddRef should have comment or be unexported (golint)
    • Line 27: warning: exported method ICoreWebView2WebResourceRequestedEventArgs.PutResponse should have comment or be unexported (golint)
    • Line 40: warning: exported method ICoreWebView2WebResourceRequestedEventArgs.GetRequest should have comment or be unexported (golint)
    • pkg/edge/ICoreWebView2Controller.go
    • Line 37: warning: exported type ICoreWebView2Controller should have comment or be unexported (golint)
    • Line 41: warning: exported method ICoreWebView2Controller.AddRef should have comment or be unexported (golint)
    • Line 46: warning: exported method ICoreWebView2Controller.GetBounds should have comment or be unexported (golint)
    • Line 59: warning: exported method ICoreWebView2Controller.PutBounds should have comment or be unexported (golint)
    • Line 72: warning: exported method ICoreWebView2Controller.AddAcceleratorKeyPressed should have comment or be unexported (golint)
    • Line 85: warning: exported method ICoreWebView2Controller.PutIsVisible should have comment or be unexported (golint)
    • Line 98: warning: exported method ICoreWebView2Controller.GetICoreWebView2Controller2 should have comment or be unexported (golint)
    • Line 111: warning: exported method ICoreWebView2Controller.NotifyParentWindowPositionChanged should have comment or be unexported (golint)
    • pkg/edge/ICoreWebViewSettings.go
    • Line 45: warning: exported type ICoreWebViewSettings should have comment or be unexported (golint)
    • Line 49: warning: exported method ICoreWebViewSettings.AddRef should have comment or be unexported (golint)
    • Line 54: warning: exported method ICoreWebViewSettings.GetIsScriptEnabled should have comment or be unexported (golint)
    • Line 67: warning: exported method ICoreWebViewSettings.PutIsScriptEnabled should have comment or be unexported (golint)
    • Line 80: warning: exported method ICoreWebViewSettings.GetIsWebMessageEnabled should have comment or be unexported (golint)
    • Line 93: warning: exported method ICoreWebViewSettings.PutIsWebMessageEnabled should have comment or be unexported (golint)
    • Line 106: warning: exported method ICoreWebViewSettings.GetAreDefaultScriptDialogsEnabled should have comment or be unexported (golint)
    • Line 119: warning: exported method ICoreWebViewSettings.PutAreDefaultScriptDialogsEnabled should have comment or be unexported (golint)
    • Line 132: warning: exported method ICoreWebViewSettings.GetIsStatusBarEnabled should have comment or be unexported (golint)
    • Line 145: warning: exported method ICoreWebViewSettings.PutIsStatusBarEnabled should have comment or be unexported (golint)
    • Line 158: warning: exported method ICoreWebViewSettings.GetAreDevToolsEnabled should have comment or be unexported (golint)
    • Line 171: warning: exported method ICoreWebViewSettings.PutAreDevToolsEnabled should have comment or be unexported (golint)
    • Line 183: warning: exported method ICoreWebViewSettings.GetAreDefaultContextMenusEnabled should have comment or be unexported (golint)
    • Line 196: warning: exported method ICoreWebViewSettings.PutAreDefaultContextMenusEnabled should have comment or be unexported (golint)
    • Line 208: warning: exported method ICoreWebViewSettings.GetAreHostObjectsAllowed should have comment or be unexported (golint)
    • Line 221: warning: exported method ICoreWebViewSettings.PutAreHostObjectsAllowed should have comment or be unexported (golint)
    • Line 234: warning: exported method ICoreWebViewSettings.GetIsZoomControlEnabled should have comment or be unexported (golint)
    • Line 247: warning: exported method ICoreWebViewSettings.PutIsZoomControlEnabled should have comment or be unexported (golint)
    • Line 260: warning: exported method ICoreWebViewSettings.GetIsBuiltInErrorPageEnabled should have comment or be unexported (golint)
    • Line 273: warning: exported method ICoreWebViewSettings.PutIsBuiltInErrorPageEnabled should have comment or be unexported (golint)
    • Line 286: warning: exported method ICoreWebViewSettings.GetUserAgent should have comment or be unexported (golint)
    • Line 302: warning: exported method ICoreWebViewSettings.PutUserAgent should have comment or be unexported (golint)
    • Line 320: warning: exported method ICoreWebViewSettings.GetAreBrowserAcceleratorKeysEnabled should have comment or be unexported (golint)
    • Line 333: warning: exported method ICoreWebViewSettings.PutAreBrowserAcceleratorKeysEnabled should have comment or be unexported (golint)
    • Line 346: warning: exported method ICoreWebViewSettings.GetIsPinchZoomEnabled should have comment or be unexported (golint)
    • Line 359: warning: exported method ICoreWebViewSettings.PutIsPinchZoomEnabled should have comment or be unexported (golint)
    • Line 372: warning: exported method ICoreWebViewSettings.GetIsSwipeNavigationEnabled should have comment or be unexported (golint)
    • Line 385: warning: exported method ICoreWebViewSettings.PutIsSwipeNavigationEnabled should have comment or be unexported (golint)
    • pkg/edge/ICoreWebView2_2.go
    • Line 14: warning: exported type ICoreWebView2_2 should have comment or be unexported (golint)
    • Line 18: warning: exported method ICoreWebView2_2.AddRef should have comment or be unexported (golint)
    • pkg/edge/COREWEBVIEW2_KEY_EVENT_KIND.go
    • Line 3: warning: exported type COREWEBVIEW2_KEY_EVENT_KIND should have comment or be unexported (golint)
    • Line 6: warning: exported const COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN should have comment (or a comment on this block) or be unexported (golint)
    • pkg/edge/COREWEBVIEW2_WEB_RESOURCE_CONTEXT.go
    • Line 3: warning: exported type COREWEBVIEW2_WEB_RESOURCE_CONTEXT should have comment or be unexported (golint)
    • Line 6: warning: exported const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL should have comment (or a comment on this block) or be unexported (golint)
    • pkg/edge/ICoreWebView2AcceleratorKeyPressedEventArgs.go
    • Line 19: warning: exported type ICoreWebView2AcceleratorKeyPressedEventArgs should have comment or be unexported (golint)
    • Line 23: warning: exported method ICoreWebView2AcceleratorKeyPressedEventArgs.AddRef should have comment or be unexported (golint)
    • Line 28: warning: exported method ICoreWebView2AcceleratorKeyPressedEventArgs.GetKeyEventKind should have comment or be unexported (golint)
    • Line 41: warning: exported method ICoreWebView2AcceleratorKeyPressedEventArgs.GetVirtualKey should have comment or be unexported (golint)
    • Line 54: warning: exported method ICoreWebView2AcceleratorKeyPressedEventArgs.GetPhysicalKeyStatus should have comment or be unexported (golint)
    • Line 67: warning: exported method ICoreWebView2AcceleratorKeyPressedEventArgs.PutHandled should have comment or be unexported (golint)
    • pkg/edge/ICoreWebView2_3.go
    • Line 18: warning: exported type ICoreWebView2_3 should have comment or be unexported (golint)
    • Line 22: warning: exported method ICoreWebView2_3.SetVirtualHostNameToFolderMapping should have comment or be unexported (golint)
    • Line 46: warning: exported method ICoreWebView2.GetICoreWebView2_3 should have comment or be unexported (golint)
    • Line 58: warning: exported method Chromium.GetICoreWebView2_3 should have comment or be unexported (golint)
    • webviewloader/module_amd64.go
    • Line 3: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 5: warning: comment on exported var WebView2Loader should be of the form "WebView2Loader ..." (golint)
    • internal/w32/w32.go
    • Line 12: warning: exported var Ole32CoInitializeEx should have comment or be unexported (golint)
    • Line 44: warning: exported const SystemMetricsCxIcon should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported const SWShow should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: exported const SWPNoZOrder should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported const WMDestroy should have comment (or a comment on this block) or be unexported (golint)
    • Line 72: warning: exported const GWLStyle should have comment (or a comment on this block) or be unexported (golint)
    • Line 76: warning: exported const WSOverlapped should have comment (or a comment on this block) or be unexported (golint)
    • Line 85: warning: exported type WndClassExW should have comment or be unexported (golint)
    • Line 100: warning: exported type Rect should have comment or be unexported (golint)
    • Line 107: warning: exported type MinMaxInfo should have comment or be unexported (golint)
    • Line 115: warning: exported type Point should have comment or be unexported (golint)
    • Line 119: warning: exported type Msg should have comment or be unexported (golint)
    • Line 129: warning: exported function Utf16PtrToString should have comment or be unexported (golint)
    • Line 144: warning: exported function SHCreateMemStream should have comment or be unexported (golint)
    • pkg/edge/ICoreWebView2WebResourceRequest.go
    • Line 20: warning: exported type ICoreWebView2WebResourceRequest should have comment or be unexported (golint)
    • Line 24: warning: exported method ICoreWebView2WebResourceRequest.AddRef should have comment or be unexported (golint)
    • Line 29: warning: exported method ICoreWebView2WebResourceRequest.GetUri should have comment or be unexported (golint)
    • pkg/edge/COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND.go
    • Line 3: warning: exported type COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND should have comment or be unexported (golint)
    • Line 6: warning: exported const COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY should have comment (or a comment on this block) or be unexported (golint)
    • pkg/edge/ICoreWebView2Controller2.go
    • Line 38: warning: exported type ICoreWebView2Controller2 should have comment or be unexported (golint)
    • Line 42: warning: exported method ICoreWebView2Controller2.AddRef should have comment or be unexported (golint)
    • Line 47: warning: exported method ICoreWebView2Controller2.GetDefaultBackgroundColor should have comment or be unexported (golint)
    • Line 60: warning: exported method ICoreWebView2Controller2.PutDefaultBackgroundColor should have comment or be unexported (golint)

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.

    • webview.go
    • Line 124: warning: cyclomatic complexity 17 of function (*webview).callbinding() is high (> 15) (gocyclo)

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!