WebIDL validation: detect attributes/fields that don't follow initialisms rule
dontcallmedom opened this issue · 0 comments
dontcallmedom commented
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"