soumya92/barista

View on GitHub

Showing 92 of 92 total issues

Line length
Open

<img src="https://raw.githubusercontent.com/soumya92/barista/gh-pages/logo/128.png" height="128" width="128" alt="Logo" />
Severity: Info
Found in README.md by markdownlint

MD013 - Line length

Tags: line_length

Aliases: line-length Parameters: linelength, codeblocks, tables (number; default 80, boolean; default true)

This rule is triggered when there are lines that are longer than the configured line length (default: 80 characters). To fix this, split the line up into multiple lines.

This rule has an exception where there is no whitespace beyond the configured line length. This allows you to still include items such as long URLs without being forced to break them in the middle.

You also have the option to exclude this rule for code blocks and tables. To do this, set the code_blocks and/or tables parameters to false.

Code blocks are included in this rule by default since it is often a requirement for document readability, and tentatively compatible with code rules. Still, some languages do not lend themselves to short lines.

Can't follow non-constant source. Use a directive to specify location.
Open

[ -e "$CONFIG_DIR/barista/keys" ] && . "$CONFIG_DIR/barista/keys"
Severity: Minor
Found in build.sh by shellcheck

Can't follow non-constant source. Use a directive to specify location.

Problematic code:

. "$(find_install_dir)/lib.sh"

Correct code:

# shellcheck source=src/lib.sh
. "$(find_install_dir)/lib.sh"

Rationale:

ShellCheck is not able to include sourced files from paths that are determined at runtime. The file will not be read, potentially resulting in warnings about unassigned variables and similar.

Use a [[Directive]] to point shellcheck to a fixed location it can read instead.

Exceptions:

If you don't care that ShellCheck is unable to account for the file, specify # shellcheck source=/dev/null.

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

var childId should be childID
Open

        oldName, childId := nameAndId(child)
Severity: Minor
Found in logging/id.go by golint

First header should be a top level header
Open

## Contributor License Agreement
Severity: Info
Found in CONTRIBUTING.md by markdownlint

MD002 - First header should be a top level header

Tags: headers

Aliases: first-header-h1

Parameters: level (number; default 1)

This rule is triggered when the first header in the document isn't a h1 header:

## This isn't a H1 header

### Another header

The first header in the document should be a h1 header:

# Start with a H1 header

## Then use a H2 for subsections

Emphasis used instead of a header
Open

**This is not an official Google product**
Severity: Info
Found in README.md by markdownlint

MD036 - Emphasis used instead of a header

Tags: headers, emphasis

Parameters: punctuation (string; default ".,;:!?")

Aliases: no-emphasis-as-header

This check looks for instances where emphasized (i.e. bold or italic) text is used to separate sections, where a header should be used instead:

**My document**

Lorem ipsum dolor sit amet...

_Another section_

Consectetur adipiscing elit, sed do eiusmod.

To fix this, use markdown headers instead of emphasized text to denote sections:

# My document

Lorem ipsum dolor sit amet...

## Another section

Consectetur adipiscing elit, sed do eiusmod.

Note: this rule looks for single line paragraphs that consist entirely of emphasized text. It won't fire on emphasis used within regular text, multi-line emphasized paragraphs, and paragraphs ending in punctuation. Similarly to rule MD026, you can configure what characters are recognized as punctuation.

This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
Open

        -timeout 90s \
Severity: Minor
Found in test.sh by shellcheck

This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.

Problematic code:

var='This is long \
piece of text'

Correct code:

var='This is a long '\
'piece of text'

Rationale:

You have a single quoted string containing a backslash followed by a linefeed (newline). Unlike double quotes or unquoted strings, this has no special meaning. The string will contain a literal backslash and a linefeed.

If you wanted to break the line but not add a linefeed to the string, stop the single quote, break the line, and reopen it. This is demonstrated in the correct code.

If you wanted to break the line and also include the linefeed as a literal, you don't need a backslash:

var='This is a multi-line string
with an embedded linefeed'

Exceptions:

If you do want a string containing a literal backslash+linefeed combo, such as with sed, you can [[ignore]] this warning.

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

TODO found
Open

// TODO: See if this is a solved problem.
Severity: Minor
Found in modules/media/info.go by fixme

TODO found
Open

                // TODO: Handle parent being moved. For most modules, this is not
Severity: Minor
Found in base/watchers/file/file.go by fixme

TODO found
Open

            // TODO: Figure out how to check the token for server-side validity.
Severity: Minor
Found in oauth/oauth.go by fixme

TODO found
Open

    // TODO: Handle more than 10 arguments.
Severity: Minor
Found in base/watchers/dbus/testbus.go by fixme

TODO found
Open

# TODO: Use argument parsing here.
Severity: Minor
Found in testing/flakes.sh by fixme

TODO found
Open

    // TODO: Argument parsing here.
Severity: Minor
Found in oauth/oauth.go by fixme
Severity
Category
Status
Source
Language