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

Proper code style: Refactoring #117

Closed
exislow opened this issue Mar 22, 2022 · 10 comments
Closed

Proper code style: Refactoring #117

exislow opened this issue Mar 22, 2022 · 10 comments
Labels
work in progress Somebody is working on this issue

Comments

@exislow
Copy link

exislow commented Mar 22, 2022

Dear @dspverden,

I would like to contribute more and more to this project, since I really like it and use my aurora daily. I already have some custom modifications to this code held in my GitHub repository fork.

What I really have noticed is that the code styling is somehow odd. I couldn't figure out, yet, to what code style / IDE settings you stick to. I would like to propose to stick to the Arduino code style guidelines:

If you agree, I could reformat the code of the develop branch and send you a pull request. What do you think?

This will make the code very readable and better maintanable compared to the current code style in my opinion (also other Arduino projects have shown sticking to a proper code style increases the coding efficiency).

@dspverden
Copy link
Collaborator

dspverden commented Mar 27, 2022

Sounds good.
I would like to merge PR #97 first next week, if that is ok for you?
I also would like to talk about the style guideline first, because Arduino defines sometimes different styles for the same code.

@exislow
Copy link
Author

exislow commented Apr 2, 2022

Sure, this is totally fine. Just tell me, as soon as the PR #97 is merged.

Of course, we can discuss the style guidelines first. Have you already had a look at the JetBrains CLion code style formatter? It sticks to what Arduino code style guidelines are recommending and also to a general propper C style. Tell me what you think about it.

@dspverden
Copy link
Collaborator

I have merged PR #97 now.
I am now looking into style guide and what would be the best way to define it. Any idea? Something like a .md file, perhaps?

@dspverden dspverden added the work in progress Somebody is working on this issue label Apr 19, 2022
@exislow
Copy link
Author

exislow commented May 7, 2022

An *.md sounds reasonable. You could also create a Wiki page here and refer to it. But I guess this is not a big deal at all.

Finding and committing to a proper style guide is the bigger task. Did you have a chance to check, e.g. the code formatter of CLion?

After PR #97 is already merged, I could also just send you a new pull request with properly reformated code so you would have a better idea what I am talking about. What do you think?

@exislow
Copy link
Author

exislow commented Jun 6, 2022

*ping

@exislow
Copy link
Author

exislow commented Sep 1, 2022

@dspverden are we still on the same page about this idea?

@dspverden
Copy link
Collaborator

dspverden commented Sep 1, 2022

Just send a PR and I will have a look.
I never worked with CLion or something like that. Lately I came across the Boost-style and I am now using that in all of my newer projects. But I see that this would be a lot of work to change aurora to Boost-style.

@exislow
Copy link
Author

exislow commented Sep 2, 2022

Okay, I will do so based on the latest develop branch. CLion is just an IDE which used an general state of the art code formatter, which is absed on any specific code style. I will just send you a PR in the next days. A lot of files will contain changes, but just formatting changes, no logic changes.

@dspverden
Copy link
Collaborator

ok, looking forward to it.

@exislow
Copy link
Author

exislow commented Sep 11, 2022

I have got you the PR #124. Let me know what you think about it :-)

@exislow exislow closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress Somebody is working on this issue
Projects
None yet
Development

No branches or pull requests

2 participants