Showing 13 of 28 total issues
File select.ts
has 529 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Component,
Input,
Output,
EventEmitter,
Function inputEvent
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public inputEvent(e:any, isUpMode:boolean = false) {
// tab
if (e.keyCode === 9) {
return;
}
- 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 inputEvent
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public inputEvent(e:any, isUpMode:boolean = false) {
// tab
if (e.keyCode === 9) {
return;
}
Function mainClick
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private mainClick(e:any) {
if (this.inputMode === true || this._disabled === true) {
return;
}
Consider simplifying this complex logical expression. Open
if (isUpMode && (e.keyCode === 37 || e.keyCode === 39 || e.keyCode === 38 ||
e.keyCode === 40 || e.keyCode === 13)) {
e.preventDefault();
return;
}
Function mainClick
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private mainClick(e:any) {
if (this.inputMode === true || this._disabled === true) {
return;
}
- 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;
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;
Function ensureHighlightVisible
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public ensureHighlightVisible(optionsMap:Map<string, number> = null) {
let container = this.actor.element.nativeElement.querySelector('.ui-select-choices-content');
if (!container) {
return;
- 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 selectMatch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private selectMatch(value:SelectItem, e:Event = null) {
if (e) {
e.stopPropagation();
e.preventDefault();
}
- 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 constructor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
constructor(source:any) {
if (typeof source === 'string') {
this.id = this.text = source;
}
- 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"