Showing 1,006 of 6,062 total issues
Function __module9__
has 462 lines of code (exceeds 25 allowed). Consider refactoring. Open
var __module9__ = (function() {
"use strict";
var __exports__;
/* Jison generated parser */
var handlebars = (function(){
- Create a ticketCreate a ticket
Function handlebars
has 458 lines of code (exceeds 25 allowed). Consider refactoring. Open
var handlebars = (function(){
var parser = {trace: function trace() { },
yy: {},
symbols_: {"error":2,"root":3,"statements":4,"EOF":5,"program":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"partial_option0":27,"inMustache_repetition0":28,"inMustache_option0":29,"dataName":30,"param":31,"STRING":32,"INTEGER":33,"BOOLEAN":34,"hash":35,"hash_repetition_plus0":36,"hashSegment":37,"ID":38,"EQUALS":39,"DATA":40,"pathSegments":41,"SEP":42,"$accept":0,"$end":1},
terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",38:"ID",39:"EQUALS",40:"DATA",42:"SEP"},
- Create a ticketCreate a ticket
Function setup
has 413 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setup($) {
$.fn._fadeIn = $.fn.fadeIn;
var noOp = $.noop || function() {};
- Create a ticketCreate a ticket
Class ServiceObject
has 98 methods (exceeds 20 allowed). Consider refactoring. Open
class ServiceObject
include CrowbarPacemakerProxy
FORBIDDEN_PROPOSAL_NAMES=["template","nodes","commit","status"]
- Create a ticketCreate a ticket
Function __module10__
has 363 lines of code (exceeds 25 allowed). Consider refactoring. Open
var __module10__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__) {
"use strict";
var __exports__ = {};
var Exception = __dependency1__;
var parse = __dependency2__.parse;
- Create a ticketCreate a ticket
Method proposal_update
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
def proposal_update
if params[:submit].nil?
#
# This is RESTFul path
#
- Read upRead up
- Create a ticketCreate a ticket
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
File nic.rb
has 723 lines of code (exceeds 250 allowed). Consider refactoring. Open
class ::Nic
include Comparable
private
@@interfaces = Hash.new
@nic = nil
- Create a ticketCreate a ticket
File upgrade_controller.rb
has 668 lines of code (exceeds 250 allowed). Consider refactoring. Open
class Api::UpgradeController < ApiController
# disable upgrade API until upgrade to next version is implemented
before_action(except: :show) do
# skip filter if we're in the middle of upgrade from previos version
unless File.exist?("/var/lib/crowbar/upgrade/8-to-9-upgrade-running")
- Create a ticketCreate a ticket
Class Upgrade
has 78 methods (exceeds 20 allowed). Consider refactoring. Open
class Upgrade < Tableless
class << self
def timeouts
::Crowbar::UpgradeTimeouts.new.values
end
- Create a ticketCreate a ticket
Method apply_role
has 289 lines of code (exceeds 25 allowed). Consider refactoring. Open
def apply_role(role, inst, in_queue, bootstrap = false)
Rails.logger.debug "apply_role(#{role.name}, #{inst}, #{in_queue}, #{bootstrap})"
Rails.logger.progress("Starting to apply role #{role.name}")
# Variables used in the global ensure
- Create a ticketCreate a ticket
File default.rb
has 621 lines of code (exceeds 250 allowed). Consider refactoring. Open
return if node[:platform_family] == "windows"
dirty = false
# Make sure packages we need will be present
- Create a ticketCreate a ticket
Method bulk
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
def bulk
@report = {
success: [],
failed: [],
duplicate_public: false,
- Read upRead up
- Create a ticketCreate a ticket
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 lexer
has 243 lines of code (exceeds 25 allowed). Consider refactoring. Open
var lexer = (function(){
var lexer = ({EOF:1,
parseError:function parseError(str, hash) {
if (this.yy.parser) {
this.yy.parser.parseError(str, hash);
- Create a ticketCreate a ticket
Class Nic
has 66 methods (exceeds 20 allowed). Consider refactoring. Open
class ::Nic
include Comparable
private
@@interfaces = Hash.new
@nic = nil
- Create a ticketCreate a ticket
Function ajax
has 240 lines of code (exceeds 25 allowed). Consider refactoring. Open
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
- Create a ticketCreate a ticket
Method nodes
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
def nodes
if params[:component]
component = params[:component]
upgrade_status = ::Crowbar::UpgradeStatus.new
substep = upgrade_status.current_substep
- Read upRead up
- Create a ticketCreate a ticket
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
File nodes_controller.rb
has 545 lines of code (exceeds 250 allowed). Consider refactoring. Open
class NodesController < ApplicationController
# allow node polling during the upgrade
skip_before_filter :upgrade, only: [:index]
api :GET, "/nodes", "List all nodes and their status"
- Create a ticketCreate a ticket
Method services
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
def services
return unless cluster_health_check
return unless check_schema_migrations
return unless check_product_version
begin
- Read upRead up
- Create a ticketCreate a ticket
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 setDocument
has 218 lines of code (exceeds 25 allowed). Consider refactoring. Open
setDocument = Sizzle.setDocument = function( node ) {
var hasCompare, parent,
doc = node ? node.ownerDocument || node : preferredDoc;
// If no document and documentElement is available, return
- Create a ticketCreate a ticket
Method provided_with_enabled
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
def provided_with_enabled(feature,
platform = nil,
arch = nil,
check_enabled = true,
ignore_cloud = false,
- Read upRead up
- Create a ticketCreate a ticket
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"