mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Remove the entire folder with temp files used by pvs-studio tool
This commit is contained in:
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import shutil
|
||||||
from xml.etree.ElementTree import fromstring
|
from xml.etree.ElementTree import fromstring
|
||||||
|
|
||||||
import click
|
import click
|
||||||
@ -193,15 +194,8 @@ class PvsStudioCheckTool(CheckToolBase): # pylint: disable=too-many-instance-at
|
|||||||
self._bad_input = True
|
self._bad_input = True
|
||||||
|
|
||||||
def clean_up(self):
|
def clean_up(self):
|
||||||
temp_files = (
|
if os.path.isdir(self._tmp_dir):
|
||||||
self._tmp_output_file,
|
shutil.rmtree(self._tmp_dir)
|
||||||
self._tmp_preprocessed_file,
|
|
||||||
self._tmp_cfg_file,
|
|
||||||
self._tmp_cmd_file,
|
|
||||||
)
|
|
||||||
for f in temp_files:
|
|
||||||
if os.path.isfile(f):
|
|
||||||
os.remove(f)
|
|
||||||
|
|
||||||
def check(self, on_defect_callback=None):
|
def check(self, on_defect_callback=None):
|
||||||
self._on_defect_callback = on_defect_callback
|
self._on_defect_callback = on_defect_callback
|
||||||
|
Reference in New Issue
Block a user