appmattus / markdown-lint

Linting for markdown files
Apache License 2.0
16 stars 3 forks source link

Feature Request: Publishing the analyzer as a standalone JAR #32

Open davidburstromspotify opened 4 years ago

davidburstromspotify commented 4 years ago

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.

mattmook commented 4 years ago

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

mattmook commented 4 years ago

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

davidburstromspotify commented 4 years ago

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.

mattmook commented 4 years ago

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.

davidburstromspotify commented 4 years ago

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

hanggrian commented 1 year ago

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