Showing 139 of 731 total issues
Function ngOnChanges
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
ngOnChanges(changes: SimpleChanges) {
if (changes.schema) {
if (this.schema && this.schema.required) {
for (const prop of this.schema.required) {
this.requiredCache[prop] = true;
- 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 focusNext
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
focusNext() {
const options = this.options;
const len = options.length;
if (this.focusIndex < len - 1) {
for (let i = this.focusIndex + 1; i < len; i++) {
- 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 adjustMenuDirection
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
adjustMenuDirection(event: {
[InViewportMetadata]: { entry: IntersectionObserverEntry };
target: HTMLElement;
visible: boolean;
}): void {
- 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 optionTemplates
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
set optionTemplates(val: QueryList<SelectOptionDirective>) {
this._optionTemplates = val;
if (val) {
const arr = val.toArray();
- 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 toggleDropdown
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
toggleDropdown(state: boolean): void {
if (this.dropdownActive === state) return;
this.dropdownActive = state;
- 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
Avoid too many return
statements within this function. Open
return DATE_DISPLAY_FORMATS.date;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return DATE_DISPLAY_FORMATS.dateTime;
Avoid too many return
statements within this function. Open
return DATE_DISPLAY_FORMATS.dateTime;
Avoid too many return
statements within this function. Open
return DATE_DISPLAY_FORMATS.date;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return placement;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return el.parent().find('.radio-label--content').text().trim() || '';
Avoid too many return
statements within this function. Open
return undefined;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return findInput(element).val();
Function increment
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private increment(): void {
if (this.progress >= 100) return;
// inspired by angular-loading-bar
// https://github.com/chieffancypants/angular-loading-bar
- 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"