diff --git a/.github/styles/Agora/Acronyms.yml b/.github/styles/Agora/Acronyms.yml new file mode 100644 index 00000000000..461f1128cac --- /dev/null +++ b/.github/styles/Agora/Acronyms.yml @@ -0,0 +1,66 @@ +extends: conditional +message: "Spell out '%s', if it's unfamiliar to the audience." +link: "https://developers.google.com/style/abbreviations" +level: suggestion +ignorecase: false +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '\b([A-Z]{3,5})\b' +second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' +# ... with the exception of these: +exceptions: + - API + - ASP + - CLI + - CPU + - CSS + - CSV + - DEBUG + - DITA + - DOM + - DPI + - FAQ + - GCC + - GDB + - GET + - GPU + - GTK + - GUI + - HTML + - HTTP + - HTTPS + - IDE + - JAR + - JSON + - JSX + - LESS + - LLDB + - NET + - NOTE + - NVDA + - OSS + - PATH + - PDF + - PHP + - POST + - RAM + - RTC + - RTM + - RSA + - SCM + - SCSS + - SD-RTN + - SDK + - SQL + - SSH + - SSL + - SVG + - TCP + - UDP + - URI + - URL + - USB + - UTF + - XML + - XSS + - YAML + - ZIP diff --git a/.github/styles/Agora/Characters.yml b/.github/styles/Agora/Characters.yml new file mode 100644 index 00000000000..0eccdccee75 --- /dev/null +++ b/.github/styles/Agora/Characters.yml @@ -0,0 +1,6 @@ +extends: existence +message: "Illegal character" +level: error +nonword: true +tokens: + - '[^\sa-zA-Z0-9™#%*+=@&~|<>(){}:"''.,?/_-]' \ No newline at end of file diff --git a/.github/styles/Agora/Colons.yml b/.github/styles/Agora/Colons.yml new file mode 100644 index 00000000000..73dba27278b --- /dev/null +++ b/.github/styles/Agora/Colons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' should be in uppercase." +link: "https://developers.google.com/style/colons" +nonword: true +level: warning +scope: sentence +tokens: + - ':\s[a-z]' diff --git a/.github/styles/Agora/Contractions.yml b/.github/styles/Agora/Contractions.yml new file mode 100644 index 00000000000..1e6c8b461f4 --- /dev/null +++ b/.github/styles/Agora/Contractions.yml @@ -0,0 +1,30 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +scope: sentence +level: suggestion +ignorecase: true +action: + name: replace +swap: + aren't: are not + can't: cannot + couldn't: could not + didn't: did not + don't: do not + doesn't: does not + hasn't: has not + haven't: have not + how's: how is + isn't: is not + it's: it is + shouldn't: should not + that's: that is + they're: they are + wasn't: was not + we're: we are + we've: we have + weren't: were not + what's: what is + when's: when is + where's: where is + won't: will not diff --git a/.github/styles/Agora/Headings.yml b/.github/styles/Agora/Headings.yml new file mode 100644 index 00000000000..0c66c465373 --- /dev/null +++ b/.github/styles/Agora/Headings.yml @@ -0,0 +1,50 @@ +extends: capitalization +message: "'%s' should use sentence-style capitalization." +link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings" +level: warning +scope: heading +match: $sentence +indicators: + - ":" +exceptions: + - Agora Analytics + - Agora Cloud Recording + - Agora Console + - Agora Interactive Live Streaming Premium + - Agora Interactive Live Streaming Standard + - Agora Interactive Whiteboard + - Agora MediaPlayer Kit + - Agora On-premise Recording SDK + - Agora Real-time Messaging + - Agora RTM SDK + - Agora SD-RTN + - Agora Video Call + - Agora Video SDK + - Agora Voice Call + - Agora Voice SDK + - AI Interactive Classroom + - Azure + - Breakout Class + - Lecture Hall + - CLI + - Code + - Docker + - I + - Kubernetes + - Linux + - Live-stream Shopping + - macOS + - Marketplace + - MongoDB + - Multiple Hosts + - One-to-one Classroom + - PK Host + - Small Classroom + - Single Host + - Studio + - TypeScript + - URLs + - Virtual Host + - Visual + - VS + - Windows diff --git a/.github/styles/Agora/Link.yml b/.github/styles/Agora/Link.yml new file mode 100644 index 00000000000..c5f2b8c138d --- /dev/null +++ b/.github/styles/Agora/Link.yml @@ -0,0 +1,8 @@ +message: "Don't use '%s' as the content of a link." +extends: existence +ignorecase: true +scope: link +level: error +tokens: + - here + - this diff --git a/.github/styles/Agora/Spelling.yml b/.github/styles/Agora/Spelling.yml new file mode 100644 index 00000000000..e872a7af106 --- /dev/null +++ b/.github/styles/Agora/Spelling.yml @@ -0,0 +1,11 @@ +extends: spelling +message: "Did you really mean '%s'?" +level: error +ignore: + # Relative path to StylesPath + - ignore.txt +# The default dictionary is https://github.com/errata-ai/en_US-web +# Comment out the following to use custom .dic files +# dicpath: ../../fixtures/spelling/dics +# dictionaries: +# - en_US diff --git a/.github/styles/Agora/WordList.yml b/.github/styles/Agora/WordList.yml new file mode 100644 index 00000000000..f4e3826a829 --- /dev/null +++ b/.github/styles/Agora/WordList.yml @@ -0,0 +1,88 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: "https://agoradoc-style-guide.readthedocs.io/en/latest/overview.html" +level: warning +ignorecase: false +action: + name: replace +swap: + "(?:back-end|back ?end)": backend + "(?:cell ?phone|smart ?phone)": phone|mobile phone + "(?:e-mail|Email|E-mail)": email + "(?:file ?path|path ?name)": path + "(?:kill|terminate|abort)": stop|exit|cancel|end + "(?:lastmile|last-mile)": last mile + "(?:WiFi|wifi)": Wi-Fi + "(?:unarchive|uncompress|unzip)": extract + '[\.]+apk': APK + '3\-D': 3D + "tap (?:&|and) hold": touch & hold + "un(?:check|select)": clear + above: preceding + account name: username + action bar: app bar + admin: administrator + agora: Agora + Ajax: AJAX + android: Android + application: app + approx\.: approximately + audio capture: audio sample + audio sampling rate: audio sample rate + autoupdate: automatically update + BETA: beta + bit rate: bitrate + bluetooth: Bluetooth + boolean: Boolean + cellular data: mobile data + cellular network: mobile network + chapter: documents|pages|sections + check box: checkbox + CLI: command-line tool + click on: click|click in + data are: data is + demonstrate: show + disabled?: turn off|off + dual streams: dual stream + enter a channel: join a channel + fewer data: less data + file name: filename + firewalls: firewall rules + functionality: capability|feature + Googling: search with Google + grayed-out: unavailable + H5: HTML5 + HTTPs: HTTPS + illegal: invalid + in order to: to + ingest: import|load + Internet: internet + ios: iOS + k8s: Kubernetes + long press: touch & hold + mac: Mac + MacOS: macOS + multi-channel: multichannel + multi-media: multimedia + multi-threaded: multithreaded + open-source: open source + re-integrate: reintegrate + regex: regular expression + SD-RTN: SD-RTN™ + SHA1: SHA-1|HAS-SHA1 + sign into: sign in to + sign-?on: single sign-on + stylesheet: style sheet + tablet: device + the dual-stream mode: dual-stream mode + This article: This page + this article: this page + touch: tap + uid: user ID + uri: URI + url: URL + user name: username + video capturing: video capture + vs\.: versus + World Wide Web: web + wrong: incorrect diff --git a/.github/styles/Google/AMPM.yml b/.github/styles/Google/AMPM.yml new file mode 100644 index 00000000000..fb919244779 --- /dev/null +++ b/.github/styles/Google/AMPM.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'AM' or 'PM' (preceded by a space)." +link: "https://developers.google.com/style/word-list" +level: error +nonword: true +tokens: + - '\d{1,2}[AP]M' + - '\d{1,2} ?[ap]m' + - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/.github/styles/Google/DateFormat.yml b/.github/styles/Google/DateFormat.yml new file mode 100644 index 00000000000..83d9fb601cd --- /dev/null +++ b/.github/styles/Google/DateFormat.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'July 31, 2016' format, not '%s'." +link: "https://developers.google.com/style/dates-times" +ignorecase: true +level: error +nonword: true +tokens: + - '\d{1,2}(?:\.|/)\d{1,2}(?:\.|/)\d{4}' + - '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}' diff --git a/.github/styles/Google/Ellipses.yml b/.github/styles/Google/Ellipses.yml new file mode 100644 index 00000000000..955beaf6b5f --- /dev/null +++ b/.github/styles/Google/Ellipses.yml @@ -0,0 +1,9 @@ +extends: existence +message: "In general, don't use an ellipsis." +link: "https://developers.google.com/style/ellipses" +nonword: true +level: warning +action: + name: remove +tokens: + - '\.\.\.' diff --git a/.github/styles/Google/EmDash.yml b/.github/styles/Google/EmDash.yml new file mode 100644 index 00000000000..731892c7e9f --- /dev/null +++ b/.github/styles/Google/EmDash.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't put a space before or after a dash." +link: "https://developers.google.com/style/dashes" +nonword: true +level: error +action: + name: edit + params: + - remove + - " " +tokens: + - '\s[—–]\s' diff --git a/.github/styles/Google/EnDash.yml b/.github/styles/Google/EnDash.yml new file mode 100644 index 00000000000..8747215b4ec --- /dev/null +++ b/.github/styles/Google/EnDash.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Use an em dash ('—') instead of '–'." +link: "https://developers.google.com/style/dashes" +nonword: true +level: error +action: + name: edit + params: + - replace + - "-" + - "—" +tokens: + - "–" diff --git a/.github/styles/Google/Exclamation.yml b/.github/styles/Google/Exclamation.yml new file mode 100644 index 00000000000..6774f8040b2 --- /dev/null +++ b/.github/styles/Google/Exclamation.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't use exclamation points in text." +link: "https://developers.google.com/style/exclamation-points" +nonword: true +level: error +tokens: + - '\w!(?:\s|$)' diff --git a/.github/styles/Google/FirstPerson.yml b/.github/styles/Google/FirstPerson.yml new file mode 100644 index 00000000000..372c71beca3 --- /dev/null +++ b/.github/styles/Google/FirstPerson.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Avoid first-person pronouns such as '%s'." +link: "https://developers.google.com/style/pronouns#personal-pronouns" +ignorecase: true +level: warning +nonword: true +tokens: + - (?:^|\s)I\s + - (?:^|\s)I,\s + - \bI'm\b + - \bme\b + - \bmy\b + - \bmine\b diff --git a/.github/styles/Google/Gender.yml b/.github/styles/Google/Gender.yml new file mode 100644 index 00000000000..e81aad3adf8 --- /dev/null +++ b/.github/styles/Google/Gender.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Don't use '%s' as a gender-neutral pronoun." +link: "https://developers.google.com/style/pronouns#gender-neutral-pronouns" +level: error +ignorecase: true +tokens: + - he/she + - s/he + - \(s\)he diff --git a/.github/styles/Google/GenderBias.yml b/.github/styles/Google/GenderBias.yml new file mode 100644 index 00000000000..6c30cbf389b --- /dev/null +++ b/.github/styles/Google/GenderBias.yml @@ -0,0 +1,45 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +link: "https://developers.google.com/style/inclusive-documentation" +ignorecase: true +level: error +swap: + (?:alumna|alumnus): graduate + (?:alumnae|alumni): graduates + air(?:m[ae]n|wom[ae]n): pilot(s) + anchor(?:m[ae]n|wom[ae]n): anchor(s) + authoress: author + camera(?:m[ae]n|wom[ae]n): camera operator(s) + chair(?:m[ae]n|wom[ae]n): chair(s) + congress(?:m[ae]n|wom[ae]n): member(s) of congress + door(?:m[ae]|wom[ae]n): concierge(s) + draft(?:m[ae]n|wom[ae]n): drafter(s) + fire(?:m[ae]n|wom[ae]n): firefighter(s) + fisher(?:m[ae]n|wom[ae]n): fisher(s) + fresh(?:m[ae]n|wom[ae]n): first-year student(s) + garbage(?:m[ae]n|wom[ae]n): waste collector(s) + lady lawyer: lawyer + ladylike: courteous + landlord: building manager + mail(?:m[ae]n|wom[ae]n): mail carriers + man and wife: husband and wife + man enough: strong enough + mankind: human kind + manmade: manufactured + manpower: personnel + men and girls: men and women + middle(?:m[ae]n|wom[ae]n): intermediary + news(?:m[ae]n|wom[ae]n): journalist(s) + ombuds(?:man|woman): ombuds + oneupmanship: upstaging + poetess: poet + police(?:m[ae]n|wom[ae]n): police officer(s) + repair(?:m[ae]n|wom[ae]n): technician(s) + sales(?:m[ae]n|wom[ae]n): salesperson or sales people + service(?:m[ae]n|wom[ae]n): soldier(s) + steward(?:ess)?: flight attendant + tribes(?:m[ae]n|wom[ae]n): tribe member(s) + waitress: waiter + woman doctor: doctor + woman scientist[s]?: scientist(s) + work(?:m[ae]n|wom[ae]n): worker(s) diff --git a/.github/styles/Google/HeadingPunctuation.yml b/.github/styles/Google/HeadingPunctuation.yml new file mode 100644 index 00000000000..0da9126b00d --- /dev/null +++ b/.github/styles/Google/HeadingPunctuation.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't put a period at the end of a heading." +link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings" +nonword: true +level: warning +scope: heading +action: + name: edit + params: + - remove + - "." +tokens: + - '[a-z0-9][.]\s*$' diff --git a/.github/styles/Google/Latin.yml b/.github/styles/Google/Latin.yml new file mode 100644 index 00000000000..8843c3e6d8a --- /dev/null +++ b/.github/styles/Google/Latin.yml @@ -0,0 +1,11 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: "https://developers.google.com/style/abbreviations" +ignorecase: true +level: error +nonword: true +action: + name: replace +swap: + '\b(?:eg|e\.g\.)[\s,]': for example + '\b(?:ie|i\.e\.)[\s,]': that is diff --git a/.github/styles/Google/LyHyphens.yml b/.github/styles/Google/LyHyphens.yml new file mode 100644 index 00000000000..a65f217738d --- /dev/null +++ b/.github/styles/Google/LyHyphens.yml @@ -0,0 +1,14 @@ +extends: existence +message: "'%s' doesn't need a hyphen." +link: "https://developers.google.com/style/hyphens" +level: error +ignorecase: false +nonword: true +action: + name: edit + params: + - replace + - "-" + - " " +tokens: + - '\s[^\s-]+ly-' diff --git a/.github/styles/Google/OptionalPlurals.yml b/.github/styles/Google/OptionalPlurals.yml new file mode 100644 index 00000000000..3478bbe01a0 --- /dev/null +++ b/.github/styles/Google/OptionalPlurals.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't use plurals in parentheses such as in '%s'." +link: "https://developers.google.com/style/plurals-parentheses" +level: error +nonword: true +action: + name: edit + params: + - remove + - "(s)" +tokens: + - '\b\w+\(s\)' diff --git a/.github/styles/Google/Ordinal.yml b/.github/styles/Google/Ordinal.yml new file mode 100644 index 00000000000..5f0c3bd452d --- /dev/null +++ b/.github/styles/Google/Ordinal.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Spell out all ordinal numbers ('%s') in text." +link: "https://developers.google.com/style/numbers" +level: error +nonword: true +tokens: + - \d+(?:st|nd|rd|th) diff --git a/.github/styles/Google/OxfordComma.yml b/.github/styles/Google/OxfordComma.yml new file mode 100644 index 00000000000..66ad1483471 --- /dev/null +++ b/.github/styles/Google/OxfordComma.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use the Oxford comma in '%s'." +link: "https://developers.google.com/style/commas" +scope: sentence +level: warning +tokens: + - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' diff --git a/.github/styles/Google/Parens.yml b/.github/styles/Google/Parens.yml new file mode 100644 index 00000000000..605ea6058d3 --- /dev/null +++ b/.github/styles/Google/Parens.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use parentheses judiciously." +link: "https://developers.google.com/style/parentheses" +nonword: true +level: suggestion +tokens: + - '\(.+\)' diff --git a/.github/styles/Google/Passive.yml b/.github/styles/Google/Passive.yml new file mode 100644 index 00000000000..c9eac7a3de5 --- /dev/null +++ b/.github/styles/Google/Passive.yml @@ -0,0 +1,184 @@ +extends: existence +link: "https://developers.google.com/style/voice" +message: "In general, use active voice instead of passive voice ('%s')." +ignorecase: true +level: suggestion +raw: + - \b(am|are|were|being|is|been|was|be)\b\s* +tokens: + - '[\w]+ed' + - awoken + - beat + - become + - been + - begun + - bent + - beset + - bet + - bid + - bidden + - bitten + - bled + - blown + - born + - bought + - bound + - bred + - broadcast + - broken + - brought + - built + - burnt + - burst + - cast + - caught + - chosen + - clung + - come + - cost + - crept + - cut + - dealt + - dived + - done + - drawn + - dreamt + - driven + - drunk + - dug + - eaten + - fallen + - fed + - felt + - fit + - fled + - flown + - flung + - forbidden + - foregone + - forgiven + - forgotten + - forsaken + - fought + - found + - frozen + - given + - gone + - gotten + - ground + - grown + - heard + - held + - hidden + - hit + - hung + - hurt + - kept + - knelt + - knit + - known + - laid + - lain + - leapt + - learnt + - led + - left + - lent + - let + - lighted + - lost + - made + - meant + - met + - misspelt + - mistaken + - mown + - overcome + - overdone + - overtaken + - overthrown + - paid + - pled + - proven + - put + - quit + - read + - rid + - ridden + - risen + - run + - rung + - said + - sat + - sawn + - seen + - sent + - set + - sewn + - shaken + - shaven + - shed + - shod + - shone + - shorn + - shot + - shown + - shrunk + - shut + - slain + - slept + - slid + - slit + - slung + - smitten + - sold + - sought + - sown + - sped + - spent + - spilt + - spit + - split + - spoken + - spread + - sprung + - spun + - stolen + - stood + - stridden + - striven + - struck + - strung + - stuck + - stung + - stunk + - sung + - sunk + - swept + - swollen + - sworn + - swum + - swung + - taken + - taught + - thought + - thrived + - thrown + - thrust + - told + - torn + - trodden + - understood + - upheld + - upset + - wed + - wept + - withheld + - withstood + - woken + - won + - worn + - wound + - woven + - written + - wrung diff --git a/.github/styles/Google/Periods.yml b/.github/styles/Google/Periods.yml new file mode 100644 index 00000000000..1e8da2649fe --- /dev/null +++ b/.github/styles/Google/Periods.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't use periods with acronyms or initialisms such as '%s'." +link: "https://developers.google.com/style/abbreviations" +level: error +nonword: true +tokens: + - '\b(?:[A-Z]\.){3,}' diff --git a/.github/styles/Google/Quotes.yml b/.github/styles/Google/Quotes.yml new file mode 100644 index 00000000000..851cdd7cc8f --- /dev/null +++ b/.github/styles/Google/Quotes.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Commas and periods go inside quotation marks." +link: "https://developers.google.com/style/quotation-marks" +level: error +nonword: true +tokens: + - '"[^"]+"[.,?]' diff --git a/.github/styles/Google/Ranges.yml b/.github/styles/Google/Ranges.yml new file mode 100644 index 00000000000..8a68bb3cec6 --- /dev/null +++ b/.github/styles/Google/Ranges.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't add words such as 'from' or 'between' to describe a range of numbers." +link: "https://developers.google.com/style/hyphens" +nonword: true +level: warning +tokens: + - '(?:from|between)\s\d+\s?-\s?\d+' diff --git a/.github/styles/Google/Semicolons.yml b/.github/styles/Google/Semicolons.yml new file mode 100644 index 00000000000..d309f58bdc6 --- /dev/null +++ b/.github/styles/Google/Semicolons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Use semicolons judiciously." +link: "https://developers.google.com/style/semicolons" +nonword: true +scope: sentence +level: suggestion +tokens: + - ";" diff --git a/.github/styles/Google/Slang.yml b/.github/styles/Google/Slang.yml new file mode 100644 index 00000000000..ee01e0d0cdb --- /dev/null +++ b/.github/styles/Google/Slang.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Don't use internet slang abbreviations such as '%s'." +link: "https://developers.google.com/style/abbreviations" +ignorecase: true +level: error +tokens: + - "tl;dr" + - ymmv + - rtfm + - imo + - fwiw diff --git a/.github/styles/Google/Spacing.yml b/.github/styles/Google/Spacing.yml new file mode 100644 index 00000000000..ae2a7648479 --- /dev/null +++ b/.github/styles/Google/Spacing.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' should have one space." +link: "https://developers.google.com/style/sentence-spacing" +level: error +nonword: true +tokens: + - "[a-z][.?!] {2,}[A-Z]" + - "[a-z][.?!][A-Z]" diff --git a/.github/styles/Google/Spelling.yml b/.github/styles/Google/Spelling.yml new file mode 100644 index 00000000000..c69d2a05c89 --- /dev/null +++ b/.github/styles/Google/Spelling.yml @@ -0,0 +1,8 @@ +extends: existence +message: "In general, use American spelling instead of '%s'." +link: "https://developers.google.com/style/spelling" +ignorecase: true +level: warning +tokens: + - '(?:\w+)nised?' + - '(?:\w+)logue' diff --git a/.github/styles/Google/Units.yml b/.github/styles/Google/Units.yml new file mode 100644 index 00000000000..1c9a350fffa --- /dev/null +++ b/.github/styles/Google/Units.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Put a nonbreaking space between the number and the unit in '%s'." +link: "https://developers.google.com/style/units-of-measure" +nonword: true +level: error +tokens: + - \d+(?:B|kB|MB|GB|TB) + - \d+(?:ns|ms|s|min|h|d) diff --git a/.github/styles/Google/We.yml b/.github/styles/Google/We.yml new file mode 100644 index 00000000000..f13f1d45fdb --- /dev/null +++ b/.github/styles/Google/We.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Try to avoid using first-person plural like '%s'." +link: "https://developers.google.com/style/pronouns#personal-pronouns" +level: warning +ignorecase: true +tokens: + - we + - we'(?:ve|re) + - ours? + - us + - let's diff --git a/.github/styles/Google/Will.yml b/.github/styles/Google/Will.yml new file mode 100644 index 00000000000..9e7a994dad9 --- /dev/null +++ b/.github/styles/Google/Will.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Avoid using '%s'." +link: "https://developers.google.com/style/tense" +ignorecase: true +level: warning +tokens: + - will diff --git a/.github/styles/Google/meta.json b/.github/styles/Google/meta.json new file mode 100644 index 00000000000..b2244a6eb30 --- /dev/null +++ b/.github/styles/Google/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/Google/releases.atom", + "vale_version": ">=1.0.0" +} diff --git a/.github/styles/Google/vocab.txt b/.github/styles/Google/vocab.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/.github/styles/Vocab/Agora/accept.txt b/.github/styles/Vocab/Agora/accept.txt new file mode 100644 index 00000000000..7eca12f5606 --- /dev/null +++ b/.github/styles/Vocab/Agora/accept.txt @@ -0,0 +1,3 @@ +Agora +SD-RTN +support@agora.io diff --git a/.github/styles/ignore.txt b/.github/styles/ignore.txt new file mode 100644 index 00000000000..25e33484004 --- /dev/null +++ b/.github/styles/ignore.txt @@ -0,0 +1,5 @@ +conref +conrefed +ditamap +ditaval +syntaxes \ No newline at end of file diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml new file mode 100644 index 00000000000..2f0a262c50b --- /dev/null +++ b/.github/workflows/vale-linter.yml @@ -0,0 +1,25 @@ +name: Linting +on: [push, pull_request] + +jobs: + prose: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Vale + uses: errata-ai/vale-action@v1.4.3 + with: + # Only lint the modified files + # files: __onlyModified + # Only lint EN files + files: en-US/markdown/ + + # Only lint modified lines + onlyAnnotateModifiedLines: true + + env: + # Required, set by GitHub actions automatically: + # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 00000000000..1539bf5f002 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,26 @@ +# Example Vale config file (`.vale.ini` or `_vale.ini`) + +StylesPath = .github/styles + +Vocab = Agora + +# The minimum alert level to display (suggestion, warning, or error). +# +# CI builds will only fail on error-level alerts. +MinAlertLevel = warning + +# HTML tags to be ignored by Vale. +IgnoredScopes = code, strong, tt, link + +[*.{md,dita}] +BasedOnStyles = Google, Agora + +# Exclude +# +# For a description (and unit tests) for these patterns see: +# https://regex101.com/r/m9klBv/3/tests +TokenIgnores = (\[[a-zA-Z0-9-]+\][^(]) + +[*.md] +BlockIgnores = ((?:~.*~)), \ +(?s) *(\$\$.*?\$\$) \ No newline at end of file diff --git a/test-vale.md b/test-vale.md new file mode 100644 index 00000000000..2691b35c196 --- /dev/null +++ b/test-vale.md @@ -0,0 +1,62 @@ +Test vale linter configurations. + +## Legal characters + +Chinese characters:。;,‘“ + +Valid characters: ",.?-_™ + +。。。。。。。,,,,,“! + +## Spelling + +Typo: teh is a typo. + +Agora should be OK. + +Try spelling error niiiiice, laaunch + + +## MDITA + +The [sdk-name] enables you to develop rapidly to enhance your social, work, education, and IoT apps with real-time engagements. + +This page shows the minimum code you need to add [feature] into your app by using the [sdk-name] for [platform]. + +[this](somelink) + +
+ +You need to use different integration methods to integrate different versions of the SDK. + +1. According to your requirements, choose one of the following methods to copy the `AgoraRtcKit.framework`, `Agorafdkaac.framework`,./libs
in the SDK package../libs/ALL_ARCHITECTURE
in the SDK package. The dynamic libraries under this path contains the x86-64 architecture, you need to remove the x86-64 architecture in the libraries before uploading the app to the App Store.
+In Terminal, run the following command to remove the x86-64 architecture. Remember to replace ALL_ARCHITECTURE/AgoraRtcKit.framework/AgoraRtcKit
with the path of the dynamic library in your project.
+lipo -remove x86-64 ALL_ARCHITECTURE/AgoraRtcKit.framework/AgoraRtcKit -output ALL_ARCHITECTURE/AgoraRtcKit.framework/AgoraRtcKit+