Validates a csv file and reports an error message if it is not a valid solution for a 9x9 Sudoku game.
In case the validation is successful it exits with zero, otherwise it exits with one and shows an error on the console.
The filename parameter must be provided with an absolute path or a path relative to the destination folder of the installation.
Linux/Mac
./validate <filename>
Windows
./validate.bat <filename>
Prerequisite: Java SE 11 (LTS)
Clone this repository, go to its location in a terminal and execute:
./gradlew build
Build the project and locate the distro files at the subfolder validate/build/distributions
Unpack the distributed package into any destination folder.
- Linux or Mac: use the command
tar xvf validate.tar - Windows: right-click the
validate.zipfile and click Extract All.
- LinkageError: - this may happen when you build the project but execute the distribution with a different java versoin. Make sure that your JAVA_HOME and PATH is configured properly.
- File does not exists.: - the input file can be provided either with path relative to the current directory or with an absolute path. If the directory name contains a whitespace, put the whole expression between double-quotes.
- Sudoku on Wikipedia
- Gradle - build tool
- JUnit Jupiter - unit testing
- PMD - static source code analyzer
- JaCoCo plugin - java code coverage
- System Rules - for testing exit code