Showing 155 of 280 total issues
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
//prettier-ignore
return html`
<div class="static-page-container">
<div class="main-border">
Function addCatagoryFiles
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
addCatagoryFiles(files) {
let pictureFiles = preprocessMenuData(files);
let totalFilesList = [];
if (pictureFiles.length !== 0) {
totalFilesList = pictureFiles.map(
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return html`
<div class="static-page-container">
<div class="main-border">
<div class="main-content">
Function updated
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
updated(_changedProperties) {
super.updated(_changedProperties);
this.lang = getLanguageFromFilename(this.fileName);
_changedProperties.forEach(async (oldValue, propName) => {
if (propName === 'fileName' && !this.fetchLoading) {
Function fetchData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
async fetchData() {
if (!this.fileName) {
this.fetchLoading = false;
return;
}
Function TextViewLayoutRight
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const TextViewLayoutRight = (
textRight,
parallels,
clickFunction,
rightTextData,
Function parseDisplayData
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
parseDisplayData(displayData, segmentnrString) {
this.displayName = displayData ? displayData[0] : '';
if (!this.shouldNotShowExtLink) {
if (
this.lang === LANGUAGE_CODES.SANSKRIT ||
- 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 TextSegment
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function TextSegment({
inputData,
lang,
colorValues,
onClick = 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 fetchNewText
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
async fetchNewText() {
this.fetchLoading = true;
const { textleft, parallels, error } = await getFileTextAndParallels({
fileName: this.fileName,
limit_collection: this.limitCollection,
- 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 preprocessMenuData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function preprocessMenuData(menuData) {
// this function has a bit of spaghetti-style; maybe we can refactor it at some point.
return menuData.map(menuEntry => {
menuEntry.imgStringPLI = '';
menuEntry.imgStringSKT = '';
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
if (!this.fileName) {
//prettier-ignore
return html`
<div class="data-view-subheader">
Function getIcon
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
getIcon(par_lang) {
if (!this.logo) {
return;
}
let title;
Function firstUpdated
has 26 lines of code (exceeds 25 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];
Consider simplifying this complex logical expression. Open
if (
(this.viewMode === DATA_VIEW_MODES.TEXT ||
this.viewMode === DATA_VIEW_MODES.TEXT_SEARCH ||
this.viewMode === DATA_VIEW_MODES.TABLE ||
this.viewMode === DATA_VIEW_MODES.NUMBERS ||
Function addSegmentObservers
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
async addSegmentObservers() {
if (!this.shadowRoot.querySelector('.right-segment')) {
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 exportJsEWTS
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function exportJsEWTS(global) {
const jsEWTS = {
fromWylie: fromWylie,
toWylie: toWylie,
};
- 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 getExternalLinkName
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getExternalLinkName(language, externalLink) {
if (!externalLink) {
return;
}
let linkName = '';
- 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 render
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
render() {
if (
this.selectedView === DATA_VIEW_MODES.TEXT ||
this.selectedView === DATA_VIEW_MODES.TEXT_SEARCH
) {
- 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 TextSegmentWords
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
inputData,
lang,
colorValues,
highlightMode,
onClick,
Function getLeftSegmentColors
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
current_parallels,
segText,
segmentNr,
lang,
leftSideSelected,