Showing 191 of 191 total issues
Avoid too many return
statements within this function. Open
return right<RuntimeError, OutputBindings>({});
Avoid too many return
statements within this function. Open
return left<RuntimeError, OutputBindings>(errorOrNotificationEvent.value);
Avoid too many return
statements within this function. Open
return left<RuntimeError, NotificationEvent>(error);
Avoid too many return
statements within this function. Open
return ResponseErrorInternal(
`Error retrieving MessageStatus: ${
errorOrMaybeMessageStatus.value.code
}|${errorOrMaybeMessageStatus.value.body}`
);
Avoid too many return
statements within this function. Open
return left<RuntimeError, OutputBindings>(
TransientError("Cannot update message pending status")
);
Avoid too many return
statements within this function. Open
return right<RuntimeError, OutputBindings>(
withoutUndefinedValues(outputBindings)
);
Avoid too many return
statements within this function. Open
return ResponseErrorInternal(
`Error retrieving NotificationStatus: ${
errorOrNotificationStatuses.value.name
}|${errorOrNotificationStatuses.value.message}`
);
Avoid too many return
statements within this function. Open
return ResponseSuccessJson(
retrievedServiceToPublic(maybeUpdatedService.value)
);
Avoid too many return
statements within this function. Open
return ResponseErrorQuery(
"Error while updating the existing service",
errorOrMaybeUpdatedService.value
);
Avoid too many return
statements within this function. Open
return ResponseErrorQuery(
"Error while creating Message",
errorOrMessage.value
);
Avoid too many return
statements within this function. Open
return ResponseSuccessJson(returnedMessage);
Avoid too many return
statements within this function. Open
return ResponseErrorValidation(
"Unable to decode CreatedMessageEvent",
readableReport(createdMessageEventOrError.value)
);
Avoid too many return
statements within this function. Open
return right<RuntimeError, NotificationEvent>(emailNotificationEvent);
Function handleNotification
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export async function handleNotification(
lAppInsightsClient: TelemetryClient,
lNotificationModel: NotificationModel,
webhookNotificationEvent: NotificationEvent
): Promise<Either<RuntimeError, NotificationEvent>> {
- Read upRead up
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
Trailing spaces Open
- [submitMessageforUser] Added payment metadata into the message payload
- Read upRead up
- Exclude checks
MD009 - Trailing spaces
Tags: whitespace
Aliases: no-trailing-spaces
Parameters: br_spaces (number; default: 0)
This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.
The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.
Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.
Headers should be surrounded by blank lines Open
### Added
- Read upRead up
- Exclude checks
MD022 - Headers should be surrounded by blank lines
Tags: headers, blank_lines
Aliases: blanks-around-headers
This rule is triggered when headers (any style) are either not preceded or not followed by a blank line:
# Header 1
Some text
Some more text
## Header 2
To fix this, ensure that all headers have a blank line both before and after (except where the header is at the beginning or end of the document):
# Header 1
Some text
Some more text
## Header 2
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse headers that don't have a blank line before, and will parse them as regular text.
Trailing spaces Open
- Fixed a bug during function packing that prevents the API backend to run
- Read upRead up
- Exclude checks
MD009 - Trailing spaces
Tags: whitespace
Aliases: no-trailing-spaces
Parameters: br_spaces (number; default: 0)
This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.
The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.
Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.
Headers should be surrounded by blank lines Open
## [v0.52.0] - 2018-09-19
- Read upRead up
- Exclude checks
MD022 - Headers should be surrounded by blank lines
Tags: headers, blank_lines
Aliases: blanks-around-headers
This rule is triggered when headers (any style) are either not preceded or not followed by a blank line:
# Header 1
Some text
Some more text
## Header 2
To fix this, ensure that all headers have a blank line both before and after (except where the header is at the beginning or end of the document):
# Header 1
Some text
Some more text
## Header 2
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse headers that don't have a blank line before, and will parse them as regular text.
Headers should be surrounded by blank lines Open
### Changed
- Read upRead up
- Exclude checks
MD022 - Headers should be surrounded by blank lines
Tags: headers, blank_lines
Aliases: blanks-around-headers
This rule is triggered when headers (any style) are either not preceded or not followed by a blank line:
# Header 1
Some text
Some more text
## Header 2
To fix this, ensure that all headers have a blank line both before and after (except where the header is at the beginning or end of the document):
# Header 1
Some text
Some more text
## Header 2
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse headers that don't have a blank line before, and will parse them as regular text.
Headers should be surrounded by blank lines Open
### Added
- Read upRead up
- Exclude checks
MD022 - Headers should be surrounded by blank lines
Tags: headers, blank_lines
Aliases: blanks-around-headers
This rule is triggered when headers (any style) are either not preceded or not followed by a blank line:
# Header 1
Some text
Some more text
## Header 2
To fix this, ensure that all headers have a blank line both before and after (except where the header is at the beginning or end of the document):
# Header 1
Some text
Some more text
## Header 2
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse headers that don't have a blank line before, and will parse them as regular text.