Thanks to visit codestin.com
Credit goes to github.com

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
3 changes: 3 additions & 0 deletions kythe/typescript/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2755,6 +2755,9 @@ export function index(compilationUnit: CompilationUnit, options: IndexingOptions
try {
plugin.index(indexingContext);
} catch (err) {
if (indexingContext.options.failAnalysisOnPluginError) {
throw err;
}
console.error(`Plugin ${plugin.name} errored:`, err);
}
}
Expand Down
13 changes: 6 additions & 7 deletions kythe/typescript/plugin_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,17 @@ export interface IndexingOptions {
*/
readFile?: (path: string) => Buffer;

/**
* When enabled emits 0-0 spans at the beginning of each file that represent
* current module. By default 0-1 spans are emitted. Also this flag changes it
* to emit `defines/implicit` edges instead of `defines/binding`.
*/
emitZeroWidthSpansForModuleNodes?: boolean;

/**
* When enabled, ref/call source anchors span identifiers instead of full
* call expressions when possible.
*/
emitRefCallOverIdentifier?: boolean;

/**
* When enabled any error thrown from any plugin gets propagated to the caller.
* Currently errors from plugins are logged without interrupting analysis.
*/
failAnalysisOnPluginError?: boolean;
}


Expand Down