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

Closed
Uran198 opened this Issue Apr 30, 2016 · 18 comments

Comments

@Uran198
Member

Uran198 commented Apr 30, 2016

It's lightweight and supports a lot of languages: http://astyle.sourceforge.net/

@gitmate-bot

This comment has been minimized.

Show comment
Hide comment
@gitmate-bot

gitmate-bot Apr 30, 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 Apr 30, 2016

Thanks for reporting this issue!

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

CC @sils1297, @AbdealiJK

@AbdealiJK

This comment has been minimized.

Show comment
Hide comment
@AbdealiJK

AbdealiJK Apr 30, 2016

Contributor

Hasn't been updated since December 2014 though -
https://sourceforge.net/projects/astyle/files/

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:

Thanks for reporting this issue!

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

CC @sils1297 https://github.com/sils1297, @AbdealiJK
https://github.com/AbdealiJK


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#388 (comment)

Contributor

AbdealiJK commented Apr 30, 2016

Hasn't been updated since December 2014 though -
https://sourceforge.net/projects/astyle/files/

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:

Thanks for reporting this issue!

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

CC @sils1297 https://github.com/sils1297, @AbdealiJK
https://github.com/AbdealiJK


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#388 (comment)

@sils

This comment has been minimized.

Show comment
Hide comment
@sils

sils May 6, 2016

Member

astyle was quite popular IIRC, it supports more languages than we do right now so maybe this is a quick and nice thing?

Member

sils commented May 6, 2016

astyle was quite popular IIRC, it supports more languages than we do right now so maybe this is a quick and nice thing?

@sils sils added this to the 0.3 milestone May 6, 2016

@sils sils removed this from the 0.3 milestone May 15, 2016

ivange94 added a commit to ivange94/coala-bears that referenced this issue Nov 5, 2016

AStyleLintBear.py: Add a linter bear for AStyle
Add a linter bear for the Artistic Style linter

Closes coala#388

ivange94 added a commit to ivange94/coala-bears that referenced this issue Nov 6, 2016

AStyleLintBear.py: Add a linter bear for AStyle
Add a linter bear for the Artistic Style linter

Closes coala#388
@sils

This comment has been minimized.

Show comment
Hide comment
@sils

sils Nov 22, 2016

Member

@ivange94 any progress here?

Member

sils commented Nov 22, 2016

@ivange94 any progress here?

@ivange94

This comment has been minimized.

Show comment
Hide comment
@ivange94

ivange94 Nov 22, 2016

Member

I have actually looked at this just once. Sorry if I am blocking anyone but
I am really interesting in completing this. I'll be traveling for a
conference 4th December and it was so sudden hence I was not prepared and I
am trying to rush things now. I did not even have a passport. Then I have
internships too. But I will secure sometime and complete this before the
end of the week. I have already done some research and it would be a waste
of time for me to leave now.

On Tue, Nov 22, 2016 at 11:25 AM, Lasse Schuirmann <notifications@github.com

wrote:

@ivange94 https://github.com/ivange94 any progress here?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#388 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKzjvtd1OiKb0kdZ0rmM9fvJ3RiFmuwQks5rAsMugaJpZM4ITa9V
.

Software Engineering Student, University of Buea
Software Developer (Volunteer), OpenMRS
GSoC Veteran
Help Desk Manager, OpenMRS

Member

ivange94 commented Nov 22, 2016

I have actually looked at this just once. Sorry if I am blocking anyone but
I am really interesting in completing this. I'll be traveling for a
conference 4th December and it was so sudden hence I was not prepared and I
am trying to rush things now. I did not even have a passport. Then I have
internships too. But I will secure sometime and complete this before the
end of the week. I have already done some research and it would be a waste
of time for me to leave now.

On Tue, Nov 22, 2016 at 11:25 AM, Lasse Schuirmann <notifications@github.com

wrote:

@ivange94 https://github.com/ivange94 any progress here?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#388 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKzjvtd1OiKb0kdZ0rmM9fvJ3RiFmuwQks5rAsMugaJpZM4ITa9V
.

Software Engineering Student, University of Buea
Software Developer (Volunteer), OpenMRS
GSoC Veteran
Help Desk Manager, OpenMRS

@sils

This comment has been minimized.

Show comment
Hide comment
@sils

sils Nov 22, 2016

Member
Member

sils commented Nov 22, 2016

@sils

This comment has been minimized.

Show comment
Hide comment
@sils

sils Nov 22, 2016

Member

setting importance to high because this adds missing auto frmatting correction for some languages.

Member

sils commented Nov 22, 2016

setting importance to high because this adds missing auto frmatting correction for some languages.

@Nosferatul

This comment has been minimized.

Show comment
Hide comment
@Nosferatul
Member

Nosferatul commented Dec 13, 2016

@ivange94 ping

ivange94 added a commit to ivange94/coala-bears that referenced this issue Dec 15, 2016

AStyleLintBear.py: Add a linter bear for AStyle
Add a linter bear for the Artistic Style linter

Closes coala#388
@ivange94

This comment has been minimized.

Show comment
Hide comment
@ivange94

ivange94 Dec 15, 2016

Member

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

Member

ivange94 commented Dec 15, 2016

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

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 Dec 15, 2016

Member

@linter tries to read a corrected version of the file from stdout, but there's none, that's why it wipes the file. Use stderr if this is the correct stream.

Btw: you can't use redirects, piping and other shell features, as shell-execution is disabled for security reasons.

Member

Makman2 commented Dec 15, 2016

@linter tries to read a corrected version of the file from stdout, but there's none, that's why it wipes the file. Use stderr if this is the correct stream.

Btw: you can't use redirects, piping and other shell features, as shell-execution is disabled for security reasons.

ivange94 added a commit to ivange94/coala-bears that referenced this issue Dec 24, 2016

AStyleLintBear.py: Add a linter bear for AStyle
Add a linter bear for the Artistic Style linter

Closes coala#388
@ivange94

This comment has been minimized.

Show comment
Hide comment
@ivange94

ivange94 Dec 24, 2016

Member

@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"

Member

ivange94 commented Dec 24, 2016

@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"

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 Dec 24, 2016

Member

@ivange94 did you use use_stdin?

Member

Makman2 commented Dec 24, 2016

@ivange94 did you use use_stdin?

ivange94 added a commit to ivange94/coala-bears that referenced this issue Dec 24, 2016

AStyleLintBear.py: Add a linter bear for AStyle
Add a linter bear for the Artistic Style linter

Closes coala#388
@ivange94

This comment has been minimized.

Show comment
Hide comment
@ivange94

ivange94 Dec 24, 2016

Member

@Makman2 Yes. This is what I did ivange94@acdbf91. Still not working.

Member

ivange94 commented Dec 24, 2016

@Makman2 Yes. This is what I did ivange94@acdbf91. Still not working.

@ivange94

This comment has been minimized.

Show comment
Hide comment
@ivange94

ivange94 Dec 29, 2016

Member

@Makman2 not sure how to proceed as using use_stdin, use_stdout, use_stderr, didn't help.

Member

ivange94 commented Dec 29, 2016

@Makman2 not sure how to proceed as using use_stdin, use_stdout, use_stderr, didn't help.

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 Dec 29, 2016

Member

I'm looking at it today 👍

Member

Makman2 commented Dec 29, 2016

I'm looking at it today 👍

@Makman2 Makman2 self-assigned this Dec 29, 2016

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 Dec 29, 2016

Member

See gitter:

When astyle detects stdin, it outputs stuff to stdout. This is how create_arguments has to look like to start a default astyle run, no need for shell :)

@linter(...,
        use_stdin=True):
class AstyleBear:
    ...
    @staticmethod
    def create_arguments(filename, file, config_file):
        return '--dry-run',
Member

Makman2 commented Dec 29, 2016

See gitter:

When astyle detects stdin, it outputs stuff to stdout. This is how create_arguments has to look like to start a default astyle run, no need for shell :)

@linter(...,
        use_stdin=True):
class AstyleBear:
    ...
    @staticmethod
    def create_arguments(filename, file, config_file):
        return '--dry-run',

@Makman2 Makman2 removed their assignment Dec 29, 2016

@ivange94

This comment has been minimized.

Show comment
Hide comment
@ivange94

ivange94 Mar 9, 2017

Member

I should be unassigned. Can't find the time to complete this.

Member

ivange94 commented Mar 9, 2017

I should be unassigned. Can't find the time to complete this.

yash-nisar added a commit to yash-nisar/coala-bears that referenced this issue Jun 30, 2017

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

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

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

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

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

Merged

bears/c_languages: Add ArtisticStyleBear #1882

0 of 2 tasks complete

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@rultor rultor closed this in #1882 Jul 21, 2017

umeshksingla added a commit to umeshksingla/coala-bears that referenced this issue Sep 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment