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

Use astyle(1) to make style consistent #64

Merged
merged 3 commits into from
Jun 27, 2017
Merged

Use astyle(1) to make style consistent #64

merged 3 commits into from
Jun 27, 2017

Conversation

smortex
Copy link
Contributor

@smortex smortex commented Jun 27, 2017

This was discussed in #53 (link to comment).

When this pull request is approved, I will, before merging I will:

  • Rebase branch on top of master;
  • Run make style and add changes to this branch.

@smortex smortex requested a review from neomilium June 27, 2017 09:16
@smortex smortex self-assigned this Jun 27, 2017
@smortex smortex added this to the 1.0.0 milestone Jun 27, 2017
@smortex smortex requested a review from doegox June 27, 2017 09:16
@doegox
Copy link
Member

doegox commented Jun 27, 2017

Maybe take the chance to align style between libnfc and libfreefare?
At the moment libnfc style is:

astyle --formatted --mode=c --suffix=none \
--indent=spaces=2 --indent-switches --indent-preprocessor \
--keep-one-line-blocks --max-instatement-indent=60 \
--style=linux --pad-oper --unpad-paren --pad-header \
--align-pointer=name {} \;

@smortex
Copy link
Contributor Author

smortex commented Jun 27, 2017

Huhu, in fact I conscientiously used settings that match FreeBSD's style(9) since it's basically what I used when writing libfreefare.

The only difference these flags produce with the current code is that I used a space before an opening parenthesis when calling a function (when I did not forget it, bad habit I took from mono's code), and it's not possible to have this exact behavior with astyle. This leads to quite a lot of changes, but I am OK with it. However, changing all indentation rules seems gratuitous to me.

Do you think it's better to have a similar style in libnfc and libfreefare ?

@doegox
Copy link
Member

doegox commented Jun 27, 2017

Not that important if it makes more trouble than benefits, forget about it

doegox
doegox previously approved these changes Jun 27, 2017
@smortex
Copy link
Contributor Author

smortex commented Jun 27, 2017

Fsck, committing the result of make style dismissed the review approval 😮

@smortex smortex merged commit b496928 into master Jun 27, 2017
@smortex smortex deleted the style branch June 27, 2017 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants