Single scan of the pull request

One-time scan on a specific pull request from the command line.


You can perform a one-time scan on a specific pull request using the single scan mode. LPVS should be compiled from the source code. Please refer to the detailed guideline.

Follow the next steps:

mvn clean install
cd target/
  • Choose a specific pull request from GitHub which is a target for the scan and run the command with flag --github.pull.request:
java -jar -Dgithub.token=<my-token> lpvs-*.jar --github.pull.request=<PR URL>

Example:

-jar -Dgithub.token=your_personal_token lpvs-*.jar --github.pull.request=https://github.com/Samsung/LPVS/pull/594

Note

By default, the above commands require a pre-configured MySQL database. Use the "singlescan" profile to skip setting up a pre-configured MySQL database:

java -jar -Dspring.profiles.active=singlescan -Dgithub.token=<my-token> lpvs-*.jar --github.pull.request=<PR URL>
  • Optionally, generate an HTML report and save it in a specified folder using flag --build.html.report, or PDF report using flag --build.pdf.report. Replace path/to/your/folder with the full path to the folder where you want to save the HTML/PDF report, and your_report_filename.html or your_report_filename.pdf with the desired filename for the report.
java -jar -Dspring.profiles.active=singlescan -Dgithub.token=<my-token> lpvs-*.jar --github.pull.request=<PR URL> --build.html.report=</path/to/your/folder/your_report_filename.html>
java -jar -Dspring.profiles.active=singlescan -Dgithub.token=<my-token> lpvs-*.jar --github.pull.request=<PR URL> --build.pdf.report=</path/to/your/folder/your_report_filename.pdf>
java -jar -Dspring.profiles.active=singlescan -Dgithub.token=<my-token> lpvs-*.jar --github.pull.request=<PR URL> --build.html.report=</path/to/your/folder/your_report_filename.html> --build.pdf.report=</path/to/your/folder/your_report_filename.pdf>

Warning

Ensure that the specified folder exists before generating the HTML report.

Examples of the command:

java -jar -Dspring.profiles.active=singlescan lpvs-*.jar --github.pull.request=https://github.com/Samsung/LPVS/pull/2
java -jar -Dspring.profiles.active=singlescan lpvs-*.jar --github.pull.request=https://github.com/Samsung/LPVS/pull/2 --build.html.report=report.html
java -jar -Dspring.profiles.active=singlescan lpvs-*.jar --github.pull.request=https://github.com/Samsung/LPVS/pull/2 --build.pdf.report=report.pdf
java -jar -Dspring.profiles.active=singlescan lpvs-*.jar --github.pull.request=https://github.com/Samsung/LPVS/pull/2 --build.html.report=report.html --build.pdf.report=report.pdf