Showing 2,737 of 2,737 total issues
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpOstreeClient::OstreeOstreeDistribution` initialize method"
end
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleAnsibleDistribution` initialize method"
end
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebAptDistribution` initialize method"
end
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RpmRpmDistribution` initialize method"
end
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpFileClient::FileFileDistribution` initialize method"
end
Function SelectAllCheckbox
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const SelectAllCheckbox = ({
selectNone,
selectPage,
selectedCount,
pageRowCount,
- Read upRead up
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 ChangeHostCVModal
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const ChangeHostCVModal = ({
isOpen,
closeModal,
hostEnvId,
orgId,
- Read upRead up
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 setContentOverrides
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const setContentOverrides = ({
hostId,
search,
enabled,
limit_to_env: limitToEnv,
- Read upRead up
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 label
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
KT.object.label = (function(){
var initial_name_value,
retrieve_label = true,
initialize = function(){
- Read upRead up
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 LastSync
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const LastSync = ({
lastSyncWords, lastSync, emptyMessage, startedAt,
}) => {
if (lastSync && lastSyncWords) {
let Icon;
- Read upRead up
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 ActivationKeysSearch
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const ActivationKeysSearch = () => {
const ACTIVATION_KEYS = 'ACTIVATION_KEYS';
const KT_AK_LABEL = 'kt_activation_keys';
const [selectedEnvId, setSelectedEnvId] = useState(getSelectedEnvId());
const [selectedContentViewId, setSelectedContentViewId] = useState(getSelectedContentViewId());
- Read upRead up
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 ContentViewTable
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const ContentViewTable = () => {
const response = useSelector(selectContentViews);
const status = useSelector(selectContentViewStatus);
const error = useSelector(selectContentViewError);
const [searchQuery, updateSearchQuery] = useState('');
- Read upRead up
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 withOrganization
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function withOrganization(WrappedComponent) {
class CheckOrg extends Component {
constructor(props) {
super(props);
this.state = { orgId: null };
- Read upRead up
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 render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
render() {
const currentOrg = orgId();
const {
deleteModalOpened, openDeleteModal, closeDeleteModal,
deleteButtonDisabled, disableDeleteButton, enableDeleteButton,
- Read upRead up
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 message
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def message
# Retrieve a text message that may be rendered for a task's status. This is used in various places,
# such as System Event history.
details = TaskStatus::TYPES[self.task_type]
return _("Non-system event") if details.nil?
- Read upRead up
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 update_attributes_with_logics!
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def update_attributes_with_logics!(params)
transaction do
fail _("No recurring logic tied to the sync plan.") if self.foreman_tasks_recurring_logic.nil?
params["cron_expression"] = '' if (params.key?("interval") && !params["interval"].eql?(CUSTOM_CRON) && self.interval.eql?(CUSTOM_CRON))
self.update!(params.except(:enabled))
- Read upRead up
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 content_options
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def content_options(host, selected_id, object_type, options = {})
include_blank = options.fetch(:include_blank, nil)
include_blank = '<option></option>' if include_blank == true #check for true specifically
orgs = relevant_organizations(host)
all_options = []
- Read upRead up
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 update
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def update
async = ::Foreman::Cast.to_bool(params.fetch(:async, true))
update_params = environment_params
fail HttpErrors::BadRequest, _("Can't update the '%s' environment") % "Library" if @environment.library? && update_params.empty?
update_params[:name] = params[:environment][:new_name] if params[:environment][:new_name]
- Read upRead up
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 update
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def update
update_params = rule_params
update_params[:name] = update_params[:name].first if update_params[:name]
if @rule.filter.content_type == ContentViewPackageFilter::CONTENT_TYPE
- Read upRead up
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 current_organization_object
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def current_organization_object
if !session[:current_organization_id]
@current_org = Organization.current
return @current_org
else
- Read upRead up
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"