Skip to content

Commit

Permalink
Add vale support
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <travis.collins@analog.com>
  • Loading branch information
tfcollins committed Aug 22, 2024
1 parent f9d1b12 commit ebe95fe
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/doc/styles/ADI/Capitalization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: capitalization
message: "'%s' should be in title case"
level: warning
scope: sentence
# $title, $sentence, $lower, $upper, or a pattern.
#match: $title
#style: AP # AP or Chicago; only applies when match is set to $title.
exceptions:
- ADC
- DAC
- adc
- dac
5 changes: 5 additions & 0 deletions .github/doc/styles/ADI/Spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: spelling
message: "Did you really mean '%s'?"
level: error
ignore:
- Vocab/Sphinx/accept.txt
14 changes: 14 additions & 0 deletions .github/doc/styles/ADI/Terms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# `extends` specifies the extension point you're using. Here, we're
# using `substitution` to ensure correct usage of some techincal and
# brand-specifc terminology.
extends: substitution
# `message` allows you to customize the output shown to your users.
message: Use '%s' instead of '%s'.
# We're setting this rule's severity to `error`, which will cause
# CI builds to fail.
level: error
# We're using case-insensitive patterns.
ignorecase: true
swap:
libIIO: libiio
linux: Linux
8 changes: 8 additions & 0 deletions .github/doc/styles/GoogleUpdate/Units.yml
Original file line number Diff line number Diff line change
@@ -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: warning
tokens:
- \d+(?:B|kB|MB|GB|TB)
- \d+(?:ns|ms|s|min|h|d)
40 changes: 40 additions & 0 deletions .github/doc/styles/Vocab/Sphinx/accept.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
adijif
204B
204C
JESD204B
JESD204C
libiio
pypi
conda
JESD
ADI
SYSREF
LMFC
AD-FMCDAQ2-EBZ
AD9523-1
AD9528
AD9680
ADRV9009
HMC7044
Nox
pyenv
bashrc
zshrc
Makefile
Ultrascale
Ultrascale+
[aA][dD][cC]
[dD][aA][cC]
PLL
[nN]ox
[mM]ultiblock
codecov
mux
muxes
muxing
Fmax
parameterization
clk
[xX]ilinx
(?i)fpgas
fpga
Empty file.
12 changes: 12 additions & 0 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: reviewdog
on: [pull_request,push]

jobs:
vale:
name: runner / vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: errata-ai/vale-action@reviewdog
with:
files: docs/source
11 changes: 11 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
StylesPath = .github/doc/styles
MinAlertLevel = suggestion


Vocab = Sphinx

[*.rst]
BasedOnStyles = ADI, Vale, Google

[*.md]
BasedOnStyles = ADI, Vale, Google

0 comments on commit ebe95fe

Please sign in to comment.