Showing 166 of 560 total issues
Function parse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
parse(context: RR0SsgContext, data: string): S[] {
let eol = data.indexOf("\n")
const header = data.substring(0, eol)
data = data.substring(eol + 1).replaceAll(`""`, "''")
this.fields.clear()
- 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 multiVariableNeuralNetworkTrainer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var multiVariableNeuralNetworkTrainer = function (numberOfInputNodes,
svg_el, table_el,
dataPoints, labels,
weights, bias,
gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
- 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 getDate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected getDate(context: RR0SsgContext, caseLink: URL, row: Element): RR0SsgContext {
const timeStr = caseLink.pathname.substring(this.searchPath.length + 2)
const dateFields = UrecatHttpDatasource.urlDateFormat.exec(timeStr)
const itemContext = context.clone()
const dateTime = itemContext.time
- 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 next
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
next(context: HtmlRR0SsgContext): Link | undefined {
let fileName = context.inputFile.name;
if (this.isTimeFile(fileName)) {
const pos = this.timeFiles.indexOf(fileName);
if (pos >= 0) {
- 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 handle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async handle(context: HtmlRR0SsgContext, linkEl: HTMLAnchorElement, pathToSearch: string): Promise<void> {
if (this.dataService.dirs.find(dir => dir.startsWith(pathToSearch))) {
const dataList = await this.dataService.get(context, pathToSearch, ["api", "product", "org"], ["index.json"])
for (const data of dataList) {
const type = data?.type
- 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 getAge
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getAge(from?: Date): number | undefined {
if (this.birthTime) {
let timeDelta: number;
if (this.deathTime) {
timeDelta = this.deathTime.getTime() - this.birthTime.getTime();
- 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"