Skip to content
代码片段 群组 项目
提交 d2106468 编辑于 作者: Suzanne Selhorn's avatar Suzanne Selhorn 提交者: Russell Dickenson
浏览文件

Updated Vale to use latest Readability extension

上级 27ba1b90
No related branches found
No related tags found
无相关合并请求
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
# #
# Checks the Flesch-Kincaid reading level. # Checks the Flesch-Kincaid reading level.
# #
# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles # https://docs.errata.ai/vale/styles#metric
extends: readability extends: metric
message: "Grade level (%s) is high. To lower the score, use shorter sentences and words." message: "The grade level - %s - refers to how hard the content is to understand. Aim for 8th grade or lower by using shorter sentences and words."
link: https://docs.gitlab.com/ee/development/documentation/testing.html#vale-readability-score link: https://docs.gitlab.com/ee/development/documentation/testing.html#vale-readability-score
level: suggestion level: suggestion
grade: 8 formula: |
metrics: (0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59
- Flesch-Kincaid condition: "> 1"
...@@ -234,15 +234,8 @@ As a general guideline, the lower the score, the more readable the documentation ...@@ -234,15 +234,8 @@ As a general guideline, the lower the score, the more readable the documentation
For example, a page that scores `12` before a set of changes, and `9` after, indicates an iterative improvement to readability. The score is not an exact science, but is meant to help indicate the For example, a page that scores `12` before a set of changes, and `9` after, indicates an iterative improvement to readability. The score is not an exact science, but is meant to help indicate the
general complexity level of the page. general complexity level of the page.
The readability score is calculated by using the following formula: The readability score is calculated based on the number of words per sentence, and the number
of syllables per word. For more information, see [the Vale documentation](https://docs.errata.ai/vale/styles#metric).
```plaintext
(.39 x ASL) + (11.8 x ASW) – 15.59
```
- `ASL` is average sentence length (the number of words divided by the number of sentences).
- `ASW` is the average number of syllables per word (the number of syllables divided by the number of words).
- The score excludes headings, code blocks, and lists.
### Install linters ### Install linters
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册