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

More comprehensive property sort order error messages #1157

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

rafw87
Copy link

@rafw87 rafw87 commented Oct 29, 2017

What do the changes you have made achieve?
This PR introduces new option for property-sort-order rule: display-mode: lines/blocks.
Display Mode"lines" (default) works as before. Display mode "blocks" tries to agregate wrongly sorted properties in longer blocks and displays one message per detected block instead of per single line. Message for block contains expected and actual order of properties in block.
There is naive algorithm used for block detection, may not support correctly some corner cases but in general should give better (or at least not worse) advices that original.

Are there any new warning messages?
Yes, introduces messages like:
"Expected order width, display, found display, width"
instead of
"Expected width, found display"
"Expected display, found width"
for detected blocks (single element blocks are reported as before).

Have you written tests?
Yes, single test in both scss and sass suites.

Have you included relevant documentation
Yes

Which issues does this resolve?
Closes #416

<DCO 1.1 Signed-off-by: Rafal Witczak [email protected]>

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 97.567% when pulling ae35621 on rafw87:property-sort-order-display-mode into cf93524 on sasstools:develop.

1 similar comment
@coveralls
Copy link

coveralls commented Oct 29, 2017

Coverage Status

Coverage decreased (-0.02%) to 97.567% when pulling ae35621 on rafw87:property-sort-order-display-mode into cf93524 on sasstools:develop.

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.

More comprehensive property sort order error messages
2 participants