Skip to content

Commit fa35ed5

Browse files
cli: Add lint subcommand. (#92)
1 parent 4d888ce commit fa35ed5

File tree

6 files changed

+666
-7
lines changed

6 files changed

+666
-7
lines changed

Development.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ and can be inspected using `protoc`:
5050
protoc --decode=scip.Index -I /path/to/scip scip.proto < index.scip
5151
```
5252

53+
There is also a `lint` subcommand which performs various well-formedness
54+
checks on a SCIP index. It is meant primarily for people working on a SCIP indexer,
55+
and is not recommended for use in other settings.
56+
57+
```
58+
scip lint /path/to/index.scip
59+
```
60+
5361
## Testing and adding new SCIP semantics
5462

5563
It is helpful to use reprolang to check the existing code navigation behavior,

Readme.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ DESCRIPTION:
7070
7171
COMMANDS:
7272
convert Convert a SCIP index to an LSIF index
73+
lint Flag potential issues with a SCIP index
74+
print Print a SCIP index in a human-readable format for debugging
7375
snapshot Generate snapshot files for golden testing
7476
stats Output useful statistics about a SCIP index
75-
print Print a SCIP index in a human-readable format for debugging
7677
help, h Shows a list of commands or help for one command
7778
7879
GLOBAL OPTIONS:
@@ -94,6 +95,27 @@ OPTIONS:
9495
--to value Output path for LSIF index (default: dump.lsif)
9596
```
9697

98+
### `scip lint`
99+
100+
```
101+
NAME:
102+
scip lint - Flag potential issues with a SCIP index
103+
104+
USAGE:
105+
scip lint [command options] [arguments...]
106+
107+
DESCRIPTION:
108+
Example usage:
109+
110+
scip lint /path/to/index.scip
111+
112+
You may want to filter the output using `grep -v <pattern>`
113+
to narrow down on certain classes of errors.
114+
115+
OPTIONS:
116+
--help, -h show help (default: false)
117+
```
118+
97119
### `scip print`
98120

99121
```

0 commit comments

Comments
 (0)