Skip to content

Commit

Permalink
implementing reading grade rule
Browse files Browse the repository at this point in the history
  • Loading branch information
aireilly committed Aug 13, 2024
1 parent 350fd72 commit 2a0f3f3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 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 @@
Before you can deploy virtual distributed unit (vDU) applications, you need to 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 and various other cluster configuration settings.
15 changes: 5 additions & 10 deletions .vale/styles/RedHat/ReadabilityGrade.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
extends: readability
grade: 21
level: suggestion
extends: metric
message: "Simplify your language. The calculated Flesch–Kincaid grade level (%s) is above the recommended value of 16."
link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/readabilitygrade/
message: "Grade level ('%s') too high."
metrics:
- Automated Readability
- Coleman-Liau
- Flesch-Kincaid
- Gunning Fog
- SMOG
formula: |
(0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59
condition: "> 16"
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 sentences that have a calculated Flesch–Kincaid grade level above the recommended value of 15.

.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 2a0f3f3

Please sign in to comment.