zammad/zammad

View on GitHub

Showing 2,063 of 4,240 total issues

File codemirror.js has 9881 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/5/LICENSE

// This is CodeMirror (https://codemirror.net/5), a code editor
// implemented in JavaScript on top of the browser's DOM.
Severity: Major
Found in app/assets/javascripts/app/lib/base/codemirror.js - About 1 mo to fix

    File jquery-3.6.0.js has 6891 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * jQuery JavaScript Library v3.6.0
     * https://jquery.com/
     *
     * Includes Sizzle.js
    Severity: Major
    Found in app/assets/javascripts/app/lib/core/jquery-3.6.0.js - About 2 wks to fix

      File jquery-ui-1.11.4.js has 4659 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*! jQuery UI - v1.11.4 - 2017-10-12
      * http://jqueryui.com
      * Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, sortable.js, accordion.js, autocomplete.js, menu.js
      * Copyright jQuery Foundation and other contributors; Licensed MIT */
      
      
      Severity: Major
      Found in app/assets/javascripts/app/lib/core/jquery-ui-1.11.4.js - About 1 wk to fix

        Function linkify has 2298 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var linkify = (function (exports) {
            'use strict';
        
            /**
             * Finite State Machine generation utilities
        Severity: Major
        Found in app/assets/javascripts/app/lib/base/linkify.js - About 1 wk to fix

          Function Plot has 1911 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function Plot(placeholder, data_, options_, plugins) {
                  // data is on the form:
                  //   [ series1, series2 ... ]
                  // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
                  // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
          Severity: Major
          Found in app/assets/javascripts/app/lib/flot/jquery.flot.js - About 1 wk to fix

            Function Sizzle has 1510 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            ( function( window ) {
            var i,
                support,
                Expr,
                getText,
            Severity: Major
            Found in app/assets/javascripts/app/lib/core/jquery-3.6.0.js - About 1 wk to fix

              File chat-no-jquery.js has 2497 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              if (!window.zammadChatTemplates) {
                window.zammadChatTemplates = {};
              }
              window.zammadChatTemplates["agent"] = function(__obj) {
                if (!__obj) __obj = {};
              Severity: Major
              Found in public/assets/chat/chat-no-jquery.js - About 6 days to fix

                File chat.js has 2482 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                if (!window.zammadChatTemplates) {
                  window.zammadChatTemplates = {};
                }
                window.zammadChatTemplates["agent"] = function(__obj) {
                  if (!__obj) __obj = {};
                Severity: Major
                Found in public/assets/chat/chat.js - About 6 days to fix

                  File types.ts has 2436 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  export type Maybe<T> = T | null;
                  export type InputMaybe<T> = Maybe<T>;
                  export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
                  export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
                  export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
                  Severity: Major
                  Found in app/frontend/shared/graphql/types.ts - About 6 days to fix

                    File linkify.js has 2370 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*!
                     * Linkify v3.0.5
                     * https://github.com/Hypercontext/linkifyjs
                     * Copyright (c) 2021 SoapBox Innovations Inc.; Licensed MIT
                     *
                    Severity: Major
                    Found in app/assets/javascripts/app/lib/base/linkify.js - About 6 days to fix

                      File jquery.flot.js has 1976 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*! Javascript plotting library for jQuery, v. 0.7.
                       *
                       * Released under the MIT license by IOLA, December 2007.
                       *
                       */
                      Severity: Major
                      Found in app/assets/javascripts/app/lib/flot/jquery.flot.js - About 5 days to fix

                        File cropper.js has 1820 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*!
                         * Cropper v1.0.0-rc.1
                         * https://github.com/fengyuanchen/cropper
                         *
                         * Copyright (c) 2014-2015 Fengyuan Chen and contributors
                        Severity: Major
                        Found in app/assets/javascripts/app/lib/base/cropper.js - About 4 days to fix

                          File bootstrap-datepicker.js has 1746 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /* =========================================================
                           * bootstrap-datepicker.js
                           * Repo: https://github.com/eternicode/bootstrap-datepicker/
                           * Demo: http://eternicode.github.io/bootstrap-datepicker/
                           * Docs: http://bootstrap-datepicker.readthedocs.org/
                          Severity: Major
                          Found in app/assets/javascripts/app/lib/bootstrap/bootstrap-datepicker.js - About 4 days to fix

                            File jquery.fineuploader-3.0.js has 1628 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /**
                             * http://github.com/Valums-File-Uploader/file-uploader
                             *
                             * Multiple file upload component with progress-bar, drag-and-drop, support for all modern browsers.
                             *
                            Severity: Major
                            Found in app/assets/javascripts/app/lib/base/jquery.fineuploader-3.0.js - About 4 days to fix

                              Function jsonlint has a Cognitive Complexity of 174 (exceeds 5 allowed). Consider refactoring.
                              Open

                              var jsonlint = (function(){
                              var parser = {trace: function trace() { },
                              yy: {},
                              symbols_: {"error":2,"JSONString":3,"STRING":4,"JSONNumber":5,"NUMBER":6,"JSONNullLiteral":7,"NULL":8,"JSONBooleanLiteral":9,"TRUE":10,"FALSE":11,"JSONText":12,"JSONValue":13,"EOF":14,"JSONObject":15,"JSONArray":16,"{":17,"}":18,"JSONMemberList":19,"JSONMember":20,":":21,",":22,"[":23,"]":24,"JSONElementList":25,"$accept":0,"$end":1},
                              terminals_: {2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},
                              Severity: Minor
                              Found in app/assets/javascripts/app/lib/base/jsonlint.js - About 3 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 linkify has a Cognitive Complexity of 174 (exceeds 5 allowed). Consider refactoring.
                              Open

                              var linkify = (function (exports) {
                                  'use strict';
                              
                                  /**
                                   * Finite State Machine generation utilities
                              Severity: Minor
                              Found in app/assets/javascripts/app/lib/base/linkify.js - About 3 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 parse5322 has 689 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function parse5322(opts) {
                              
                                  // tokenizing functions
                              
                                  function inStr() { return pos < len; }
                              Severity: Major
                              Found in app/assets/javascripts/app/lib/base/email-addresses.js - About 3 days to fix

                                File FieldTreeSelect.spec.ts has 1227 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
                                
                                import { cloneDeep, keyBy } from 'lodash-es'
                                import {
                                  getAllByRole,

                                  File FieldTreeSelect.spec.ts has 1103 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
                                  
                                  import { cloneDeep, keyBy } from 'lodash-es'
                                  import { getByText, waitFor } from '@testing-library/vue'
                                  import { FormKit } from '@formkit/vue'

                                    File FieldSelect.spec.ts has 1092 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
                                    
                                    import type { SetRequired } from 'type-fest'
                                    import { cloneDeep, keyBy } from 'lodash-es'
                                    import {
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language