Showing 155 of 280 total issues
Function LeftSegmentContainer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function LeftSegmentContainer({
segmentNr,
segText,
current_parallels,
number,
- 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 deeply nested control flow statements. Open
if (m_tokens.contains(tr)) {
tokens.push(tr);
i += len;
continue TOKEN;
}
Avoid deeply nested control flow statements. Open
} else if (state == State.SUFF2) {
consonants.push(stack.single_consonant);
if (isSuff2(stack.single_consonant)) {
if (!suff2(stack.single_consonant, prev_cons)) {
warns.push(
Avoid deeply nested control flow statements. Open
if (o != null) {
out += o;
continue ESC;
}
Function adjustChartHeight
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
adjustChartHeight() {
this.chartHeight = '84vh';
if (!this.graphData || !this.graphData[this.currentPage]) {
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 deeply nested control flow statements. Open
if (opts.check_strict && !plus) {
var prev = consonantStringBackwards(tokens, i - 1, orig_i);
if (!subscript(t2, prev)) {
prev = prev.replace(/\+/g, '');
warns.push(
Avoid deeply nested control flow statements. Open
if (position > rootOffsetEnd) {
word.classList.remove(C_HIGHLIGHTED_SEGMENT);
} else {
word.classList.add(C_HIGHLIGHTED_SEGMENT);
}
Function scrollAfterEndlessReload
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
scrollAfterEndlessReload() {
if (this.noScrolling && this.EndlessScrollFlag) {
if (this.activeSegment) {
let mainScrollPosition = this.scrollTop;
let mainElement = document.querySelector('html');
- 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 deeply nested control flow statements. Open
if (position < parallels[i].root_offset_end) {
colourValues[j] += 1;
}
Avoid deeply nested control flow statements. Open
while (tokens[i] != null && tokens[i] == '^') {
caret++;
i++;
}
Avoid deeply nested control flow statements. Open
if (opts.check_strict) {
if (!isSuffix(stack.single_consonant)) {
warns.push(
'Invalid suffix consonant: "' + stack.single_consonant + '".'
);
Avoid deeply nested control flow statements. Open
if (t2 == 'l' && consonants > 1) break;
Function fetchDataText
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
async fetchDataText() {
if (!this.rightFileName) {
this.fetchLoading = false;
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 deeply nested control flow statements. Open
if (o == '^') {
st.caret = true;
} else {
if (o == 'H') st.visarga = true;
st.finals.push(o);
Function firstUpdated
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
firstUpdated(_changedProperties) {
super.firstUpdated(_changedProperties);
const currentUrl = window.location.href;
if (currentUrl.match('/chn/text/[TX][0-9]+$')) {
let textNr = currentUrl.match(/[TX][0-9]+$/g)[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 collectionMenu
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
collectionMenu() {
if (!this.navigationMenuData) {
return;
}
let collectionMenuData = html``;
- 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 consonantStringBackwards
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function consonantStringBackwards(tokens, i, orig_i) {
var out = [];
var t = '';
while (i >= orig_i && tokens[i] != null) {
t = tokens[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 TibetanSegmentUnicode
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const TibetanSegmentUnicode = segment => {
let strippedSegment = segment.replace(/ \//g, '/');
strippedSegment = strippedSegment.replace(/ng\//g, 'ng /'); // always put tsek between nga and shad
if (strippedSegment.match(/@|#/)) {
// don't process folio numbers
- 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 'Facsimile';
Avoid too many return
statements within this function. Open
return 'PTS Section';