Showing 711 of 1,553 total issues

Function copy has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  copy(source) {
    super.copy(source)

    this.fragmentShader = source.fragmentShader
    this.vertexShader = source.vertexShader
Severity: Minor
Found in packages/miew/src/gfx/shaders/UberMaterial.js - About 1 hr to fix

    Function build has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      build(complex) {
        const geom = new BufferGeometry()
        this._atom1 = this._getAtomFromName(complex, this._id1)
        this._atom2 = this._getAtomFromName(complex, this._id2)
    
    
    Severity: Minor
    Found in packages/miew/src/gfx/objects/LinesObj.js - About 1 hr to fix

      Function rebuild has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        rebuild() {
          if (this._building) {
            this.logger.warn('Miew.rebuild(): already building!')
            return
          }
      Severity: Minor
      Found in packages/miew/src/Miew.ts - About 1 hr to fix

        Function _resetComponentTransform has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          _resetComponentTransform() {
            const visual = this._complexVisual
            const selection = this._complexVisual.getSelectionGeo()
            let i
            let j
        Severity: Minor
        Found in packages/miew/src/ComplexVisualEdit.js - About 1 hr to fix

          Function _initRenderPanel has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Menu.prototype._initRenderPanel = function () {
            const self = this
          
            $(`${self._menuId} [data-toggle=resolution]`).on(
              'click',
          Severity: Minor
          Found in demo/src/scripts/ui/Menu.js - About 1 hr to fix

            Function checkArg has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              checkArg(key, arg, modificate) {
                if (key !== undefined && arg !== undefined) {
                  if (keyRemap(key) === 'selector') {
                    const res = selectors.parse(arg)
            
            
            Severity: Minor
            Found in packages/miew-cli/src/Miew-cli.js - About 1 hr to fix

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

                constructor(bBox, volInfo) {
                  const { delta } = volInfo // {x: XY, y : XZ, z: YZ}
                  const { obtuseAngle } = volInfo // 1 - obtuse, 0 - acute
              
                  const bSize = new Vector3()
              Severity: Minor
              Found in packages/miew/src/gfx/VolumeBounds.js - About 1 hr to fix

                Function _getBaseVertices has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  _getBaseVertices(delta, obtuseAngle) {
                    const projTable = VolumeBounds._projectionTable
                
                    const proj = (index, inv) => {
                      // tricky function to take account of projections: their position(related to box) and sign
                Severity: Minor
                Found in packages/miew/src/gfx/VolumeBounds.js - About 1 hr to fix

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

                    constructor() {
                      super()
                  
                      // set default values
                      this.setValues({
                  Severity: Minor
                  Found in packages/miew/src/gfx/shaders/AOMaterial.js - About 1 hr to fix

                    Function touchstartend has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    ObjectControls.prototype.touchstartend = function (event) {
                      if (this.enabled === false) {
                        return
                      }
                    
                    
                    Severity: Minor
                    Found in packages/miew/src/ui/ObjectControls.js - About 1 hr to fix

                      Function _rotate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      ObjectHandler.prototype._rotate = (function () {
                        const p = new Vector3()
                        const q = new Quaternion()
                        const s = new Vector3()
                      
                      
                      Severity: Minor
                      Found in packages/miew/src/ui/ObjectControls.js - About 1 hr to fix

                        Function parseSync has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          parseSync() {
                            const complexes = []
                            const self = this
                            const moleculaSet = this._selectComponents(this._data)
                            moleculaSet.forEach((molSet) => {
                        Severity: Minor
                        Found in packages/miew/src/io/parsers/CMLParser.js - About 1 hr to fix

                          Function parse has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            parse(stream) {
                              /** @type {?Assembly} */
                              let assembly = this._assembly
                              /** @type {?Matrix4} */
                              let matrix = this._matrix
                          Severity: Minor
                          Found in packages/miew/src/io/parsers/pdb/Remark350.js - About 1 hr to fix

                            Function _writeHeader has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              _writeHeader() {
                                const FBXHeaderVersion = 1003 // 1003 is some number which appears to present in many 6.1 ASCII files
                                const FBXVersion = 6100 // Mandatory and only supported version
                                const date = new Date()
                                const timeStampVersion = 1000
                            Severity: Minor
                            Found in packages/miew/src/io/exporters/fbx/FBXResult.js - About 1 hr to fix

                              Function load has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                load() {
                                  return new Promise((resolve, reject) => {
                                    if (this._abort) {
                                      throw new Error('Loading aborted')
                                    }
                              Severity: Minor
                              Found in packages/miew/src/io/loaders/XHRLoader.js - About 1 hr to fix

                                Function _traverse has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  _traverse(mmtfData) {
                                    const self = this
                                
                                    // get metadata
                                    const { metadata } = this._complex
                                Severity: Minor
                                Found in packages/miew/src/io/parsers/MMTFParser.js - About 1 hr to fix

                                  Function decode has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function decode() {
                                        // backwards compatible: old non-versioned view is the 0th version
                                        if (expression.length === 40) {
                                          expression = `0${expression}`
                                        }
                                  Severity: Minor
                                  Found in packages/miew/src/Miew.ts - About 1 hr to fix

                                    Function unput has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          unput: function (ch) {
                                            var len = ch.length
                                            var lines = ch.split(/(?:\r\n?|\n)/g)
                                    
                                            this._input = ch + this._input
                                    Severity: Minor
                                    Found in packages/miew-cli/src/MiewCLIParser.js - About 1 hr to fix

                                      Function touchmove has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      ObjectControls.prototype.touchmove = function (event) {
                                        if (this.enabled === false || this._state === STATE.NONE) {
                                          return
                                        }
                                      
                                      
                                      Severity: Minor
                                      Found in packages/miew/src/ui/ObjectControls.js - About 1 hr to fix

                                        Function unput has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                              unput: function (ch) {
                                                var len = ch.length
                                                var lines = ch.split(/(?:\r\n?|\n)/g)
                                        
                                                this._input = ch + this._input
                                        Severity: Minor
                                        Found in packages/miew/src/utils/SelectionParser.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language