Showing 711 of 1,553 total issues

Function parser has 3026 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var parser = (function () {
  var o = function (k, v, o, l) {
      for (o = o || {}, l = k.length; l--; o[k[l]] = v);
      return o
    },
Severity: Major
Found in packages/miew-cli/src/MiewCLIParser.js - About 2 wks to fix

    Function parser has 2634 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var parser = function () {
      var o = function o(k, v, _o, l) {
        for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {
        }
        return _o;
    Severity: Major
    Found in packages/miew-cli/dist/index.modern.js - About 1 wk to fix

      Function parser has 2634 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var parser = function () {
        var o = function o(k, v, _o, l) {
          for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {
          }
          return _o;
      Severity: Major
      Found in packages/miew-cli/dist/index.js - About 1 wk to fix

        File index.js has 4041 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /** 3D Molecular Viewer v0.0.1
        Copyright (c) 2015-2023 EPAM Systems, Inc. */
        
        'use strict';
        
        
        Severity: Major
        Found in packages/miew-cli/dist/index.js - About 1 wk to fix

          File index.modern.js has 4039 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /** 3D Molecular Viewer v0.0.1
          Copyright (c) 2015-2023 EPAM Systems, Inc. */
          
          import { Miew } from 'miew';
          import { find, forEach, remove, omitBy, findKey, isNumber, assign, forIn, isEmpty, isEqual, isString, isPlainObject, isUndefined, slice, sortBy, keys, get, set } from 'lodash';
          Severity: Major
          Found in packages/miew-cli/dist/index.modern.js - About 1 wk to fix

            File Miew.ts has 3458 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /* global DEBUG:false, PACKAGE_VERSION:false */
            // eslint-disable-next-line
            //@ts-nocheck
            import { Spinner } from 'spin.js'
            import Stats from './gfx/Stats'
            Severity: Major
            Found in packages/miew/src/Miew.ts - About 1 wk to fix

              File MiewCLIParser.js has 3029 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /* eslint-disable */
              // DO NOT EDIT! Automatically generated from .jison
              /* parser generated by jison 0.4.18 */
              /*
                Returns a Parser object of the following structure:
              Severity: Major
              Found in packages/miew-cli/src/MiewCLIParser.js - About 1 wk to fix

                File Menu.js has 2631 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import $ from 'jquery'
                import _ from 'lodash'
                import { Miew } from 'miew'
                import menuHtml from '../../menu.html'
                import 'bootstrap'
                Severity: Major
                Found in demo/src/scripts/ui/Menu.js - About 1 wk to fix

                  Function parser has a Cognitive Complexity of 231 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var parser = (function () {
                    var o = function (k, v, o, l) {
                        for (o = o || {}, l = k.length; l--; o[k[l]] = v);
                        return o
                      },
                  Severity: Minor
                  Found in packages/miew-cli/src/MiewCLIParser.js - About 4 days 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 parser has a Cognitive Complexity of 224 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var parser = (function () {
                    var o = function (k, v, o, l) {
                        for (o = o || {}, l = k.length; l--; o[k[l]] = v);
                        return o
                      },
                  Severity: Minor
                  Found in packages/miew/src/utils/SelectionParser.js - About 4 days 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 parser has a Cognitive Complexity of 219 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var parser = function () {
                    var o = function o(k, v, _o, l) {
                      for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {
                      }
                      return _o;
                  Severity: Minor
                  Found in packages/miew-cli/dist/index.js - About 4 days 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 parser has a Cognitive Complexity of 219 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var parser = function () {
                    var o = function o(k, v, _o, l) {
                      for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {
                      }
                      return _o;
                  Severity: Minor
                  Found in packages/miew-cli/dist/index.modern.js - About 4 days 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 parser has 782 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var parser = (function () {
                    var o = function (k, v, o, l) {
                        for (o = o || {}, l = k.length; l--; o[k[l]] = v);
                        return o
                      },
                  Severity: Major
                  Found in packages/miew/src/utils/SelectionParser.js - About 3 days to fix

                    Function lexer has 652 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      var lexer = (function () {
                        var lexer = {
                          EOF: 1,
                    
                          parseError: function parseError(str, hash) {
                    Severity: Major
                    Found in packages/miew-cli/src/MiewCLIParser.js - About 3 days to fix

                      Function readCIF has a Cognitive Complexity of 142 (exceeds 5 allowed). Consider refactoring.
                      Open

                      export default function readCIF(source) {
                        let i = 0
                        let j = 0
                        const n = source.length
                        let code = NaN
                      Severity: Minor
                      Found in packages/miew/src/io/parsers/readCIF.js - About 2 days 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 _buildBetaSheets has a Cognitive Complexity of 135 (exceeds 5 allowed). Consider refactoring.
                      Open

                        _buildBetaSheets() {
                          // find bridges
                          // check each chain against each other chain, and against itself
                          const bridges = []
                          for (let a = 0; a < this._complex._chains.length; ++a) {
                      Severity: Minor
                      Found in packages/miew/src/chem/SecondaryStructureMap.js - About 2 days 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

                      Miew has 139 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      export class Miew extends EventDispatcher {
                        constructor(opts: MiewOptions) {
                          super()
                          this._opts = merge(
                            {
                      Severity: Major
                      Found in packages/miew/src/Miew.ts - About 2 days to fix

                        Function ContactSurface has a Cognitive Complexity of 122 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function ContactSurface(packedArrays, boundaries, params, _indexList) {
                          // Field generation method adapted from AstexViewer (Mike Hartshorn)
                          // by Fred Ludlow.
                          // Other parts based heavily on NGL (Alexander Rose) EDT Surface class
                          //
                        Severity: Minor
                        Found in packages/miew/src/gfx/geometries/ContactSurface.js - About 2 days 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 lexer has 440 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var lexer = function () {
                            var lexer = {
                              EOF: 1,
                              parseError: function parseError(str, hash) {
                                if (this.yy.parser) {
                        Severity: Major
                        Found in packages/miew-cli/dist/index.js - About 2 days to fix

                          Function lexer has 440 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            var lexer = function () {
                              var lexer = {
                                EOF: 1,
                                parseError: function parseError(str, hash) {
                                  if (this.yy.parser) {
                          Severity: Major
                          Found in packages/miew-cli/dist/index.modern.js - About 2 days to fix
                            Severity
                            Category
                            Status
                            Source
                            Language