BindaCMS/binda

View on GitHub

Showing 5 of 81 total issues

File binda.bundle.js has 699 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/******/ (function(modules) { // webpackBootstrap
/******/     // The module cache
/******/     var installedModules = {};
/******/
/******/     // The require function
Severity: Major
Found in app/assets/javascripts/binda/dist/binda.bundle.js - About 1 day to fix

    Function LoginForm has 75 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var LoginForm = function () {
        function LoginForm() {
            _classCallCheck(this, LoginForm);
    
            this.current = 0;
    Severity: Major
    Found in app/assets/javascripts/binda/dist/binda.bundle.js - About 3 hrs to fix

      Function Shader has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var Shader = function () {
        function Shader() {
          _classCallCheck(this, Shader);
      
          this.uniforms = {
      Severity: Major
      Found in app/assets/javascripts/binda/dist/binda.bundle.js - About 2 hrs to fix

        Method get_relation_dependents has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

                    def get_relation_dependents(field_slug, instance_type = nil)
                        raise ArgumentError, "There isn't any instance named: #{instance_type}. Make sure is either 'component' or 'board'", caller if !instance_type.nil? && ['board','component'].include?(instance_type)
                        
                        dependents = get_dependents(instance_type, field_slug)
                        
        Severity: Minor
        Found in app/models/concerns/binda/default_helpers.rb - About 25 mins 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

        Method create has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            def create
              build_resource( sign_up_params )
        
              resource.save
              yield resource if block_given?
        Severity: Minor
        Found in app/controllers/binda/users/registrations_controller.rb - About 25 mins 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

        Severity
        Category
        Status
        Source
        Language