Closed jaycenhorton closed 6 years ago
@jaycenhorton Are you currently using Solium as a command-line utility or as part of a text editor / IDE?
If as part of an editor, then the editor's solium integration is responsible for invoking solium's --fix
every time a user saves. In that case, this issue needs to be raised with that integration's developers.
Or is there some other way you're thinking about this?
Currently, I'm using it as both. I run --fix
before pushing to github, and I use the solidity vscode plugin which is also relying on solium.
I suppose I brought up this issue as more of a feature request/discussion. But it seems if there is no active development on the IDE side, I would assume this would be best opened on that repo?
This feature is not possible inside the linter itself due to the nature of the application - it is a cli tool (a long-running background process could monitor your code and run fix automatically, but a cli tool needs to be invoked).
In IDEs, the plugin providing Solium's services is what should be monitoring code for changes and running --fix.
For your CLI use case, I think you can automate --fix
using Git's Pre-commit hook.
Thanks @duaraghav8 I'll close this here and perhaps link back where appropriate
Let me know in case you have any other issues
It would be fantastic if solium allowed a user option that automatically runs
--fix
whenever the user saves. Ideally this would be consumable in the same way as Prettier