UNPKG

standardlint

Version:
33 lines (30 loc) 743 B
import { getJSONFileContents } from "./chunk-K3CM3JAW.mjs"; import { logDefaultPathMessage } from "./chunk-322CAOWI.mjs"; import { calculatePass } from "./chunk-I4KWICZI.mjs"; // src/checks/checkForDefinedTags.ts function checkForDefinedTags(severity, basePath, customPath) { const path = customPath || "manifest.json"; const name = "Tags"; const message = "Check for defined tags"; if (!customPath) logDefaultPathMessage(name, path); const serviceMetadata = getJSONFileContents( basePath, path ); const result = serviceMetadata?.spec?.tags && serviceMetadata?.spec?.tags.length > 0; return { name, status: calculatePass(result, severity), message, path }; } export { checkForDefinedTags };