Project

General

Profile

Actions

action #48605

closed

coordination #44075: [functional][y][epic] Use more static code style checks to make life for test developers such a pain that nobody dares to add new tests which we would not be able to maintain anyway ;)

[functional][y] Reduce code nesting level to a limit of 4

Added by okurz about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Enhancement to existing tests
Target version:
SUSE QA - Milestone 25
Start date:
2019-03-02
Due date:
2019-06-04
% Done:

0%

Estimated time:
2.00 h
Difficulty:

Description

Motivation

See parent ticket #44075

Acceptance criteria

  • AC1: .perlcriticrc has a nesting limit of 4
  • AC2: All code positions that exceed the limit have been fixed or explicitly whitelisted together with specific tickets, e.g. to other teams

Suggestions

Currently based on a limit of 4 the following code positions are reporting too deep nesting.

lib/bootloader_setup.pm: Code structure is deeply nested at line 486, column 21.  Consider refactoring.  (Severity: 5)
lib/registration.pm: Code structure is deeply nested at line 280, column 21.  Consider refactoring.  (Severity: 5)
lib/registration.pm: Code structure is deeply nested at line 334, column 21.  Consider refactoring.  (Severity: 5)
lib/registration.pm: Code structure is deeply nested at line 339, column 21.  Consider refactoring.  (Severity: 5)
lib/registration.pm: Code structure is deeply nested at line 343, column 21.  Consider refactoring.  (Severity: 5)
tests/migration/sle12_online_migration/yast2_migration.pm: Code structure is deeply nested at line 159, column 21.  Consider refactoring.  (Severity: 5)
tests/slenkins/slenkins_control.pm: Code structure is deeply nested at line 84, column 21.  Consider refactoring.  (Severity: 5)

I suggest to either fix these code positions directly or explicitly whitelist the positions, e.g. with some "nocritic" pragmas together with tickets that can be assigned to other teams to fix it.

Actions

Also available in: Atom PDF