Skip to content
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 a style guide for writing new specs #1363

Merged
merged 5 commits into from
Apr 17, 2019
Merged

Add a style guide for writing new specs #1363

merged 5 commits into from
Apr 17, 2019

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Mar 20, 2019

I've tried to capture the best practices I've come up with while
writing tests in the HRX format, mixed with best practices from other
testing traditions and a few rules that mostly serve to just establish
a consistent style.

I've tried to capture the best practices I've come up with while
writing tests in the HRX format, mixed with best practices from other
testing traditions and a few rules that mostly serve to just establish
a consistent style.
Copy link

@nshahan nshahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great resource. Looking forward to someone updating the older tests. 😃

STYLE_GUIDE.md Outdated Show resolved Hide resolved
STYLE_GUIDE.md Outdated Show resolved Hide resolved
STYLE_GUIDE.md Outdated Show resolved Hide resolved
STYLE_GUIDE.md Outdated Show resolved Hide resolved
STYLE_GUIDE.md Outdated Show resolved Hide resolved
STYLE_GUIDE.md Outdated Show resolved Hide resolved
@nex3
Copy link
Contributor Author

nex3 commented Apr 4, 2019

@xzyfer @nschonni ping!

STYLE_GUIDE.md Show resolved Hide resolved
STYLE_GUIDE.md Show resolved Hide resolved

[implementation-specific expectations]: README.md#implementation-specific-expectations

### DO use Dart Sass's output as the default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this also apply to errors? Currently, dart-sass errors are sometimes inferior to ruby and libsass, e.g.:

libsass and ruby:

Invalid CSS after "... (foo: bar) or ": expected @supports condition (e.g. (display: flexbox)), was "{"

dart-sass:

expected "("

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This isn't about saying which errors are best, it's just about being consistent in formatting. If any implementation's errors need improvement, that's something that should be handled on that implementation's issue tracker, not by swapping output positions in the specs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If error is not what we want the canonical error message to look like, but is merely the current error message of dart-sass, perhaps all errors should be language-specific?

I.e. no error, only error-dart-sass and error-libsass.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that could be a reasonable approach. Let's discuss it on a separate issue, though; until the infrastructure supports it, I'd like to keep this as the recommended approach.

STYLE_GUIDE.md Show resolved Hide resolved
@nex3 nex3 requested review from nshahan, glebm and nschonni April 5, 2019 22:04
@nex3
Copy link
Contributor Author

nex3 commented Apr 8, 2019

@xzyfer @nschonni I'd still really value your feedback on this!

@nex3
Copy link
Contributor Author

nex3 commented Apr 17, 2019

Looks like @xzyfer and @nschonni aren't available right now, so I'm going to go ahead and merge this. Feel free to file issues for after-the-fact feedback.

@nex3 nex3 merged commit 9a6371c into master Apr 17, 2019
@nex3 nex3 deleted the style-guide branch April 17, 2019 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants