Skip to content
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
Closed

Show stdout and stderr for linter bears #455

AbdealiJK opened this issue May 20, 2016 · 9 comments

Comments

@AbdealiJK
Copy link
Contributor

@AbdealiJK 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
Copy link
Collaborator

@gitmate-bot 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
Copy link
Member

@arafsheikh 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
Copy link
Member

@Makman2 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
Copy link
Member

@Makman2 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
Copy link
Member

@Nosferatul Nosferatul commented Dec 13, 2016

@Mixih
Copy link
Member

@Mixih 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
Copy link
Member

@Vamshi99 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
Copy link
Member

@yash-nisar 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
Copy link
Member

@yash-nisar 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 added a commit to yash-nisar/coala that referenced this issue Jul 24, 2017
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
Linked pull requests

Successfully merging a pull request may close this issue.

9 participants
You can’t perform that action at this time.