coala-bears icon indicating copy to clipboard operation
coala-bears copied to clipboard

DuplicateFileBear.py: Applying IgnoreResultAction gives error

Open akshatkarani opened this issue 4 years ago • 0 comments

Applying IgnoreResultAction on results originating from DuplicateFileBear gives the following error

**** DuplicateFileBear [Section: duplicate | Severity: INFO] ****
!    ! File /home/akshat/coala-repos/coala-tutorial/src/add.py is identical to File /home/akshat/coala-repos/coala-tutorial/src/dup_add.py
[    ] *0. Do (N)othing
[    ]  1. (O)pen file
[    ]  2. Add (I)gnore comment
[    ] Enter number (Ctrl-D to exit): 2
[ERROR][19:02:50] Failed to execute the action IgnoreResultAction with error: '/home/akshat/coala-repos/coala-tutorial/src/add.py'.

IgnoreResultAction should not even be applicable in this since DuplicateFileBear is a GlobalBear. It is applicable because of the file argument passed when it is yielded. Removing it should fix it.

akshatkarani avatar Aug 07 '19 13:08 akshatkarani