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

Fix empty lines rules #4260

Merged
merged 4 commits into from Sep 13, 2019
Merged

Fix empty lines rules #4260

merged 4 commits into from Sep 13, 2019

Conversation

vankop
Copy link
Member

@vankop vankop commented Sep 7, 2019

Which issue, if any, is this issue related to?

related to #4232 . Now there is no extra warnings.

fix:

  • function-max-empty-lines
  • selector-max-empty-lines
  • value-list-max-empty-lines

Is there anything in the PR that needs further explanation?

Only for value-list-max-empty-lines was test case with comments with exited max empty lines length, so only in the end of this work I realized that comments inside rule range are skipped =(
Also there is no info in README about it

If this behavior must be restored I can rework

report({
message: messages.expected(max),
node: decl,
index: placeIndexOnValueStart(decl) + node.sourceIndex,
Copy link
Member Author

Choose a reason for hiding this comment

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

so for function-max-empty-lines column will be set to start of the function

a { transform: translate() }
/*             ↑ */
/*  column will start here */            

report({
message: messages.expected(max),
node: rule,
index: 0,
Copy link
Member Author

Choose a reason for hiding this comment

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

for selector-max-empty-lines column set to start of selector

report({
message: messages.expected(max),
node: decl,
index: 0,
Copy link
Member Author

Choose a reason for hiding this comment

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

for value-list-max-empty-lines column set to start of the property

@hudochenkov
Copy link
Member

@vankop could you help summarize this PR in one sentence for commit message and changelog entry, please? :)

@vankop
Copy link
Member Author

vankop commented Sep 10, 2019

Rework *-max-empty-lines rules to create only one violation per function, selector, value list

@jeddy3
Copy link
Member

jeddy3 commented Sep 10, 2019

In Changelog parlance:

  • Fixed: *-max-empty-lines to only report one violation per function, selector, value list

@jeddy3 jeddy3 mentioned this pull request Sep 10, 2019
6 tasks
@hudochenkov hudochenkov merged commit 0858782 into master Sep 13, 2019
@hudochenkov hudochenkov deleted the fix-empty-lines-rules branch September 13, 2019 17:44
@hudochenkov
Copy link
Member

  • Fixed: *-max-empty-lines to only report one violation per function, selector, value list (#4260).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants