From cc9c685b81a1d192e5c60520f35a693a32b51344 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Thu, 11 Jul 2024 11:35:36 -0700 Subject: [PATCH] Add Vale to CircleCI for linting documentation * Configure vale, including accept.txt to define terminology we use in the documentation * Add instructions for running vale locally to the README Co-authored-by: Christina Chortaria --- .circleci/config.yml | 3 +++ README.md | 10 ++++++++++ docs/.vale.ini | 11 +++++++++++ docs/.vale/config/vocabularies/Base/accept.txt | 12 ++++++++++++ docs/browse-lists.md | 2 +- 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 docs/.vale.ini create mode 100644 docs/.vale/config/vocabularies/Base/accept.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index da3dbcb5b..b71e668c9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,6 +4,8 @@ orbs: browser-tools: circleci/browser-tools@1.4.8 ruby: circleci/ruby@2.1.4 node: circleci/node@5.3.0 + browser-tools: circleci/browser-tools@1.4.6 + vale: circleci/vale@1.0.0 executors: orangelight-executor: docker: @@ -225,6 +227,7 @@ workflows: - test: requires: - build + - vale/lint - finish: requires: - test diff --git a/README.md b/README.md index 47d8e3067..0484aa0e2 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,16 @@ It will tell you if you've passed the assertion(s) specified in `lighthouserc.js`. It will also give you a URL where you can see the complete lighthouse results. +#### Documentation linting with vale + +To run locally: +``` +brew install vale +cd docs +vale sync +vale . +``` + #### Running CodeQL locally If you get a CodeQL warning on your branch, you may wish to run diff --git a/docs/.vale.ini b/docs/.vale.ini new file mode 100644 index 000000000..ef29fe63a --- /dev/null +++ b/docs/.vale.ini @@ -0,0 +1,11 @@ +StylesPath = .vale + +MinAlertLevel = suggestion + +Packages = RedHat + +Vocab = Base + +[*] +BasedOnStyles = Vale, RedHat + diff --git a/docs/.vale/config/vocabularies/Base/accept.txt b/docs/.vale/config/vocabularies/Base/accept.txt new file mode 100644 index 000000000..a3f2a4930 --- /dev/null +++ b/docs/.vale/config/vocabularies/Base/accept.txt @@ -0,0 +1,12 @@ +Ctrl +figgy +Figgy +iiif +Marquand +Mudd +orangelight +Orangelight +postgres +solr +Solr +tmux diff --git a/docs/browse-lists.md b/docs/browse-lists.md index 88cfa51d7..2c9f2120a 100644 --- a/docs/browse-lists.md +++ b/docs/browse-lists.md @@ -39,7 +39,7 @@ Fix: - Find which machine to use from section: `How to know which machine to use`. Currently the `call_numbers` task is deployed to run on `catalog-indexer3`. - SSH as `deploy` user to the machine used to produce the subjects lists -- Run the first rake task to generate the CSV file from solr data: +- Run the first rake task to generate the CSV file from Solr data: - `cd /opt/orangelight/current` - `OL_DB_PORT=5432 bundle exec rake browse:subjects`