Merge pull request #689 from yiliang114/main

fix: typos
This commit is contained in:
Dirk Bäumer
2022-08-24 12:14:48 +02:00
committed by GitHub
4 changed files with 8 additions and 8 deletions

View File

@ -136,7 +136,7 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
const diagnostics: Diagnostic[] = [];
while ((m = pattern.exec(text)) && problems < settings.maxNumberOfProblems) {
problems++;
const diagnosic: Diagnostic = {
const diagnostic: Diagnostic = {
severity: DiagnosticSeverity.Warning,
range: {
start: textDocument.positionAt(m.index),
@ -146,24 +146,24 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
source: 'ex'
};
if (hasDiagnosticRelatedInformationCapability) {
diagnosic.relatedInformation = [
diagnostic.relatedInformation = [
{
location: {
uri: textDocument.uri,
range: Object.assign({}, diagnosic.range)
range: Object.assign({}, diagnostic.range)
},
message: 'Spelling matters'
},
{
location: {
uri: textDocument.uri,
range: Object.assign({}, diagnosic.range)
range: Object.assign({}, diagnostic.range)
},
message: 'Particularly for names'
}
];
}
diagnostics.push(diagnosic);
diagnostics.push(diagnostic);
}
// Send the computed diagnostics to VSCode.

View File

@ -15,7 +15,7 @@ export function activate(context: ExtensionContext) {
/*
* all except the code to create the language client in not browser specific
* and couuld be shared with a regular (Node) extension
* and could be shared with a regular (Node) extension
*/
const documentSelector = [{ language: 'plaintext' }];

View File

@ -21,7 +21,7 @@ const connection = createConnection(messageReader, messageWriter);
connection.onInitialize((params: InitializeParams): InitializeResult => {
const capabilities: ServerCapabilities = {
colorProvider: {} // provide a color providr
colorProvider: {} // provide a color provider
};
return { capabilities };
});

View File

@ -8,7 +8,7 @@ export async function activate(context: vscode.ExtensionContext) {
const runHandler = (request: vscode.TestRunRequest, cancellation: vscode.CancellationToken) => {
const queue: { test: vscode.TestItem; data: TestCase }[] = [];
const run = ctrl.createTestRun(request);
// map of file uris to statments on each line:
// map of file uris to statements on each line:
const coveredLines = new Map</* file uri */ string, (vscode.StatementCoverage | undefined)[]>();
const discoverTests = async (tests: Iterable<vscode.TestItem>) => {