Skip to content

Commit

Permalink
Merge pull request #862 from aireilly/metric-reading-score
Browse files Browse the repository at this point in the history
Implementing a Flesch–Kincaid grade level rule
  • Loading branch information
aireilly authored Aug 14, 2024
2 parents 350fd72 + 2780668 commit 750ea5b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions .vale/fixtures/RedHat/ReadabilityGrade/testinvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tune and configure the cluster host firmware and various other cluster configuration settings.
1 change: 1 addition & 0 deletions .vale/fixtures/RedHat/ReadabilityGrade/testvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tune and configure the cluster host firmware.
11 changes: 4 additions & 7 deletions .vale/styles/RedHat/ReadabilityGrade.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
extends: readability
grade: 21
level: suggestion
grade: 9
message: "Simplify your language. The calculated Flesch–Kincaid grade level of %s is above the recommended reading grade level of 9."
link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/readabilitygrade/
message: "Grade level ('%s') too high."
level: suggestion
metrics:
- Automated Readability
- Coleman-Liau
- Flesch-Kincaid
- Gunning Fog
- SMOG

3 changes: 2 additions & 1 deletion modules/reference-guide/pages/readabilitygrade.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

= Readability grade

Grade level too high.
Try to write paragraphs that have a calculated Flesch–Kincaid grade level below the recommended value of 9.

.Additional resources

* link:https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests[Flesch–Kincaid readability tests]
* link:https://vale.sh/docs/topics/styles#metric[Vale documentation - `metric` extension point]
* link:{repository-url}blob/main/.vale/styles/RedHat/ReadabilityGrade.yml[`ReadabilityGrade.yml` source code]

0 comments on commit 750ea5b

Please sign in to comment.