Project

General

Profile

action #97097

Updated by dvenkatachala over 2 years ago

> ## Story 
 >  
 > 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. 
 
 
 >  
 > ## Background 
 >  
 > * Syntax checkers for coding style 
     
 > * we have called Things like if check_var('ARCH') instead of `is_aarch64` being wildly used, When there is `Utils::Architectures::is_aarch64`. When finding the functions check_var('ARCH', '') and check_var('BACKEND','') in most check_var syntax, propose the aforementioned function 
 >     * Things like if check_var('BACKEND', 'qemu') instead of `is_qemu` being wildly used, When there are `Utils::Backends::is_qemu`. When finding the perl modules, Replace these functions with already defined functions in (in check_var syntax, propose the lib/Utils/Architectures.pm and lib/Utils/Backends.pm)    
      Example: check_var('ARCH', 'aarch64') to is_aarch64 , check_var('ARCH', 's390x') to is_s390x  
     aforementioned function. 
 >     * Mix between my `my $self = shift shift` and my `my ($self) = @_ for parameter parsing, @_`, the proposal would be to stick to my `my ($self) = @ 

 @_` 
 > ### AC's for each feach item 
  
 > * AC1: Each subtask is proposed as an RFC in the os-autoinst-distri-opensuse repo. 
  
 > * AC2: There's a corresponding entry in the [contributing](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/CONTRIBUTING.md#coding-style) document. 
 >  
 >  
 > ## For syntax checking (check_var, get_var, `script.*zypper`... etc) 
 >  
 > * 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 etherpad.nue.suse.com/qe-core-proposed-syntax-checks to add the proposals.

Back