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

Replace astyle #69

Open
matthiasbeyer opened this issue Sep 10, 2014 · 11 comments
Open

Replace astyle #69

matthiasbeyer opened this issue Sep 10, 2014 · 11 comments

Comments

@matthiasbeyer
Copy link
Member

Astyle behaves/is very bad:

  • Adds blank lines at EOF
  • Isn't forward compatible (see Add tests astyle #68 )
  • Doesn't allow simple checking

It should be replaced.

Alternatives I know (by name) are:

  • gnu indent
  • uncrustify (maybe an C++ thing, I don't know)
  • Vera++ (maybe also an C++ thing)
  • cb which is an ancient beautifier (code beautifier) but may match our needs
  • nsiqcppstyle
  • KWStyle (from the cmake guys)

We should discuss the alternatives here.

@matthiasbeyer
Copy link
Member Author

@neithernut you're welcome to review my (kind of) suggestions and replace astyle with it after we chose one.

@TheNeikos
Copy link
Contributor

A blank line at EOF is good. It keeps Git happy. Although, I don't know the extent, so if it adds multiple (or one everytime it is run) then it has to go.

@neithernut
Copy link
Member

Piping through astyle yields one additional newline per run.

@matthiasbeyer
Copy link
Member Author

That sucks, indeed!

@matthiasbeyer
Copy link
Member Author

I guess KWStyle sounds good, but well, I don't know the details (of either of the listed suggestions). So @neithernut should evaluate and tell us what is the best idea for the project (and eventually for other projects as well...)

@neithernut
Copy link
Member

I'm on it

@neithernut
Copy link
Member

gnu indent and uncrustify are availible in package repos and somewhat similar to astyle, so the config file may be more easily ported from the astylerc. They, too, do not support style checking. However, we already have a workaround.
Uncrustify's default config contains a hint about it's version, so it may be forward-compatible in some way. Someone would have to test this.

KWStyle looks good. Also, it's XML all over the place.

Vera++ and nsiqcppstyle are out since they seem to be cpp only.

for cb I didn't find anything useful (try googleing for "cb"...)

@matthiasbeyer
Copy link
Member Author

uncrustify looks like a C++ thing to me, too. Maybe we (you?) should try gnu indent first... if you want.

@neithernut
Copy link
Member

I'm on the train in a few minutes, so I probably can't do it until tomorow.

@matthiasbeyer
Copy link
Member Author

I don't care about this one as much as about others. it is in the 'v0.0.1' milestone, which is due end of the month. I consider this is secondary and not as important as the actual code. I would love to see more code instead of this.

@neithernut
Copy link
Member

@TheNeikos @manuelmessner: evaluating the alternatives mentioned in this discussion (gnu indent and uncrustify and maybe KWStyle) would be a possibility to contribute which does not require deep knowledge about any internas.

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

No branches or pull requests

3 participants