xfix/showdown2irc

View on GitHub
html2irc/html2irc.go

Summary

Maintainability
B
5 hrs
Test Coverage

Method htmlConverter.parseStartToken has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

func (c htmlConverter) parseStartToken() {
    // This is a really basic HTML rendering engine for purpose of decoding
    // raw text (such as output from commands).
    //
    // In CSS, there are two major display categories, inline and block.
Severity: Minor
Found in html2irc/html2irc.go - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method htmlConverter.parseStartToken has 82 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (c htmlConverter) parseStartToken() {
    // This is a really basic HTML rendering engine for purpose of decoding
    // raw text (such as output from commands).
    //
    // In CSS, there are two major display categories, inline and block.
Severity: Major
Found in html2irc/html2irc.go - About 2 hrs to fix

    2: cannot find package "golang.org/x/net/html" in any of:
    Open

        "golang.org/x/net/html"
    Severity: Minor
    Found in html2irc/html2irc.go by govet

    There are no issues that match your filters.

    Category
    Status