xojs / SublimeLinter-contrib-xo

SublimeLinter plugin for XO
https://github.com/xojs/xo
MIT License
55 stars 7 forks source link

Using logging instead of plain `print()` #23

Closed LuKks closed 3 years ago

LuKks commented 3 years ago

Thanks to @kaste https://github.com/xojs/SublimeLinter-contrib-xo/issues/22#issuecomment-725427876.

Fixes #22

kaste commented 3 years ago

This doesn't work as print and info/warning have different func signatures. You didn't test, did you?

LuKks commented 3 years ago

Before the pull request I did a simple test with the debug preference disabled and enabled: image

What is wrong exactly?

kaste commented 3 years ago

Hm, it should not just print the second argument. The first arg is either an already formatted string or a Template string with some %s in it iirc.

The screenshot also indicates this as Python logs some usage warnings here.

LuKks commented 3 years ago

Ooh, in that moment I saw some warnings, etc but I didn't pay attention to it, I assumed it wasn't from this plugin. Thank you, now I get it that it uses formatting. image

LuKks commented 3 years ago

Oh, there is a commit "using single quotes" that is not strictly related to this issue, a long time ago I read you when someone did a unrelated change so I know that doing unrelated changes it's wrong. Should I revert it and make a separated pull request or it's just ok?

sindresorhus commented 3 years ago

No, it's fine.