Page MenuHomePhabricator

Added SCSS-Lint linter
AbandonedPublic

Authored by joshuaspence on Oct 22 2014, 10:40 PM.

Details

Reviewers
remon
epriestley
chad
Group Reviewers
Blessed Reviewers
Test Plan

Add the following JSON to your .arclint:

"scss-lint": {
  "type": "scss-lint"
}

Then, add a ruby file with errors, for instance:

.message {
  margin: 0;
  margin: 10px;
}

Run arc lint. It should come up with: "Property margin already defined on line 2"

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 6236
Build 6258: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

remon updated this revision to Diff 25784.Oct 22 2014, 10:40 PM
remon retitled this revision from to Added SCSS-Lint linter.
remon updated this object.
remon edited the test plan for this revision. (Show Details)
remon updated this revision to Diff 25785.Oct 22 2014, 10:41 PM
remon edited edge metadata.
  • You didn't see this.
jjooss added a subscriber: jjooss.Dec 2 2014, 4:03 PM

polite bump

joshuaspence requested changes to this revision.Dec 30 2014, 12:46 PM
joshuaspence edited edge metadata.
joshuaspence added inline comments.
src/lint/linter/__tests__/ArcanistLinterTestCase.php
7 ↗(On Diff #25785)

We don't want this... the expectation is that scss-lint $SOME_PATH should work regardless of the file extension.

This revision now requires changes to proceed.Dec 30 2014, 12:46 PM
danoc added a subscriber: danoc.Apr 7 2015, 6:13 PM
danoc added a comment.Apr 7 2015, 6:15 PM

Anyone have an update on this? I'd love to use it in our project.

src/lint/linter/ArcanistSCSSLintLinter.php
13
danoc awarded a token.Apr 7 2015, 7:06 PM
joshuaspence commandeered this revision.EditedMay 24 2015, 11:58 AM
joshuaspence edited reviewers, added: remon; removed: joshuaspence.

Haven't heard back on this, so commandeering to fix it up a bit.

Rebase, general tidying

remon edited edge metadata.May 27 2015, 2:13 PM

Sorry for not responding! Is there something you need from me in the diff? I'll be happy to help!

epriestley requested changes to this revision.May 27 2015, 2:22 PM
epriestley edited edge metadata.
epriestley added inline comments.
src/lint/linter/ArcanistSCSSLintLinter.php
96

This has the same issue with severity structure discussed elsewhere. In particular, severity and severity.rules will be ignored in .arclint.

See discussion in D12034 for a specific example and how to resolve this issue. See D11657 for general discussion.

This revision now requires changes to proceed.May 27 2015, 2:22 PM
Dru89 added a subscriber: Dru89.Jul 9 2015, 3:57 PM

any updates on this?

Kwisatz added a subscriber: Kwisatz.Jan 2 2016, 5:48 PM
Korri added a subscriber: Korri.Apr 5 2016, 3:38 PM

Any plan on taking this issue over? Should I try? This would be pretty usefull for us :)

Is there any solutions for arclint & scss or is this still a valid issue?

@santanaviny

You could use a Script and Regex Linter with config like this:

"stylelint": {
      "type": "script-and-regex",
      "script-and-regex.script": "sh -c 'node ./node_modules/stylelint/bin/stylelint.js \"$0\"  || true'",
      "script-and-regex.regex": "/^(\\h+)(?P<line>\\d+):(?P<char>\\d+)(\\h+)(?P<error>✖)(\\h+)(?P<message>.*)(\\h{1,})(?P<code>.*)$/m",
      "include": "/local\\/assets\\/styles\\/.*\\.scss/i"
    }