lolibrary/lolibrary

View on GitHub

Showing 80 of 80 total issues

File field.js has 5482 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/******/ (function(modules) { // webpackBootstrap
/******/     // The module cache
/******/     var installedModules = {};
/******/
/******/     // The require function
Severity: Major
Found in web.sakura/nova-components/ImageArray/dist/js/field.js - About 2 wks to fix

    Function Form has 201 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Form = function () {
        /**
         * Create a new Form instance.
         *
         * @param {object} data
    Severity: Major
    Found in web.sakura/nova-components/ImageArray/dist/js/field.js - About 1 day to fix

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      /******/     function __webpack_require__(moduleId) {
      /******/
      /******/         // Check if module is in cache
      /******/         if(installedModules[moduleId]) {
      /******/             return installedModules[moduleId].exports;
      Severity: Major
      Found in web.sakura/nova-components/ImageArray/dist/js/field.js and 1 other location - About 7 hrs to fix
      web.sakura/nova-components/ImageArray/dist/js/field.js on lines 6..27

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 175.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      /******/     function __webpack_require__(moduleId) {
      /******/
      /******/         // Check if module is in cache
      /******/         if(installedModules[moduleId]) {
      /******/             return installedModules[moduleId].exports;
      Severity: Major
      Found in web.sakura/nova-components/ImageArray/dist/js/field.js and 1 other location - About 7 hrs to fix
      web.sakura/nova-components/ImageArray/dist/js/field.js on lines 480..501

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 175.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
      Severity: Major
      Found in web.sakura/nova-components/ImageArray/dist/js/field.js and 1 other location - About 6 hrs to fix
      web.sakura/nova-components/ImageArray/dist/js/field.js on lines 6647..6647

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 171.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
      Severity: Major
      Found in web.sakura/nova-components/ImageArray/dist/js/field.js and 1 other location - About 6 hrs to fix
      web.sakura/nova-components/ImageArray/dist/js/field.js on lines 2579..2579

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 171.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Method fields has 107 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function fields(Request $request)
          {
              return [
                  Text::make('ID')->onlyOnDetail(),
                  Text::make('Slug')->onlyOnDetail(),
      Severity: Major
      Found in web.sakura/app/Nova/Item.php - About 4 hrs to fix

        Function main has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring.
        Open

        func main() {
            g := generator.New()
        
            t, err := template.New("protoc-gen-router").Parse(tmpl)
            if err != nil {
        Severity: Minor
        Found in cmd/protoc-gen-router/main.go - About 4 hrs 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 xhrAdapter has 106 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function xhrAdapter(config) {
          return new Promise(function dispatchXhrRequest(resolve, reject) {
            var requestData = config.data;
            var requestHeaders = config.headers;
        
        
        Severity: Major
        Found in web.sakura/nova-components/ImageArray/dist/js/field.js - About 4 hrs to fix

          Function dispatchXhrRequest has 104 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            return new Promise(function dispatchXhrRequest(resolve, reject) {
              var requestData = config.data;
              var requestHeaders = config.headers;
          
              if (utils.isFormData(requestData)) {
          Severity: Major
          Found in web.sakura/nova-components/ImageArray/dist/js/field.js - About 4 hrs to fix

            Function debounce has 95 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function debounce(func, wait, options) {
              var lastArgs,
                  lastThis,
                  maxWait,
                  result,
            Severity: Major
            Found in web.sakura/nova-components/ImageArray/dist/js/field.js - About 3 hrs to fix

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

              /******/     __webpack_require__.n = function(module) {
              /******/         var getter = module && module.__esModule ?
              /******/             function getDefault() { return module['default']; } :
              /******/             function getModuleExports() { return module; };
              /******/         __webpack_require__.d(getter, 'a', getter);
              Severity: Major
              Found in web.sakura/nova-components/ImageArray/dist/js/field.js and 1 other location - About 3 hrs to fix
              web.sakura/nova-components/ImageArray/dist/js/field.js on lines 48..54

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 104.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

              /******/     __webpack_require__.n = function(module) {
              /******/         var getter = module && module.__esModule ?
              /******/             function getDefault() { return module['default']; } :
              /******/             function getModuleExports() { return module; };
              /******/         __webpack_require__.d(getter, 'a', getter);
              Severity: Major
              Found in web.sakura/nova-components/ImageArray/dist/js/field.js and 1 other location - About 3 hrs to fix
              web.sakura/nova-components/ImageArray/dist/js/field.js on lines 525..531

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 104.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              File edit.blade.php has 304 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              @extends('layouts.app')
              
              @section('content')
              <div class="container">
                  <div class="row mb-3">
              Severity: Minor
              Found in web.sakura/resources/views/items/edit.blade.php - About 3 hrs to fix

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                /******/     __webpack_require__.d = function(exports, name, getter) {
                /******/         if(!__webpack_require__.o(exports, name)) {
                /******/             Object.defineProperty(exports, name, {
                /******/                 configurable: false,
                /******/                 enumerable: true,
                Severity: Major
                Found in web.sakura/nova-components/ImageArray/dist/js/field.js and 1 other location - About 2 hrs to fix
                web.sakura/nova-components/ImageArray/dist/js/field.js on lines 514..522

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 92.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                /******/     __webpack_require__.d = function(exports, name, getter) {
                /******/         if(!__webpack_require__.o(exports, name)) {
                /******/             Object.defineProperty(exports, name, {
                /******/                 configurable: false,
                /******/                 enumerable: true,
                Severity: Major
                Found in web.sakura/nova-components/ImageArray/dist/js/field.js and 1 other location - About 2 hrs to fix
                web.sakura/nova-components/ImageArray/dist/js/field.js on lines 37..45

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 92.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Consider simplifying this complex logical expression.
                Open

                    if ((inherited || hasOwnProperty.call(value, key)) &&
                        !(skipIndexes && (
                           // Safari 9 has enumerable `arguments.length` in strict mode.
                           key == 'length' ||
                           // Node.js 0.10 has enumerable non-index properties on buffers.
                Severity: Critical
                Found in web.sakura/nova-components/ImageArray/dist/js/field.js - About 2 hrs to fix

                  Method run has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function run()
                      {
                          $user = '00000000-0000-0000-0000-000000000000';
                  
                          if (! Post::where('slug', 'lolibrary-open-source')->exists()) {
                  Severity: Major
                  Found in web.sakura/database/seeds/BlogSeeder.php - About 2 hrs to fix

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

                    module.exports = function normalizeComponent (
                      rawScriptExports,
                      compiledTemplate,
                      functionalTemplate,
                      injectStyles,
                    Severity: Major
                    Found in web.sakura/nova-components/ImageArray/dist/js/field.js - About 2 hrs to fix

                      Function Errors has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var Errors = function () {
                          /**
                           * Create a new Errors instance.
                           */
                          function Errors() {
                      Severity: Major
                      Found in web.sakura/nova-components/ImageArray/dist/js/field.js - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language