Katello/katello

View on GitHub

Showing 2,737 of 2,737 total issues

Function bezierCurveTo has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

  contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
                                            aCP2x, aCP2y,
                                            aX, aY) {
Severity: Minor
Found in app/assets/javascripts/katello/html5/excanvas.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                    if (this.options.custom_compare(searchText, option.html, item )){
                        found = true;
                        results += 1;
                    }
    Severity: Major
    Found in app/assets/javascripts/katello/common/chosen.jquery.js - About 45 mins to fix

      Function createRadialGradient has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        contextPrototype.createRadialGradient = function(aX0, aY0, aR0,
                                                         aX1, aY1, aR1) {
      Severity: Minor
      Found in app/assets/javascripts/katello/html5/excanvas.js - About 45 mins to fix

        Function finishRepo has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            finishRepo = function (repo_id, state, duration, raw_state, error_details, task_id) {
        Severity: Minor
        Found in app/assets/javascripts/katello/sync_management/sync_management.js - About 45 mins to fix

          Function CVVersionCompare has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          const CVVersionCompare = ({
            cvId,
            versionIds,
            versionLabels,
          }) => {
          Severity: Minor
          Found in webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompare.js - About 45 mins 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 render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

            render() {
              const { displayArch, releasever, type } = this.props;
          
              const archLabel = displayArch || __('Unspecified');
              const releaseverLabel = releasever || '';

          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 CVDeleteEnvironmentSelection has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          const CVDeleteEnvironmentSelection = () => {
            const {
              cvVersionResponse, cvDetailsResponse, cvVersionStatus, cvDetailsStatus,
            } = useContext(CVDeleteContext);
            const [versionExpanded, setVersionExpanded] = useState([]);

          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 AffectedRepositorySelection has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          const AffectedRepositorySelection = ({
            cvId, filterId, setShowAffectedRepos, disabled,
          }) => {
            const dispatch = useDispatch();
            const response = useSelector(state => selectCVFilterDetails(state, cvId, filterId), shallowEqual);

          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 ContentViewVersionDetails has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          const ContentViewVersionDetails = ({ cvId, details }) => {
            const { versionId } = useParams();
            const { pathname } = useLocation();
            const { push } = useHistory();
            const dispatch = useDispatch();

          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 DebsController has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              function DebsController($scope, $location, translate, Nutupane, Deb, CurrentOrganization) {

            Function DebController has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function DebController($scope, Deb, Host, CurrentOrganization, ApiErrorHandler, newHostDetailsUI) {

              Method sync_available_module_stream_associations has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                    def sync_available_module_stream_associations(new_available_module_streams)
                      new_associated_ids = new_available_module_streams.keys.compact
                      upgradable_streams = self.host_available_module_streams.where(:available_module_stream_id => new_associated_ids)
                      old_associated_ids = self.available_module_stream_ids
                      delete_ids = old_associated_ids - new_associated_ids
              Severity: Minor
              Found in app/models/katello/concerns/host_managed_extensions.rb - About 45 mins 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 SelectSource has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              const SelectSource = () => {
                const {
                  acsType, setAcsType, contentType, setContentType, setAuthentication,
                } = useContext(ACSCreateContext);
              
              
              Severity: Minor
              Found in webpack/scenes/AlternateContentSources/Create/Steps/SelectSource.js - About 45 mins 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 ACSCreateFinish has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              const ACSCreateFinish = ({ activeStep }) => {
                const { push } = useHistory();
                const currentStep = activeStep.id;
                const {
                  setIsOpen,
              Severity: Minor
              Found in webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js - About 45 mins 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 EnvironmentContentController has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  function EnvironmentContentController($scope, ContentService, ContentView, Repository, translate, $location) {

                Method manifest_expiration_date has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                        def manifest_expiration_date(cached: true)
                          Rails.cache.fetch("#{self.label}_manifest_expiration_date", expires_in: 1.minute, force: !cached) do
                            unless manifest_imported?(cached: cached)
                              Rails.logger.error "Manifest not imported for organization #{self.label}"
                              return nil
                Severity: Minor
                Found in app/models/katello/concerns/organization_extensions.rb - About 45 mins 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 NewEnvironmentController has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    function NewEnvironmentController($scope, Environment, FormUtils, Notification, PathsService, translate) {

                  Method destroyable? has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def destroyable?(remove_from_content_view_versions = false)
                        if self.environment.try(:library?) && self.content_view.default?
                          if self.environment.organization.being_deleted?
                            return true
                          elsif self.custom? && self.deletable?(remove_from_content_view_versions)
                  Severity: Minor
                  Found in app/models/katello/repository.rb - About 45 mins 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

                  Method kickstart_repository_id has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def kickstart_repository_id(host, options = {})
                        host_ks_repo_id = host_hostgroup_kickstart_repository_id(host)
                        ks_repo_options = kickstart_repository_options(host, options)
                        # if the kickstart repo id is set in the selected_hostgroup use that
                        selected_host_group = options.fetch(:selected_host_group, nil)
                  Severity: Minor
                  Found in app/helpers/katello/hosts_and_hostgroups_helper.rb - About 45 mins 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

                  Method repos has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def repos(env, content_view = nil, include_feedless = true)
                        if content_view.nil?
                          if !env.library?
                            fail "No content view specified for the repos call in a " \
                                            "Non library environment #{env.inspect}"
                  Severity: Minor
                  Found in app/models/katello/product.rb - About 45 mins 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

                  Severity
                  Category
                  Status
                  Source
                  Language