opf/openproject

View on GitHub

Showing 610 of 1,650 total issues

Function initializeCalendar has 110 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

        Class CostQuery has 33 methods (exceeds 20 allowed). Consider refactoring.
        Open

        class CostQuery < ApplicationRecord
          extend Forwardable
          include Enumerable
          include Engine
        
        
        Severity: Minor
        Found in modules/reporting/app/models/cost_query.rb - About 4 hrs to fix

          WorkPackageTimelineTableController has 33 functions (exceeds 20 allowed). Consider refactoring.
          Open

          @Component({
            selector: 'wp-timeline-container',
            templateUrl: './wp-timeline-container.html',
          })
          export class WorkPackageTimelineTableController extends UntilDestroyedMixin implements AfterViewInit {

            Function initializeHalProperties has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
            Open

            export function initializeHalProperties<T extends HalResource>(halResourceService:HalResourceService, halResource:T) {
              setSource();
              setupLinks();
              setupEmbedded();
              proxyProperties();
            Severity: Minor
            Found in frontend/src/app/features/hal/helpers/hal-resource-builder.ts - 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

            ResourceChangeset has 32 functions (exceeds 20 allowed). Consider refactoring.
            Open

            export class ResourceChangeset<T extends HalResource = HalResource> {
              /** Maintain a single change set while editing */
              protected changeset = new Changeset();
            
              /** Reference and load promise for the current form */

              File historic_active_record_relation.rb has 332 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              class Journable::HistoricActiveRecordRelation < ActiveRecord::Relation
                attr_accessor :timestamp
              
                include ActiveRecord::Delegation::ClassSpecificRelation
              
              
              Severity: Minor
              Found in app/models/journable/historic_active_record_relation.rb - About 4 hrs to fix

                File model.js has 331 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: Minor
                Found in frontend/src/stimulus/controllers/dynamic/backlogs/model.js - About 3 hrs to fix

                  Function Backlog has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  RB.Backlog = (function ($) {
                    return RB.Object.create({
                  
                      initialize: function (el) {
                        this.$ = $(el);
                  Severity: Major
                  Found in frontend/src/stimulus/controllers/dynamic/backlogs/backlog.js - About 3 hrs to fix

                    OpMultiDatePickerComponent has 31 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    @Component({
                      selector: 'op-multi-date-picker',
                      templateUrl: './multi-date-picker.component.html',
                      styleUrls: ['../styles/datepicker.modal.sass'],
                      changeDetection: ChangeDetectionStrategy.OnPush,

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

                        private buildItems() {
                          const c = this.column;
                      
                          this.items = [
                            {

                        Function constructor has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          constructor(public readonly injector:Injector,
                            public table:WorkPackageTable) {
                            // The DragService may not have been provided
                            // in which case we do not provide drag and drop
                            if (this.dragService === null) {

                          File wp-single-view.component.ts has 324 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 wp-list.service.ts has 322 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 ian-center.service.ts has 321 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 openproject-grids.module.ts has 317 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: Minor
                                Found in frontend/src/app/shared/components/grids/openproject-grids.module.ts - About 3 hrs to fix

                                  Function buildV3GetQueryFromJsonParams has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                    public buildV3GetQueryFromJsonParams(updateJson:string|null) {
                                      const queryData:Partial<QueryRequestParams> = {
                                        pageSize: this.paginationService.getPerPage(),
                                      };
                                  
                                  

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

                                  export function registerWorkPackageMouseHandler(this:void,
                                    injector:Injector,
                                    getRenderInfo:() => RenderInfo,
                                    workPackageTimeline:WorkPackageTimelineTableController,
                                    halEditing:HalResourceEditingService,

                                  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

                                  BoardListComponent has 29 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  @Component({
                                    selector: 'board-list',
                                    templateUrl: './board-list.component.html',
                                    styleUrls: ['./board-list.component.sass'],
                                    changeDetection: ChangeDetectionStrategy.OnPush,
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language