crowbar/crowbar-core

View on GitHub

Showing 6,062 of 6,062 total issues

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

      init: function (el, values, options, width, height) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js - About 35 mins to fix

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

      _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js - About 35 mins to fix

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

      init: function (el, values, options, width, height) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js - About 35 mins to fix

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

      init: function (el, values, options, width, height) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js - About 35 mins to fix

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

      init: function (el, values, options, width, height) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js - About 35 mins to fix

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

      init: function (el, values, options, width, height) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js - About 35 mins to fix

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

      _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js - About 35 mins to fix

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

        add: function (id, content, config, tags, append) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/bootstrap/fileinput.js - About 35 mins to fix

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

        renderFileActions: function (showUpload, showDelete, disabled, url, key) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/bootstrap/fileinput.js - About 35 mins to fix

Method allocate_ip has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def allocate_ip(bc_instance, network, range, name, suggestion = nil)
Severity: Minor
Found in crowbar_framework/app/models/network_service.rb - About 35 mins to fix

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

                actions: function (showUpload, showDelete, disabled, url, key) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/bootstrap/fileinput.js - About 35 mins to fix

Method allocate_virtual_ip has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def allocate_virtual_ip(bc_instance, network, range, service, suggestion = nil)
Severity: Minor
Found in crowbar_framework/app/models/network_service.rb - About 35 mins to fix

Method setup_interface has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def setup_interface(switch_config, a_node, conduit, switch_name, interface_id )
Severity: Minor
Found in chef/cookbooks/network/recipes/switch_config.rb - About 35 mins to fix

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

        set: function (id, content, config, tags, append) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/bootstrap/fileinput.js - About 35 mins to fix

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

        previewFile: function (i, file, theFile, previewId, data) {
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/bootstrap/fileinput.js - About 35 mins to fix

Method relevant_attributes_changed_if_roles? has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def relevant_attributes_changed_if_roles?(node, old_role, new_role, ignore_attr, only_for_roles)
Severity: Minor
Found in crowbar_framework/app/models/service_object.rb - About 35 mins to fix

Method render_instance_selector has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def render_instance_selector(bc, name, label, field, proposal)
Severity: Minor
Found in crowbar_framework/app/helpers/form_helper.rb - About 35 mins to fix

Method migrate_object has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def self.migrate_object(bc_name, template, all_scripts, attributes, deployment)
Severity: Minor
Found in crowbar_framework/lib/schema_migration.rb - About 35 mins to fix

Method migrate_proposal has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def self.migrate_proposal(bc_name, validator, template, all_scripts, proposal)
Severity: Minor
Found in crowbar_framework/lib/schema_migration.rb - About 35 mins to fix

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  $.fn.removeJsonAttribute = function(key, value, type) {
    var attribute = new JsonAttribute(this);
    return attribute.remove(key, value, type)
  };
crowbar_framework/vendor/assets/javascripts/jquery/jsonAttribute.js on lines 206..209
crowbar_framework/vendor/assets/javascripts/jquery/jsonAttribute.js on lines 211..214

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 47.

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

Severity
Category
Status
Source
Language