tessella 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/lint.md +3 -1
- data/lib/tessella/lint/geometry.rb +5 -1
- data/lib/tessella/lint/geometry_checks.rb +6 -6
- data/lib/tessella/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70e5df2d792312a032d105d86ebcd9cde5f8d357d718c11fbe02e107773cc217
|
|
4
|
+
data.tar.gz: 756687ed3bbe6defe6e9bba37a5a17fcdcfe01b9a25fa9f3db3c4f4cff99762f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e592914390c17e222832a335e2bf31c2a472844ed542560c68af3757f1da4d0761cf93998ffa65ed0bd7f3bbcdbf0f45ca4b3c0048d02ddbd22abe43b2b7355b
|
|
7
|
+
data.tar.gz: 7783749e4ec92297e5982475d5c29d9221faa3111978677fa2ec5be6fd20ea39abe68171a6c9de4a3c13f5c5236c025658b11030c08e3254c70bc6fc6434b017
|
data/doc/lint.md
CHANGED
|
@@ -32,7 +32,9 @@ when none is given.
|
|
|
32
32
|
## Output and exit status
|
|
33
33
|
|
|
34
34
|
Each finding goes to stderr as `FILE:LINE: message` (`stdin` for
|
|
35
|
-
stdin), one per line.
|
|
35
|
+
stdin), one per line. LINE is the input's own line; a column a message
|
|
36
|
+
names (`col N`, `column N`) is where the glyph renders, counted from
|
|
37
|
+
1 in display columns with `--prefix` included, as `--ruler` counts. The exit status is 0 when every input is clean,
|
|
36
38
|
1 on any finding or a file that cannot be read (the other files are
|
|
37
39
|
still linted), and 2 on a usage mistake. A clean file prints nothing:
|
|
38
40
|
|
|
@@ -46,7 +46,11 @@ module Tessella
|
|
|
46
46
|
}.freeze
|
|
47
47
|
|
|
48
48
|
SIDE_A = "|+"
|
|
49
|
-
|
|
49
|
+
# What a vertical may hang from besides a glyph reaching
|
|
50
|
+
# down: an ASCII side, or an arrow head pointing up the
|
|
51
|
+
# line (a box edge on the arrow's row gets it checked).
|
|
52
|
+
ABOVE_SIDE_A = "|+▴▲"
|
|
53
|
+
ABOVE_VERT_A = "|+-^"
|
|
50
54
|
ABOVE_ARROW_A = "|+-v▼▾"
|
|
51
55
|
ARROWS = "▼▾"
|
|
52
56
|
# The second column of a wide glyph: structural to nothing.
|
|
@@ -174,14 +174,14 @@ module Tessella
|
|
|
174
174
|
"hangs from '#{above}'")
|
|
175
175
|
end
|
|
176
176
|
|
|
177
|
-
# The
|
|
178
|
-
# arrow head's, or a vertical's), or nil
|
|
179
|
-
# is no connector: a vertical with a
|
|
180
|
-
# is a junction drawn in two cells.
|
|
177
|
+
# The glyphs without a down arm that may carry this
|
|
178
|
+
# connector (an arrow head's, or a vertical's), or nil
|
|
179
|
+
# when the glyph is no connector: a vertical with a
|
|
180
|
+
# horizontal beside it is a junction drawn in two cells.
|
|
181
181
|
def connector_kind(row, ch, c)
|
|
182
182
|
return ABOVE_ARROW_A if arrow_head?(row, ch, c)
|
|
183
|
-
return
|
|
184
|
-
|
|
183
|
+
return ABOVE_SIDE_A if arms?(ch, UP | DOWN, exact: true) &&
|
|
184
|
+
!beside_horizontal?(row, c)
|
|
185
185
|
|
|
186
186
|
ABOVE_VERT_A if ch == "|" && !beside?(row, c, "-")
|
|
187
187
|
end
|
data/lib/tessella/version.rb
CHANGED