Implement a Gradle task that reports Markdown style violations without modifying files, and add functional tests for the Gradle plugin using GradleRunner.
LintMarkdownTask scope
@CacheableTask abstract class LintMarkdownTask : DefaultTask()
@InputDirectory abstract val sourceDir: DirectoryProperty
- Configurable rules (each individually togglable):
- Violations reported as Gradle warnings with file + line number
- Task fails (throws
GradleException) if any violations are found and failOnViolation = true (default)
Functional tests scope
- Use
GradleRunner (Gradle TestKit) to exercise ProcessMarkdownTask, MergeMarkdownTask, and LintMarkdownTask against real project fixtures
- Tests live in
gradle-plugin/src/test/kotlin/
- At minimum: one happy-path test and one failure-mode test per task
Acceptance criteria
LintMarkdownTask reports violations with actionable messages
- Task fails build when violations found and
failOnViolation = true
- At least one
GradleRunner functional test passes for each task
Implement a Gradle task that reports Markdown style violations without modifying files, and add functional tests for the Gradle plugin using
GradleRunner.LintMarkdownTask scope
@CacheableTask abstract class LintMarkdownTask : DefaultTask()@InputDirectory abstract val sourceDir: DirectoryPropertyGradleException) if any violations are found andfailOnViolation = true(default)Functional tests scope
GradleRunner(Gradle TestKit) to exerciseProcessMarkdownTask,MergeMarkdownTask, andLintMarkdownTaskagainst real project fixturesgradle-plugin/src/test/kotlin/Acceptance criteria
LintMarkdownTaskreports violations with actionable messagesfailOnViolation = trueGradleRunnerfunctional test passes for each task