diff --git a/.github/workflows/pr-lint-vale.yml b/.github/workflows/pr-lint-vale.yml new file mode 100644 index 000000000..4293f29a2 --- /dev/null +++ b/.github/workflows/pr-lint-vale.yml @@ -0,0 +1,14 @@ +name: reviewdog +on: [pull_request] + +jobs: + vale: + name: runner / vale + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: errata-ai/vale-action@v2.1.1 + with: + reporter: github-pr-check + vale_flags: "--minAlertLevel=suggestion" + fail_on_error: true diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 000000000..7b1766614 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,127 @@ +################### +### Vale Config ### +################### + +# This is a Vale linter configuration file. +# - Repo: esp-vale-config (Default config) +# - Version: v0-1-1 +# It lists all necessary parameters to configure Vale for your project. +# For official documentation on all config settings, see +# https://vale.sh/docs/topics/config + + +############## +### Global ### +############## + +# This section lists core settings applying to Vale itself. + + +# Specify path to external resources (e.g., styles and vocab files). +# The path value may be absolute or relative to this configuration file. +StylesPath = .vale/styles + + +# Specify the minimum alert severity that Vale will report. +MinAlertLevel = suggestion # "suggestion", "warning", or "error" + + +# Specify vocabulary for special treatment. +# Create a folder in /Vocab//and add its name here +# The folder should contain two files: +# - accept.txt -- lists words with accepted case-sensitive spelling +# - reject.txt -- lists words whose occurrences throw an error +# Vocab = Espressif + + +# Specify the packages to import into your project. +# A package is a zip file containing a number of rules (style) written in YAML. +# For a list of official packages, see Package Hub at https://vale.sh/hub/ +# For official documentation on packages, see +# https://vale.sh/docs/topics/packages/ +# Before linting, navigate to your project and run `vale sync` to download +# the official packages specified below. +# Packages = Package1, Package2, \ +# https://example.com/path/to/package/Package.zip +Packages = Google, Microsoft, RedHat, \ +https://dl.espressif.com/dl/esp-vale-config/Espressif-latest.zip + + +############### +### Formats ### +############### + +# This section enables association of "unknown" formats with the ones +# supported by Vale. For official documentation on supported formats, see +# https://vale.sh/docs/topics/scoping/ +[formats] + +# For example, treat MDX files as Markdown files. +# mdx = md + + +################################ +### Format-specific settings ### +################################ + +# This section lists the settings that apply to specific file formats +# based on their glob pattern. +# Settings provided under a more specific glob pattern, +# such as [*.{md,txt}] will override those in [*]. +[*.{md,rst}] + + +# Enable styles to activate all rules included in them. +# BasedOnStyles = Style1, Style2 +BasedOnStyles = Vale, Espressif-latest, Espressif-devportal + + +### Deactivate individual rules ### +### in enabled styles. +# Style1.Rule1 = NO +Vale.Repetition = NO +Vale.Spelling = NO +Espressif-latest.Admonitions = NO +Espressif-latest.Adverbs = NO +Espressif-latest.Contractions = NO +Espressif-latest.HeadingBegin = NO +Espressif-latest.HeadingEnd = NO +Espressif-latest.Headings = NO +Espressif-latest.Monospace = NO +Espressif-latest.PascalCamelCase = NO +Espressif-latest.TermsAcronyms = NO +Espressif-latest.TermsFixedPattern = NO +Espressif-latest.TermsSingleCorrectSpelling = NO + + +### Change default severity level ### +### of an activated rule. +# Choose between "suggestion", "warning", or "error". +# Style1.Rule2 = error + + +### Activate individual rules ### +### in non-enabled styles stored in . +# Style1.Rule = YES +Google.Gender = YES +Google.GenderBias = YES +Google.Slang = YES +Google.Spacing = YES +Microsoft.DateNumbers = YES +Microsoft.Ellipses = YES +#Microsoft.FirstPerson = YES +Microsoft.Hyphens = YES +Microsoft.Ordinal = YES +#Microsoft.OxfordComma = YES +Microsoft.Percentages = YES +#Microsoft.Quotes = YES +Microsoft.RangeTime = YES +Microsoft.Semicolon = YES +#Microsoft.SentenceLength = YES +Microsoft.Suspended = YES +Microsoft.Units = YES +Microsoft.URLFormat = YES +#Microsoft.We = YES +Microsoft.Wordiness = YES +#RedHat.Contractions = YES +RedHat.RepeatedWords = YES diff --git a/.vale/styles/Espressif-devportal/HeadingSentenceCase.yml b/.vale/styles/Espressif-devportal/HeadingSentenceCase.yml new file mode 100644 index 000000000..ac4681252 --- /dev/null +++ b/.vale/styles/Espressif-devportal/HeadingSentenceCase.yml @@ -0,0 +1,168 @@ +--- +extends: capitalization +level: suggestion +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/headings/ +match: $sentence +message: "Use sentence-style capitalization. Found: '%s'. Suggested: '%s'. Ensure that proper nouns and noun phrases are capitalized correctly." +scope: heading +indicators: + - ":" +exceptions: + +# Espressif + - Espressif + - Xtensa + - RISC-V + - Wokwi + - 'Developer Portal' + - DevKit + - SoCs? + - (?i)VSCode + - (?i)FreeRTOS + - eFuses? + - \bESP[-A-Za-z0-9_]*\b + - Rainmaker + - LowCode + - ZeroCode + +# Embedded + - ADC + - AIoT + - DAC + - IoT + - Matter + - PHY + - PSRAM + - RAM + - SRAM + - WLED + +# Rust + - 'Rust' + - 'std' + - 'no_std' + +# Measurement Units + - kbps|Mbps|Gbps + - KiB|MiB|GiB + - kHz|MHz|GHz + - dBm|dBu|dBV + +# General + - Ansible + - Antora + - API + - AppData + - AsciiDoc + - Asciidoctor + - AWS + - Azure + - BASIC + - Bitbucket + - BOM + - Bugzilla + - CDs + - CentOS + - Ceph + - CLI + - Clion + - CMake + - Copilot + - DdoS + - DevOps + - DevOps + - DNS + - DNSSec + - Docker + - Dockerfiles? + - Eclipse + - Flatpak + - Flatpak Builder + - GCC + - Git + - GitHub + - GitLab + - GitOps + - GraphQL + - GUI + - Homebrew + - HTTP + - HTTPS + - IaaS + - IBM + - ID + - IDEs? + - IDs + - IntelliJ + - IPSec + - JAR file + - Java + - JavaScript + - JetBrains + - Jira + - JSON + - Kubernetes + - LibreOffice + - Linux + - LLVM + - Lua + - MAC + - macOS + - Makefile + - Mattermost + - MicroPython + - Microsoft + - MinGW + - MongoDB + - MySQL + - NetworkManager + - Nginx + - Node.js + - NuttX + - NVMe + - OAuth + - OpenJDK + - OpenOCD + - OpenShift + - OpenSSH + - OpenSSL + - OpenStack + - OpenTelemetry + - OpenTracing + - PCIe + - PHP + - Podman + - POSIX + - PostgreSQL + - PostScript + - PowerShell + - Prometheus + - Python + - Pytorch + - Qt + - Qute + - Red Hat + - Redis + - RTOS + - SaaS + - SDK + - SELinux + - Studio + - SVG + - SysV + - Traefik + - TypeScript + - URI + - URIs? + - URLs? + - USB + - Vale + - Vmware + - VS + - VS Code + - WebSocket + - Windows + - WireGuard + - Wordpress + - xterm + - YouTube diff --git a/.vale/styles/Espressif-devportal/ListEndPunctuation.yml b/.vale/styles/Espressif-devportal/ListEndPunctuation.yml new file mode 100644 index 000000000..6e1589fc4 --- /dev/null +++ b/.vale/styles/Espressif-devportal/ListEndPunctuation.yml @@ -0,0 +1,19 @@ +extends: existence +message: "Ensure consistent punctuation in lists. Some items end with punctuation while others don't." +level: warning +link: https://mos.espressif.com/punctuation.html#punctuation-in-lists +scope: raw +nonword: true +tokens: + # Find bulleted lists with inconsistent punctuation + - '(?m)^[\-\+\*]\s.*\w(? Define Abbreviations and Acronyms at First Use +link: http://mos.espressif.com/general-conventions.html#define-abbreviations-and-acronyms-at-first-use +level: warning +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '(?`_ + - '(?<=`)(?:\b(?:in|on|at)\s+)?(here|click here|this page|this link|read more|learn more)(?= <[^>]+>`_)' + # Check rST internal refs :ref:`here` + - '(?<=:ref:`)(?:\b(?:in|on|at)\s+)?(here|click here|this page|this link|read more|learn more)(?=<[^`>]+>`)' diff --git a/README.md b/README.md index 58933b479..b613a2415 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ This project stores the files for the [Espressif Developer Portal][] website. Gi [Espressif Developer Portal]: https://developer.espressif.com/ +This doesn't works. See [this](./content/blog/2025/03/esp32-bluetooth-clearing-the-air/index.md#impat). + +For details, see the page [at this link](https://google.com). ## Contribute and render locally @@ -17,3 +20,66 @@ See also the Contribution Guide articles: - [Contribution workflow](./content/pages/contribution-guide/contrib-workflow/index.md) - [Writing content](./content/pages/contribution-guide/writing-content/index.md) + +## Test Vale style + +--- + +Rule `Espressif-devportal.HeadingSentenceCase` + +#### Use Sentence Style Capitalization + +#### Exceptions for capitalization can be added like Espressif + +--- + +Rules `Espressif-devportal.ListEndPunctuation` and `Espressif-devportal.ListMixedType` + +Simple bullet list: + +- Item 1 +- Item 2. + +Multi-level list: + +1. Item 1: +2. Item 2 + - Item 1. + - Item 2 + +Bullets and numbers at the same level: + +1. Item 1 +- Item 2 + +--- + +Rule `Espressif-devportal.NonStandardChars` + +The modules–those that integrate SoCs–are more popular. + +--- + +Rule `Espressif-devportal.OfxordComma` + +Espressif is famous for its SoCs, modules and development boards. + +--- + +Rule `Espressif-devportal.TermsAcronyms` + +LP-Core integrates an IMAC CPU. + +--- + +Rules `Espressif-devportal.TermsFixedPattern` and `Espressif-devportal.TermsSingleCorrectSpelling` + +Espressif SOCs are famous for its Wi-Fi and bluetooth features. ESP-iDF programming guide is also popular. + +--- + +Rule `Espressif-devportal.UsefulLinkText` + +For details, see [here](https://google.com) and [on this page][example]. + +[example]: https://google.com