Showing 92 of 92 total issues
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return 1;
Avoid too many return
statements within this function. Open
return [];
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return collator.compare(bValue, aValue);
Avoid too many return
statements within this function. Open
return -1;
Avoid too many return
statements within this function. Open
return 0;
Function errorCaptureConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function errorCaptureConfig(config) {
const errorCaptureName = 'error-capture-enabled';
const errorEnvironmentName = 'error-capture-environment';
const { modulePrefix, serverVariables } = config;
- 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
Function allInstructors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
get allInstructors() {
if (
!this._offeringInstructorsData?.isResolved ||
!this._offeringInstructorGroupsInstructors?.isResolved ||
(this.isIndependentLearning && !this._ilmInstructorsData?.isResolved) ||
- 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
Function getUserFullName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getUserFullName(user) {
if (user.displayName) {
return user.displayName;
}
- 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
Function icsFeedUrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
get icsFeedUrl() {
if (this.icsFeedKey) {
let host = this.host;
if (!host) {
host = window.location.protocol + '//' + window.location.hostname;
- 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
Function sortBy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function sortBy(arr, sortKeys) {
if (arr !== null && typeof arr === 'object') {
if ('slice' in arr) {
arr = arr.slice();
}
- 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"