Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Drop all configurations #33

Open
pablomayobre opened this issue May 7, 2017 · 5 comments
Open

Drop all configurations #33

pablomayobre opened this issue May 7, 2017 · 5 comments

Comments

@pablomayobre
Copy link
Contributor

Luacheck intends to provide a Global configuration file from the next release on (which will probably be released tomorrow) and with that there is no need to configure Atom itself.

This package should deprecate all the configurations soon and drop them entirely soon after that!

Maybe we can make an update once Luacheck releases the new version telling users that have a custom config of linter-luacheck, that they should update to the new Luacheck version since configuration will be removed in future releases of linter-luacheck

Then wait like a month and remove the configurations. What do you think @Arcanemagus ?

Configurations currently override the .luacheckrc file which is not nice at all! Global config is definetely a better option

@Arcanemagus
Copy link
Member

The problem I see with that is updates can take a long time to propagate around an ecosystem. I highly doubt all users of this package will be on the latest within a month without some serious prodding.

You could do something similar to this and once per Atom session send an info level notification saying "your luacheck version is out of date, please update to vX.Y.Z.".

After a while of running that I suppose it would be okay to drop the settings (other than the path to luacheck).

@pablomayobre
Copy link
Contributor Author

Yes! That was what I was proposing... This has it's own benefits, Luacheck is totally backwards compatible, and the supported Lua versions are always the same, but there have been several improvements to Luacheck since the last versions, pushing users to update to newer versions will be helpful for them too.

Also Luacheck now provides binary for Windows, and is easy to install in all systems, it shouldn't be a problem for users to run a command to update with LuaRocks, or download the latest binaries

@Arcanemagus
Copy link
Member

"Shouldn't be a problem" and users actually doing it are two entirely different things 😛.

There are still people reporting the deprecated style errors on linter months after an update was pushed out fixing it.

@pablomayobre
Copy link
Contributor Author

IF YOU ARE READING THIS PLEASE UPDATE YOUR LUACHECK VERSION! I IMPLORE YOU! 😭

First this is NOT a breaking change, you can still use linter-luacheck with older Luacheck versions, linter-luacheck will only deprecate the editor configuration (the one found in the settings), so in order to configure Luacheck you will actually need to provide a .luacheckrc file.

The reason for the deprecation is that CLI configurations should only be used if they are needed by the linter provider (for example if the provider needs specific formatting on stdout). CLI configurations are the ones with the highest priority, they override .luacheckrc files and the global configurations (they may even override inline configs)! So providing this configurations as part of the provider is actually bad behaviour.

If you want global configuration please update to newer versions of Luacheck. If you don't wanna update, you can provide the same configurations through a .luacheckrc file (This is also recommended, if you upload your code to Github other users will be able to provide PRs with appropriate formatting checked by Luacheck without further configuration on their part)

Now if someone asks for "The configuration I had for linter-luacheck dissapeared I want it back" point it to this post!

@pablomayobre
Copy link
Contributor Author

pablomayobre commented May 9, 2017

Luacheck 0.20.0 has been released, and with that Global configs, so I'll work on this the weekend!

I'll work on a local branch and submit a PR so you can review it before I actually push it, if that is fine with you @Arcanemagus

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

No branches or pull requests

2 participants