-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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 SCSS configuration for Hound #17769
Conversation
CC: @twbs/team |
I'm in favor. Been using it on Primer and haven't had much issue with it. |
@croaky Am I correct in assuming that Hound only lints changed files? My point being that if something failing lint gets pushed directly to master, we'd never find out about it via Hound? If yes, then I'm opposed to removing the scsslint task from the Gruntfile. But in either case, I'm +1 on enabling Hound. |
Yup, that's correct. If you're interested, the security doc goes into excruciating detail of the what happens but the gist is it runs on the full file contents of non-deleted files in the pull request.
Yup, also correct. Hound only operates on GitHub webhook events for opening a pull request, and pushing follow-on commits to the pull request.
Sounds good. Want me to revert that deletion? |
Yes please. |
This change uses Bootstrap's existing `scss/.scss-lint.yml` file to configure Hound's hosted SCSS-Lint instance. On each pull request to Bootstrap, Hound will comment on any SCSS style violations in-line, like this: ![screenshot](https://images.thoughtbot.com/hound/scss-example.png) If you update the pull request to adopt a suggestion, the comment will be hidden. It leaves the existing linting done by Grunt + Travis. Hound is free for open source projects and is open source itself: https://github.com/thoughtbot/hound
Cool, updated. Since the existing Grunt + Travis lines are now back, I removed the Since Hound can only be enabled for the whole repo, I think we'll want a separate set of config branched off master: https://github.com/twbs/bootstrap/compare/twbs:master...croaky:hound-master?expand=1 I can open that PR if that plan works for you. To avoid JSHint / SCSS-Lint surprises, both PRs (one branched off master, one off v4-dev) should be merged before an admin on this repo enables Hound at https://houndci.com. |
SGTM. Open it. |
Merged to |
Add SCSS configuration for Hound
...And now activated on houndci.com |
Per #17997 (comment) ; thanks @vsn4ik ! Refs #17769 /fyi @croaky [ci skip]
Per #17997 (comment) ; thanks @vsn4ik ! Refs #17769 /fyi @croaky [ci skip]
Per twbs#17997 (comment) ; thanks @vsn4ik ! Refs twbs#17769 /fyi @croaky [ci skip]
What
This change uses Bootstrap's existing
scss/.scss-lint.yml
file to configure Hound's hosted SCSS-Lint instance.It leaves existing JavaScript linting as-is because Hound does not support ESLint or JSCS yet. It does support JSHint for the master branch, but I decided to focus just on v4 for this change.
How it works
On each pull request to Bootstrap, Hound will comment on any SCSS style violations in-line, like this:
If you update the pull request to adopt a suggestion, the comment will be hidden.
The same checks are maintained on pull requests. Instead of output such as this in Travis...
... it will be an in-line comment from Hound.
Hound is free for open source projects and is open source itself, like Travis: https://github.com/thoughtbot/hound
Why
The advantages for the Bootstrap project might be:
grunt test
to run all lint checks.jekyll:docs
could be removed from the build, Ruby would not need to be installed on TravisCI.fail_on_violations: true
setting, but if SCSS-Lint has false positives or false negatives, you can change the setting tofalse
to treat its comments more as suggestions than a binary outcome that should fail the build. https://houndci.com/configuration#configuration