action #96675

coordination #96596: [qe-core][CI] Implement checks in the CI for common errors/coding style

[qe-core] Add CI check preventing obsolete use of `check_var('VAR')

Added by apappas 5 months ago. Updated 2 months ago.

In Progress
Enhancement to existing tests
Target version:
Start date:
Due date:
% Done:


Estimated time:



As a code reviewer I would like the CI to do menial checks so that I can focus on bigger details and be more effective with my work.


Many uses of the check_var() have been obsoleted by fuctions like is_qemu and is_aarch64 which are more legible and should be the only way those conditions are checked.

Acceptance Criteria

  • AC1: Propose checks as an RFC in the os-autoinst-distri-opensuse repo.
  • AC2: Add a corresponding entry in the contributing document.
  • AC3: Make the mechanism extensible to new variables.

Initial Thoughts

  • Create a hash table in yaml, json, xml, CORBA, toml, $MARKUPLANGUAGE to check with a regex for a syntax that when matching, would propose a suggestion.
  • Use to add the proposals.


#1 Updated by apappas 5 months ago

  • Assignee changed from apappas to dvenkatachala

Assigning to Dee who has already started working on this issue.

#2 Updated by szarate 5 months ago

Something else to keep in mind here, is that there's already something in the git repo:

we don't need to necessarily adopt this, but is good to keep it in mind.

#3 Updated by okurz 5 months ago

  • Category set to Enhancement to existing tests

#5 Updated by dvenkatachala 4 months ago

  • Status changed from In Progress to Resolved

Replaced the function calls check_var('ARCH', '') with already defined functions(in the lib/Utils/
PR Merged:

#6 Updated by okurz 4 months ago

  • Due date deleted (2021-09-01)

#7 Updated by dvenkatachala 4 months ago

  • Status changed from Resolved to Workable

#8 Updated by dvenkatachala 4 months ago

In the existing Perl module, we have called the functions check_var('ARCH', '') and check_var('BACKEND',''), replace these function calls with already defined functions in the lib/Utils/ and lib/Utils/
Example: check_var('ARCH', 'aarch64') to is_aarch64 , check_var('ARCH', 's390x') to is_s390x.
PR Merged :

Implement a CI check, which verifies function calls check_var('ARCH', '') and check_var('BACKEND','') when a new file is created or existing files are edited.

#9 Updated by szarate 4 months ago

  • Tracker changed from coordination to action

#10 Updated by dvenkatachala 4 months ago

  • Status changed from Workable to In Progress

#11 Updated by dvenkatachala 2 months ago

I had created PR for CI Story, I will continue this work after my vacation.

Also available in: Atom PDF