Skip to content

Commit d8ef2f7

Browse files
cleanup: Remove --snapshot-dir flag (#115)
1 parent d6c4fe6 commit d8ef2f7

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

packages/pyright-scip/src/MainCommand.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export interface IndexOptions {
55
projectName: string;
66
projectVersion: string;
77
projectNamespace?: string;
8-
snapshotDir: string;
98
environment?: string;
109
dev: boolean;
1110
output: string;
@@ -65,7 +64,6 @@ export function mainCommand(
6564
.option('--cwd <path>', 'working directory for executing scip-python', process.cwd())
6665
.option('--target-only <path>', 'limit analysis to the following path')
6766
.option('--output <path>', 'path to the output file', DEFAULT_OUTPUT_FILE)
68-
.option('--snapshot-dir <path>', 'the directory to output a snapshot of the SCIP dump')
6967
.option('--quiet', 'run without logging and status information', false)
7068
.option(
7169
'--show-progress-rate-limit <limit>',

packages/pyright-scip/src/main-impl.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ function indexAction(options: IndexOptions): void {
1717
}
1818

1919
const projectRoot = options.cwd;
20-
const snapshotDir = options.snapshotDir;
2120
const environment = options.environment;
2221

2322
const originalWorkdir = process.cwd();
@@ -51,25 +50,6 @@ function indexAction(options: IndexOptions): void {
5150

5251
fs.close(output);
5352

54-
if (snapshotDir) {
55-
sendStatus(`Writing snapshot from index: ${outputFile}`);
56-
57-
const scipIndex = scip.Index.deserializeBinary(fs.readFileSync(outputFile));
58-
for (const doc of scipIndex.documents) {
59-
if (doc.relative_path.startsWith('..')) {
60-
console.log('Skipping Doc:', doc.relative_path);
61-
continue;
62-
}
63-
64-
const inputPath = path.join(projectRoot, doc.relative_path);
65-
const input = Input.fromFile(inputPath);
66-
const obtained = formatSnapshot(input, doc, scipIndex.external_symbols);
67-
const relativeToInputDirectory = path.relative(projectRoot, inputPath);
68-
const outputPath = path.resolve(snapshotDir, relativeToInputDirectory);
69-
writeSnapshot(outputPath, obtained);
70-
}
71-
}
72-
7353
process.chdir(originalWorkdir);
7454
}
7555

0 commit comments

Comments
 (0)