lowdefy/lowdefy

View on GitHub

Showing 9,449 of 9,537 total issues

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

const mockBlock = ({ meta, schema }) => {
  const mockMath = Object.create(global.Math);
  mockMath.random = () => 0.5;
  global.Math = mockMath;
  const moveItemDown = jest.fn();
Severity: Minor
Found in packages/utils/block-dev/src/mockBlock.js - 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 recursiveBuild has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

async function recursiveBuild({ context, refDef, count, referencedFrom }) {
  // TODO: Maybe it would be better to detect a cycle, since this is the real issue here?
  if (count > 10000) {
    throw new Error(`Maximum recursion depth of references exceeded.`);
  }
Severity: Minor
Found in packages/build/src/build/buildRefs/recursiveBuild.js - 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 sanitizeGrow has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Confirmed

const sanitizeGrow = (value) => {
  if (value === 'unset' || value === 'inherit' || value === 'initial') {
    return value;
  }
  if (type.isNumber(value) && value >= 0) {
Severity: Minor
Found in packages/layout/src/deriveLayout.js - 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 recursiveFormatPath has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Confirmed

function recursiveFormatPath({ data, instancePath, formattedPath = '', gap = '', root = false }) {
  if (instancePath.length === 0) return formattedPath;
  const key = instancePath.shift();
  const newData = get(data, key);
  let newPath;
Severity: Minor
Found in packages/build/src/utils/formatErrorMessage.js - 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 buildRequest has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Confirmed

function buildRequest(request, pageContext) {
  const { auth, checkDuplicateRequestId, pageId, typeCounters } = pageContext;
  if (type.isUndefined(request.id)) {
    throw new Error(`Request id missing at page "${pageId}".`);
  }
Severity: Minor
Found in packages/build/src/build/buildPages/buildBlock/buildRequests.js - 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 buildApp has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function buildApp({ components }) {
  if (type.isNone(components.app)) {
    components.app = {};
  }
  if (!type.isObject(components.app)) {
Severity: Minor
Found in packages/build/src/build/buildApp.js - 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

Header levels should only increment by one level at a time
Open

### Bug Fixes
Severity: Info
Found in CHANGELOG.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

Header levels should only increment by one level at a time
Open

### Bug Fixes
Severity: Info
Found in CHANGELOG.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

Header levels should only increment by one level at a time
Open

### Bug Fixes
Severity: Info
Found in CHANGELOG.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

Header levels should only increment by one level at a time
Open

### Features
Severity: Info
Found in CHANGELOG.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

Header levels should only increment by one level at a time
Open

### Bug Fixes
Severity: Info
Found in CHANGELOG.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

Line length
Open

- **docs:** Update GoogleMaps blocks docs. Split into GoogleMaps, GoogleMapsHeatmap, GoogleMapsScript. ([262f5a4](https://github.com/lowdefy/lowdefy/commit/262f5a4392ecc3288f802b41cb0a854a01e991d9))
Severity: Info
Found in CHANGELOG.md by markdownlint

MD013 - Line length

Tags: line_length

Aliases: line-length

Parameters: linelength, ignorecodeblocks, codeblocks, tables (number; default 80, boolean; default false, boolean; default true, 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. To do this, set the ignore_code_blocks parameter to true. To exclude this rule for tables set the tables parameters to false. Setting the parameter code_blocks to false to exclude the rule for code blocks is deprecated and will be removed in a future release.

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

# [4.0.0-rc.1](https://github.com/lowdefy/lowdefy/compare/v4.0.0-rc.0...v4.0.0-rc.1) (2023-02-17)
Severity: Info
Found in CHANGELOG.md by markdownlint

MD013 - Line length

Tags: line_length

Aliases: line-length

Parameters: linelength, ignorecodeblocks, codeblocks, tables (number; default 80, boolean; default false, boolean; default true, 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. To do this, set the ignore_code_blocks parameter to true. To exclude this rule for tables set the tables parameters to false. Setting the parameter code_blocks to false to exclude the rule for code blocks is deprecated and will be removed in a future release.

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

# [4.0.0-alpha.33](https://github.com/lowdefy/lowdefy/compare/v4.0.0-alpha.32...v4.0.0-alpha.33) (2022-09-22)
Severity: Info
Found in CHANGELOG.md by markdownlint

MD013 - Line length

Tags: line_length

Aliases: line-length

Parameters: linelength, ignorecodeblocks, codeblocks, tables (number; default 80, boolean; default false, boolean; default true, 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. To do this, set the ignore_code_blocks parameter to true. To exclude this rule for tables set the tables parameters to false. Setting the parameter code_blocks to false to exclude the rule for code blocks is deprecated and will be removed in a future release.

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.

Header levels should only increment by one level at a time
Open

### Bug Fixes
Severity: Info
Found in CHANGELOG.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

Header levels should only increment by one level at a time
Open

### Bug Fixes
Severity: Info
Found in CHANGELOG.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

Header levels should only increment by one level at a time
Open

### Bug Fixes
Severity: Info
Found in CHANGELOG.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

Header levels should only increment by one level at a time
Open

#### Actions
Severity: Info
Found in CHANGELOG.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

Unordered list indentation
Open

  - `Alert`
Severity: Info
Found in CHANGELOG.md by markdownlint

MD007 - Unordered list indentation

Tags: bullet, ul, indentation

Aliases: ul-indent

Parameters: indent (number; default 3)

This rule is triggered when list items are not indented by the configured number of spaces (default: 2).

Example:

* List item
   * Nested list item indented by 3 spaces

Corrected Example:

* List item
  * Nested list item indented by 2 spaces

Rationale (3 space indent): This matches the minimum possible indentation for ordered lists (i.e Kramdown won't parse anything less than 3 spaces as a sublist on OLs), and since MD005 requires consistent indentation across lists, anything less than three on this rule will cause a violation of MD005 if you have both kinds of lists in the same document.

This means if you want to set this to 2, you'll need to disable MD005.

Rationale (4 space indent): Same indent as code blocks, simpler for editors to implement. See https://cirosantilli.com/markdown-style-guide#spaces-before-list-marker for more information.

In addition, this is a compatibility issue with multi-markdown parsers, which require a 4 space indents. See http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting for a description of the problem.

Lists should be surrounded by blank lines
Open

 - Follow the checklist and complete everything that is applicable.

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