Closed gdelhumeau closed 9 years ago
Preview of the change, if you have improvements (even more context?) let me know:
Before:
Errors produced by compilation of testCase
ERROR 2:11 The variable "@undefinedVariable" was not declared.
ERROR 6:3 The namespace "#doesNotExists > .mixin(...)" was not declared.
ERROR 6:20 Could not find mixin named ".mixin".
ERROR 10:3 The namespace "#undefinedNamespace > #doesNotExists > .mixin(...)" was not declared.
After:
Errors produced by compilation of testCase
ERROR 2:11 The variable "@undefinedVariable" was not declared.
1: #undefinedVariable {
2: margin: @undefinedVariable;
3: }
ERROR 6:3 The namespace "#doesNotExists > .mixin(...)" was not declared.
5: padding: 2 2 2 2;
6: #doesNotExists > .mixin();
7: }
ERROR 6:20 Could not find mixin named ".mixin".
5: padding: 2 2 2 2;
6: #doesNotExists > .mixin();
7: }
ERROR 10:3 The namespace "#undefinedNamespace > #doesNotExists > .mixin(...)" was not declared.
9: padding: 2 2 2 2;
10: #undefinedNamespace > #doesNotExists > .mixin();
11: }
Nice!
Maybe you could add the name of the file where the error happens, because it can be inside an imported file.
Thanks a lot, Guillaume
Thank you for answer, there are 69 tests with error so I wanted to get feedback/ideas before I change them all.
The 'testCase' is the file name in the above example. If the error happen in imported file, report looks like this:
Errors produced by compilation of testCase
ERROR import\syntactically-incorrect-wrong-variable.less 3:10 The variable "@undefinedVariable" was not declared.
2: ruleset {
3: color: @undefinedVariable;
4: }
Hi.
Example or error message:
In my case, it do not always have the complete file which is compiled (it is computed internally by my program, and I have to use the debugger to see the problem).
What could be great is to display the lines which pose the problem.
Something like:
Thanks, Guillaume