Laverna/laverna

View on GitHub

Showing 22 of 111 total issues

File controller.js has 393 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Copyright (C) 2015 Laverna project Authors.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
Severity: Minor
Found in app/scripts/modules/codemirror/controller.js - About 5 hrs to fix

    Function exports has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function(gulp, plugins) {
        return function() {
            var options = {base: './app/bower_components/'};
    
            return merge.apply(merge, [
    Severity: Major
    Found in gulps/copy.js - About 2 hrs to fix

      Function exports has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(gulp, plugins) {
          return function() {
              return gulp.src('./app/scripts/main.js')
              // Require.js optimizer
              .pipe(plugins.requirejsOptimize({
      Severity: Major
      Found in gulps/require.js - About 2 hrs to fix

        Function exports has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function(gulp, plug, pkg) {
        
            /**
             * Use livereload server when debugging.
             */
        Severity: Major
        Found in gulps/mobile.js - About 2 hrs to fix

          File configs.js has 270 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Copyright (C) 2015 Laverna project Authors.
           *
           * This Source Code Form is subject to the terms of the Mozilla Public
           * License, v. 2.0. If a copy of the MPL was not distributed with this
          Severity: Minor
          Found in app/scripts/collections/modules/configs.js - About 2 hrs to fix

            Function initEditor has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    initEditor: function() {
                        this.editor = CodeMirror.fromTextArea(document.getElementById('editor--input'), {
                            mode          : {
                                name        : 'gfm',
                                gitHubSpice : false
            Severity: Minor
            Found in app/scripts/modules/codemirror/controller.js - About 1 hr to fix

              Function exports has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              module.exports = function(gulp, plugins, pkg) {
                  return function() {
                      var platforms = [
                          'darwin-x64',
                          // 'linux-arm',
              Severity: Minor
              Found in gulps/electron.js - About 1 hr to fix

                Function configure has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        configure: function() {
                            this.md
                            .use(sanitizer)
                            .use(imsize)
                            .use(math, {
                Severity: Minor
                Found in app/scripts/modules/markdown/libs/markdown-it.js - About 1 hr to fix

                  Function checkChanges has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          checkChanges: function() {
                              var promises = [],
                                  self     = this;
                  
                              this.configs.statRemote = false;
                  Severity: Minor
                  Found in app/scripts/modules/dropbox/classes/sync.js - About 1 hr to fix

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

                            initEncrypt: function() {
                                var promises = [],
                                    profile  = (this.profiles.length === 1 ? this.profiles[0] : 'notes-db'),
                                    self     = this;
                    
                    
                    Severity: Minor
                    Found in app/scripts/apps/encryption/encrypt/controller.js - About 1 hr to fix

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

                              show: function(note, notebooks) {
                                  var notebooksView;
                                  note = note[0];
                      
                                  // Set document title
                      Severity: Minor
                      Found in app/scripts/apps/notes/form/controller.js - About 1 hr to fix

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

                                saveForageItem: function(storeName, db, data) {
                                    var defer  = Q.defer();
                        
                                    // Convert data
                                    if (!_.isUndefined(data.notebookId)) {
                        Severity: Minor
                        Found in app/scripts/helpers/migrate.js - About 1 hr to fix

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

                                  onScroll: _.debounce(function(e) {
                          
                                      // Don't do any computations
                                      if (!e.doc.scrollTop) {
                                          this.view.ui.previewScroll.scrollTop(0);
                          Severity: Minor
                          Found in app/scripts/modules/codemirror/controller.js - About 1 hr to fix

                            Function bind has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    bind: function() {
                                        var self = this;
                            
                                        // Help
                                        Mousetrap.bind(this.configs.appKeyboardHelp, function(e) {
                            Severity: Minor
                            Found in app/scripts/helpers/keybindings.js - About 1 hr to fix

                              Function toggleBlock has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      toggleBlock: function(type) {
                                          var stat  = this.getState(),
                                              start = this.editor.getCursor('start'),
                                              end   = this.editor.getCursor('end'),
                                              text,
                              Severity: Minor
                              Found in app/scripts/modules/codemirror/controller.js - About 1 hr to fix

                                Function getModel has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        getModel: function(options) {
                                            var Model  = (this.changeDatabase(options)).prototype.model,
                                                idAttr = Model.prototype.idAttribute,
                                                data   = {},
                                                model;
                                Severity: Minor
                                Found in app/scripts/collections/modules/module.js - About 1 hr to fix

                                  Function onFsChange has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          onFsChange: function(data) {
                                  
                                              return Radio.request(data.storeName, 'get:model', {
                                                  id: data.data.id
                                              })
                                  Severity: Minor
                                  Found in app/scripts/modules/fs/classes/sync.js - About 1 hr to fix

                                    Function createWindow has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        createWindow: function() {
                                    
                                            // Recover window state (width, height, and x&y position)
                                            this.state = windowStateKeeper('main', {
                                                width  : 1000,
                                    Severity: Minor
                                    Found in electron.js - About 1 hr to fix

                                      Function addToZip has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              addToZip: function(profile, notes, notebooks, tags, configs) {
                                      Severity: Minor
                                      Found in app/scripts/modules/importExport/controller.js - About 35 mins to fix

                                        Function _getArgs has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                                _getArgs: function(profile, filter, query, page, id) {
                                        Severity: Minor
                                        Found in app/scripts/apps/notes/appNote.js - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language