-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate how to create a megalinter plugin #30
Comments
Great idea :) |
@nvuillam feel free to help :-) PR very welcome as well ;-) |
@Ellerbach it is basically one YML descriptor file with some info about how to call our linter, + one (optional but recommended) README :) Example:
Another even more simple example: https://github.com/kpj/jupyfmt/blob/master/mega-linter-plugin-jupyfmt/jupyfmt.megalinter-descriptor.yml Much easier to write for people with the knowledge about the linters, so with my current backlog I'm afraid the PR won't come from me ^^ |
Thanks, we'll definitely look at this. We'll ping you here/open issue if we have questions. |
Hey @nvuillam :) I have a few Q? :)
|
@DariuszPorowski glad to (again) see you onboard :) Like any other plugin , using PLUGINS property :) -> https://megalinter.io/beta/plugins/#use-external-plugins With secured variables, it's not passed anymore -> https://megalinter.io/beta/configuration/#environment-variables-security No debian/ubuntu, as it just runs the command on MegaLinter alpine-based image before running the linters :) |
@nvuillam will look at vars, but Q around flavor was because I created the configuration exactly in that matter, but when I use docs flavor, it shows me no litter found. And it's not error from the litter container but ML config :D on full image all is good |
There was a bug using plugins with flavors, but i think we solved it, did you try with beta version? |
And one more, pulling GH action with ML takes 2-3 mins each time. Have you explored any options to cache it inside gh actions? |
Nop, the latest stable one. Will try with beta. :) |
I think @Kurt-von-Laven tried it... me not personally yet ^^ If you have a simple recipe i'm all ears :) |
Yes, we created ScribeMD/docker-cache for this purpose. If you need still better performance, one could also add an argument to mega-linter-runner so that it pulls from ghcr.io by default in v7 but can still pull from Docker Hub. |
@Kurt-von-Laven will try, thanks! |
@Kurt-von-Laven @nvuillam tested, ScribeMD/docker-cache works, does the job, had to switch from official ml action to npx mega-linter-runner, but it looks like restore from cache is longer than pulling each time. pulling takes on avg ~35s, restoring from cache ~50s (documentation flavor). So probably for bigger images like full megalinter makes sens :) |
Shoot. docker-cache does have some overhead, because it has to extract and load the image from the cache rather than pull layers directly. I am glad you measured! Your best bet is probably to switch mega-linter-runner to use ghcr.io instead of Docker Hub then since that will get you the best pull times. Which runner did you test on for my awareness? |
@Kurt-von-Laven used ubuntu-latest, will try with ghcr.io, and let you know :) |
See https://megalinter.io/latest/plugins/
Megalinter allows to create plugin. This can be a nice and convenient way to get the tools integrated in a larger linter infrastructure.
The text was updated successfully, but these errors were encountered: