markdown-lint icon indicating copy to clipboard operation
markdown-lint copied to clipboard

Feature Request: Publishing the analyzer as a standalone JAR

Open davidburstromspotify opened this issue 5 years ago • 6 comments

Hi!

Would you consider publishing the analyzer/processor as a standalone JAR, e.g. on Maven Central? That way the project topology would lend itself better to be included as a third party analyser, without the Gradle Plugin infrastructure attached to it.

davidburstromspotify avatar Sep 28 '20 16:09 davidburstromspotify

HI @davidburstromspotify, yes this is an excellent idea, and shouldn't be much work either.

mattmook avatar Oct 04 '20 23:10 mattmook

Are there any particular wrappers that you think we could include built-in support for?

mattmook avatar Oct 04 '20 23:10 mattmook

Well, the reason I'm asking is because I could use it for a tool that I'm working on, that's eventually going to be open sourced.

It could also make the linter available as an integration in IntelliJ/Eclipse/others.

davidburstromspotify avatar Oct 05 '20 07:10 davidburstromspotify

As a very quick workaround, so you are unblocked, you should be able to depend on the plugin as a jar already.

Add the gradle plugins repository to the parent build.gradle.kts:

subprojects {
    repositories {
        ...
        maven {
            setUrl("https://plugins.gradle.org/m2/")
        }
    }

Depend on the plugin:

implementation("gradle.plugin.com.appmattus:markdown:0.6.0")

Then, to execute, create an instance of RuleProcessor and call process with your required configuration. Take a look at MarkdownLint for the default values that the plugin uses.

mattmook avatar Oct 05 '20 10:10 mattmook

Thank you for your suggestion, I'll use that!

davidburstromspotify avatar Oct 05 '20 15:10 davidburstromspotify

In this spirit, also consider uploading com.appmatus.rules into Maven Central so that we can create custom rules.

hanggrian avatar Aug 18 '23 01:08 hanggrian