liquibase-linter
Version:
A liquibase linter in JS
18 lines (17 loc) • 878 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.check = void 0;
var check = function (changeSet, reporter) {
var hasRemoteSqlFilePath = changeSet.changes.some(function (change) {
var _a;
var sqlFileChange = change.sqlFile;
if (!sqlFileChange)
return false;
var isPathLocal = sqlFileChange.relativeToChangelogFile && ((_a = sqlFileChange === null || sqlFileChange === void 0 ? void 0 : sqlFileChange.path) === null || _a === void 0 ? void 0 : _a.startsWith("./"));
return !isPathLocal;
});
if (hasRemoteSqlFilePath) {
reporter.warning("The changeSet contains a sql script imported from another directory. More details [here](https://github.com/clementdessoude/liquibase-linter/tree/main/src/rules/use-local-sql-files.md)", changeSet.id);
}
};
exports.check = check;