Implementation of the spotless tool to lint and format the code and a pre-commit hook to execute a spotlessCheck automatically.
[!IMPORTANT]
The pre-commit hook is applied to our local .git dir on the first run of the ./gradlew build command.
This PR also includes the generation of a root Gradle project to handle generic processes for the plugins avoiding code duplication, for now it only handles the spotless actions.
The formatting options included in this spotless implementations are:
License header validation
Google Java format conventions
Remove unused imports
Order imports following the Wazuh-indexer format
Trim trailing whitespaces
Add new lines at EOF
All these format options can be applied by running ./gradlew spotlessApply from the project's root directory.
Description
Implementation of the spotless tool to lint and format the code and a pre-commit hook to execute a
spotlessCheck
automatically.This PR also includes the generation of a root Gradle project to handle generic processes for the plugins avoiding code duplication, for now it only handles the spotless actions.
The formatting options included in this spotless implementations are:
All these format options can be applied by running
./gradlew spotlessApply
from the project's root directory.Issues Resolved