JAVA
Linters
Linter | Additional |
---|---|
checkstyle JAVA_CHECKSTYLE |
|
pmd JAVA_PMD |
Linted files
- File extensions:
.java
Configuration in MegaLinter
Variable | Description | Default value |
---|---|---|
JAVA_PRE_COMMANDS | List of bash commands to run before the linters | None |
JAVA_POST_COMMANDS | List of bash commands to run after the linters | None |
JAVA_FILTER_REGEX_INCLUDE | Custom regex including filter | |
JAVA_FILTER_REGEX_EXCLUDE | Custom regex excluding filter |
Behind the scenes
Installation
- Dockerfile commands :
ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk
ENV PATH="$JAVA_HOME/bin:${PATH}"
- APK packages (Linux):