Showing 155 of 280 total issues
Function render
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return html`
<div class="static-page-container lang_skt">
<div class="main-border">
<div class="main-content">
File text-view-left.js
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { customElement, html, LitElement, property } from 'lit-element';
import { removeDuplicates } from '../utility/views-common';
import { getFileTextAndParallels } from '../../api/actions';
import sharedDataViewStyles from '../data/data-view-shared.styles';
Function render
has 65 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 render
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const shouldShowTransliterationSlider =
((this.language === 'tib' || this.language === 'multi') &&
this.viewMode != 'graph') ||
this.viewMode === 'english';
Function styles
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static get styles() {
return [
sharedDataViewStyles,
css`
#text-view-header {
Function render
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return html`
<div class="static-page-container lang_tib">
<div class="main-border">
<div class="main-content">
Function render
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
// prettier-ignore
return html`
<vaadin-app-layout>
<vaadin-drawer-toggle slot="navbar"></vaadin-drawer-toggle>
Function render
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const shouldShowMultiLingFilters =
this.viewMode !== DATA_VIEW_MODES.MULTILING;
//prettier-ignore
return html`
Function render
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return html`
<div class="static-page-container lang_pli">
<div class="main-border">
<div class="main-content">
DataViewFiltersContainer
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@customElement('data-view-filters-container')
export class DataViewFiltersContainer extends LitElement {
// Filter sliders:
@property({ type: String }) viewMode;
@property({ type: String }) fileName;
Function highlightActiveMainElement
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
export function highlightActiveMainElement({
rootSegtext,
rootSegnr,
selectedNumbers,
startoffset,
- 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 renderFilesCollectionFilters
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderFilesCollectionFilters() {
const loading =
this.filterCategoriesDataLoading ||
this.filterFilesDataLoading ||
this.filterCategoriesDataLoading ||
Function render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
//prettier-ignore
return html`
<div class="data-view-filter-sliders">
<div
Function updated
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updated(_changedProperties) {
_changedProperties.forEach(async (oldValue, propName) => {
if (propName === 'filename' && !this.fetchLoading) {
this.lang = getLanguageFromFilename(this.filename);
Function styles
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static get styles() {
return [
sharedDataViewStyles,
css`
#english-view-header {
Function styles
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static get styles() {
return [
css`
:host {
width: 100%;
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
//prettier-ignore
return html`
<div class="static-page-container">
<div class="main-border">
Function displayParallels
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
displayParallels(e) {
if (!e || !e.target) {
return;
}
let allSegments = this.shadowRoot.querySelectorAll(
Function render
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
//prettier-ignore
return html`
<div class="visual-page-container">
<div class="main-border">
Function highlightParallel
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
highlightParallel({
rootSegments,
rootOffsetBegin,
rootOffsetEnd,
rightMode,