Skip to content

Commit d28a34a

Browse files
committed
First draft of the new libsass error reporting
Includes full stack trace, which me might want to limit by some command line option given cli util.
1 parent 1122ec7 commit d28a34a

File tree

224 files changed

+3118
-990
lines changed

Some content is hidden

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

224 files changed

+3118
-990
lines changed

spec/core_functions/color/adjust_color/error/args.hrx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Error: Only one positional argument is allowed. All other arguments must be pass
2828
1 | a {b: adjust-color(red, 1)}
2929
| ^^^
3030
'
31-
input.scss 1:20 adjust-color
31+
input.scss 1:20 adjust-color()
3232
,
3333
1 | a {b: adjust-color(red, 1)}
3434
| ^^^^^^^^^^^^^^^^^^^^

spec/core_functions/color/adjust_color/error/bounds.hrx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Error: $red: Expected -256 to be within -255 and 255.
1515
1 | a {b: adjust-color(red, $red: -256)}
1616
| ^^^^
1717
'
18-
input.scss 1:31 adjust-color
18+
input.scss 1:31 adjust-color()
1919
,
2020
1 | a {b: adjust-color(red, $red: -256)}
2121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -41,7 +41,7 @@ Error: $red: Expected 256 to be within -255 and 255.
4141
1 | a {b: adjust-color(red, $red: 256)}
4242
| ^^^
4343
'
44-
input.scss 1:31 adjust-color
44+
input.scss 1:31 adjust-color()
4545
,
4646
1 | a {b: adjust-color(red, $red: 256)}
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -67,7 +67,7 @@ Error: $green: Expected -256 to be within -255 and 255.
6767
1 | a {b: adjust-color(green, $green: -256)}
6868
| ^^^^
6969
'
70-
input.scss 1:35 adjust-color
70+
input.scss 1:35 adjust-color()
7171
,
7272
1 | a {b: adjust-color(green, $green: -256)}
7373
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -93,7 +93,7 @@ Error: $green: Expected 256 to be within -255 and 255.
9393
1 | a {b: adjust-color(green, $green: 256)}
9494
| ^^^
9595
'
96-
input.scss 1:35 adjust-color
96+
input.scss 1:35 adjust-color()
9797
,
9898
1 | a {b: adjust-color(green, $green: 256)}
9999
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -119,7 +119,7 @@ Error: $blue: Expected -256 to be within -255 and 255.
119119
1 | a {b: adjust-color(blue, $blue: -256)}
120120
| ^^^^
121121
'
122-
input.scss 1:33 adjust-color
122+
input.scss 1:33 adjust-color()
123123
,
124124
1 | a {b: adjust-color(blue, $blue: -256)}
125125
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,7 +145,7 @@ Error: $blue: Expected 256 to be within -255 and 255.
145145
1 | a {b: adjust-color(blue, $blue: 256)}
146146
| ^^^
147147
'
148-
input.scss 1:33 adjust-color
148+
input.scss 1:33 adjust-color()
149149
,
150150
1 | a {b: adjust-color(blue, $blue: 256)}
151151
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -171,7 +171,7 @@ Error: $saturation: Expected -100.001 to be within -100 and 100.
171171
1 | a {b: adjust-color(red, $saturation: -100.001)}
172172
| ^^^^^^^^
173173
'
174-
input.scss 1:38 adjust-color
174+
input.scss 1:38 adjust-color()
175175
,
176176
1 | a {b: adjust-color(red, $saturation: -100.001)}
177177
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -197,7 +197,7 @@ Error: $saturation: Expected 100.001 to be within -100 and 100.
197197
1 | a {b: adjust-color(red, $saturation: 100.001)}
198198
| ^^^^^^^
199199
'
200-
input.scss 1:38 adjust-color
200+
input.scss 1:38 adjust-color()
201201
,
202202
1 | a {b: adjust-color(red, $saturation: 100.001)}
203203
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -223,7 +223,7 @@ Error: $lightness: Expected -100.001 to be within -100 and 100.
223223
1 | a {b: adjust-color(red, $lightness: -100.001)}
224224
| ^^^^^^^^
225225
'
226-
input.scss 1:37 adjust-color
226+
input.scss 1:37 adjust-color()
227227
,
228228
1 | a {b: adjust-color(red, $lightness: -100.001)}
229229
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -249,7 +249,7 @@ Error: $lightness: Expected 100.001 to be within -100 and 100.
249249
1 | a {b: adjust-color(red, $lightness: 100.001)}
250250
| ^^^^^^^
251251
'
252-
input.scss 1:37 adjust-color
252+
input.scss 1:37 adjust-color()
253253
,
254254
1 | a {b: adjust-color(red, $lightness: 100.001)}
255255
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -275,7 +275,7 @@ Error: $alpha: Expected -1.001 to be within -1 and 1.
275275
1 | a {b: adjust-color(red, $alpha: -1.001)}
276276
| ^^^^^^
277277
'
278-
input.scss 1:33 adjust-color
278+
input.scss 1:33 adjust-color()
279279
,
280280
1 | a {b: adjust-color(red, $alpha: -1.001)}
281281
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -301,7 +301,7 @@ Error: $alpha: Expected 1.001 to be within -1 and 1.
301301
1 | a {b: adjust-color(red, $alpha: 1.001)}
302302
| ^^^^^
303303
'
304-
input.scss 1:33 adjust-color
304+
input.scss 1:33 adjust-color()
305305
,
306306
1 | a {b: adjust-color(red, $alpha: 1.001)}
307307
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

spec/core_functions/color/adjust_color/error/type.hrx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Error: $color: 1 is not a color.
1515
1 | a {b: adjust-color(1)}
1616
| ^
1717
'
18-
input.scss 1:20 adjust-color
18+
input.scss 1:20 adjust-color()
1919
,
2020
1 | a {b: adjust-color(1)}
2121
| ^^^^^^^^^^^^^^^
@@ -41,7 +41,7 @@ Error: $red: c is not a number.
4141
1 | a {b: adjust-color(red, $red: c)}
4242
| ^
4343
'
44-
input.scss 1:31 adjust-color
44+
input.scss 1:31 adjust-color()
4545
,
4646
1 | a {b: adjust-color(red, $red: c)}
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -67,7 +67,7 @@ Error: $green: c is not a number.
6767
1 | a {b: adjust-color(red, $green: c)}
6868
| ^
6969
'
70-
input.scss 1:33 adjust-color
70+
input.scss 1:33 adjust-color()
7171
,
7272
1 | a {b: adjust-color(red, $green: c)}
7373
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -93,7 +93,7 @@ Error: $blue: c is not a number.
9393
1 | a {b: adjust-color(red, $blue: c)}
9494
| ^
9595
'
96-
input.scss 1:32 adjust-color
96+
input.scss 1:32 adjust-color()
9797
,
9898
1 | a {b: adjust-color(red, $blue: c)}
9999
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -119,7 +119,7 @@ Error: $hue: c is not a number.
119119
1 | a {b: adjust-color(red, $hue: c)}
120120
| ^
121121
'
122-
input.scss 1:31 adjust-color
122+
input.scss 1:31 adjust-color()
123123
,
124124
1 | a {b: adjust-color(red, $hue: c)}
125125
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,7 +145,7 @@ Error: $saturation: c is not a number.
145145
1 | a {b: adjust-color(red, $saturation: c)}
146146
| ^
147147
'
148-
input.scss 1:38 adjust-color
148+
input.scss 1:38 adjust-color()
149149
,
150150
1 | a {b: adjust-color(red, $saturation: c)}
151151
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -171,7 +171,7 @@ Error: $lightness: c is not a number.
171171
1 | a {b: adjust-color(red, $lightness: c)}
172172
| ^
173173
'
174-
input.scss 1:37 adjust-color
174+
input.scss 1:37 adjust-color()
175175
,
176176
1 | a {b: adjust-color(red, $lightness: c)}
177177
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -197,7 +197,7 @@ Error: $alpha: c is not a number.
197197
1 | a {b: adjust-color(red, $alpha: c)}
198198
| ^
199199
'
200-
input.scss 1:33 adjust-color
200+
input.scss 1:33 adjust-color()
201201
,
202202
1 | a {b: adjust-color(red, $alpha: c)}
203203
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

spec/core_functions/color/adjust_hue.hrx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Error: $color: 1 is not a color.
121121
1 | a {b: adjust-hue(1, 2)}
122122
| ^
123123
'
124-
input.scss 1:18 adjust-hue
124+
input.scss 1:18 adjust-hue()
125125
,
126126
1 | a {b: adjust-hue(1, 2)}
127127
| ^^^^^^^^^^^^^^^^
@@ -147,7 +147,7 @@ Error: $degrees: blue is not a number.
147147
1 | a {b: adjust-hue(red, blue)}
148148
| ^^^^
149149
'
150-
input.scss 1:23 adjust-hue
150+
input.scss 1:23 adjust-hue()
151151
,
152152
1 | a {b: adjust-hue(red, blue)}
153153
| ^^^^^^^^^^^^^^^^^^^^^

spec/core_functions/color/alpha.hrx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,19 @@ Error: $color: 1 is not a color.
129129
'
130130
input.scss 1:7 root stylesheet
131131

132+
<===> error/type/error-libsass
133+
Error: $color: 1 is not a color.
134+
,
135+
1 | a {b: alpha(1)}
136+
| ^
137+
'
138+
input.scss 1:13 alpha()
139+
,
140+
1 | a {b: alpha(1)}
141+
| ^^^^^^^^
142+
'
143+
input.scss 1:7 root stylesheet
144+
132145
<===>
133146
================================================================================
134147
<===> error/quoted_string/options.yml
@@ -158,6 +171,19 @@ Error: $color: cd is not a color.
158171
'
159172
input.scss 1:7 root stylesheet
160173

174+
<===> error/unquoted_string/no_equals/error-libsass
175+
Error: $color: cd is not a color.
176+
,
177+
1 | a {b: alpha(cd)}
178+
| ^^
179+
'
180+
input.scss 1:13 alpha()
181+
,
182+
1 | a {b: alpha(cd)}
183+
| ^^^^^^^^^
184+
'
185+
input.scss 1:7 root stylesheet
186+
161187
<===> error/unquoted_string/non_identifier_before_equals/input.scss
162188
a {b: alpha(unquote("1=c"))}
163189

@@ -168,3 +194,16 @@ Error: $color: 1=c is not a color.
168194
| ^^^^^^^^^^^^^^^^^^^^^
169195
'
170196
input.scss 1:7 root stylesheet
197+
198+
<===> error/unquoted_string/non_identifier_before_equals/error-libsass
199+
Error: $color: 1=c is not a color.
200+
,
201+
1 | a {b: alpha(unquote("1=c"))}
202+
| ^^^^^
203+
'
204+
input.scss 1:21 alpha()
205+
,
206+
1 | a {b: alpha(unquote("1=c"))}
207+
| ^^^^^^^^^^^^^^^^^^^^^
208+
'
209+
input.scss 1:7 root stylesheet

spec/core_functions/color/blue.hrx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Error: $color: 1 is not a color.
8181
1 | a {b: blue(1)}
8282
| ^
8383
'
84-
input.scss 1:12 blue
84+
input.scss 1:12 blue()
8585
,
8686
1 | a {b: blue(1)}
8787
| ^^^^^^^

spec/core_functions/color/change_color/error/args.hrx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Error: Only one positional argument is allowed. All other arguments must be pass
2828
1 | a {b: change-color(red, 1)}
2929
| ^^^
3030
'
31-
input.scss 1:20 change-color
31+
input.scss 1:20 change-color()
3232
,
3333
1 | a {b: change-color(red, 1)}
3434
| ^^^^^^^^^^^^^^^^^^^^

spec/core_functions/color/change_color/error/bounds.hrx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Error: $red: Expected -1 to be within 0 and 255.
1515
1 | a {b: change-color(red, $red: -1)}
1616
| ^^
1717
'
18-
input.scss 1:31 change-color
18+
input.scss 1:31 change-color()
1919
,
2020
1 | a {b: change-color(red, $red: -1)}
2121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -41,7 +41,7 @@ Error: $red: Expected 256 to be within 0 and 255.
4141
1 | a {b: change-color(red, $red: 256)}
4242
| ^^^
4343
'
44-
input.scss 1:31 change-color
44+
input.scss 1:31 change-color()
4545
,
4646
1 | a {b: change-color(red, $red: 256)}
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -67,7 +67,7 @@ Error: $green: Expected -1 to be within 0 and 255.
6767
1 | a {b: change-color(green, $green: -1)}
6868
| ^^
6969
'
70-
input.scss 1:35 change-color
70+
input.scss 1:35 change-color()
7171
,
7272
1 | a {b: change-color(green, $green: -1)}
7373
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -93,7 +93,7 @@ Error: $green: Expected 256 to be within 0 and 255.
9393
1 | a {b: change-color(green, $green: 256)}
9494
| ^^^
9595
'
96-
input.scss 1:35 change-color
96+
input.scss 1:35 change-color()
9797
,
9898
1 | a {b: change-color(green, $green: 256)}
9999
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -119,7 +119,7 @@ Error: $blue: Expected -1 to be within 0 and 255.
119119
1 | a {b: change-color(blue, $blue: -1)}
120120
| ^^
121121
'
122-
input.scss 1:33 change-color
122+
input.scss 1:33 change-color()
123123
,
124124
1 | a {b: change-color(blue, $blue: -1)}
125125
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,7 +145,7 @@ Error: $blue: Expected 256 to be within 0 and 255.
145145
1 | a {b: change-color(blue, $blue: 256)}
146146
| ^^^
147147
'
148-
input.scss 1:33 change-color
148+
input.scss 1:33 change-color()
149149
,
150150
1 | a {b: change-color(blue, $blue: 256)}
151151
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -171,7 +171,7 @@ Error: $saturation: Expected -0.001 to be within 0 and 100.
171171
1 | a {b: change-color(red, $saturation: -0.001)}
172172
| ^^^^^^
173173
'
174-
input.scss 1:38 change-color
174+
input.scss 1:38 change-color()
175175
,
176176
1 | a {b: change-color(red, $saturation: -0.001)}
177177
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -197,7 +197,7 @@ Error: $saturation: Expected 100.001 to be within 0 and 100.
197197
1 | a {b: change-color(red, $saturation: 100.001)}
198198
| ^^^^^^^
199199
'
200-
input.scss 1:38 change-color
200+
input.scss 1:38 change-color()
201201
,
202202
1 | a {b: change-color(red, $saturation: 100.001)}
203203
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -223,7 +223,7 @@ Error: $lightness: Expected -0.001 to be within 0 and 100.
223223
1 | a {b: change-color(red, $lightness: -0.001)}
224224
| ^^^^^^
225225
'
226-
input.scss 1:37 change-color
226+
input.scss 1:37 change-color()
227227
,
228228
1 | a {b: change-color(red, $lightness: -0.001)}
229229
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -249,7 +249,7 @@ Error: $lightness: Expected 100.001 to be within 0 and 100.
249249
1 | a {b: change-color(red, $lightness: 100.001)}
250250
| ^^^^^^^
251251
'
252-
input.scss 1:37 change-color
252+
input.scss 1:37 change-color()
253253
,
254254
1 | a {b: change-color(red, $lightness: 100.001)}
255255
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -275,7 +275,7 @@ Error: $alpha: Expected -0.001 to be within 0 and 1.
275275
1 | a {b: change-color(red, $alpha: -0.001)}
276276
| ^^^^^^
277277
'
278-
input.scss 1:33 change-color
278+
input.scss 1:33 change-color()
279279
,
280280
1 | a {b: change-color(red, $alpha: -0.001)}
281281
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -301,7 +301,7 @@ Error: $alpha: Expected 1.001 to be within 0 and 1.
301301
1 | a {b: change-color(red, $alpha: 1.001)}
302302
| ^^^^^
303303
'
304-
input.scss 1:33 change-color
304+
input.scss 1:33 change-color()
305305
,
306306
1 | a {b: change-color(red, $alpha: 1.001)}
307307
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)