HashKeyQuotes: force no quotes for names containing "_"
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.
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:
Changing it, produce perlcritic violations, so a cleanup is needed as well.
- 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
- Change existing tidy checks within os-autoinst
- Ensure os-autoinst code adheres to the new rules
- Apply the same for os-autoinst-distri-opensuse
#1 Updated by okurz over 1 year ago
- Status changed from New to Feedback
- Assignee set to cfconrad
cfconrad did you solve this now yourself with https://github.com/os-autoinst/os-autoinst/pull/1223/files#diff-838517ce7f3788eb66e3542a57c722fcR26 or what is missing?
#5 Updated by okurz about 1 year ago
- Subject changed from [tools] HashKeyQuotes: force no quotes for names containing "_" to HashKeyQuotes: force no quotes for names containing "_"
- Description updated (diff)
- Status changed from New to Workable
- Target version set to Ready
I am sure our perl gurus will arrive at a solution quickly :)