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:
--lang
Language name defined in config/nitron.json--remote
Repository to analyze
- Args:
- Database file named
cache.db
to 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=master
ormain
) Branch to analyze--start-date dd:mm:yyyy
--end-date dd:mm:yyyy
(optional) filter commits by date
- Args:
- Database file named
cache.db
to save parsetrees
- Database file named
- Usage:
preparse-fetch --branch master --start-date 01:01:2012 cache.db
for detail: FetchCommand.kt
- Command:
preparse
- Options:
--repository
Repository 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.db
to save parsetrees
- Database file named
- Usage:
preparse --repository https://github.com/githubtraining/hellogitworld cache.db
for detail: ParseCommand.kt