Preparing report...

Report for github.1485827954.workers.dev/88250/lute

(v1.7.6)

A+    Excellent!    Found 55 issues across 163 files

Tweet

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!


gofmt94%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo71%

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.

    • parse/inline.go
    • Line 138: warning: cyclomatic complexity 53 of function (*Tree).parseCloseBracket() is high (> 15) (gocyclo)
    • Line 25: warning: cyclomatic complexity 23 of function (*Tree).parseInline() is high (> 15) (gocyclo)
    • parse/auto_link.go
    • Line 158: warning: cyclomatic complexity 93 of function (*Tree).parseGFMAutoLink0() is high (> 15) (gocyclo)
    • Line 425: warning: cyclomatic complexity 19 of function (*Tree).isValidDomain() is high (> 15) (gocyclo)
    • parse/heading.go
    • Line 100: warning: cyclomatic complexity 32 of function (*Tree).parseATXHeading() is high (> 15) (gocyclo)
    • Line 176: warning: cyclomatic complexity 20 of function (*Tree).parseSetextHeading() is high (> 15) (gocyclo)
    • render/protyle_renderer.go
    • Line 1228: warning: cyclomatic complexity 29 of function (*ProtyleRenderer).renderImage() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 21 of function (*ProtyleRenderer).renderTextMark() is high (> 15) (gocyclo)
    • parse/file_annotation_ref.go
    • Line 21: warning: cyclomatic complexity 23 of function (*Tree).parseFileAnnotationRef() is high (> 15) (gocyclo)
    • Line 100: warning: cyclomatic complexity 19 of function (*Context).parseFileAnnotationRefID() is high (> 15) (gocyclo)
    • vditor_wysiwyg.go
    • Line 516: warning: cyclomatic complexity 258 of function (*Lute).genASTByVditorDOM() is high (> 15) (gocyclo)
    • Line 272: warning: cyclomatic complexity 46 of function (*Lute).searchEmptyNodes() is high (> 15) (gocyclo)
    • Line 418: warning: cyclomatic complexity 19 of function (*Lute).adjustVditorDOMListItemInP() is high (> 15) (gocyclo)
    • Line 208: warning: cyclomatic complexity 16 of function (*Lute).adjustVditorDOMListList() is high (> 15) (gocyclo)
    • Line 1508: warning: cyclomatic complexity 16 of function (*Lute).isInline() is high (> 15) (gocyclo)
    • vditor_ir.go
    • Line 143: warning: cyclomatic complexity 197 of function (*Lute).genASTByVditorIRDOM() is high (> 15) (gocyclo)
    • parse/inline_html.go
    • Line 25: warning: cyclomatic complexity 38 of function (*Tree).parseInlineHTML() is high (> 15) (gocyclo)
    • Line 490: warning: cyclomatic complexity 24 of function SetSpanIAL() is high (> 15) (gocyclo)
    • Line 368: warning: cyclomatic complexity 23 of function parseAttrValSpec() is high (> 15) (gocyclo)
    • Line 597: warning: cyclomatic complexity 22 of function SetTextMarkNode() is high (> 15) (gocyclo)
    • Line 184: warning: cyclomatic complexity 19 of function (*Tree).parseCDATA() is high (> 15) (gocyclo)
    • ast/node.go
    • Line 221: warning: cyclomatic complexity 37 of function (*Node).Marker() is high (> 15) (gocyclo)
    • parse/html_block.go
    • Line 236: warning: cyclomatic complexity 33 of function (*Tree).isOpenTag() is high (> 15) (gocyclo)
    • Line 21: warning: cyclomatic complexity 23 of function HtmlBlockStart() is high (> 15) (gocyclo)
    • Line 170: warning: cyclomatic complexity 22 of function (*Tree).parseHTML() is high (> 15) (gocyclo)
    • Line 128: warning: cyclomatic complexity 20 of function (*Tree).isHTMLBlockClose() is high (> 15) (gocyclo)
    • html/token.go
    • Line 398: warning: cyclomatic complexity 50 of function (*Tokenizer).readScript() is high (> 15) (gocyclo)
    • Line 955: warning: cyclomatic complexity 30 of function (*Tokenizer).Next() is high (> 15) (gocyclo)
    • protyle.go
    • Line 1056: warning: cyclomatic complexity 201 of function (*Lute).genASTContenteditable() is high (> 15) (gocyclo)
    • Line 680: warning: cyclomatic complexity 75 of function (*Lute).genASTByBlockDOM() is high (> 15) (gocyclo)
    • Line 331: warning: cyclomatic complexity 23 of function (*Lute).MergeSameTextMark() is high (> 15) (gocyclo)
    • Line 1903: warning: cyclomatic complexity 23 of function (*Lute).setBlockIAL() is high (> 15) (gocyclo)
    • Line 256: warning: cyclomatic complexity 17 of function (*Lute).BlockDOM2Tree() is high (> 15) (gocyclo)
    • parse/blocks.go
    • Line 82: warning: cyclomatic complexity 63 of function (*Tree).incorporateLine() is high (> 15) (gocyclo)
    • html/render.go
    • Line 67: warning: cyclomatic complexity 56 of function render1() is high (> 15) (gocyclo)
    • parse/list.go
    • Line 151: warning: cyclomatic complexity 35 of function (*Tree).parseListMarker() is high (> 15) (gocyclo)
    • Line 77: warning: cyclomatic complexity 16 of function (*Context).listFinalize() is high (> 15) (gocyclo)
    • render/protyle_export_md_renderer.go
    • Line 262: warning: cyclomatic complexity 34 of function (*ProtyleExportMdRenderer).renderMdMarker() is high (> 15) (gocyclo)
    • Line 1844: warning: cyclomatic complexity 20 of function (*ProtyleExportMdRenderer).renderListItem() is high (> 15) (gocyclo)
    • Line 208: warning: cyclomatic complexity 20 of function (*ProtyleExportMdRenderer).renderTextMark() is high (> 15) (gocyclo)
    • Line 1363: warning: cyclomatic complexity 18 of function (*ProtyleExportMdRenderer).renderParagraph() is high (> 15) (gocyclo)
    • Line 1091: warning: cyclomatic complexity 18 of function (*ProtyleExportMdRenderer).renderTable() is high (> 15) (gocyclo)
    • parse/delimiter.go
    • Line 294: warning: cyclomatic complexity 64 of function (*Tree).scanDelims() is high (> 15) (gocyclo)
    • Line 69: warning: cyclomatic complexity 63 of function (*Tree).processEmphasis() is high (> 15) (gocyclo)
    • parse/inline_link.go
    • Line 23: warning: cyclomatic complexity 46 of function (*Context).parseInlineLinkDest() is high (> 15) (gocyclo)
    • parse/parse.go
    • Line 33: warning: cyclomatic complexity 26 of function (*Tree).finalParseBlockIAL() is high (> 15) (gocyclo)
    • html/doctype.go
    • Line 16: warning: cyclomatic complexity 24 of function parseDoctype() is high (> 15) (gocyclo)
    • h2m.go
    • Line 82: warning: cyclomatic complexity 171 of function (*Lute).genASTByDOM() is high (> 15) (gocyclo)
    • Line 652: warning: cyclomatic complexity 18 of function appendSpace() is high (> 15) (gocyclo)
    • html/parse.go
    • Line 825: warning: cyclomatic complexity 115 of function inBodyIM() is high (> 15) (gocyclo)
    • Line 1393: warning: cyclomatic complexity 30 of function inTableIM() is high (> 15) (gocyclo)
    • Line 1758: warning: cyclomatic complexity 26 of function inSelectIM() is high (> 15) (gocyclo)
    • Line 430: warning: cyclomatic complexity 23 of function (*parser).resetInsertionMode() is high (> 15) (gocyclo)
    • Line 612: warning: cyclomatic complexity 22 of function inHeadIM() is high (> 15) (gocyclo)
    • Line 2125: warning: cyclomatic complexity 22 of function parseForeignContent() is high (> 15) (gocyclo)
    • Line 1216: warning: cyclomatic complexity 21 of function (*parser).inBodyEndTagFormatting() is high (> 15) (gocyclo)
    • Line 110: warning: cyclomatic complexity 21 of function (*parser).indexOfElementInScope() is high (> 15) (gocyclo)
    • Line 1546: warning: cyclomatic complexity 17 of function inColumnGroupIM() is high (> 15) (gocyclo)
    • Line 162: warning: cyclomatic complexity 16 of function (*parser).clearStackToContext() is high (> 15) (gocyclo)
    • Line 2205: warning: cyclomatic complexity 16 of function (*parser).inForeignContent() is high (> 15) (gocyclo)
    • util/url.go
    • Line 54: warning: cyclomatic complexity 25 of function unescape() is high (> 15) (gocyclo)
    • Line 199: warning: cyclomatic complexity 25 of function shouldEscape() is high (> 15) (gocyclo)
    • parse/text.go
    • Line 47: warning: cyclomatic complexity 19 of function (*Tree).parseBackslash() is high (> 15) (gocyclo)
    • parse/emoji.go
    • Line 37: warning: cyclomatic complexity 17 of function (*Tree).emoji0() is high (> 15) (gocyclo)
    • parse/table.go
    • Line 20: warning: cyclomatic complexity 31 of function (*Context).parseTable() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 19 of function (*Context).parseTable0() is high (> 15) (gocyclo)
    • Line 291: warning: cyclomatic complexity 17 of function (*Context).parseTableDelimRow() is high (> 15) (gocyclo)
    • parse/inlines.go
    • Line 27: warning: cyclomatic complexity 27 of function (*Tree).walkParseInline() is high (> 15) (gocyclo)
    • render/space.go
    • Line 62: warning: cyclomatic complexity 25 of function allowSpace() is high (> 15) (gocyclo)
    • parse/transform.go
    • Line 203: warning: cyclomatic complexity 55 of function NestedInlines2FlattedSpans() is high (> 15) (gocyclo)
    • Line 22: warning: cyclomatic complexity 55 of function NestedInlines2FlattedSpansHybrid() is high (> 15) (gocyclo)
    • html/escape.go
    • Line 57: warning: cyclomatic complexity 43 of function unescapeEntity() is high (> 15) (gocyclo)
    • parse/link.go
    • Line 300: warning: cyclomatic complexity 20 of function (*Context).parseLinkLabel() is high (> 15) (gocyclo)
    • Line 22: warning: cyclomatic complexity 20 of function (*Context).parseLinkRefDef() is high (> 15) (gocyclo)
    • render/format_renderer.go
    • Line 1655: warning: cyclomatic complexity 19 of function (*FormatRenderer).renderListItem() is high (> 15) (gocyclo)
    • Line 210: warning: cyclomatic complexity 18 of function (*FormatRenderer).renderTextMark() is high (> 15) (gocyclo)
    • Line 921: warning: cyclomatic complexity 18 of function (*FormatRenderer).renderTable() is high (> 15) (gocyclo)
    • Line 1192: warning: cyclomatic complexity 16 of function (*FormatRenderer).renderParagraph() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words