Showing 589 of 1,576 total issues
File team-planner.component.ts
has 791 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 Filters
has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring. Open
Open
Reporting.Filters = function($){
var load_available_values_for_filter = function (filter_name, callback_func) {
var select, radio_options, post_select_values;
select = $('.filter-value[data-filter-name="' + filter_name + '"]').first();
// check if we might have a radio-box
- 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 Model
has 329 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
RB.Model = (function ($) {
return RB.Object.create({
initialize: function (el) {
this.$ = $(el);
File hal-resource.spec.ts
has 618 lines of code (exceeds 250 allowed). Consider refactoring. Open
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-work-packages.module.ts
has 607 lines of code (exceeds 250 allowed). Consider refactoring. Open
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-multi-date-form.component.ts
has 558 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 te-calendar.component.ts
has 549 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
ChangeDetectionStrategy,
Component,
ElementRef,
EventEmitter,
Class PDFStyles
has 59 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class PDFStyles
include MarkdownToPDF::Common
include MarkdownToPDF::StyleHelper
def initialize(yml)
Function Filters
has 210 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Reporting.Filters = function($){
var load_available_values_for_filter = function (filter_name, callback_func) {
var select, radio_options, post_select_values;
select = $('.filter-value[data-filter-name="' + filter_name + '"]').first();
// check if we might have a radio-box
Method static_links
has 210 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def static_links
{
upsale: {
href: 'https://www.openproject.org/enterprise-edition',
label: 'homescreen.links.upgrade_enterprise_edition'
PathHelperService
has 57 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Injectable({ providedIn: 'root' })
export class PathHelperService {
public readonly appBasePath = window.appBasePath || '';
public readonly api = {
Function registerWidgets
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function registerWidgets(injector:Injector) {
const hookService = injector.get(HookService);
const i18n = injector.get(I18nService);
hookService.register('gridWidgets', () => {
File storage.component.ts
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 dynamic-form.component.spec.ts
has 461 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { NgSelectModule } from '@ng-select/ng-select';
import { NgOptionHighlightModule } from '@ng-select/ng-option-highlight';
import {
Component,
forwardRef,
Class SetAttributesService
has 50 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class WorkPackages::SetAttributesService < BaseServices::SetAttributes
include Attachments::SetReplacements
private
Method modify_conditions
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
Open
def modify_conditions(node)
if node.kind_of? Arel::TreeManager
# We have another sub-tree, investigate its core, which is a SelectCore
node.instance_variable_get(:@ast).instance_variable_get(:@cores).each do |core|
modify_conditions(core)
- 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-timeline-container.directive.ts
has 442 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
TeamPlannerComponent
has 47 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
selector: 'op-team-planner',
templateUrl: './team-planner.component.html',
styleUrls: ['./team-planner.component.sass'],
changeDetection: ChangeDetectionStrategy.OnPush,
Function registerWorkPackageMouseHandler
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function registerWorkPackageMouseHandler(this:void,
injector:Injector,
getRenderInfo:() => RenderInfo,
workPackageTimeline:WorkPackageTimelineTableController,
halEditing:HalResourceEditingService,
File timeline-cell-renderer.ts
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import * as moment from 'moment';
import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';
import { DisplayFieldRenderer } from 'core-app/shared/components/fields/display/display-field-renderer';
import { Injector } from '@angular/core';
import { Highlighting } from 'core-app/features/work-packages/components/wp-fast-table/builders/highlighting/highlighting.functions';