-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
138 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,48 @@ | ||
Feature: Comments | ||
Scenario: Markdown | ||
When I test comments for ".md" | ||
Then the output should contain exactly: | ||
""" | ||
test.md:15:19:vale.Redundancy:'ACT test' is redundant | ||
test.md:19:19:vale.Redundancy:'ACT test' is redundant | ||
test.md:25:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
test.md:77:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
test.md:87:16:demo.Raw:Link "[must not use `.html`](../index.html)" must use the .md file extension. | ||
""" | ||
|
||
Scenario: reStructuredText | ||
When I test comments for ".rst" | ||
Then the output should contain exactly: | ||
""" | ||
test.rst:15:19:vale.Redundancy:'ACT test' is redundant | ||
test.rst:19:19:vale.Redundancy:'ACT test' is redundant | ||
test.rst:25:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
""" | ||
Scenario: MDX | ||
When I test comments for ".mdx" | ||
Then the output should contain exactly: | ||
""" | ||
test.mdx:15:19:vale.Redundancy:'ACT test' is redundant | ||
test.mdx:19:19:vale.Redundancy:'ACT test' is redundant | ||
test.mdx:25:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
test.mdx:77:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
test.mdx:87:16:demo.Raw:Link "[must not use `.html`](../index.html)" must use the .md file extension. | ||
""" | ||
|
||
Scenario: AsciiDoc | ||
When I test comments for ".adoc" | ||
Then the output should contain exactly: | ||
""" | ||
test.adoc:15:19:vale.Redundancy:'ACT test' is redundant | ||
test.adoc:19:19:vale.Redundancy:'ACT test' is redundant | ||
test.adoc:25:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
""" | ||
Scenario: Markdown | ||
When I test comments for ".md" | ||
Then the output should contain exactly: | ||
""" | ||
test.md:15:19:vale.Redundancy:'ACT test' is redundant | ||
test.md:19:19:vale.Redundancy:'ACT test' is redundant | ||
test.md:25:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
test.md:77:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
test.md:87:16:demo.Raw:Link "[must not use `.html`](../index.html)" must use the .md file extension. | ||
""" | ||
|
||
Scenario: Org Mode | ||
When I test comments for ".org" | ||
Then the output should contain exactly: | ||
""" | ||
test.org:17:21:vale.Redundancy:'ACT test' is redundant | ||
""" | ||
Scenario: reStructuredText | ||
When I test comments for ".rst" | ||
Then the output should contain exactly: | ||
""" | ||
test.rst:15:19:vale.Redundancy:'ACT test' is redundant | ||
test.rst:19:19:vale.Redundancy:'ACT test' is redundant | ||
test.rst:25:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
""" | ||
|
||
Scenario: AsciiDoc | ||
When I test comments for ".adoc" | ||
Then the output should contain exactly: | ||
""" | ||
test.adoc:15:19:vale.Redundancy:'ACT test' is redundant | ||
test.adoc:19:19:vale.Redundancy:'ACT test' is redundant | ||
test.adoc:25:20:demo.Ending-Preposition:Don't end a sentence with 'of.' | ||
""" | ||
|
||
Scenario: Org Mode | ||
When I test comments for ".org" | ||
Then the output should contain exactly: | ||
""" | ||
test.org:17:21:vale.Redundancy:'ACT test' is redundant | ||
""" |
8 changes: 7 additions & 1 deletion
8
testdata/fixtures/comments/_vale → testdata/fixtures/comments/.vale.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
StylesPath = ../../styles | ||
MinAlertLevel = suggestion | ||
|
||
[*.{md,rst,org,adoc}] | ||
[formats] | ||
mdx = md | ||
|
||
[*.{md,rst,org,adoc,mdx}] | ||
BasedOnStyles = vale, demo | ||
|
||
vale.Spelling = NO | ||
demo.CheckLinks = NO | ||
demo.Spellcheck = NO | ||
demo.ZeroOccurrence = NO | ||
demo.SentenceCaseAny = NO | ||
|
||
[*.mdx] | ||
CommentDelimiters = {/*, */} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{/* vale off */} | ||
|
||
This is some text ACT test | ||
|
||
This is some text ACT test | ||
|
||
{/* vale on */} | ||
|
||
{/* vale vale.Redundancy = NO */} | ||
|
||
This is some text ACT test | ||
|
||
{/* vale vale.Redundancy = YES */} | ||
|
||
This is some text ACT test | ||
|
||
{/* vale demo.Ending-Preposition = NO */} | ||
|
||
This is some text ACT test. This is a sentence for. | ||
|
||
This is a sentance of. | ||
|
||
{/* vale demo.Ending-Preposition = YES */} | ||
|
||
This is a sentance of. | ||
|
||
1. Consider the following `deployment.yaml` file. | ||
|
||
```yaml | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: my-nginx-svc | ||
labels: | ||
app: nginx | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- port: 80 | ||
selector: | ||
app: nginx | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: my-nginx | ||
labels: | ||
app: nginx | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.7.9 | ||
ports: | ||
- containerPort: 80 | ||
``` | ||
2. few other steps. | ||
{/* vale off */} | ||
1. This is a sentance of. | ||
```bash | ||
SSH should not typically be used within containers. | ||
Ensure that non-SSH services are not using port 22. | ||
``` | ||
{/* vale on */} | ||
|
||
something else. | ||
|
||
This is a sentance of. | ||
|
||
- Unordered list example. | ||
{/* vale off */} | ||
- This is a sentance of. | ||
{/* vale on */} | ||
- one more item. | ||
|
||
{/* vale demo.Raw = NO */} | ||
|
||
Internal Links [must not use `.html`](../index.html) |