diff --git a/packages/colibri/src/linter/base_linter.ts b/packages/colibri/src/linter/base_linter.ts index 4f379a70..13f9ac44 100644 --- a/packages/colibri/src/linter/base_linter.ts +++ b/packages/colibri/src/linter/base_linter.ts @@ -70,7 +70,8 @@ export abstract class Base_linter { } async exec_linter(file: string, options: common.l_options) { - this.delete_previus_lint(); + const file_dir = get_directory(file); + this.delete_previus_lint(file_dir); const command = this.get_command(file, options); @@ -78,19 +79,18 @@ export abstract class Base_linter { logger.Logger.log(msg, logger.T_SEVERITY.INFO); const P = new Process(); - const file_dir = get_directory(file); const opt: p_options = { cwd: file_dir, }; const result = await P.exec_wait(command, opt); - this.delete_previus_lint(); + this.delete_previus_lint(file_dir); return result; } abstract lint(file: string, options: common.l_options): Promise; - abstract delete_previus_lint(): void; + abstract delete_previus_lint(working_dir: string): void; public async lint_from_project(file_path: string, _prj_file_list: t_file[], options: common.l_options): Promise { diff --git a/packages/colibri/src/linter/vivado.ts b/packages/colibri/src/linter/vivado.ts index a9e04b07..ebf5bd54 100644 --- a/packages/colibri/src/linter/vivado.ts +++ b/packages/colibri/src/linter/vivado.ts @@ -19,13 +19,14 @@ import { get_os } from "../process/utils"; import { Process } from "../process/process"; -import { OS } from "../process/common"; +import { OS, p_options } from "../process/common"; import { get_hdl_language } from "../utils/common_utils"; import { HDL_LANG } from "../common/general"; import { Base_linter } from "./base_linter"; import * as common from "./common"; +import * as logger from "../logger/logger"; export class Vivado extends Base_linter { binary = ""; @@ -51,20 +52,26 @@ export class Vivado extends Base_linter { this.binary = binary; } - async delete_previus_lint() { + async delete_previus_lint(working_dir: string) { + const opt: p_options = { + cwd: working_dir, + }; + const os = get_os(); const p = new Process(); if (os === OS.WINDOWS) { let command = 'del xvhdl.pb && del xvhdl.log && rmdir xsim.dir'; - await p.exec_wait(command); + await p.exec_wait(command, opt); + command = 'del xvlog.pb && del xvlog.log && rmdir xsim.dir'; - await p.exec_wait(command); + await p.exec_wait(command, opt); } else { let command = 'rm xvhdl.pb; rm xvhdl.log; rm -R xsim.dir'; - await p.exec_wait(command); + await p.exec_wait(command, opt); + command = 'rm xvlog.pb; rm xvlog.log; rm -R xsim.dir'; - await p.exec_wait(command); + await p.exec_wait(command, opt); } } diff --git a/packages/teroshdl/auto_package/templates/info.nj b/packages/teroshdl/auto_package/templates/info.nj index 47ece115..c811bc7e 100644 --- a/packages/teroshdl/auto_package/templates/info.nj +++ b/packages/teroshdl/auto_package/templates/info.nj @@ -2,7 +2,7 @@ "displayName": "TerosHDL", "publisher": "teros-technology", "description": "Powerful IDE for ASIC/FPGA: state machine viewer, linter, documentation, snippets... and more! ", -"version": "5.0.7", +"version": "5.0.8", "engines": { "vscode": "^1.74.0" }, diff --git a/packages/teroshdl/package.json b/packages/teroshdl/package.json index 959c2616..d092d20c 100644 --- a/packages/teroshdl/package.json +++ b/packages/teroshdl/package.json @@ -3,7 +3,7 @@ "displayName": "TerosHDL", "publisher": "teros-technology", "description": "Powerful IDE for ASIC/FPGA: state machine viewer, linter, documentation, snippets... and more! ", - "version": "5.0.7", + "version": "5.0.8", "engines": { "vscode": "^1.74.0" }, diff --git a/packages/teroshdl/resources/release_notes/release-notes.html b/packages/teroshdl/resources/release_notes/release-notes.html index 77701498..4eda3f9d 100644 --- a/packages/teroshdl/resources/release_notes/release-notes.html +++ b/packages/teroshdl/resources/release_notes/release-notes.html @@ -45,6 +45,7 @@

Minor changes v5.0.5 and v5.0.7

  • Support for GUI in VUnit
  • Support for "copy as VHDL component" in Verilog/SV templates
  • Fix bug verilog arguments ModelSim
  • +
  • Delete auxiliar files in Vivado linter