Skip to content

Output appropriate message if the language given in input is not valid/not supported for KeywordBear #1256

@aptrishu

Description

@aptrishu

If I put this in .coafile

[Default] language = anything bears = KeywordBear files = javaji/test.cs use_spaces = yeah file_naming_convention = pascal keywords = \#warning

and run coala -V , I get this

Traceback (most recent call last): File "/home/rishus23/venv/coala/lib/python3.4/site-packages/coalib/bears/Bear.py", line 240, in execute return [] if result is None else list(result) File "/home/rishus23/venv/coala/lib/python3.4/site-packages/bears/general/KeywordBear.py", line 104, in run keyword.start()) File "/home/rishus23/venv/coala/lib/python3.4/site-packages/bears/general/KeywordBear.py", line 30, in generate_diff c for c in comments if todo_source_range in c] File "/home/rishus23/venv/coala/lib/python3.4/site-packages/bears/general/KeywordBear.py", line 30, in <listcomp> c for c in comments if todo_source_range in c] File "/home/rishus23/venv/coala/lib/python3.4/site-packages/bears/general/KeywordBear.py", line 22, in _get_comments yield from result.contents.get('comments', []) AttributeError: 'str' object has no attribute 'get'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions