Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/languageservice/jsonLanguageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export interface SchemaConfiguration {
*/
schema?: JSONSchema;
/**
* A parent folder for folder specifc associations. An association that has a folder URI set is only used
* A parent folder for folder specific associations. An association that has a folder URI set is only used
* if the document that is validated has the folderUri as parent
*/
folderUri?: string;
Expand Down Expand Up @@ -392,7 +392,7 @@ export interface DocumentSymbolsContext {
}
export interface ColorInformationContext {
/**
* The maximal number of color informations returned.
* The maximal number of color information entries returned.
*/
resultLimit?: number;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/languageservice/services/yamlCompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ export class YamlCompletion {
return index > 0 && value.substring(index, value.length).trim().length === 0;
};
if (containsNewLineAfterColon(existingText) || containsNewLineAfterColon(addingText)) {
//if the exisiting object null one then replace with the non-null object
//if the existing object null one then replace with the non-null object
if (oneOfSchema && isNullObject(existingText) && !isNullObject(addingText) && !startWithNewLine(addingText)) {
return addingText;
}
Expand Down
2 changes: 1 addition & 1 deletion src/languageservice/services/yamlSchemaService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ export class YAMLSchemaService implements IJSONSchemaService {

let toValidate = node;
if (hasNestedSchema) {
// clone for meta-validation: stop at dialect boundaries abd replace with {}
// clone for meta-validation: stop at dialect boundaries and replace with {}
const stopAtDialectBoundary = (val: JSONSchema, seenSize: number): JSONSchema | undefined => {
if (seenSize !== 0 && val && typeof val === 'object' && val.$schema) return {};
return undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/languageservice/services/yamlValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class YAMLValidation {
const duplicateMessagesRemoved: Diagnostic[] = [];
for (let err of validationResult) {
/**
* A patch ontop of the validation that removes the
* A patch on top of the validation that removes the
* 'Matches many schemas' error for kubernetes
* for a better user experience.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/languageservice/utils/block-string-rewriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ export class BlockStringRewriter {
// so do not increment i
continue;
} else {
// It's unconvertable, give up
// It's unconvertible, give up
// Explanation:
// If the line of text is only whitespace and it's more whitespace than the expected indentation,
// then it's joined with the previous line with a real newline instead of a space.
// This means an extra newline gets inserted if we change nothing.
// We can avoid this if the preceeding text is a newline,
// because we can just remove the preceeding newline to compensate,
// We can avoid this if the preceding text is a newline,
// because we can just remove the preceding newline to compensate,
// but if it's not we are SOL
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions src/languageservice/utils/textBuffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class TextBuffer {
return this.doc.getText(range);
}

getPosition(offest: number): Position {
return this.doc.positionAt(offest);
getPosition(offset: number): Position {
return this.doc.positionAt(offset);
}
}
4 changes: 2 additions & 2 deletions test/autoCompletion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2756,7 +2756,7 @@ describe('Auto Completion Tests', () => {
assert.equal(result.items[0].insertText, ' obj1:\n ');
});

it('Simple array object completion without "-" befor array empty item', async () => {
it('Simple array object completion without "-" before array empty item', async () => {
// eslint-disable-next-line @typescript-eslint/no-require-imports
const schema = require(path.join(__dirname, './fixtures/testArrayCompletionSchema.json'));
schemaProvider.addSchema(SCHEMA_ID, schema);
Expand Down Expand Up @@ -3012,7 +3012,7 @@ describe('Auto Completion Tests', () => {
createExpectedCompletion('options', 'options:\n description: ', 0, 2, 0, 2, 10, 2, { documentation: '' })
);
});
it('Should not agregate suggested text from different schemas', async () => {
it('Should not aggregate suggested text from different schemas', async () => {
const schema = {
definitions: { obj1, obj2 },
anyOf: [
Expand Down
2 changes: 1 addition & 1 deletion test/hover.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe('Hover Tests', () => {
);
});

it('Hover does not show results when there isnt description field', async () => {
it('Hover does not show results when there is no description field', async () => {
schemaProvider.addSchema(SCHEMA_ID, {
type: 'object',
properties: {
Expand Down
2 changes: 1 addition & 1 deletion test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('Kubernetes Integration Tests', () => {
* No longer has those types of validation
*/
// describe('Test that validation DOES throw errors', function () {
// it('Error when theres no value for a node', async () => {
// it('Error when there is no value for a node', async () => {
// const content = 'apiVersion:';
// const result = await parseSetup(content);
// assert.notEqual(result.length, 0);
Expand Down
6 changes: 3 additions & 3 deletions test/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ address:
});
}

it('Modeline Schema takes precendence over all other schema APIs', async () => {
it('Modeline Schema takes precedence over all other schema APIs', async () => {
languageSettingsSetup
.withSchemaFileMatch({
fileMatch: ['test.yaml'],
Expand Down Expand Up @@ -960,7 +960,7 @@ address:
assert.strictEqual(result.items[0].label, 'dollar-schema');
});

it('Manually setting schema takes precendence over all other lower priority schemas', async () => {
it('Manually setting schema takes precedence over all other lower priority schemas', async () => {
languageSettingsSetup
.withSchemaFileMatch({
fileMatch: ['test.yaml'],
Expand Down Expand Up @@ -1007,7 +1007,7 @@ address:
assert.strictEqual(result.items.length, 0);
});

it('SchemaAssociation takes precendence over SchemaStore', async () => {
it('SchemaAssociation takes precedence over SchemaStore', async () => {
languageSettingsSetup
.withSchemaFileMatch({
fileMatch: ['test.yaml'],
Expand Down
2 changes: 1 addition & 1 deletion test/schema2019Validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ describe('Validation Tests', () => {
});
});

describe('dynamic evalation inside nested refs', () => {
describe('dynamic evaluation inside nested refs', () => {
const schema: JSONSchema = {
$schema: 'https://json-schema.org/draft/2019-09/schema',
$defs: {
Expand Down
6 changes: 3 additions & 3 deletions test/schemaValidation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ obj:
});

describe('Multiple type tests', function () {
it('Do not error when there are multiple types in schema and theyre valid', async () => {
it('Do not error when there are multiple types in schema and they are valid', async () => {
schemaProvider.addSchema(SCHEMA_ID, {
type: 'object',
properties: {
Expand All @@ -1186,7 +1186,7 @@ obj:
});

describe('Invalid YAML errors', function () {
it('Error when theres a finished untyped item', async () => {
it('Error when there is a finished untyped item', async () => {
schemaProvider.addSchema(SCHEMA_ID, {
type: 'object',
properties: {
Expand All @@ -1204,7 +1204,7 @@ obj:
assert.deepEqual(result[0], createExpectedError(BlockMappingEntryError, 1, 0, 1, 2));
});

it('Error when theres no value for a node', async () => {
it('Error when there is no value for a node', async () => {
schemaProvider.addSchema(SCHEMA_ID, {
type: 'object',
properties: {
Expand Down
2 changes: 1 addition & 1 deletion test/yamlParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { aliasDepth } from '../src/languageservice/parser/ast-converter';

describe('YAML parser', () => {
describe('YAML parser', function () {
it('parse emtpy text', () => {
it('parse empty text', () => {
const parsedDocument = parse('');
assert(parsedDocument.documents.length === 1, 'A document has been created for an empty text');
});
Expand Down
Loading