Drone Lint Checker Plugin

I was trying to find any good example of a lint checker plugin for Drone.

I have a need to lint check LUA code and was looking for a good example of a drone plugin or a way to tackle it.

Any potiners would be greatly appreciated.

Cheers!

Instead of a plugin, you might be able to just use a custom docker image:

pipeline:
  lint:
    image: mikeyyuen/luacheck
    commands:
    - luacheck

A plugin can be useful when you need to encapsulate complex logic and present a simplified configuration. I am not familiar with lua, but if I wanted to lint Go or JS code I would just download an image with the linter installed and use the commands section, as opposed to creating a plugin.

Thank you that is extremely helpful. I like that approach.

I will give that a try first and if not successful then look at the plugin route.

The image you proposed in the example is a little heavy as it is using Ubuntu. I did come across this file:

Which is lighter weight using Alpine and I will just combine the two.

Cheers.

plugins are just small wrappers around shell commands, so if the shell commands do not work, creating a plugin won’t change this. Plugins are just a way of packing stuff for re-use – under the hood plugins are just commands running in docker images.