Showing 155 of 280 total issues
File tibetan-transliteration.js
has 1789 lines of code (exceeds 250 allowed). Consider refactoring. Open
function newHashSet() {
var x = [];
x.add = function(K) {
if (this.indexOf(K) < 0) this.push(K);
};
Function fromWylieOneStack
has a Cognitive Complexity of 121 (exceeds 5 allowed). Consider refactoring. Open
function fromWylieOneStack(tokens, i, opts) {
var orig_i = i;
var t = '',
t2 = ''; //, o = ''
var out = '';
- 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 fromWylie
has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring. Open
export function fromWylie(str, opts, warns) {
if (!warns) {
warns = [];
}
if (!opts) {
- 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 271 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 toWylie
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
export function toWylie(str, escape, warns) {
if (!warns) {
warns = [];
}
if (escape === undefined) escape = 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 fromWylieOneTsekbar
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
function fromWylieOneTsekbar(tokens, i, opts) {
// (str, int)
var orig_i = i;
var t = tokens[i];
// variables for tracking the state within the syllable as we parse it
- 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 fromWylieOneStack
has 190 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fromWylieOneStack(tokens, i, opts) {
var orig_i = i;
var t = '',
t2 = ''; //, o = ''
var out = '';
Function render
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
//prettier-ignore
return html`
<div class="static-page-container">
<div class="main-border">
Function render
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
render() {
if (!this.data) {
//prettier-ignore
return html`<span lang="en">Click on a syllable in the Inquiry Text to display the approximate
matches. Only colored syllables have parallels. Black text has no
- 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 toWylieOneStack
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
function toWylieOneStack(str, len, i) {
var orig_i = i;
var ffinal = null,
vowel = null,
klass = null;
- 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
File data-view.js
has 385 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @file data-view is the container component of table-view, numbers-view, table-view and graph-view.
*
* @todo:
* - pass filter values inside an object instead of separately in order to simplify code.
Function render
has 130 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 fromWylieOneTsekbar
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fromWylieOneTsekbar(tokens, i, opts) {
// (str, int)
var orig_i = i;
var t = tokens[i];
// variables for tracking the state within the syllable as we parse it
Function highlightParallel
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
highlightParallel({
rootSegments,
rootOffsetBegin,
rootOffsetEnd,
rightMode,
- 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
File text-view-right.js
has 370 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { customElement, html, LitElement, property } from 'lit-element';
import { findColorValues, highlightActiveMainElement } from './textViewUtils';
import {
getLanguageFromFilename,
Function render
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
if (!this.data) {
//prettier-ignore
return html`<span lang="en">Click on a syllable in the Inquiry Text to display the approximate
matches. Only colored syllables have parallels. Black text has no
DataView
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
@customElement('data-view')
export class DataView extends LitElement {
@property({ type: String }) fileName = '';
@property({ type: String }) language;
@property({ type: Number }) score;
Function render
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const shouldShowTextSearchBox =
(this.viewMode === DATA_VIEW_MODES.TEXT ||
this.viewMode === DATA_VIEW_MODES.TEXT_SEARCH) &&
this.fileName;
File actions.js
has 341 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
API_URL,
getFileSegmentsUrl,
getGraphDataUrl,
getTableViewUrl,
Function fromWylie
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function fromWylie(str, opts, warns) {
if (!warns) {
warns = [];
}
if (!opts) {