Showing 711 of 1,553 total issues

Function getAtomByFullname has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  getAtomByFullname(fullName) {
    const parts = fullName.split('.')
    if (parts.length !== 3) {
      return null
    }
Severity: Minor
Found in packages/miew/src/chem/Complex.js - About 1 hr to fix

    Function setOptions has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      setOptions(opts) {
        if (typeof opts === 'string') {
          opts = Miew.options.fromAttr(opts)
        }
        if (opts.reps) {
    Severity: Minor
    Found in packages/miew/src/Miew.ts - About 1 hr to fix

      Function _renderShadowMap has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        _renderShadowMap() {
          if (!settings.now.shadow.on) {
            return
          }
      
      
      Severity: Minor
      Found in packages/miew/src/Miew.ts - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

            if (
              t &&
              (!(t.position.x === 0 && t.position.y === 0 && t.position.z === 0) ||
                !(
                  t.quaternion.x === 0 &&
        Severity: Critical
        Found in packages/miew/src/ComplexVisualEdit.js - About 1 hr to fix

          Function propagateProp has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              value: function propagateProp(path, arg) {
                if (path !== undefined) {
                  var argExc = {};
                  var adapter = options.adapters[_typeof(lodash.get(settings.defaults, path))];
                  if (adapter === undefined) {
          Severity: Minor
          Found in packages/miew-cli/dist/index.js - About 1 hr to fix

            Function fillToolbar has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function fillToolbar(type, name, option, entityList) {
                const toolbar = $(`${self._menuId} [data-toolbar-type=${type}]`).get(0)
                const list = entityList.all
                for (let i = 0, n = list.length; i < n; i++) {
                  let entry = list[i]
            Severity: Minor
            Found in demo/src/scripts/ui/Menu.js - About 1 hr to fix

              Function propagateProp has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  value: function propagateProp(path, arg) {
                    if (path !== undefined) {
                      var argExc = {};
                      var adapter = options.adapters[_typeof(get(settings.defaults, path))];
                      if (adapter === undefined) {
              Severity: Minor
              Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

                Function onError has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function onError(err) {
                  const doc = document.createDocumentFragment()
                
                  const containers = document.getElementsByClassName('miew-container')
                  const parent = containers.length > 0 ? containers[0] : null
                Severity: Minor
                Found in demo/src/scripts/index.js - About 1 hr to fix

                  Function setItem has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    setItem(itemIdx, botPos, topPos, itemRad) {
                      const chunkSize = this._chunkSize
                      const firstOffset = chunkSize * 2 * itemIdx * VEC_SIZE
                      const secondOffset = firstOffset + chunkSize * VEC_SIZE
                  
                  
                  Severity: Minor
                  Found in packages/miew/src/gfx/geometries/Simple2CCylindersGeometry.js - About 1 hr to fix

                    Function withinRadii has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      this.withinRadii = function (x, y, z, rExtra, out) {
                        let outIdx = 0
                    
                        const nearI = hashFunc(x, minX)
                        const nearJ = hashFunc(y, minY)
                    Severity: Minor
                    Found in packages/miew/src/gfx/geometries/ContactSurface.js - About 1 hr to fix

                      Function createShadowmapMaterial has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const createShadowmapMaterial = (function () {
                        const matValues = {
                          colorFromDepth: true,
                          orthoCam: true,
                          lights: false,
                      Severity: Minor
                      Found in packages/miew/src/gfx/meshutils.js - About 1 hr to fix

                        Function change has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          change(repSettings, complex, mode, color) {
                            const diff = {}
                        
                            // modify selector
                            if (repSettings.selector) {
                        Severity: Minor
                        Found in packages/miew/src/gfx/Representation.js - About 1 hr to fix

                          Function constructor has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            constructor(source, options) {
                              super(source, options)
                              this._tags = [
                                'HEADER',
                                'TITLE',
                          Severity: Minor
                          Found in packages/miew/src/io/exporters/PDBExporter.js - About 1 hr to fix

                            Function _collectGeoInfo has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              _collectGeoInfo(mesh) {
                                const {
                                  geometry: {
                                    attributes: { position, color, normal },
                                    index
                            Severity: Minor
                            Found in packages/miew/src/io/exporters/fbx/FBXInfoExtractor.js - About 1 hr to fix

                              Function _fillHeader has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                _fillHeader(headerFormat, arrays) {
                                  for (const key in headerFormat) {
                                    if (Object.hasOwn(headerFormat, key)) {
                                      switch (headerFormat[key][0]) {
                                        case valueType.singular:
                              Severity: Minor
                              Found in packages/miew/src/io/parsers/VolumeModel.js - About 1 hr to fix

                                Function RenderSettingsPanel has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const RenderSettingsPanel = () => {
                                  const options = [
                                    {
                                      name: 'Resolution'
                                    },

                                  Function vertexFusion has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    vertexFusion(offset, len) {
                                      const faceVer = this._indices.length
                                      const vertices = this._position
                                      const normals = this._normals
                                      const oldVerCount = vertices.length | 0
                                  Severity: Minor
                                  Found in packages/miew/src/gfx/geometries/IsoSurface.js - About 1 hr to fix

                                    Function constructor has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      constructor(
                                        ResidueGroup,
                                        geoParams,
                                        complex,
                                        colorer,
                                    Severity: Minor
                                    Found in packages/miew/src/gfx/modes/processors/ResiduesProcessor.js - About 1 hr to fix

                                      Function _polygonize has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        _polygonize(grid, isoLevel, triangles) {
                                          const { cubeIndex } = grid
                                          let i = 0
                                          const arrSize = IsoSurface._arrSize
                                          const firstIndices = IsoSurface._firstIndices
                                      Severity: Minor
                                      Found in packages/miew/src/gfx/geometries/IsoSurface.js - About 1 hr to fix

                                        Function W has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          function W(r, t, n, e) {
                                            switch (r) {
                                              case 1:
                                                return h(t)
                                              case 2:
                                        Severity: Minor
                                        Found in packages/miew/src/vendors/mmtf.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language