opf/openproject

View on GitHub

Showing 600 of 1,617 total issues

OpWpMultiDateFormComponent has 44 functions (exceeds 20 allowed). Consider refactoring.
Open

@Component({
  selector: 'op-wp-multi-date-form',
  templateUrl: './wp-multi-date-form.component.html',
  styleUrls: [
    '../styles/datepicker.modal.sass',

    Function buildItems has 148 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      private buildItems() {
        this.items = [
          {
            // Configuration modal
            disabled: false,

      Function Model has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
      Open

      RB.Model = (function ($) {
        return RB.Object.create({
      
          initialize: function (el) {
            this.$ = $(el);
      Severity: Minor
      Found in frontend/src/stimulus/controllers/dynamic/backlogs/model.js - About 5 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 initializeHalProperties has 141 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function initializeHalProperties<T extends HalResource>(halResourceService:HalResourceService, halResource:T) {
        setSource();
        setupLinks();
        setupEmbedded();
        proxyProperties();
      Severity: Major
      Found in frontend/src/app/features/hal/helpers/hal-resource-builder.ts - About 5 hrs to fix

        File board-list.component.ts has 401 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import {
          ChangeDetectionStrategy,
          ChangeDetectorRef,
          Component,
          ElementRef,

          File op-autocompleter.component.ts has 396 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* We just forward the ng-select outputs without renaming */
          /* eslint-disable @angular-eslint/no-output-native */
          import {
            AfterViewInit,
            ChangeDetectionStrategy,

            OpAutocompleterComponent has 40 functions (exceeds 20 allowed). Consider refactoring.
            Open

            @Component({
              selector: 'op-autocompleter',
              changeDetection: ChangeDetectionStrategy.OnPush,
              templateUrl: './op-autocompleter.component.html',
              styleUrls: ['./op-autocompleter.component.sass'],

              Method check has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                    def check(pop_options = {}, options = {})
                      host = pop_options[:host] || "127.0.0.1"
                      port = pop_options[:port] || "110"
                      apop = (pop_options[:apop].to_s == "1")
                      delete_unprocessed = (pop_options[:delete_unprocessed].to_s == "1")
              Severity: Minor
              Found in lib/redmine/pop3.rb - About 5 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 Taskboard has 123 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              RB.Taskboard = (function ($) {
                return RB.Object.create(RB.Model, {
              
                  initialize: function (el) {
                    var self = this; // So we can bind the event handlers to this object
              Severity: Major
              Found in frontend/src/stimulus/controllers/dynamic/backlogs/taskboard.js - About 4 hrs to fix

                Function GroupBys has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Reporting.GroupBys = (function($){
                  var group_by_container_ids = function() {
                    var ids = ['group-by--columns', 'group-by--rows'];
                
                    return _.filter(ids, function (i) {

                  File multi-date-picker.component.ts has 366 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  // -- copyright
                  // OpenProject is an open source project management software.
                  // Copyright (C) 2012-2024 the OpenProject GmbH
                  //
                  // This program is free software; you can redistribute it and/or

                    Class BaseActivityProvider has 36 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Activities::BaseActivityProvider
                      include I18n
                      include Redmine::I18n
                      include OpenProject::StaticRouting
                    
                    
                    Severity: Minor
                    Found in app/models/activities/base_activity_provider.rb - About 4 hrs to fix

                      GridAreaService has 36 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      @Injectable()
                      export class GridAreaService {
                        private resource:GridResource;
                      
                        public schema:SchemaResource;
                      Severity: Minor
                      Found in frontend/src/app/shared/components/grids/grid/area.service.ts - About 4 hrs to fix

                        TimeEntryCalendarComponent has 36 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        @Component({
                          templateUrl: './te-calendar.template.html',
                          styleUrls: ['./te-calendar.component.sass'],
                          selector: 'op-time-entries-calendar',
                          encapsulation: ViewEncapsulation.None,

                          File dynamic-fields.service.ts has 361 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import { Injectable } from '@angular/core';
                          import { FormlyFieldConfig } from '@ngx-formly/core';
                          import { Observable, of } from 'rxjs';
                          import { map } from 'rxjs/operators';
                          import { HttpClient } from '@angular/common/http';

                            File op-work-packages-calendar.service.ts has 360 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import { Injectable, Injector } from '@angular/core';
                            import {
                              CalendarOptions,
                              DatesSetArg,
                              DayCellContentArg,

                              GlobalSearchInputComponent has 35 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              @Component({
                                selector: 'opce-global-search',
                                changeDetection: ChangeDetectionStrategy.OnPush,
                                templateUrl: './global-search-input.component.html',
                                styleUrls: [

                                Function initializeCalendar has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  private initializeCalendar() {
                                    void this.weekdayService.loadWeekdays()
                                      .toPromise()
                                      .then(() => {
                                        this.calendarOptions$.next(

                                  File url-params-helper.ts has 347 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  // -- copyright
                                  // OpenProject is an open source project management software.
                                  // Copyright (C) 2012-2024 the OpenProject GmbH
                                  //
                                  // This program is free software; you can redistribute it and/or

                                    File global-search-input.component.ts has 345 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    // -- copyright
                                    // OpenProject is an open source project management software.
                                    // Copyright (C) 2012-2024 the OpenProject GmbH
                                    //
                                    // This program is free software; you can redistribute it and/or
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language