theforeman/foreman_remote_execution

View on GitHub

Showing 89 of 229 total issues

File foreman_remote_execution.js has 1598 lines of code (exceeds 250 allowed). Consider refactoring.
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 1598 lines of code (exceeds 250 allowed). Consider refactoring.
    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 1597 lines of code (exceeds 250 allowed). Consider refactoring.
      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 1597 lines of code (exceeds 250 allowed). Consider refactoring.
        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 1596 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

           locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['en'] = {
            "domain": "foreman_remote_execution",
            "locale_data": {
              "foreman_remote_execution": {
                "": {

            File foreman_remote_execution.js has 1596 lines of code (exceeds 250 allowed). Consider refactoring.
            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 1596 lines of code (exceeds 250 allowed). Consider refactoring.
              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 1596 lines of code (exceeds 250 allowed). Consider refactoring.
                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 1596 lines of code (exceeds 250 allowed). Consider refactoring.
                  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 1595 lines of code (exceeds 250 allowed). Consider refactoring.
                    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 1594 lines of code (exceeds 250 allowed). Consider refactoring.
                      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 foreman_remote_execution.js has 1594 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                         locales['foreman_remote_execution'] = locales['foreman_remote_execution'] || {}; locales['foreman_remote_execution']['ja'] = {
                          "domain": "foreman_remote_execution",
                          "locale_data": {
                            "foreman_remote_execution": {
                              "": {

                          File job_invocation_composer.rb has 534 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          class JobInvocationComposer
                            class JobTemplateNotFound < StandardError; end
                          
                            class FeatureNotFound < StandardError; end
                          
                          
                          Severity: Major
                          Found in app/models/job_invocation_composer.rb - About 1 day to fix

                            File JobWizard.js has 498 lines of code (exceeds 250 allowed). Consider refactoring.
                            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';
                            Severity: Minor
                            Found in webpack/JobWizard/JobWizard.js - About 7 hrs to fix

                              File Schedule.test.js has 419 lines of code (exceeds 250 allowed). Consider refactoring.
                              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';
                              Severity: Minor
                              Found in webpack/JobWizard/steps/Schedule/__tests__/Schedule.test.js - About 6 hrs to fix

                                Class JobInvocationComposer has 41 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                class JobInvocationComposer
                                  class JobTemplateNotFound < StandardError; end
                                
                                  class FeatureNotFound < StandardError; end
                                
                                
                                Severity: Minor
                                Found in app/models/job_invocation_composer.rb - About 5 hrs to fix

                                  File AdvancedFields.test.js has 377 lines of code (exceeds 250 allowed). Consider refactoring.
                                  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

                                    export const DateTimePicker = ({
                                      dateTime,
                                      setDateTime,
                                      isDisabled,
                                      ariaLabel,
                                    Severity: Minor
                                    Found in webpack/JobWizard/steps/form/DateTimePicker.js - About 4 hrs 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

                                    Function formatter has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                                    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
                                    
                                    
                                    Severity: Major
                                    Found in webpack/JobWizard/steps/form/Formatter.js - About 4 hrs to fix

                                      File index.js has 335 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      /* eslint-disable max-lines */
                                      import React, { useEffect, useState } from 'react';
                                      import {
                                        Button,
                                        DescriptionList,
                                      Severity: Minor
                                      Found in webpack/JobWizard/steps/ReviewDetails/index.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language