Showing 155 of 280 total issues
Function render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return html`
<div class="static-page-container">
<div class="main-border">
<div class="main-content">
Function getLinkForSegmentNumbers
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
getLinkForSegmentNumbers(language, segmentnr) {
// prettier-ignore
const dhpVerses = [1,21,33,44,60,76,90,100,116,129,146,157,167,179,197,
209,221,235,256,273,290,306,320,334,360,383,424]
let linkText = '';
- 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 styles
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static get styles() {
return [
css`
:host {
display: flex;
Function rightSegmentContainer
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const rightSegmentContainer = (
segmentNr,
segText,
current_parallels,
number,
Function addSegmentObservers
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async addSegmentObservers() {
if (this.addedSegmentObservers) {
return;
}
const targets = this.shadowRoot.querySelectorAll('.left-segment');
Function getCleanedWord
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
function getCleanedWord(lang, splitWords, i, transMethod) {
let cleanedWord = '';
if (lang === LANGUAGE_CODES.TIBETAN) {
if (transMethod == 'uni') {
let word = splitWords[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 styles
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static get styles() {
return [
css`
.card {
padding: 12px 24px 24px 24px;
Function render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return html`
<div class="static-page-container">
<div class="main-border">
<div class="main-content">
Function updated
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updated(_changedProperties) {
this.scrollRightText();
_changedProperties.forEach((oldValue, propName) => {
if (['rightFileName'].includes(propName)) {
this.parallels = {};
Function render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return html`
<text-view-header
.fileName="${this.fileName}"
.lang="${this.lang}"
Function splitIntoTokens
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var splitIntoTokens = function(str) {
var tokens = []; // size = str.length + 2
var i = 0;
var maxlen = str.length;
TOKEN: while (i < maxlen) {
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (this.fetchLoading) {
return html`
<bn-loading-spinner></bn-loading-spinner>
`;
Function minimumLengthText
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const minimumLengthText = language => {
let minLength;
let languageFull;
let charOrSyl;
switch (language) {
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return html`
<vaadin-radio-group
label="Choose view:"
class="visibility-filters"
Function getLinkForSegmentNumbers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getLinkForSegmentNumbers(language, segmentnr) {
// prettier-ignore
const dhpVerses = [1,21,33,44,60,76,90,100,116,129,146,157,167,179,197,
209,221,235,256,273,290,306,320,334,360,383,424]
let linkText = '';
Function styles
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static get styles() {
return [
css`
.side-sheet {
display: flex;
Function addSegmentObservers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async addSegmentObservers() {
if (!this.shadowRoot.querySelector('.right-segment')) {
return;
}
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
//prettier-ignore
return html`
<div class="table-container">
<table-view-table-header
Function TextViewInfoModalContent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function TextViewInfoModalContent(language) {
return html`
<div>
<p>
The color coding of the syllables in the Inquiry Text indicates how many
Function updated
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updated(_changedProperties) {
_changedProperties.forEach(async (oldValue, propName) => {
if (propName === 'fileName' && !this.fetchLoading) {
if (!('leftTextData' in _changedProperties)) {
this.handleFilenameChanged();