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

Coding Style is not consistent #174

Open
andrewhit opened this issue Apr 26, 2018 · 1 comment
Open

Coding Style is not consistent #174

andrewhit opened this issue Apr 26, 2018 · 1 comment

Comments

@andrewhit
Copy link

andrewhit commented Apr 26, 2018

The coding style in dpvs is not consistent.

For example, one whitespace is added or missing between "if" and "(".

neigh.c:198: if(!(neighbour->flag & NEIGHBOUR_HASHED)){
vlan.c:517: if (!conf || size < sizeof(*param) || !out || !outsize)

Some line exceeds the column number, 80. For example, dpvs/tools/dpip.

106 inet_ntop(neigh->af, &neigh->ip_addr, ipaddr, sizeof(ipaddr)) ? ipaddr : "::",

Or whether "{" should be added after "if ()" for the single statement.

The tool of "uncrustify" does the code beautification for your info.

https://github.com/uncrustify/uncrustify

It is better to add some coding style guideline to DPVS repo.

@beacer
Copy link
Contributor

beacer commented Apr 26, 2018

The auto check script/tool should be added to CI at the very beginning of project.
We'll perform more strict standard for review, and to see if we can hook some auto-check script to CI in the future.

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

No branches or pull requests

2 participants