New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show stdout and stderr for linter bears #455

Closed
AbdealiJK opened this Issue May 20, 2016 · 9 comments

Comments

9 participants
@AbdealiJK
Contributor

AbdealiJK commented May 20, 2016

Print the stdout and stderr from linter based bears when tests fail.

Gets difficult to debug things like: https://ci.appveyor.com/project/coala/coala-bears/build/1.0.1152/job/itn0bcmo387clohn

I can see that the code for the old API is here : https://github.com/coala-analyzer/coala-bears/blob/master/tests/LocalBearTestHelper.py#L27

We need to add appropriate code for the new API too !
It's been immensely helpful for me to debug

@gitmate-bot

This comment has been minimized.

Show comment
Hide comment
@gitmate-bot

gitmate-bot May 20, 2016

Collaborator

Thanks for reporting this issue!

Your aid is required, fellow coalaian. Help us triage and solving this issue!

CC @sils1297, @AbdealiJK

Collaborator

gitmate-bot commented May 20, 2016

Thanks for reporting this issue!

Your aid is required, fellow coalaian. Help us triage and solving this issue!

CC @sils1297, @AbdealiJK

@AbdealiJK AbdealiJK added the type/test label May 20, 2016

@arafsheikh arafsheikh self-assigned this May 20, 2016

@arafsheikh

This comment has been minimized.

Show comment
Hide comment
@arafsheikh

arafsheikh May 21, 2016

Member

@AbdealiJK Can you please elaborate a little on what has to be done? L29 & L32 in LocalBearTestHelper already handle stderr and stdout.

Member

arafsheikh commented May 21, 2016

@AbdealiJK Can you please elaborate a little on what has to be done? L29 & L32 in LocalBearTestHelper already handle stderr and stdout.

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 May 21, 2016

Member

This can be easily achieved with mocking process_output that retrieves the output to the test helper and forwards it then for further execution to linter again 👍

Member

Makman2 commented May 21, 2016

This can be easily achieved with mocking process_output that retrieves the output to the test helper and forwards it then for further execution to linter again 👍

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 May 21, 2016

Member

@arafsheikh ping me if you need help with this, overriding process_output is not yet documented for Linter v2 API^^

Member

Makman2 commented May 21, 2016

@arafsheikh ping me if you need help with this, overriding process_output is not yet documented for Linter v2 API^^

@sils sils added the hacktoberfest label Sep 29, 2016

@Nosferatul

This comment has been minimized.

Show comment
Hide comment
@Nosferatul
Member

Nosferatul commented Dec 13, 2016

@Mixih

This comment has been minimized.

Show comment
Hide comment
@Mixih

Mixih Mar 25, 2017

Member

@arafsheikh it seem that you are not working on this currently. I am reassigning the issue because another person has shown interest and I do not see a pr here.

Member

Mixih commented Mar 25, 2017

@arafsheikh it seem that you are not working on this currently. I am reassigning the issue because another person has shown interest and I do not see a pr here.

@Vamshi99

This comment has been minimized.

Show comment
Hide comment
@Vamshi99

Vamshi99 Mar 26, 2017

Member

Is this responsible for failing of builds in #1409 ? 😟
https://travis-ci.org/coala/coala-bears/jobs/214619678#L3510-L3524

Member

Vamshi99 commented Mar 26, 2017

Is this responsible for failing of builds in #1409 ? 😟
https://travis-ci.org/coala/coala-bears/jobs/214619678#L3510-L3524

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar

yash-nisar Mar 26, 2017

Member

Nope @Vamshi99 , this issue is an enhancement to the testing API of bears so there isn't supposed to be any problem. :)

Member

yash-nisar commented Mar 26, 2017

Nope @Vamshi99 , this issue is an enhancement to the testing API of bears so there isn't supposed to be any problem. :)

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar

yash-nisar Jul 23, 2017

Member

Proof that the patch works :
http://paste.ubuntu.com/25155867/

To summarize, we have :

E           Running bear MarkdownBear...
E           Running 'remark /tmp/tmpx12h5fev --no-color --quiet --setting "ruleRepetition": 3, "bullet": "-", "incrementListMarker": true, "fences": true, "fence": "`", "setext": false, "closeAtx": false, "ruleSpaces": false, "entities": false, "looseTable": false, "listItemIndent": "1", "emphasis": "*", "rule": "*", "spacedTable": true, "strong": "*" --use lint="firstHeadingLevel": null, "noDuplicateDefinitions": true, "codeBlockStyle": "consistent", "noShortcutReferenceImage": true, "maximumHeadingLength": 60, "noShortcutReferenceLink": true, "noDuplicateHeadingsInSection": true, "noEmptyURL": true, "checkboxContentIndent": true, "noHTML": true, "noUnusedDefinitions": true, "noUndefinedReferences": true, "noFileNameIrregularCharacters": "\\.a-zA-Z0-9-_", "noTabs": true, "finalDefinition": true, "noHeadingPunctuation": ".,;:!?", "blockquoteIndentation": 2, "headingIncrement": false, "noDuplicateHeadings": true --use validate-links'
E           The program yielded the following output:
E           
E           Stdout:
E           <h1>Hello</h1>
E           
E           Stderr:
E           ../../../tmp/tmpx12h5fev
E             1:1-1:15  warning  Do not use HTML in markdown  no-html  remark-lint
E           
E           ⚠ 1 warning

../coala/coalib/testing/LocalBearTestHelper.py:50: AssertionError

Member

yash-nisar commented Jul 23, 2017

Proof that the patch works :
http://paste.ubuntu.com/25155867/

To summarize, we have :

E           Running bear MarkdownBear...
E           Running 'remark /tmp/tmpx12h5fev --no-color --quiet --setting "ruleRepetition": 3, "bullet": "-", "incrementListMarker": true, "fences": true, "fence": "`", "setext": false, "closeAtx": false, "ruleSpaces": false, "entities": false, "looseTable": false, "listItemIndent": "1", "emphasis": "*", "rule": "*", "spacedTable": true, "strong": "*" --use lint="firstHeadingLevel": null, "noDuplicateDefinitions": true, "codeBlockStyle": "consistent", "noShortcutReferenceImage": true, "maximumHeadingLength": 60, "noShortcutReferenceLink": true, "noDuplicateHeadingsInSection": true, "noEmptyURL": true, "checkboxContentIndent": true, "noHTML": true, "noUnusedDefinitions": true, "noUndefinedReferences": true, "noFileNameIrregularCharacters": "\\.a-zA-Z0-9-_", "noTabs": true, "finalDefinition": true, "noHeadingPunctuation": ".,;:!?", "blockquoteIndentation": 2, "headingIncrement": false, "noDuplicateHeadings": true --use validate-links'
E           The program yielded the following output:
E           
E           Stdout:
E           <h1>Hello</h1>
E           
E           Stderr:
E           ../../../tmp/tmpx12h5fev
E             1:1-1:15  warning  Do not use HTML in markdown  no-html  remark-lint
E           
E           ⚠ 1 warning

../coala/coalib/testing/LocalBearTestHelper.py:50: AssertionError

@yash-nisar yash-nisar referenced this issue Jul 23, 2017

Closed

Show `stdout` and `stderr` for linter bears #4543

2 of 2 tasks complete

yash-nisar added a commit to yash-nisar/coala that referenced this issue Jul 24, 2017

Show `stdout` and `stderr` for linter bears
Print the `stdout` and `stderr` from linter bears when tests
fail which is helpful for debugging.

Closes coala/coala-bears#455
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment