Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WebIDL validation: detect attributes/fields that don't follow initialisms rule #332

Open
dontcallmedom opened this issue Apr 12, 2023 · 0 comments

Comments

@dontcallmedom
Copy link
Member

see WICG/turtledove#497 for an example of what strudy could have detected early (looking at webref, webrtc-identity and json-ld-api also have fields that use camelcase "Url").

Detecting breach of that specific rule would need to look at well-known acronyms; one possible approach would be to look at the all-caps definitions in webref

All caps dfns in webref

via jq '.dfns[].linkingText[0]|select(.|match("^[A-Z]+$"))' *.json |sort|uniq in a webref checkout

"A"
"ABNF"
"ADDITION"
"ALL"
"ALPHA"
"AT"
"BE"
"BFC"
"BLUE"
"BS"
"C"
"CBOR"
"CDDL"
"CEO"
"CJK"
"CLOSED"
"CLOSING"
"COMPUTE"
"CONNECTING"
"CSS"
"CSSHSL"
"CSSHWB"
"CSSLCH"
"CSSOKLCH"
"CSSRGB"
"D"
"DIAL"
"DNT"
"DOCTYPE"
"DONE"
"E"
"ECDH"
"ECT"
"ED"
"EMPTY"
"EPSILON"
"ERROR"
"FRAGMENT"
"FROZENNESS"
"G"
"GBK"
"GET"
"GOAWAY"
"GPU"
"GREEN"
"HID"
"HSL"
"HWB"
"I"
"ID"
"IDP"
"IME"
"INDEX"
"INDIRECT"
"ISO"
"JSON"
"LCH"
"LOADED"
"LOADING"
"MAY"
"MIDI"
"MINDE"
"ML"
"MODIFICATION"
"MRST"
"MST"
"MUST"
"N"
"NDC"
"NDEF"
"NEL"
"NONE"
"OPEN"
"OPENED"
"OPTIONAL"
"P"
"PI"
"PMI"
"POST"
"Q"
"QWERTY"
"READ"
"RECOMMENDED"
"RED"
"REMOVAL"
"REQUIRED"
"RFCB"
"ROWMIN"
"RP"
"RSSI"
"SCT"
"SFM"
"SHALL"
"SHOULD"
"SRST"
"SST"
"STORAGE"
"T"
"TIMEOUT"
"TSV"
"U"
"UA"
"ULP"
"UNIFORM"
"UNSENT"
"UP"
"URI"
"URL"
"USB"
"UTC"
"UUID"
"UV"
"VERTEX"
"WRITE"
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant