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

How to control message with position(1:1) #4

Closed
chinesedfan opened this issue Mar 25, 2019 · 5 comments · Fixed by #6
Closed

How to control message with position(1:1) #4

chinesedfan opened this issue Mar 25, 2019 · 5 comments · Fixed by #6
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem

Comments

@chinesedfan
Copy link

chinesedfan commented Mar 25, 2019

The current check logic requires the message position should be after the mark begin. It is reasonable in most cases.

But if a message belongs to the whole file, like missing license, we can't declare a mark more before than 1:1(line:column).

@wooorm
Copy link
Member

wooorm commented Mar 26, 2019

So first of all, I believe this message should in fact be about license, not the whole tree?

Otherwise: I think it makes sense!

@chinesedfan
Copy link
Author

@wooorm You referred to another line(#L20). My example is #L15. :)

@wooorm
Copy link
Member

wooorm commented Mar 29, 2019

@chinesedfan Yeah I know, but I just saw it anyway and wanted to mention it ;)

@chinesedfan
Copy link
Author

@wooorm OK, thanks for your finding and I will notify sindresorhus/awesome-lint. Let's back to this issue. Should this package consider messages that belong to the whole file? If yes, how can we control them?

@wooorm
Copy link
Member

wooorm commented Mar 29, 2019

Should this package consider messages that belong to the whole file?

Yep, I think sosee my earlier comment: “I think it makes sense!”

If yes, how can we control them?

It’s been a while since I’ve delved into this code! Maybe we can change

/* We only ignore messages if they‘re disabled,
* *not* when they’re not in the document. */
if (!message.line) {
message.line = 1
}
if (!message.column) {
message.column = 1
}
. We’ll have to investigate how this affects the ecosystem tho 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging a pull request may close this issue.

2 participants