Showing 635 of 1,693 total issues
Function ngOnInit
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
ngOnInit() {
combineLatest([
this.upload,
this.viewInitialized,
]).pipe(this.untilDestroyed())
Function setupRelationSubscription
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private setupRelationSubscription() {
// for all visible WorkPackage rows...
combineLatest([
this.querySpace.renderedWorkPackages.values$(),
this.wpTableTimeline.live$(),
Function getToken
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getToken():void {
// 2) GET /public/v1/trials/:id
this.http.get(
this.store.getValue().trialLink as string,
{
Function Backlog
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
RB.Backlog = (function ($) {
return RB.Object.create({
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 Story
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
RB.Story = (function ($) {
return RB.Object.create(RB.WorkPackage, RB.EditableInplace, {
initialize: function (el) {
this.$ = $(el);
this.el = 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
Method at_date_for_user_in_project
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def self.at_date_for_user_in_project(date, user_id, project = nil, include_default = true)
user_id = user_id.id if user_id.is_a?(User)
unless project.nil?
rate = where(["user_id = ? and project_id = ? and valid_from <= ?", user_id, project, date])
- 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 toggleApplicationPasswordDisplay
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
toggleApplicationPasswordDisplay(automaticManagementEnabled:boolean):void {
switch (this.providerTypeValue) {
case 'Storages::NextcloudStorage':
if (!this.hasApplicationPasswordInputTarget) {
return;
- 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
Method migrate_attachment
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def migrate_attachment(attachment)
file_name = attachment.disk_filename.presence
if file_name
file = legacy_file_name file_name
- 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 onValidatedSubmit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
onValidatedSubmit():void {
if (this.principalForm.invalid) {
return;
}
- 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 checkForSpecialDisplaySituations
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
checkForSpecialDisplaySituations(renderInfo:RenderInfo, bar:HTMLElement) {
const wp = renderInfo.workPackage;
const row = bar.parentElement!.parentElement!;
const selectionMode = renderInfo.viewParams.activeSelectionMode;
- 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 detectOnboardingTour
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function detectOnboardingTour():void {
// ------------------------------- Global -------------------------------
const url = new URL(window.location.href);
const isMobile = document.body.classList.contains('-browser-mobile');
const demoProjectsAvailable = jQuery('meta[name=demo_projects_available]').attr('content') === 'true';
- 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
Method submit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def submit(email)
uri = url.gsub(%r{/*\z}, "") + "/mail_handler"
headers = { "User-Agent" => "Redmine mail handler/#{VERSION}" }
Method substitute_database_table_in_predicate
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def substitute_database_table_in_predicate(predicate)
case predicate
when String
gsub_table_names_in_sql_string!(predicate)
when Arel::Nodes::HomogeneousIn,
Method render_tfoot
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def render_tfoot
return if walker.headers_empty?
write "<tfoot>"
walker.reverse_headers do |list, first, first_in_col, last_in_col|
Method up
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.up
# Add devices table
create_table "two_factor_authentication_devices" do |t|
t.string "type"
Function updatePageNumbers
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public updatePageNumbers() {
if (!this.showPageSelections) {
this.pageNumbers = [];
this.postPageNumbers = [];
return;
Function initializeDatePicker
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private initializeDatePicker() {
this.datePickerInstance = new DatePicker(
this.injector,
this.id,
this.value || '',
Function deactivate
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function deactivate(direction:MouseDirection|null, cancelled:boolean) {
const change = renderInfo.change;
workPackageTimeline.disableViewParamsCalculation = false;
cell.onmousemove = handleMouseMoveOnEmptyCell;
Function sendForm
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public sendForm(form:UntypedFormGroup):Promise<unknown> {
const request:unknown = { ...form.value, token_version: this.tokenVersion };
return this.http
.post(
`${this.baseUrlAugur}/public/v1/trials`,
Method initialize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(content)
@content = content
current = content
current_lines = current.data.text.split(/\r?\n/)
@lines = current_lines.map { |t| [nil, nil, t] }