-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to parse some of sass files #333
Comments
Few things
Until then I wouldn't even know where to begin with this I'm afraid.. |
Hi @vegisivaramanjaneyulu, can you please try and isolate what part of this file is causing the issue (delete half the file, see if the problem still occurs, if not try deleting another bit and continue till you've got it down to about 1-3 lines that cause the problem), and only post that. Currently you've posted the whole file which makes it hard to work out what the root cause is. |
Thanks for your response, we are getting the parsing exception while executing bellow code on particular sassfiles, have a look once and could you please provide the solution for this. company-mention.sass: abstract.sass &:before |
Hey @vegisivaramanjaneyulu . Could you please wrap your code with three backticks like this https://github.com/jasononeil/mdown/wiki/Github-Code-Blocks and add the correct indentations. Thanks! |
I'm running into this issue as well and it seems to be tied to with inline calculations. For example:
The fact we do |
@samuelhorwitz, your issue is unfortunately due to an issue with our AST gonzales-pe, we're currently awaiting the latest release and your issue is in the pipeline to be fixed, we've been liaising with the developer who is currently working really hard over there to get these fixed. You can find the issue I created here Once the AST is at a place we feel stable then we will be updating sass-lint to take full advantage of it. @vegisivaramanjaneyulu do you happen to be using tabs? If so they will be fixed in the upcoming AST release too. |
@DanPurdy sounds good :) Thanks |
Thanks for your support, is it possible to share the release date of upcoming AST release too, please share the date. Awaiting for your favorable response. |
@vegisivaramanjaneyulu we do not control the release of the AST, we only consume it. Once it's been updated, we can work on incorporating, testing, and releasing our own update. We don't have a release date for this at the moment. |
Hi Team, we are unable to parse sass file using gonzales.parse(..) method the bellow code only. font: could you please fix the above problem and update sass-lint . Awaiting for your favorable response. |
We keep saying this to you but can you please start submitting these issues properly, just pasting them randomly around isn't helping anyone.. You've provided nearly 0 information, You haven't answered my previous question either. Please follow the contribution guide here |
I'm running into this issue too.
demo.scss $pathNumber: 18;
$firstColor: #0057B8;
$listColors: #F11E4A, #F8A527, #266D7F, #82A, $firstColor;
$delayCoeff: 0.1s;
body {
background-color: #0057B8;
text-align: center;
line-height: 100vh;
}
.svg {
display: inline-block;
height: 200px;
width: 200px;
line-height: 200px;
text-align: center;
background-color: #FFF;
border-radius: 50%;
}
#svg {
display: inline-block;
vertical-align: middle;
fill: $firstColor;
@for $i from 1 through 18 {
path:nth-child(#{$i}) {
animation: pweek $delayCoeff*$pathNumber linear infinite;
animation-delay: $i*$delayCoeff;
&:hover {
animation-play-state: paused;
}
}
}
}
@keyframes pweek {
0% {
fill: $firstColor;
}
@for $i from 1 through length($listColors) {
#{$i*(100/length($listColors))}% {
fill: nth($listColors, $i);
}
}
} Run my task, this exception
I did some changes in file, another exception. body {
background-color: #0057B8;
text-align: center;
line-height: 100vh;
}
.svg {
display: inline-block;
height: 200px;
width: 200px;
line-height: 200px;
text-align: center;
background-color: #FFF;
border-radius: 50%;
}
#svg {
display: inline-block;
vertical-align: middle;
fill: $firstColor;
}
|
Hi @traktraktrugui your first issue is to do with a problem in the current version of our AST which you can see here #210 and #321 as well as a few other places The next issue is probably something related to #382 We're hoping to have them sorted soon. |
@samuelhorwitz Your example is working in sass-lint 1.6.0
On it's own this is due to the fact that the modulo operator is present which seems to be causing an issue still, even if you remove this though the whole block is causing an issue when placed in the context you had it so we'll have too look into why the AST falls over with this. The good news is all the other examples are passing so i'm going to close this and add an issue to the AST instead with the above example |
Hi Team,
I start using sass-lint to my sass application but I am unable parse the bellow sass file using Gonzales.parse() method, so could you please help me for this.
Edit-product.sass:
%table-nested-parent
.edit-product-link
color: $link-blue
font-size: 13px
.edit-product-dialog
@extend %dialog-610-width-basic
.edit-product-header
@extend %dialog-header-basic
.edit-product-form
@extend %dialog-form
.subheading
font-weight: bold
margin-top: 10px
.save-state
font-weight: bold
height: 30px
position: relative
and groot.js:
//////////////////////////////
// Tree Abstraction
//////////////////////////////
'use strict';
var gonzales = require('gonzales-pe');
module.exports = function (text, syntax, filename) {
var fileInfo = filename ? ' at ' + filename : '',
tree;
// Run
.toString()
to allow Buffers to be passed intext = text.toString();
try {
tree = gonzales.parse(text, { ………………………………….> I am getting error in this page , here text value is above mention edit-product.sass file
'syntax': syntax
});
}
catch (e) {
throw new Error('Parsing error' + fileInfo + ': ' + e.message); ……> this error is displaying
}
if (typeof tree === 'undefined') {
throw new Error('Undefined tree' + fileInfo + ': ' + text.toString() + ' => ' + tree.toString());
}
return tree;
};
Exception:
D:\Hiring\writer\src>gulp sassprepare
[15:35:43] Using gulpfile D:\Hiring\writer\src\Gulpfile.js
[15:35:43] Starting 'sasslint'...
text: @import "edit-product"
tree: @import "edit-product"
app\sass\modules\acl\acl.sass
1:9 warning Strings must use single quotes quotes
1:22 warning Files must end with a new line final-newline
? 2 problems (0 errors, 2 warnings)
text: //- Edit product ------------------------------------------------------------
%table-nested-parent
.edit-product-link
color: $link-blue
font-size: 13px
.edit-product-dialog
@extend %dialog-610-width-basic
.edit-product-header
@extend %dialog-header-basic
.edit-product-form
@extend %dialog-form
.subheading
font-weight: bold
margin-top: 10px
.save-state
font-weight: bold
height: 30px
position: relative
D:\Hiring\writer\src\node_modules\sass-lint\lib\groot.js:25
throw new Error('Parsing error' + fileInfo + ': ' + e.message);
^
Error: Parsing error at app\sass\modules\acl\edit-product.sass: Please check validity of the block
at module.exports (D:\Hiring\writer\src\node_modules\sass-lint\lib\groot.js:25:11)
at Function.sassLint.lintText (D:\Hiring\writer\src\node_modules\sass-lint\index.js:23:13)
at DestroyableTransform._transform (D:\Hiring\writer\src\node_modules\gulp-sass-lint\index.js:32:27)
at DestroyableTransform.Transform._read (D:\Hiring\writer\src\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:172:10)
at DestroyableTransform.Transform.write (D:\Hiring\writer\src\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:160:12)
at doWrite (D:\Hiring\writer\src\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:326:12)
at writeOrBuffer (D:\Hiring\writer\src\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:312:5)
at DestroyableTransform.Writable.write (D:\Hiring\writer\src\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:239:11)
at write (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_readable.js:623:24)
at flow (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_readable.js:632:7)
at Transform.pipeOnReadable (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_readable.js:664:5)
at Transform.emit (events.js:104:17)
at emitReadable (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_readable.js:448:10)
at emitReadable (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_readable.js:444:5)
at readableAddChunk (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_readable.js:187:9)
at Transform.Readable.push (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_readable.js:149:10)
at Transform.push (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:145:32)
at afterTransform (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:101:12)
at TransformState.afterTransform (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:79:12)
at Transform.noop as _transform
at Transform._read (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:184:10)
at Transform._write (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:172:12)
at doWrite (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:237:10)
at writeOrBuffer (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:227:5)
at Transform.Writable.write (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:194:11)
at Stream.ondata (stream.js:51:26)
at Stream.emit (events.js:107:17)
at queueData (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\map-stream\index.js:43:21)
at next (D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\map-stream\index.js:71:7)
at D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\map-stream\index.js:85:7
at D:\Hiring\writer\src\node_modules\vinyl-fs\lib\src\getContents\bufferFile.js:12:5
at evalmachine.:334:14
at D:\Hiring\writer\src\node_modules\vinyl-fs\node_modules\graceful-fs\graceful-fs.js:102:5
at FSReqWrap.oncomplete (evalmachine.:95:15)
D:\Hiring\writer\src>
The text was updated successfully, but these errors were encountered: