Skip to contentSkip to conversation

yamllint: Drop excluding quoted values with ',' from checks

PATCH In review Rob Herring (Arm) 2 participants 3 messages Apr 26, 2024 – Apr 30, 2024 Device tree bindings

lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/1 yamllint: Drop excluding quoted values with ',' from checks

From: Rob Herring <[email protected]>

Strings with commas were excluded from checks because yamllint had false positives for flow style maps and sequences which need quotes when values contain commas. This issue has been fixed as of the 1.34 release, so drop the work-around.

---
 Documentation/devicetree/bindings/.yamllint | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/.yamllint +1 -1
index 358c88813937..fadbc6ad3c76 100644
@@ -7,7 +7,7 @@ rules:
   quoted-strings:
     required: only-when-needed
     extra-allowed:
-      - '[$^,[]'
+      - '[$^[]'
       - '^/$'
   line-length:
     # 80 chars should be enough, but don't fail if a line is longer
Signature · 1 line
2.43.0
#1 lore raw
Quoted 6 lines · Rob Herring (Arm)

From: Rob Herring <[email protected]>

Strings with commas were excluded from checks because yamllint had false positives for flow style maps and sequences which need quotes when values contain commas. This issue has been fixed as of the 1.34 release, so drop the work-around.

Hmm, is this a bit aggressive of an upgrade? I only checked Debian since it is what this machine uses, and it only seems to be shipping 1.33 in testing & unstable.

Quoted 22 lines
---
 Documentation/devicetree/bindings/.yamllint | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/.yamllint +1 -1
index 358c88813937..fadbc6ad3c76 100644
@@ -7,7 +7,7 @@ rules:
   quoted-strings:
     required: only-when-needed
     extra-allowed:
-      - '[$^,[]'
+      - '[$^[]'
       - '^/$'
   line-length:
     # 80 chars should be enough, but don't fail if a line is longer
Signature · 1 line
2.43.0
author maintainer
#2 lore raw
Quoted 4 lines · Conor Dooley
Quoted 2 lines · Rob Herring (Arm)

From: Rob Herring <[email protected]>

Quoted 8 lines
Quoted 4 lines

Strings with commas were excluded from checks because yamllint had false positives for flow style maps and sequences which need quotes when values contain commas. This issue has been fixed as of the 1.34 release, so drop the work-around.

Hmm, is this a bit aggressive of an upgrade? I only checked Debian since it is what this machine uses, and it only seems to be shipping 1.33 in testing & unstable.

Humm, yeah and that's what the bot is running...

It's only required if you don't want warnings. The issue for me is if we don't enable this, we get new cases we have to go fix. I could enable it only on the bot (with some work), but then I get 'I ran the checks and didn't see this'.

There is also a new check for quoted keys that I want to enable. I haven't done that because then 1.34 is really required as yamllint will error out on unknown (to older versions) checks. That's what really drives the minimum version.

I'll hold off on this at least until it lands in debian.

Rob