Skip to content

Commit 605e17d

Browse files
authored
Merge pull request Ericsson#4698 from alfonsoespinosa/diagtool-missing-warning-not-crashing
[fix] diagtool get_warnings() returns if binary missing
2 parents cd87fde + 8ec32ae commit 605e17d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • analyzer/codechecker_analyzer/analyzers/clangtidy

analyzer/codechecker_analyzer/analyzers/clangtidy/analyzer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,12 @@ def get_warnings():
173173
Returns list of warning flags by using diagtool.
174174
"""
175175
diagtool_bin = get_diagtool_bin()
176-
environment = analyzer_context.get_context().get_env_for_bin(diagtool_bin)
177176

178177
if not diagtool_bin:
179178
return []
180179

180+
environment = analyzer_context.get_context().get_env_for_bin(diagtool_bin)
181+
181182
try:
182183
result = subprocess.check_output(
183184
[diagtool_bin, 'tree'],

0 commit comments

Comments
 (0)