Skip to content

Commit 25ec426

Browse files
committed
Prefix all syntax error messages
Issue sds#232 requested that `scss-lint` give some indication of whether an error was syntax- or style-related so that it would be displayed appropriately by the Syntastic scss-lint plugin. Since the only syntax error will ever be one reported by the `Runner` class when parsing the document fails, standardize the error message to being with "Syntax Error", so the scss-lint plugin can simply check the error message to determine whether it is style or syntax. Change-Id: I90183af30adba900ebcf94f688b8991ddcc1b663 Reviewed-on: http://gerrit.causes.com/44340 Tested-by: jenkins <[email protected]> Reviewed-by: Shane da Silva <[email protected]>
1 parent 2384268 commit 25ec426

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
the `--format` flag to be redirected to a file
3939
* Add `--require` flag allowing arbitrary Ruby modules to be loaded (facilitating
4040
custom reporters)
41+
* Prefix all syntax error messages with "Syntax Error:"
4142

4243
## 0.29.0
4344

Diff for: lib/scss_lint/runner.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def find_lints(file)
4848
end
4949
end
5050
rescue Sass::SyntaxError => ex
51-
@lints << Lint.new(nil, ex.sass_filename, Location.new(ex.sass_line), ex.to_s, :error)
51+
@lints << Lint.new(nil, ex.sass_filename, Location.new(ex.sass_line),
52+
"Syntax Error: #{ex}", :error)
5253
rescue FileEncodingError => ex
5354
@lints << Lint.new(nil, file, Location.new, ex.to_s, :error)
5455
end

0 commit comments

Comments
 (0)