Open Ellerbach opened 1 year ago
Great idea :) If you need support, don't hesitate to ask in the repo issues :)
@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? :)
RUN
is possible but it looks like only alpine setup is supported, or I missed something?@DariuszPorowski glad to (again) see you onboard :)
Like any other plugin , using PLUGINS property :) -> https://megalinter.io/beta/plugins/#use-external-plugins If docfx is dotnet based as I suspect, you should better use dotnet flavor to avoid to time required to install dotnet on documentation flavor ^^ ( example here -> https://megalinter.io/beta/descriptors/csharp_csharpier/#installation-on-mega-linter-docker-image )
With secured variables, it's not passed anymore -> https://megalinter.io/beta/configuration/#environment-variables-security I could create a SECURED_VARIABLES_ALLOWED=GITHUB_TOKEN , or even linter_name_SECURED_VARIABLES_ALLOWED=GITHUB_TOKEN Meanwhile you can override SECURED_ENV_VARIABLES_DEFAULT !
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?
There was a bug using plugins with flavors, but i think we solved it, did you try with beta version?
Nop, the latest stable one. Will try with beta. :)
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?
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.