Showing 600 of 1,617 total issues
Class CostQuery
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class CostQuery < ApplicationRecord
extend Forwardable
include Enumerable
include Engine
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();
- 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
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
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
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);
Function initializeCalendar
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
private initializeCalendar() {
const additionalOptions:{ [key:string]:unknown } = {
locales: allLocales,
locale: this.I18n.locale,
height: '100%',
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 ian-center.service.ts
has 320 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
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,
- 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 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(),
};
- 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
File wp-calendar.component.ts
has 315 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
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,
File area.service.ts
has 311 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Injectable } from '@angular/core';
import { GridWidgetArea } from 'core-app/shared/components/grids/areas/grid-widget-area';
import { GridArea } from 'core-app/shared/components/grids/areas/grid-area';
import { GridGap } from 'core-app/shared/components/grids/areas/grid-gap';
import { GridResource } from 'core-app/features/hal/resources/grid-resource';
Function Controls
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Reporting.Controls = function($){
var toggle_delete_form = function (e) {
e.preventDefault();
var offset = $('#query-icon-delete').offsetLeft;
File wp-list.service.ts
has 309 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