chore: bump version
This commit is contained in:
13
dist/index.js
vendored
13
dist/index.js
vendored
@@ -87590,23 +87590,24 @@ class CustomService extends Service {
|
||||
endLine, endColumn
|
||||
};
|
||||
}
|
||||
async checkFile(path, lang) {
|
||||
const url = this.makeFileUrl(path);
|
||||
const content = this.getFileContent(path);
|
||||
async checkFile(filePath, lang) {
|
||||
const url = this.makeFileUrl(filePath);
|
||||
const content = this.getFileContent(filePath);
|
||||
this.project.onDidOpen(url, lang, 0, content);
|
||||
const docAndNode = this.project.getClientManaged(url);
|
||||
if (!docAndNode) {
|
||||
core.error(`File ${path} is not loaded`);
|
||||
core.error(`File ${filePath} is not loaded`);
|
||||
return false;
|
||||
}
|
||||
const { node } = docAndNode;
|
||||
const errors = FileNode.getErrors(node);
|
||||
if (errors.length !== 0) {
|
||||
const msg = `${errors.length} error${errors.length > 1 ? "s" : ""} in ${path}`;
|
||||
const relPath = external_path_default().relative(this.rootDir, filePath);
|
||||
const msg = `${errors.length} error${errors.length > 1 ? "s" : ""} in ${relPath}`;
|
||||
if (this.options.verbose) {
|
||||
core.startGroup(msg);
|
||||
for (const err of errors) {
|
||||
core.error(err.message, this.getErrorProperties(err, path, content));
|
||||
core.error(err.message, this.getErrorProperties(err, filePath, content));
|
||||
}
|
||||
core.endGroup();
|
||||
}
|
||||
|
Reference in New Issue
Block a user