BuddhaNexus/buddhanexus-frontend

View on GitHub

Showing 155 of 280 total issues

Function render has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    return html`
      <div class="static-page-container lang_skt">
        <div class="main-border">
          <div class="main-content">
Severity: Major
Found in src/views/neutralview/neutral-view-sanskrit.js - About 2 hrs to fix

    File text-view-left.js has 276 lines of code (exceeds 250 allowed). Consider refactoring.
    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';
    Severity: Minor
    Found in src/views/textview/text-view-left.js - About 2 hrs to fix

      Function render has 65 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">
      Severity: Major
      Found in src/views/static/presentations/presentations-view.js - About 2 hrs to fix

        Function render has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          render() {
            const shouldShowTransliterationSlider =
              ((this.language === 'tib' || this.language === 'multi') &&
                this.viewMode != 'graph') ||
              this.viewMode === 'english';
        Severity: Major
        Found in src/views/data/data-view-header.js - About 2 hrs to fix

          Function styles has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            static get styles() {
              return [
                sharedDataViewStyles,
                css`
                  #text-view-header {
          Severity: Major
          Found in src/views/textview/text-view-header.js - About 2 hrs to fix

            Function render has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render() {
                return html`
                  <div class="static-page-container lang_tib">
                    <div class="main-border">
                      <div class="main-content">
            Severity: Major
            Found in src/views/neutralview/neutral-view-tibetan.js - About 2 hrs to fix

              Function render has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render() {
                  // prettier-ignore
                  return html`
                    <vaadin-app-layout>
                      <vaadin-drawer-toggle slot="navbar"></vaadin-drawer-toggle>
              Severity: Major
              Found in src/index.js - About 2 hrs to fix

                Function render has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  render() {
                    const shouldShowMultiLingFilters =
                      this.viewMode !== DATA_VIEW_MODES.MULTILING;
                    //prettier-ignore
                    return html`
                Severity: Major
                Found in src/views/data/data-view-filters-container.js - About 2 hrs to fix

                  Function render has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render() {
                      return html`
                        <div class="static-page-container lang_pli">
                          <div class="main-border">
                            <div class="main-content">
                  Severity: Major
                  Found in src/views/neutralview/neutral-view-pali.js - About 2 hrs to fix

                    DataViewFiltersContainer has 21 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    @customElement('data-view-filters-container')
                    export class DataViewFiltersContainer extends LitElement {
                      // Filter sliders:
                      @property({ type: String }) viewMode;
                      @property({ type: String }) fileName;
                    Severity: Minor
                    Found in src/views/data/data-view-filters-container.js - About 2 hrs to fix

                      Function highlightActiveMainElement has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                      Open

                      export function highlightActiveMainElement({
                        rootSegtext,
                        rootSegnr,
                        selectedNumbers,
                        startoffset,
                      Severity: Minor
                      Found in src/views/textview/textViewUtils.js - About 2 hrs to fix

                      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

                        renderFilesCollectionFilters() {
                          const loading =
                            this.filterCategoriesDataLoading ||
                            this.filterFilesDataLoading ||
                            this.filterCategoriesDataLoading ||
                      Severity: Major
                      Found in src/views/data/data-view-filters-container.js - About 2 hrs to fix

                        Function render has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render() {
                            //prettier-ignore
                            return html`
                              <div class="data-view-filter-sliders">
                                <div
                        Severity: Major
                        Found in src/views/data/data-view-filter-sliders.js - About 2 hrs to fix

                          Function updated has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            updated(_changedProperties) {
                              _changedProperties.forEach(async (oldValue, propName) => {
                                if (propName === 'filename' && !this.fetchLoading) {
                                  this.lang = getLanguageFromFilename(this.filename);
                          
                          
                          Severity: Minor
                          Found in src/views/utility/source-link.js - About 2 hrs to fix

                            Function styles has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              static get styles() {
                                return [
                                  sharedDataViewStyles,
                                  css`
                                    #english-view-header {
                            Severity: Minor
                            Found in src/views/englishview/english-view-header.js - About 1 hr to fix

                              Function styles has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                static get styles() {
                                  return [
                                    css`
                                      :host {
                                        width: 100%;
                              Severity: Minor
                              Found in src/views/data/data-view-filter-sliders.js - About 1 hr to fix

                                Function render has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  render() {
                                    //prettier-ignore
                                    return html`
                                      <div class="static-page-container">
                                        <div class="main-border">
                                Severity: Minor
                                Found in src/views/static/home/home-view.js - About 1 hr to fix

                                  Function displayParallels has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    displayParallels(e) {
                                      if (!e || !e.target) {
                                        return;
                                      }
                                      let allSegments = this.shadowRoot.querySelectorAll(
                                  Severity: Minor
                                  Found in src/views/textview/text-view-right.js - About 1 hr to fix

                                    Function render has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      render() {
                                        //prettier-ignore
                                        return html`
                                          <div class="visual-page-container">
                                            <div class="main-border">
                                    Severity: Minor
                                    Found in src/views/visual/visual-view-selection-box.js - About 1 hr to fix

                                      Function highlightParallel has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        highlightParallel({
                                          rootSegments,
                                          rootOffsetBegin,
                                          rootOffsetEnd,
                                          rightMode,
                                      Severity: Minor
                                      Found in src/views/textview/text-view.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language