Showing 620 of 1,668 total issues
Class StoragesController
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class Storages::Admin::StoragesController < ApplicationController
using Storages::Peripherals::ServiceResultRefinements
include FlashMessagesHelper
include OpTurbo::ComponentStream
OpModalSingleDatePickerComponent
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: opModalSingleDatePickerSelector,
templateUrl: './modal-single-date-picker.component.html',
styleUrls: ['../styles/datepicker.modal.sass', './modal-single-date-picker.component.sass'],
changeDetection: ChangeDetectionStrategy.OnPush,
UrlParamsHelperService
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
@Injectable({ providedIn: 'root' })
export class UrlParamsHelperService {
public constructor(public paginationService:PaginationService) {
}
BcfWpAttributeGroupComponent
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
templateUrl: './bcf-wp-attribute-group.component.html',
styleUrls: ['./bcf-wp-attribute-group.component.sass'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [ViewpointsService],
HalResourceService
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
@Injectable({ providedIn: 'root' })
export class HalResourceService {
/**
* List of all known hal resources, extendable.
*/
WorkPackageSingleViewComponent
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
templateUrl: './wp-single-view.component.html',
selector: 'wp-single-view',
changeDetection: ChangeDetectionStrategy.OnPush,
})
Function getAvailableProjects
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getAvailableProjects(searchTerm:string):Observable<IProjectAutocompleteItem[]> {
if (this.dataLoaded) {
return this.matchingItems(this.projects, searchTerm).pipe(
map(this.mapResultsFn),
map((projects) => projects.sort((a, b) => a.ancestors.length - b.ancestors.length)),
Function ngOnInit
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
ngOnInit():void {
registerEffectCallbacks(this, this.untilDestroyed());
this.initializeCalendar();
this.projectIdentifier = this.currentProject.identifier || undefined;
File resource-changeset.ts
has 254 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 Task
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
RB.Task = (function ($) {
return RB.Object.create(RB.WorkPackage, {
initialize: function (el) {
this.$ = $(el);
- 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 parseFilterValue
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private parseFilterValue(filterName:string, filterType:string, operator:string) {
const valueContainer = this.filterValueContainerTargets.find((filterValueContainer) => filterValueContainer.getAttribute('data-filter-name') === filterName);
if (valueContainer) {
const checkbox = valueContainer.querySelector('input[type="checkbox"]') as HTMLInputElement;
- 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 buildItems
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected buildItems():OpContextMenuItem[] {
const items = this.permittedActions.map((action:WorkPackageAction) => ({
class: undefined as string|undefined,
disabled: false,
linkText: action.text,
- 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 buildItems
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
private buildItems() {
this.items = [];
if (this.wpDisplayRepresentationService.current !== wpDisplayCardRepresentation) {
this.items.push(
Function ngOnInit
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
ngOnInit():void {
// Hook on form submit
this.element = this.elementRef.nativeElement;
this.no_filter_query = this.element.dataset.noFilterQuery!;
this.form = jQuery(this.element).closest('form');
File dynamic-form.component.ts
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ChangeDetectorRef,
Component,
EventEmitter,
Input,
Function exports
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
basePath: '',
files: [
// I18n.js is provided by the Asset pipeline,
Method change
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
def change
# see https://docs.github.com/en/rest/reference/pulls
create_table :github_pull_requests do |t|
t.references :github_user
t.references :merged_by
Function saveChanges
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public saveChanges():void {
const prefs = this.storeService.store.getValue();
const notificationSettings = (this.form.value as IFullNotificationSettingsValue);
const globalNotification = prefs.notifications.find((notification) => !notification._links.project.href) as INotificationSetting;
const globalPrefs:INotificationSetting = {
Function open
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
open() {
this._opened = true;
this.updateAppHeight();
this.cdRef.detectChanges();
Function Reporting
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.Reporting = (function($) {
var onload = function (func) {
$(document).ready(func);
};