-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add option in
block-sequence-hyphen-indicator-newline
(#259)
* feat: Add an option to block-sequence-hyphen-indicator-newline * test: Rename test suite `block-mapping-only` to `nested-hyphen-and-block-mapping-newline` * test: new test suite for `block-sequence-hyphen-indicator-newline` * docs: Update for new option in `block-sequence-hyphen-indicator-newline` * test: add test case for block mapping * Create thick-eyes-march.md --------- Co-authored-by: Yosuke Ota <otameshiyo23@gmail.com>
- Loading branch information
Showing
148 changed files
with
1,403 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"eslint-plugin-yml": minor | ||
--- | ||
|
||
feat: add `blockMapping` option in `block-sequence-hyphen-indicator-newline` |
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
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
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
22 changes: 22 additions & 0 deletions
22
...-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-always/mapping-errors.json
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,22 @@ | ||
[ | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 2, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 3, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 3, | ||
"column": 3 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 4, | ||
"column": 1 | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
...k-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-always/mapping-input.yaml
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,3 @@ | ||
- a: a | ||
- - b: b | ||
- {c: c} |
8 changes: 8 additions & 0 deletions
8
...k-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-always/mapping-output.yml
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,8 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-always/mapping-input.yaml | ||
- | ||
a: a | ||
- | ||
- | ||
b: b | ||
- | ||
{c: c} |
7 changes: 7 additions & 0 deletions
7
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/6BCT-errors.json
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,7 @@ | ||
[ | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 2, | ||
"column": 1 | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/6BCT-input.yaml
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,3 @@ | ||
- foo: bar | ||
- - baz | ||
- baz |
5 changes: 5 additions & 0 deletions
5
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/6BCT-output.yml
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,5 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/6BCT-input.yaml | ||
- | ||
foo: bar | ||
- - baz | ||
- baz |
7 changes: 7 additions & 0 deletions
7
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/735Y-errors.json
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,7 @@ | ||
[ | ||
{ | ||
"message": "Unexpected line break after this `-` indicator.", | ||
"line": 2, | ||
"column": 1 | ||
} | ||
] |
6 changes: 6 additions & 0 deletions
6
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/735Y-input.yaml
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,6 @@ | ||
- | ||
"flow in block" | ||
- > | ||
Block scalar | ||
- !!map # Block collection | ||
foo : bar |
6 changes: 6 additions & 0 deletions
6
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/735Y-output.yml
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,6 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/735Y-input.yaml | ||
- "flow in block" | ||
- > | ||
Block scalar | ||
- !!map # Block collection | ||
foo : bar |
7 changes: 7 additions & 0 deletions
7
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/93JH-errors.json
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,7 @@ | ||
[ | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 2, | ||
"column": 2 | ||
} | ||
] |
4 changes: 4 additions & 0 deletions
4
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/93JH-input.yaml
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,4 @@ | ||
- key: value | ||
key2: value2 | ||
- | ||
key3: value3 |
6 changes: 6 additions & 0 deletions
6
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/93JH-output.yml
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,6 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/93JH-input.yaml | ||
- | ||
key: value | ||
key2: value2 | ||
- | ||
key3: value3 |
17 changes: 17 additions & 0 deletions
17
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/9U5K-errors.json
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,17 @@ | ||
[ | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 4, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 6, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 8, | ||
"column": 1 | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/9U5K-input.yaml
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,8 @@ | ||
--- | ||
# Products purchased | ||
- item : Super Hoop | ||
quantity: 1 | ||
- item : Basketball | ||
quantity: 4 | ||
- item : Big Shoes | ||
quantity: 1 |
12 changes: 12 additions & 0 deletions
12
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/9U5K-output.yml
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,12 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/9U5K-input.yaml | ||
--- | ||
# Products purchased | ||
- | ||
item : Super Hoop | ||
quantity: 1 | ||
- | ||
item : Basketball | ||
quantity: 4 | ||
- | ||
item : Big Shoes | ||
quantity: 1 |
12 changes: 12 additions & 0 deletions
12
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/AZW3-errors.json
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,12 @@ | ||
[ | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 2, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 3, | ||
"column": 1 | ||
} | ||
] |
2 changes: 2 additions & 0 deletions
2
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/AZW3-input.yaml
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,2 @@ | ||
- bla"keks: foo | ||
- bla]keks: foo |
5 changes: 5 additions & 0 deletions
5
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/AZW3-output.yml
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,5 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/AZW3-input.yaml | ||
- | ||
bla"keks: foo | ||
- | ||
bla]keks: foo |
7 changes: 7 additions & 0 deletions
7
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/FH7J-errors.json
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,7 @@ | ||
[ | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 6, | ||
"column": 1 | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/FH7J-input.yaml
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,5 @@ | ||
- !!str | ||
- | ||
!!null : a | ||
b: !!str | ||
- !!str : !!null |
7 changes: 7 additions & 0 deletions
7
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/FH7J-output.yml
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,7 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/FH7J-input.yaml | ||
- !!str | ||
- | ||
!!null : a | ||
b: !!str | ||
- | ||
!!str : !!null |
17 changes: 17 additions & 0 deletions
17
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/J7PZ-errors.json
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,17 @@ | ||
[ | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 6, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 7, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 8, | ||
"column": 1 | ||
} | ||
] |
7 changes: 7 additions & 0 deletions
7
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/J7PZ-input.yaml
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,7 @@ | ||
# Ordered maps are represented as | ||
# A sequence of mappings, with | ||
# each mapping having one key | ||
--- !!omap | ||
- Mark McGwire: 65 | ||
- Sammy Sosa: 63 | ||
- Ken Griffy: 58 |
11 changes: 11 additions & 0 deletions
11
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/J7PZ-output.yml
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,11 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/J7PZ-input.yaml | ||
# Ordered maps are represented as | ||
# A sequence of mappings, with | ||
# each mapping having one key | ||
--- !!omap | ||
- | ||
Mark McGwire: 65 | ||
- | ||
Sammy Sosa: 63 | ||
- | ||
Ken Griffy: 58 |
7 changes: 7 additions & 0 deletions
7
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/JQ4R-errors.json
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,7 @@ | ||
[ | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 4, | ||
"column": 3 | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/JQ4R-input.yaml
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,3 @@ | ||
block sequence: | ||
- one | ||
- two : three |
5 changes: 5 additions & 0 deletions
5
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/JQ4R-output.yml
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,5 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/JQ4R-input.yaml | ||
block sequence: | ||
- one | ||
- | ||
two : three |
12 changes: 12 additions & 0 deletions
12
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/RZP5-errors.json
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,12 @@ | ||
[ | ||
{ | ||
"message": "Unexpected line break after this `-` indicator.", | ||
"line": 11, | ||
"column": 2 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 14, | ||
"column": 2 | ||
} | ||
] |
15 changes: 15 additions & 0 deletions
15
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/RZP5-input.yaml
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,15 @@ | ||
a: "double | ||
quotes" # lala | ||
b: plain | ||
value # lala | ||
c : #lala | ||
d | ||
? # lala | ||
- seq1 | ||
: # lala | ||
- #lala | ||
seq2 | ||
e: &node # lala | ||
- x: y | ||
block: > # lala | ||
abcde |
16 changes: 16 additions & 0 deletions
16
...-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/RZP5-output.yml
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,16 @@ | ||
# block-sequence-hyphen-indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/RZP5-input.yaml | ||
a: "double | ||
quotes" # lala | ||
b: plain | ||
value # lala | ||
c : #lala | ||
d | ||
? # lala | ||
- seq1 | ||
: # lala | ||
- seq2 | ||
e: &node # lala | ||
- | ||
x: y | ||
block: > # lala | ||
abcde |
12 changes: 12 additions & 0 deletions
12
...indicator-newline/invalid/yaml-test-suite-for-block-mapping-only-newline/RZT7-errors.json
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,12 @@ | ||
[ | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 20, | ||
"column": 3 | ||
}, | ||
{ | ||
"message": "Expected a line break after this `-` indicator.", | ||
"line": 24, | ||
"column": 3 | ||
} | ||
] |
Oops, something went wrong.