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

Uncrustify configuration #513

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Uncrustify configuration #513

wants to merge 1 commit into from

Conversation

TimothyClaeys
Copy link
Member

This PR adds the uncrustify configuration file.

You can install the uncrustify binary on Mac OSX, Linux and Windows

  • Linux: sudo apt install uncrustify
  • Mac OS: brew install uncrustify
  • Windows: download from uncrustify

Alternatively you can clone the repo and compile the project yourself (latest version)

To run it on your code use:
uncrustify -c uncrustify-openwsn.cfg -f $FilePath -o $FilePath (makes the changes in-place)

I've applied the configuration to a bunch of files in the firmware project and I think the resulting layout looks nice, is properly aligned, and most importantly, improves code readability.

There are a lot of configuration options (700+) and they are all listed here: . Some options seem to override other ones. The latter can sometimes lead to weird formatting. I tried my best to remove contradicting configuration options, but it is possible some remain.

Before we reformat the entire FW repo, I propose that the people who are developing firmware code first try the uncrustify configuration on their local working trees and see if the configuration makes sense (and if they personally agree with the proposed code layout). If we see that it works well on all the files and we've converged on a fixed code layout/style, we can reformat the entire project once. Next, we can add the uncrustify configuration to the Travis builder to enforce future PRs to adhere to the coding style.

@TimothyClaeys
Copy link
Member Author

TimothyClaeys commented Nov 30, 2020

Hi @kyh-ly, I don't think the branch openwsn_FW-881-nrf52840dk is actively maintained at the moment. This is probably why it is broken and does not work with the current version of openvisualizer. Please, in the future, if you have a problem, open a github issue and do not use unrelated PR to ask questions.

@kyh-ly
Copy link

kyh-ly commented Dec 1, 2020

@TimothyClaeys Sorry I don't have access to open issues, please tell me how to do this. 😄

@TimothyClaeys
Copy link
Member Author

TimothyClaeys commented Dec 1, 2020

@kyh-ly Sorry, apparently, the issues tab was disabled. I enabled it now. If you go the repository's main page:

openwsn-fw

You should now see an Issues tab. Can you open an new issue there for your problem with the NRF52840, and any new issues you might encounter in the future. Thanks.

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

Successfully merging this pull request may close these issues.

2 participants