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

Both line and column values should be one-based numerics #1

Open
Yeti-or opened this issue Nov 3, 2016 · 2 comments · May be fixed by #3
Open

Both line and column values should be one-based numerics #1

Yeti-or opened this issue Nov 3, 2016 · 2 comments · May be fixed by #3

Comments

@Yeti-or
Copy link

Yeti-or commented Nov 3, 2016

using example from docs:

node tmp.js
Hello world! at /Users/yeti-or/Projects/Y/BEM/deps-formatter/tmp.js:3:12 :
     2 | const fs = require('fs');
     3 |
     4 | console.log(new Warnie('Hello world!', __filename, 3, 12)
--------------------^
     5 |     .explain(fs.readFileSync(__filename, 'utf-8').split('\n')));
     6 |

line is 3 but arrow is on line 4

@Yeti-or
Copy link
Author

Yeti-or commented Nov 3, 2016

Because it is really counterintuitive.
Maybe it could be an option?

@qfox
Copy link
Contributor

qfox commented Nov 3, 2016

Lines are zero-based but columns are one-based atm.
Guess we should fix this.

@qfox qfox changed the title Incorect line number Both line numbers and column numbers should be one-based Nov 3, 2016
@qfox qfox changed the title Both line numbers and column numbers should be one-based Both line and column values should be one-based numerics Nov 3, 2016
@Yeti-or Yeti-or linked a pull request Nov 4, 2016 that will close this issue
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 a pull request may close this issue.

2 participants