coala / coala-bears

Bears for coala
https://coala.io/
GNU Affero General Public License v3.0
294 stars 580 forks source link

PycodestyleBear always exits with only one result #2882

Open areebbeigh opened 5 years ago

areebbeigh commented 5 years ago

Sample code:

x = 10
y = 5;

print( 'test' ) 

Expected PycodestyleBear output:

bad.py
[   2] y·=·5;
**** PycodestyleBear (E703) [Section: cli | Severity: NORMAL] ****
!    ! E703 statement ends with a semicolon
[    ] *0. Do (N)othing
[    ]  1. (O)pen file
[    ]  2. Add (I)gnore comment
[    ] Enter number (Ctrl-D to exit): 

bad.py
[   5] print(·'test'·)·
**** PycodestyleBear (E201) [Section: cli | Severity: NORMAL] ****
!    ! E201 whitespace after '('
[    ] *0. Do (N)othing
[    ]  1. (O)pen file
[    ]  2. Add (I)gnore comment
[    ] Enter number (Ctrl-D to exit): 

bad.py
[   5] print(·'test'·)·
**** PycodestyleBear (E202) [Section: cli | Severity: NORMAL] ****
!    ! E202 whitespace before ')'
[    ] *0. Do (N)othing
[    ]  1. (O)pen file
[    ]  2. Add (I)gnore comment
[    ] Enter number (Ctrl-D to exit): 

bad.py
[   5] print(·'test'·)·
**** PycodestyleBear (W291) [Section: cli | Severity: NORMAL] ****
!    ! W291 trailing whitespace
[    ] *0. Do (N)othing
[    ]  1. (O)pen file
[    ]  2. Add (I)gnore comment
[    ] Enter number (Ctrl-D to exit):

~ Program exited

Actual output:

bad.py
[   2] y·=·5;
**** PycodestyleBear (E703) [Section: cli | Severity: NORMAL] ****
!    ! E703 statement ends with a semicolon
[    ] *0. Do (N)othing
[    ]  1. (O)pen file
[    ]  2. Add (I)gnore comment
[    ] Enter number (Ctrl-D to exit): 

~ Program exited
areebbeigh commented 5 years ago

This is because process_output parses only the first error reported by the linter - introduced in this commit

I would like to be assigned unless this is categorized as a newcomer issue.

shivank1234 commented 5 years ago

Hey @areebbeigh Are you working on this?

areebbeigh commented 5 years ago

@shivank1234 I need to be assigned first.

kaixiongg commented 5 years ago

Hey I would like to work on this issue if it is considered as a newcomer one.

MaskedCarrot commented 5 years ago

hello can I work on this issue

KVGarg commented 5 years ago

hello can I work on this issue

A PR has already been created for it! Can you please look for a new newcomer issue. Thanks!