Project

General

Profile

action #58100

Updated by okurz almost 4 years ago

## Motivation 

 Currently we allow quotes for names containing "_". From perl perspective a name containing '_' is still a simple identifier and can be used without quotes for hashkey. 

 From https://perldoc.perl.org/perldata.html : 

     The => operator is mostly just a more visually distinctive synonym for a comma, but it also arranges 
     for its left-hand operand to be interpreted as a string if it's a bareword that would be a legal simple 
     identifier. 
    
 So we will end up with a regex like this: 

     /^[a-zA-Z][0-9a-zA-Z_]*$/ 

 Changing it, produce perlcritic violations, so a cleanup is needed as well. 

 ## Acceptance criteria 

 * **AC1:** hash keys containing `_` are accepted without surrounding quotes 
 * **AC2:** Adopted tidy rules have been applied to os-autoinst and downstream os-autoinst-distri-opensuse 


 ## Suggestions 

 * Change existing tidy checks within os-autoinst 
 * Ensure os-autoinst code adheres to the new rules 
 * Apply the same for os-autoinst-distri-opensuse

Back