Showing 96 of 250 total issues
File foreman_remote_execution.js
has 1679 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['ru'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1679 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['fr'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1678 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['pt_BR'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1678 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['es'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1677 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['en_GB'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1677 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['de'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1677 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['zh_TW'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1677 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['ka'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1676 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['ko'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1675 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['ja'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File foreman_remote_execution.js
has 1675 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['zh_CN'] = {
"domain": "foreman_remote_execution",
"locale_data": {
"foreman_remote_execution": {
"": {
File job_invocation_composer.rb
has 537 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class JobInvocationComposer
class JobTemplateNotFound < StandardError; end
class FeatureNotFound < StandardError; end
File JobWizard.js
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable max-lines */
/* eslint-disable camelcase */
import React, { useState, useEffect, useCallback } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import PropTypes from 'prop-types';
File Schedule.test.js
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable max-lines */
import React from 'react';
import { Provider } from 'react-redux';
import configureMockStore from 'redux-mock-store';
import { fireEvent, screen, render, act } from '@testing-library/react';
Class JobInvocationComposer
has 41 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class JobInvocationComposer
class JobTemplateNotFound < StandardError; end
class FeatureNotFound < StandardError; end
File AdvancedFields.test.js
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable max-lines */
import React from 'react';
import { Provider } from 'react-redux';
import { mount } from '@theforeman/test';
import { fireEvent, screen, render, act } from '@testing-library/react';
Function DateTimePicker
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Open
export const DateTimePicker = ({
dateTime,
setDateTime,
isDisabled,
ariaLabel,
- 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 formatter
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatter = (input, values, setValue) => {
const isSelectType = !!input?.options;
const inputType = input.value_type;
const isTextType = inputType === 'plain' || !inputType; // null defaults to plain
Class JobInvocation
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class JobInvocation < ApplicationRecord
CACHE_PREFIX = "job_invocation".freeze
audited :except => [:task_id, :targeting_id, :task_group_id, :triggering_id]
File index.js
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable max-lines */
import React, { useEffect, useState } from 'react';
import {
Button,
DescriptionList,