File tree Expand file tree Collapse file tree
liquidjava-verifier/src/main/java/liquidjava Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,6 +85,16 @@ mvn exec:java -pl liquidjava-verifier -Dexec.mainClass="liquidjava.api.CommandLi
8585If you're on Linux/macOS, you can use the ` liquidjava ` script (from the repository root) to simplify the process.
8686The script recompiles the verifier only when local sources or Maven files have changed.
8787
88+ The LiquidJava verifier can be run from the command line with the following options:
89+
90+ | Option | Description |
91+ | --- | --- |
92+ | ` <...paths> ` | Paths (files or directories) to be verified by LiquidJava |
93+ | ` -h ` , ` --help ` | Show the help message with available options |
94+ | ` -v ` , ` --version ` | Show the current version of the verifier |
95+ | ` -d ` , ` --debug ` | Enable debug logging and skip expression simplification for troubleshooting |
96+ | ` -lsp ` , ` --language-server ` | Enable language server mode for editor support |
97+
8898** Test a correct case** :
8999``` bash
90100./liquidjava liquidjava-example/src/main/java/testSuite/CorrectSimpleAssignment.java
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ public class CommandLineArgs {
2222 @ Option (names = { "-d" , "--debug" }, description = "Enable debug mode for more detailed output" )
2323 public boolean debugMode ;
2424
25+ @ Option (names = { "-lsp" , "--language-server" }, description = "Enable language server mode for editor support" )
26+ public boolean lspMode ;
27+
2528 @ Parameters (arity = "1..*" , paramLabel = "<...paths>" , description = "Paths to be verified by LiquidJava" )
2629 public List <String > paths ;
2730
Original file line number Diff line number Diff line change 55import java .util .Map ;
66import java .util .Set ;
77
8+ import liquidjava .api .CommandLineLauncher ;
89import liquidjava .utils .Utils ;
910import spoon .reflect .cu .SourcePosition ;
1011import spoon .reflect .declaration .CtElement ;
@@ -44,6 +45,9 @@ public void clearHistory() {
4445 }
4546
4647 public void saveContext (CtElement element , Context context ) {
48+ if (!CommandLineLauncher .cmdArgs .lspMode )
49+ return ;
50+
4751 String file = Utils .getFile (element );
4852 if (file == null )
4953 return ;
You can’t perform that action at this time.
0 commit comments