Showing 155 of 280 total issues
Function highlightTextByOffset
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export function highlightTextByOffset({
textArray,
startoffset,
endoffset,
lang,
- 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
Consider simplifying this complex logical expression. Open
if (
(filter !== 'numbers' ||
(this.language !== 'tib' &&
this.language !== 'skt' &&
this.language !== 'multi')) &&
Function render
has 96 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 render
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
//prettier-ignore
return html`
<div class="data-view ${this.headerVisibility}" lang="${this.language}" view="${this.viewMode}">
<div class="data-view__main-container">
Function render
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
if (
this.selectedView === DATA_VIEW_MODES.TEXT ||
this.selectedView === DATA_VIEW_MODES.TEXT_SEARCH
) {
Function findColorValues
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export function findColorValues({ mainSegment, segmentName, parallels, lang }) {
let WordList = [];
let colourValues = [];
let position = 0;
let Words = mainSegment;
- 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 splitIntoTokens
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
var splitIntoTokens = function(str) {
var tokens = []; // size = str.length + 2
var i = 0;
var maxlen = str.length;
TOKEN: while (i < maxlen) {
- 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 toWylie
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function toWylie(str, escape, warns) {
if (!warns) {
warns = [];
}
if (escape === undefined) escape = true;
Function toWylieOneStack
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
function toWylieOneStack(str, len, i) {
var orig_i = i;
var ffinal = null,
vowel = null,
klass = null;
Function render
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return html`
<div class="static-page-container lang_chn">
<div class="main-border">
<div class="main-content">
Function styles
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
static get styles() {
return [
css`
:host {
position: relative;
File data-view-header-fields.js
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { css, customElement, html, LitElement, property } from 'lit-element';
import '@vaadin/vaadin-combo-box/theme/material/vaadin-combo-box';
import '@vaadin/vaadin-select/theme/material/vaadin-select';
Function render
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
//prettier-ignore
return html`
<div class="selection-box">
<bn-card>
Function toWylieOneTsekbar
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function toWylieOneTsekbar(str, len, i) {
var orig_i = i;
var warns = [];
var stacks = []; // ArrayList<ToWylieStack>;
const placeholder = true;
- 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 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
if (this.fetchLoading) {
return html`
<bn-loading-spinner></bn-loading-spinner>
`;
Function collectionMenu
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
collectionMenu() {
if (!this.navigationMenuData) {
return;
}
let collectionMenuData = html``;
File formatted-segment.js
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { customElement, html, LitElement, property, css } from 'lit-element';
import { getDisplayName } from '../../api/actions';
import { getLanguageFromFilename } from './views-common';
import { segmentArrayToString } from './preprocessing';
File data-view-filters-container.js
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { customElement, html, css, LitElement, property } from 'lit-element';
import 'multiselect-combo-box/theme/material/multiselect-combo-box';
import '../utility/LoadingSpinner';
Function toWylieOneTsekbar
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function toWylieOneTsekbar(str, len, i) {
var orig_i = i;
var warns = [];
var stacks = []; // ArrayList<ToWylieStack>;
const placeholder = true;
File news-view.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { customElement, html, LitElement } from 'lit-element';
import styles from './../static-view.styles';
@customElement('news-view')