xfix/showdown2irc

View on GitHub

Showing 5 of 5 total issues

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

    exported const RplWelcome should have comment (or a comment on this block) or be unexported
    Open

        RplWelcome       Numeric = 1
    Severity: Minor
    Found in irc/numerics.go by golint

    exported type ServerAddress should have comment or be unexported
    Open

    type ServerAddress struct {
    Severity: Minor
    Found in showdown/utils.go by golint

    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
    Severity
    Category
    Status
    Source
    Language