cloudfoundry/cloud_controller_ng

View on GitHub

Showing 2,660 of 2,660 total issues

Color literals like #ccc should only be used in variable declarations; they should be referred to via variable everywhere else.
Open

    border-bottom: 1px solid #ccc;

Color literals like #ccc should only be used in variable declarations; they should be referred to via variable everywhere else.
Open

    border-top: 1px solid #ccc;

Each selector in a comma sequence should be on its own single line
Open

  h1 + p, h1 + pre + p {

Properties should be ordered background-color, border-radius, color
Open

      border-radius: 0;

Unnecessary parent selector (&)
Open

    & > p {

Color literals like #909090 should only be used in variable declarations; they should be referred to via variable everywhere else.
Open

  color: #909090;

Don't use variables in the printf format string. Use printf "..%s.." "$foo".
Open

  printf "\n${CLEAR_LINE}${GREEN}đźš”  Rubocop has autocorrected your transgressions!${NO_COLOR}\n"
Severity: Minor
Found in scripts/rubocop-pre-commit by shellcheck

Don't use variables in the printf format string. Use printf "..%s.." "$foo".

Problematic code:

printf "Hello, $NAME\n"

Correct code:

printf "Hello, %s\n" "$NAME"

Rationale:

printf interprets escape sequences and format specifiers in the format string. If variables are included, any escape sequences or format specifiers in the data will be interpreted too, when you most likely wanted to treat it as data. Example:

coverage='96%'
printf "Unit test coverage: %s\n" "$coverage"
printf "Unit test coverage: $coverage\n"

The first printf writes Unit test coverage: 96%.

The second writes bash: printf: `\': invalid format character

Exceptions

Sometimes you may actually want to interpret data as a format string, like in:

hexToAscii() { printf "\x$1"; }
hexToAscii 21

or when you have a pattern in a variable:

filepattern="file-%d.jpg"
printf -v filename "$filepattern" "$number"

These are valid use cases with no useful rewrites. Please [[ignore]] the warnings with a [[directive]].

Notice

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

Expected item on line 317 to appear before line 313. Rule sets should be ordered as follows: @extends, @includes without @content, properties, @includes with @content, nested rule sets
Open

    @extend %left-col;

Unnecessary parent selector (&)
Open

  & > ul, & > ol {

Color literals like #ddd should only be used in variable declarations; they should be referred to via variable everywhere else.
Open

    border-top: 1px solid #ddd;

Each selector in a comma sequence should be on its own single line
Open

  h1 + h2, h1 + div + h2 {

border-top: 0 is preferred over border-top: none
Open

    border-top: none;

Properties should be ordered font-size, padding
Open

      padding: 10px;

Each selector in a comma sequence should be on its own single line
Open

  p, li, dt, dd {

Merge rule aside.warning:before with rule on line 445
Open

  aside.warning:before {

Expected item on line 498 to appear before line 488. Rule sets should be ordered as follows: @extends, @includes without @content, properties, @includes with @content, nested rule sets
Open

    @extend %right-col;

Color literals like #404040 should only be used in variable declarations; they should be referred to via variable everywhere else.
Open

      border-bottom: 1px solid #404040;

Don't use variables in the printf format string. Use printf "..%s.." "$foo".
Open

    printf "\n${CLEAR_LINE}${GREEN}âť“ Some of your files are partially staged- add the corrections yourself and commit with -n.${NO_COLOR}\n"
Severity: Minor
Found in scripts/rubocop-pre-commit by shellcheck

Don't use variables in the printf format string. Use printf "..%s.." "$foo".

Problematic code:

printf "Hello, $NAME\n"

Correct code:

printf "Hello, %s\n" "$NAME"

Rationale:

printf interprets escape sequences and format specifiers in the format string. If variables are included, any escape sequences or format specifiers in the data will be interpreted too, when you most likely wanted to treat it as data. Example:

coverage='96%'
printf "Unit test coverage: %s\n" "$coverage"
printf "Unit test coverage: $coverage\n"

The first printf writes Unit test coverage: 96%.

The second writes bash: printf: `\': invalid format character

Exceptions

Sometimes you may actually want to interpret data as a format string, like in:

hexToAscii() { printf "\x$1"; }
hexToAscii 21

or when you have a pattern in a variable:

filepattern="file-%d.jpg"
printf -v filename "$filepattern" "$number"

These are valid use cases with no useful rewrites. Please [[ignore]] the warnings with a [[directive]].

Notice

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

Unnecessary parent selector (&)
Open

  & > h1, & > h2, & > div {

Properties should be ordered border-bottom, color, text-decoration
Open

      color: #fff;
Severity
Category
Status
Source
Language