Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
workspaceFolder: Resource,
private readonly interpreterAutoSelectionService: IInterpreterAutoSeletionProxyService,
workspace?: IWorkspaceService) {
this.workspace = workspace || new WorkspaceService();
this.workspaceRoot = workspaceFolder ? workspaceFolder : Uri.file(__dirname);
this.initialize();
}
// tslint:disable-next-line:function-name
function openFolder(folderPath: string) {
let uri = Uri.file(folderPath);
commands.executeCommand('vscode.openFolder', uri);
}
.forEach(mat => {
const property = mat[2] || mat[3] || prop
let pos = getPositionFromIndex(content, mat.index + mat[0].indexOf(property))
let endPos = new Position(pos.line, pos.character + property.length)
locs.push({
loc: new Location(Uri.file(file), new Range(pos, endPos)),
name: property,
detail: mat[1] || mat[0],
})
})
return locs
show(filePath: string) {
const config = workspace.getConfiguration("files", Uri.file(filePath));
const encoding = config.get("encoding");
return this.repository.show(filePath, { encoding });
}
}