Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add second person rule #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions IBM/SecondPerson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: consistency
message: "Try to use second person (you) when speaking to or about the reader."
level: warning
link: https://www.ibm.com/developerworks/library/styleguidelines/#N10050
nonword: false
either:
we: you
7 changes: 7 additions & 0 deletions features/rules.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ Feature: Rules
test.md:3:1:IBM.Usage:Verify your use of 'We' with the word usage guidelines.
test.md:3:17:IBM.Usage:Verify your use of 'deploy' with the word usage guidelines.
"""

Scenario: Focus on reader
When I test "SecondPerson"
Then the output should contain exactly:
"""
test.md:3:37:IBM.SecondPerson:Try to use second person (you) when speaking to or about the reader.
"""
6 changes: 6 additions & 0 deletions fixtures/SecondPerson/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
StylesPath = ../../

MinAlertLevel = suggestion

[*.md]
IBM.SecondPerson = YES
3 changes: 3 additions & 0 deletions fixtures/SecondPerson/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Second Person tests for IBM

I am going to show you these steps, we will cover more later.