avocado-framework / inspektor

Inspektor code checker
Other
11 stars 17 forks source link

Fix: inspekt lint failure when passed invalid path #17

Closed sanketsudake closed 8 years ago

sanketsudake commented 8 years ago

Description: When inspekt lint fired with invalid path it hits type error. As linter.check() return None, comparison between bool and None occurs.

Repro step: Try, inspekt lint random_string

ldoktor commented 8 years ago

@tripples yep, I know this issue (and I'm sorry I forgot to send the version I'm using). This solution works fine, although is quite hard to understand the failure, I put log.warning(...) in case the path returned invalid result and I think it improves the results. Anyway I'm open to discussion, what do you think?

sanketsudake commented 8 years ago

Yes, I agree putting log.warning is required here, though missed it. If you already have solution implemented, please update code. :-)

ldoktor commented 8 years ago

Hello @tripples I sent my version, it uses a different approach but should also work. Thank you for your work.