Open eleduardo opened 5 years ago
I like this idea, but it is most likely a major change to allow a plugin model for rules, which I'd like to think through first. I'm up for discussion here though on how you see this working.
Would definitely be interested in something like this
Sorry for the delay, in the following weeks and I can try a prototype so that we can discuss with code... My idea was to use the built in plugin support in go to create a linter rule that can load module based on configuration passed in the lint secion of the yaml file. In the config you could create an array of modules each pointing to the .so module and passing some common key value pairs... Each module just implements the same set of interfaces and structures that the regular linters do.
I can prototype this in the form a of PR and start the discussion from there.
The linting rules that the tool ships with are extremely powerful and very flexible. I have run into the need of adding a couple more rules but instead of contributing the rules themselves as features I was thinking if it would be better to provide a 'plugin' model where a set of pluggable modules can be added to the tool from the consumer side and via the configuration the tool just invokes those plugins.
If the team feels this could be a valuable contribution I could start working on it and send a PR where we could start the discussion.
For configuration something like this could work
lint: group: uber2 ignores: .... rules: ..... pluggable:
Any concerns with implementing something like this?