@monokle/validation
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -38,10 +38,18 @@ import { AbstractValidator } from "../../common/AbstractValidator.js"; | ||
adaptToValidationResult(resource, ref) { | ||
const region = ref.position?.endColumn && ref.position.endLine | ||
const pos = ref.position; | ||
const region = pos?.endColumn && pos.endLine | ||
? { | ||
startLine: ref.position.line, | ||
startColumn: ref.position.column, | ||
endLine: ref.position.endLine, | ||
endColumn: ref.position.endColumn, | ||
startLine: pos.line, | ||
startColumn: pos.column, | ||
endLine: pos.endLine, | ||
endColumn: pos.endColumn, | ||
} | ||
: undefined; | ||
: pos | ||
? { | ||
startLine: pos.line, | ||
startColumn: pos.column, | ||
endLine: pos.line, | ||
endColumn: pos.column + pos.length, | ||
} | ||
: undefined; | ||
const locations = createLocations(resource, region); | ||
@@ -48,0 +56,0 @@ return this.createValidationResult("LNK001", { |
{ | ||
"name": "@monokle/validation", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Kubernetes resource validation", | ||
@@ -5,0 +5,0 @@ "author": "Kubeshop", |
208383
5069