-
Notifications
You must be signed in to change notification settings - Fork 465
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
Add support for Sass 3.5 #877
Comments
Hey @mprins, thanks for looking into running SCSS-Lint on Sass 3.5. Looks like Travis lied to you, as the JRuby build definitely failed but reported as a pass. Looks like this is because while the RSpec tests failed the second step of our tests passed because we skip the Overcommit pre-commit checks for JRuby (since they aren't useful and usually fail). In any case, would love a pull request that changes |
did a quick search-replace of |
In Sass 3.5, `node.value` returns an Array instead of a String. This could mean that we could expect multiple strings, so take this commit as an experiment. Fix: sds#877
Hi, I did an experiment in this commit: tagliala@7aeb1ff All specs are green but I'm not confident of the solution and I will not submit a PR. Please read commit's message to understand what I changed and why. There should be a reason for Anyway, hope it helps to speed up things |
In Sass 3.5, `node.value` returns an Array instead of a String. This could mean that we could expect multiple strings, so take this commit as an experiment. Fix: sds#877
Thanks for digging into this, @tagliala. Your general approach seems correct, but will not work in some cases. It seems Thus the solution you suggest probably passes in tests because we don't have too many tests explicitly using interpolation in property values. We should add some tests and fix the implementations appropriately. In general, most of the linters should ignore the property value if it is composed of interpolations, since that is dynamic code that we can't easily evaluate in static analysis. Would love to have someone dig into this and get this working, as it's not that difficult but just a bit tedious to ensure we're properly handling the |
Hi, if you provide me some failing specs I could try to do a PR |
No updates on this? Bootstrap 4 now moved to Saas 3.5 |
We're happy to accept a PR adding support for Sass 3.5! As mentioned above, this is doable (and @tagliala has a proof of concept that looks promising) but I think it's likely that the implementation will introduce some issues for codebases using interpolation in property values. If someone applies the commit locally and runs SCSS-Lint against a sizable SCSS codebase (Bootstrap 4 is a good candidate) without issues, we'll be happy to take that as evidence that @tagliala's commit is sufficient and cut a release. |
In Sass 3.5, `node.value` returns an Array instead of a String. This could mean that we could expect multiple strings, so take this commit as an experiment. Fix: sds#877
@sds thanks for the hint. I can confirm that my approach passes test but doesn't work on Bootstrap 4. Here it is a failing css rule: :root {
--my-font-family: Helvetica;
}
Apparently, there are issues with custom properties. Master branch works fine. This is the only issue while linting Bootstrap 4 I've also rebased my branch with the latest master release: tagliala@7aeb1ff Hope that someone else could finish my job |
The time has come 😐 |
I have a failing spec for context 'when a custom property is present' do
let(:scss) { <<-SCSS }
:root {
--my-font-family: Helvetica;
}
SCSS
it 'has a parse tree' do
engine.tree.should_not be_nil
end
end and a clue. If you simply add a new line with Spec will pass Sorry, I cannot invest more time on this Git bisect result on Sass: sass/sass@8247d55 |
In Sass 3.5, `node.value` returns an Array instead of a String. This could mean that we could expect multiple strings, so take this commit as an experiment. Also, Sass 3.5.3 fixes a couple of issues which previously need a monkey patch in scss-lint Fix: sds#877 Ref: sass/sass#1799, sass/sass#2394
In Sass 3.5, `node.value` returns an Array instead of a String. This could mean that we could expect multiple strings. With this PR, SCSS-Lint will check the first string returned. Also, Sass 3.5.3 fixes a couple of issues which previously need a monkey patch in SCSS-Lint. This PR uses '~> 3.5.3' as the minimum required version of Sass Fix: sds#877 Ref: sass/sass#1799, sass/sass#2394
Hi, Sass released 3.5.3, with a fix that positively affects SCSS-Lint. I've update my commit with a failing spec. sass/sass#2394 At the moment the error is generated inside the Sass library, which is attempting to call the Any help would be hugely appreciated PS: I know I should give up on Ruby and go for JavaScript/node, but I will not do that 🤷♂️ |
In Sass 3.5, `node.value` returns an Array instead of a String. This could mean that we could expect multiple strings. With this PR, SCSS-Lint will check the first string returned. Also, Sass 3.5.3 fixes a couple of issues which previously need a monkey patch in SCSS-Lint. This PR uses '~> 3.5.3' as the minimum required version of Sass Fix: sds#877 Ref: sass/sass#1799, sass/sass#2394
I'm looking at running scss_lint with the Sass 3.5 pre-release in my branch and the only issue I seem to be hitting is som failing testcases due to:
(see travis builds)
Looking at the Sass API docs it seems the "proper name" is
to_s
but I might be overlookig something.Is there an interest to have this adjusted (
to_sass
->to_s
)? and have things work on 3.5?As a side note, but unrelated to this it seems that while the native rubies cause a failing build the jruby is green 😕
The text was updated successfully, but these errors were encountered: