Skip to content

Commit

Permalink
Handle reporter crashes without making all ML crash
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Jul 2, 2023
1 parent d581b90 commit 6852e58
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- New linters
- Add [Lychee](https://github.com/lycheeverse/lychee) - links and email addresses checker, by @DariuszPorowski in [#2673](https://github.com/oxsecurity/megalinter/pull/2673)

- Fixes
- Handle reporter crashes without making all ML crash
- Devskim: Remove default --ignore-globs argument
- mypy: USe /tmp as cache folder by default with ENV MYPY_CACHE_DIR=/tmp in Dockerfile

- Linter versions upgrades
- [checkov](https://www.checkov.io/) from 2.3.285 to **2.3.287** on 2023-06-12
- [snakemake](https://snakemake.readthedocs.io/en/stable/) from 7.26.0 to **7.28.1** on 2023-06-12
Expand Down
6 changes: 4 additions & 2 deletions megalinter/Linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,10 @@ def run(self):
# Generate linter reports
self.elapsed_time_s = perf_counter() - self.start_perf
for reporter in self.reporters:
reporter.produce_report()

try:
reporter.produce_report()
except Exception as e:
logging.error("Unable to process reporter " + reporter.name + str(e))
return self

def replace_vars(self, variables):
Expand Down

0 comments on commit 6852e58

Please sign in to comment.