A multilingual code normalizer application/library.
- Java 11 or later
- srcML (optional)
nitron is distributed through JitPack
implementation 'com.github.Durun:nitron:version'nitron as a library Guide (Japanese)
-
Clone this repository
*Don't forget '--recursive' option.
git clone --recursive https://github.com/Durun/nitron.git -
Prepare JAR file
- Build manually as
gradlew shadowJar - Or download JAR file here
- Build manually as
-
Place the config files
Copy config directory into the same directory with
nitron.jar. As belowWorkingDir/ ├ config/ └ nitron.jar -
Run the JAR file
Run
java -jar nitron.jar [COMMAND] [OPTIONS] [ARGS]on JVM 11 or higher
- Command:
preparse-register - Options:
--langLanguage name defined in config/nitron.json--remoteRepository to analyze
- Args:
- Database file named
cache.dbto save parsetrees
- Database file named
- Usage:
preparse-register --lang java --remote https://github.com/githubtraining/hellogitworld cache.db
for detail: RegisterCommand.kt
- Command:
preparse-fetch - Options:
--dir(optional: default=tmp) Working directory to clone the repository--branch(optional: default=masterormain) Branch to analyze--start-date dd:mm:yyyy--end-date dd:mm:yyyy(optional) filter commits by date
- Args:
- Database file named
cache.dbto save parsetrees
- Database file named
- Usage:
preparse-fetch --branch master --start-date 01:01:2012 cache.db
for detail: FetchCommand.kt
- Command:
preparse - Options:
--repositoryRepository URL to analyze--dir(optional: default=tmp) Working directory to clone the repository--start-date dd:mm:yyyy--end-date dd:mm:yyyy(optional) filter commits by date
- Args:
- Database file named
cache.dbto save parsetrees
- Database file named
- Usage:
preparse --repository https://github.com/githubtraining/hellogitworld cache.db
for detail: ParseCommand.kt