Open khalilou88 opened 9 months ago
1- Create a lib for checkstyle linting: build-tools-checkstyle
2- add maven-checkstyle-plugin
to root pom.xml
3- add target config to nx.json
"maven-checkstyle-lint": {
"cache": true,
"dependsOn": [
{
"projects": ["build-tools-checkstyle"],
"target": "build"
}
]
}
4- add target to project.json
"maven-checkstyle-lint": {
"executor": "@jnxplus/nx-maven:run-task",
"options": {
"task": "checkstyle:check"
}
}
code is here https://github.com/khalilou88/jnxplus-examples
To use linters, jnxplus plugins downland jars from checkstyle and ktlint from github releases. I thought this technique was stable but we still receive issues.
I want to try the following technique and see if it's fit nx monorepo:
https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
To lint a project, we can use run-task from jnxplus.