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

Bug: Incorrect location for padded-blocks #4913

Closed
alberto opened this Issue Jan 10, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@alberto
Copy link
Member

commented Jan 10, 2016

Using master, the location of the error for closing padded block is wrong:

{

  a();
}

produces:

4:2 - Block must be padded by blank lines. (padded-blocks)

Column number should be 1

@eslintbot

This comment has been minimized.

Copy link

commented Jan 10, 2016

@alberto Thanks for the issue! If you're reporting a bug, please be sure to include:

  1. The version of ESLint you are using (run eslint -v)
  2. What you did (the source code and ESLint configuration)
  3. The actual ESLint output complete with numbers
  4. What you expected to happen instead

Requesting a new rule? Please see Proposing a New Rule for instructions.

@eslintbot eslintbot added the triage label Jan 10, 2016

@alberto alberto added bug rule evaluating and removed triage labels Jan 10, 2016

@ilyavolodin

This comment has been minimized.

Copy link
Member

commented Jan 11, 2016

Looks like a duplicate of #4896

@alberto

This comment has been minimized.

Copy link
Member Author

commented Jan 11, 2016

@ilyavolodin #4896 is about parse errors. This is about rule errors

@michaelficarra

This comment has been minimized.

Copy link
Member

commented Jan 11, 2016

Could still be a duplicate if column numbers in the parser are always off by one.

@alberto

This comment has been minimized.

Copy link
Member Author

commented Jan 11, 2016

This has to do with the rule using node.loc.end as the location of the report, while I think eslint uses exclusive ending notation (range is really [start, end))

alberto added a commit that referenced this issue Jan 12, 2016

@alberto alberto self-assigned this Jan 13, 2016

@nzakas nzakas closed this in 7f058f3 Jan 13, 2016

nzakas added a commit that referenced this issue Jan 13, 2016

Merge pull request #4930 from eslint/issue4913
Fix: Incorrect location for padded-blocks (fixes #4913)

@alberto alberto added accepted and removed evaluating labels Jan 14, 2016

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.