Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ mvn exec:java -pl liquidjava-verifier -Dexec.mainClass="liquidjava.api.CommandLi

If you're on Linux/macOS, you can use the `liquidjava` script (from the repository root) to simplify the process.

The LiquidJava verifier can be run from the command line with the following options:

| Option | Description |
| --- | --- |
| `<...paths>` | Paths (files or directories) to be verified by LiquidJava |
| `-h`, `--help` | Show the help message with available options |
| `-v`, `--version` | Show the current version of the verifier |
| `-d`, `--debug` | Enable debug logging and skip expression simplification for troubleshooting |
| `-lsp`, `--language-server` | Enable language server mode for editor support |

**Test a correct case**:
```bash
./liquidjava liquidjava-example/src/main/java/testSuite/CorrectSimpleAssignment.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public class CommandLineArgs {
@Option(names = { "-d", "--debug" }, description = "Enable debug mode for more detailed output")
public boolean debugMode;

@Option(names = { "-lsp", "--language-server" }, description = "Enable language server mode for editor support")
public boolean lspMode;

@Parameters(arity = "1..*", paramLabel = "<...paths>", description = "Paths to be verified by LiquidJava")
public List<String> paths;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.Map;
import java.util.Set;

import liquidjava.api.CommandLineLauncher;
import liquidjava.utils.Utils;
import spoon.reflect.cu.SourcePosition;
import spoon.reflect.declaration.CtElement;
Expand Down Expand Up @@ -44,6 +45,9 @@ public void clearHistory() {
}

public void saveContext(CtElement element, Context context) {
if (!CommandLineLauncher.cmdArgs.lspMode)
return;

String file = Utils.getFile(element);
if (file == null)
return;
Expand Down
Loading