action #48602

action #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] Limit maximum file length with static code checks

Added by okurz 12 months ago. Updated 9 months ago.

Status:RejectedStart date:02/03/2019
Priority:NormalDue date:
Assignee:riafarov% Done:

0%

Category:Enhancement to existing tests
Target version:QA - future
Difficulty:
Duration:

Description

Motivation

See #44075

Acceptance criteria

  • AC1: Static checks prevent our perl files to exceed a useful limit, e.g. 1k lines ## Suggestion
  • Let's think about the proper size reasonable.
  • Investigate perl critic to achieve this goal.
  • Gather a list of file that contains more that 1k lines that we want to exclude.

History

#1 Updated by JERiveraMoya 11 months ago

  • Subject changed from [functional][y] Limit maximum file length with static code checks to [functional][y][timebox:6h] Limit maximum file length with static code checks
  • Description updated (diff)

#2 Updated by riafarov 11 months ago

  • Subject changed from [functional][y][timebox:6h] Limit maximum file length with static code checks to [functional][y] Limit maximum file length with static code checks
  • Due date deleted (23/04/2019)
  • Target version changed from Milestone 24 to future

Not seeing as priority.

#3 Updated by riafarov 9 months ago

  • Status changed from Workable to Rejected
  • Assignee set to riafarov

I will take responsibility on rejecting this one, as it's too subjective which limit to set and it should be clear that long files are bad, like main.pm.
And we have 4 of them:
./lib/utils.pm
./lib/bootloader_setup.pm
./lib/main_common.pm
./products/sle/main.pm

Which we tried to split, but they are still too big.

For 500 lines we have:
./lib/wickedbase.pm
./lib/apparmortest.pm
./lib/opensusebasetest.pm
./lib/registration.pm
./lib/susedistribution.pm
./lib/utils.pm
./lib/virtmanager.pm
./lib/x11test.pm
./lib/bootloader_setup.pm
./lib/main_common.pm
./products/sle/main.pm
./tests/installation/partitioning_raid.pm
./tests/support_server/setup.pm

we are addressing complexity already and it's not helping where someone will increase file length from 990 lines to 1001 and will be pushed to split it.

Also available in: Atom PDF