-
Notifications
You must be signed in to change notification settings - Fork 580
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
Add bear for astyle #388
Comments
Thanks for reporting this issue! Your aid is required, fellow coalaian. Help us triage and solving this issue! CC @sils1297, @AbdealiJK |
Hasn't been updated since December 2014 though - I don't know how popular it is - if it is still popular we should support it On Sat, Apr 30, 2016 at 8:28 PM, GitMate notifications@github.com wrote:
|
astyle was quite popular IIRC, it supports more languages than we do right now so maybe this is a quick and nice thing? |
Add a linter bear for the Artistic Style linter Closes coala#388
Add a linter bear for the Artistic Style linter Closes coala#388
@ivange94 any progress here? |
I have actually looked at this just once. Sorry if I am blocking anyone but On Tue, Nov 22, 2016 at 11:25 AM, Lasse Schuirmann <notifications@github.com
Software Engineering Student, University of Buea |
thanks!
|
setting importance to high because this adds missing auto frmatting correction for some languages. |
@ivange94 ping |
Add a linter bear for the Artistic Style linter Closes coala#388
AStyleLintBear wipes out the contents of the file. Right now I just have a simple implementation without a lot of options set. But everytime I run the bear and select auto apply patch, the contents of the file get wiped. Actually this is what I was having the first time I tried this some days ago and I talked to @Makman2 on gitter. And he said what is happening is that the astyle linter automatically changes the file instead of printing the changes to the standart output but the @LINTER decorator is expecting deteced changes to be printed. So he asked me to look for a switch that will prevent the file from been touched and one that prints the formatting changes to the std instead of touching the file. I have found no switch displays the formatting changes to the standard. With astyle to display formatting changes to standard output without touching the file, you use a pipe and a redirect instead of a switch. e.g astyle --style=allman < test.cpp | less Still trying to figure out what to do here. Don't know if there is another rout I can take to stop @LINTER decorator from wiping out the file. you can view the code here ivange94@bea32b0 |
Btw: you can't use redirects, piping and other shell features, as shell-execution is disabled for security reasons. |
Add a linter bear for the Artistic Style linter Closes coala#388
@Makman2 as per your suggestion on gitter, I tried different combinations of use_stderr and use_stdout but it still did not work. When I run the bear, and select apply patch. The contents of the file still get wiped. They are replaced with the message "Formatted file_name.cpp" |
@ivange94 did you use |
Add a linter bear for the Artistic Style linter Closes coala#388
@Makman2 Yes. This is what I did ivange94@acdbf91. Still not working. |
@Makman2 not sure how to proceed as using use_stdin, use_stdout, use_stderr, didn't help. |
I'm looking at it today 👍 |
See gitter: When astyle detects stdin, it outputs stuff to stdout. This is how @linter(...,
use_stdin=True):
class AstyleBear:
...
@staticmethod
def create_arguments(filename, file, config_file):
return '--dry-run', |
I should be unassigned. Can't find the time to complete this. |
It's lightweight and supports a lot of languages: http://astyle.sourceforge.net/
The text was updated successfully, but these errors were encountered: