Skip to content

Commit 18b2d35

Browse files
authored
Merge pull request #22 from bencromwell/chore/linting
chore: linting and CI
2 parents 1a1e8ec + d85fb74 commit 18b2d35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+101256
-290
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
StylesPath = styles
2+
3+
MinAlertLevel = suggestion
4+
5+
[*.md]
6+
BasedOnStyles = Irwell

.github/styles/Irwell/Spelling.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
extends: spelling
2+
message: |
3+
Did you really mean '%s'?
4+
5+
If intentional, try code/bold formatting.
6+
7+
# Further details:
8+
# For UI elements, use bold formatting.
9+
#
10+
# For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use code formatting.
11+
#
12+
# The spell checker doesn't check words with bold or code formatting.
13+
level: error
14+
dictionaries:
15+
- en_GB
16+
dicpath: config/dictionaries/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Automated Readability Index (%s) below 8."
3+
link: https://en.wikipedia.org/wiki/Automated_readability_index
4+
5+
formula: |
6+
(4.71 * (characters / words)) + (0.5 * (words / sentences)) - 21.43
7+
8+
condition: "> 8"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Coleman–Liau Index grade (%s) below 9."
3+
link: https://en.wikipedia.org/wiki/Coleman%E2%80%93Liau_index
4+
5+
formula: |
6+
(0.0588 * (characters / words) * 100) - (0.296 * (sentences / words) * 100) - 15.8
7+
8+
condition: "> 9"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Flesch–Kincaid grade level (%s) below 8."
3+
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests
4+
5+
formula: |
6+
(0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59
7+
8+
condition: "> 8"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Flesch reading ease score (%s) above 70."
3+
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests
4+
5+
formula: |
6+
206.835 - (1.015 * (words / sentences)) - (84.6 * (syllables / words))
7+
8+
condition: "< 70"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Gunning-Fog index (%s) below 10."
3+
link: https://en.wikipedia.org/wiki/Gunning_fog_index
4+
5+
formula: |
6+
0.4 * ((words / sentences) + 100 * (complex_words / words))
7+
8+
condition: "> 10"

.github/styles/Readability/LIX.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
extends: metric
2+
message: "Try to keep the LIX score (%s) below 35."
3+
4+
link: https://en.wikipedia.org/wiki/Lix_(readability_test)
5+
# Very Easy: 20 - 25
6+
#
7+
# Easy: 30 - 35
8+
#
9+
# Medium: 40 - 45
10+
#
11+
# Difficult: 50 - 55
12+
#
13+
# Very Difficult: 60+
14+
formula: |
15+
(words / sentences) + ((long_words * 100) / words)
16+
17+
condition: "> 35"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the SMOG grade (%s) below 10."
3+
link: https://en.wikipedia.org/wiki/SMOG
4+
5+
formula: |
6+
1.0430 * math.sqrt((polysyllabic_words * 30.0) / sentences) + 3.1291
7+
8+
condition: "> 10"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"feed": "https://github.com/errata-ai/Readability/releases.atom",
3+
"vale_version": ">=2.13.0"
4+
}

0 commit comments

Comments
 (0)