jameswlane/status-board

View on GitHub

Showing 112 of 112 total issues

Function renderJsDashboard has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

export function renderJsDashboard(packagesPath: any,
                                  wallboardAssetsFolder: any,
                                  dashboardName: any,
                                  request: Request,
                                  response: Response) {
Severity: Minor
Found in src/webapp/logic.ts - About 35 mins to fix

Function message has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    message(roomId: number, from: string, message: string, notify: 1 | 0, callback?: any) {
Severity: Minor
Found in src/job-dependencies/hipchat/hipchat.ts - About 35 mins to fix

Function getFirst has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

export function getFirst(packagesPath: string[],
                         itemName: string,
                         itemType: 'dashboards' | 'jobs' | 'widgets',
                         extension: string,
                         callback: any) {
Severity: Minor
Found in src/item-manager/get-first.ts - About 35 mins to fix

Function renderWidgetResource has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export function renderWidgetResource(localPackagesPath: string,
                                     resource: string,
                                     request: Request,
                                     response: Response) {
  let input;
Severity: Minor
Found in src/webapp/routes/widget/render-widget-resource.ts - About 35 mins 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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  atlasboard.on("widgetData", function (e, data) {
    $('.spinner', data.$widgetContainer.parent()).hide();
  });
Severity: Minor
Found in assets/javascripts/plugins/spinner.js and 1 other location - About 30 mins to fix
assets/javascripts/plugins/spinner.js on lines 23..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  atlasboard.on("widgetError", function (e, data) {
    $('.spinner', data.$errorContainer.parent()).hide();
  });
Severity: Minor
Found in assets/javascripts/plugins/spinner.js and 1 other location - About 30 mins to fix
assets/javascripts/plugins/spinner.js on lines 19..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function getJobs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export function getJobs(options: IJobOptions, callback: IVoidCallbackWithData) {
  const packagesPath = options.packagesPath;
  const filters = options.filters || {};

  const configPath = path.join(options.configPath, '/dashboard_common.json');
Severity: Minor
Found in src/job-manager/get-jobs.ts - About 25 mins 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

Function fillDependencies has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export function fillDependencies(jobWorker: any, deps: any): void {
  jobWorker.dependencies = {};

  const dependencyFolders = fs.readdirSync(__dirname);

Severity: Minor
Found in src/job-dependencies/loader.ts - About 25 mins 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

Line length
Open

| 2.x    | [![CircleCI](https://circleci.com/gh/jameswlane/status-board/tree/2.x.svg?style=svg)](https://circleci.com/gh/jameswlane/status-board/tree/2.x)       | [![dependencies Status](https://david-dm.org/jameswlane/status-board/2.x/status.svg)](https://david-dm.org/jameswlane/status-board)    | [![devDependencies Status](https://david-dm.org/jameswlane/status-board/2.x/dev-status.svg)](https://david-dm.org/jameswlane/status-board?type=dev)    |                                                                                                                                                                          | [![codecov](https://codecov.io/gh/jameswlane/status-board/branch/2.x/graph/badge.svg)](https://codecov.io/gh/jameswlane/status-board)    |                                                                                                                                                                                                                |
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.

Line length
Open

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
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.

Multiple top level headers in the same document
Open

# Unknown release date
Severity: Info
Found in docs/ROADMAP.md by markdownlint

MD025 - Multiple top level headers in the same document

Tags: headers

Aliases: single-h1

Parameters: level (number; default 1)

This rule is triggered when a top level header is in use (the first line of the file is a h1 header), and more than one h1 header is in use in the document:

# Top level header

# Another top level header

To fix, structure your document so that there is a single h1 header that is the title for the document, and all later headers are h2 or lower level headers:

# Title

## Header

## Another header

Rationale: A top level header is a h1 on the first line of the file, and serves as the title for the document. If this convention is in use, then there can not be more than one title for the document, and the entire document should be contained within this header.

Note: The level parameter can be used to change the top level (ex: to h2) in cases where an h1 is added externally.

Lists should be surrounded by blank lines
Open

* Drop Node 10.x.x support
Severity: Info
Found in docs/ROADMAP.md by markdownlint

MD032 - Lists should be surrounded by blank lines

Tags: bullet, ul, ol, blank_lines

Aliases: blanks-around-lists

This rule is triggered when lists (of any kind) are either not preceded or not followed by a blank line:

Some text
* Some
* List

1. Some
2. List
Some text

To fix this, ensure that all lists have a blank line both before and after (except where the block is at the beginning or end of the document):

Some text

* Some
* List

1. Some
2. List

Some text

Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse lists that don't have blank lines before and after them.

Note: List items without hanging indents are a violation of this rule; list items with hanging indents are okay:

* This is
not okay

* This is
  okay

Line length
Open

* Publishing others' private information, such as a physical or electronic address, without explicit permission
Severity: Info
Found in CODE_OF_CONDUCT.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.

Line length
Open

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
Severity: Info
Found in CODE_OF_CONDUCT.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.

Line length
Open

Also, please watch the repo and respond to questions/bug reports/feature requests! Thanks!
Severity: Info
Found in CONTRIBUTING.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.

Hard tabs
Open

    <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
Severity: Info
Found in README.md by markdownlint

MD010 - Hard tabs

Tags: whitespace, hard_tab

Aliases: no-hard-tabs

This rule is triggered by any lines that contain hard tab characters instead of using spaces for indentation. To fix this, replace any hard tab characters with spaces instead.

Example:

Some text

    * hard tab character used to indent the list item

Corrected example:

Some text

    * Spaces used to indent the list item instead

Multiple consecutive blank lines
Open


Severity: Info
Found in README.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Inline HTML
Open

| [<img src="https://avatars2.githubusercontent.com/u/794161?v=4" width="100px;" alt="James W. Lane III"/><br /><sub><b>James W. Lane III</b></sub>](http://fueledbydreams.com)<br />[💻](https://github.com/jameswlane/status-board/commits?author=jameswlane "Code") [⚠️](https://github.com/jameswlane/status-board/commits?author=jameswlane "Tests") [🚇](#infra-jameswlane "Infrastructure (Hosting, Build-Tools, etc)") [🔧](#tool-jameswlane "Tools") | [<img src="https://avatars2.githubusercontent.com/u/6710107?v=4" width="100px;" alt="Swami Kalagiri"/><br /><sub><b>Swami Kalagiri</b></sub>](https://www.linkedin.com/in/swami-kalagiri)<br />[💻](https://github.com/jameswlane/status-board/commits?author=SwamiKalagiri "Code") [⚠️](https://github.com/jameswlane/status-board/commits?author=SwamiKalagiri "Tests") |
Severity: Info
Found in README.md by markdownlint

MD033 - Inline HTML

Tags: html

Aliases: no-inline-html

This rule is triggered whenever raw HTML is used in a markdown document:

Inline HTML header

To fix this, use 'pure' markdown instead of including raw HTML:

# Markdown header

Rationale: Raw HTML is allowed in markdown, but this rule is included for those who want their documents to only include "pure" markdown, or for those who are rendering markdown documents in something other than HTML.

Line length
Open

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at james.w.lane@fueledbydreams.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Severity: Info
Found in CODE_OF_CONDUCT.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.

Inline HTML
Open

| [<img src="https://avatars2.githubusercontent.com/u/794161?v=4" width="100px;" alt="James W. Lane III"/><br /><sub><b>James W. Lane III</b></sub>](http://fueledbydreams.com)<br />[💻](https://github.com/jameswlane/status-board/commits?author=jameswlane "Code") [⚠️](https://github.com/jameswlane/status-board/commits?author=jameswlane "Tests") [🚇](#infra-jameswlane "Infrastructure (Hosting, Build-Tools, etc)") [🔧](#tool-jameswlane "Tools") | [<img src="https://avatars2.githubusercontent.com/u/6710107?v=4" width="100px;" alt="Swami Kalagiri"/><br /><sub><b>Swami Kalagiri</b></sub>](https://www.linkedin.com/in/swami-kalagiri)<br />[💻](https://github.com/jameswlane/status-board/commits?author=SwamiKalagiri "Code") [⚠️](https://github.com/jameswlane/status-board/commits?author=SwamiKalagiri "Tests") |
Severity: Info
Found in README.md by markdownlint

MD033 - Inline HTML

Tags: html

Aliases: no-inline-html

This rule is triggered whenever raw HTML is used in a markdown document:

Inline HTML header

To fix this, use 'pure' markdown instead of including raw HTML:

# Markdown header

Rationale: Raw HTML is allowed in markdown, but this rule is included for those who want their documents to only include "pure" markdown, or for those who are rendering markdown documents in something other than HTML.

Severity
Category
Status
Source
Language