GithubHelp home page GithubHelp logo

Coding Standard about coova-chilli HOT 9 CLOSED

coova avatar coova commented on August 16, 2024
Coding Standard

from coova-chilli.

Comments (9)

jobezic avatar jobezic commented on August 16, 2024

Yes, we need some sort of refactoring..

from coova-chilli.

click avatar click commented on August 16, 2024

I've come to love the development-mantra that NASA follows, according to Lifehacker:
http://lifehacker.com/nasas-rules-for-writing-mission-critical-code-1719276064
Might be overkill for coova-chilli, although readability and function-understanding would become a lot less vague.

With regards to testingtools, there's a few simple tools that can be utilized, and SHOULD be utilized as well (Valgrind, Helgrind), and possibly also an offsite analyzer like https://scan.coverity.com/ to catch possible memoryleaks/incorrect declarations and the likes.

from coova-chilli.

wlanmac avatar wlanmac commented on August 16, 2024

For the most part, emacs "mode: c; c-basic-offset: 2" is used throughout. (a recent commit fixed formatting in a couple places). Agreed, we should be more script on coding style and start to integrate testing into the build process.

from coova-chilli.

gbaligh avatar gbaligh commented on August 16, 2024

Do not forget to add modelines for VIM user like me ;)

from coova-chilli.

sevan avatar sevan commented on August 16, 2024

Perhaps we could use indent(1) or clang-format which could tie in as a hook so it would be irrelevant what editor you're using?

from coova-chilli.

gbaligh avatar gbaligh commented on August 16, 2024

πŸ‘

from coova-chilli.

gbaligh avatar gbaligh commented on August 16, 2024

what about indent:

indent -nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 -i2 -ip0 -l80 -lp -npcs -nprs -npsl -sai -saf -saw -ncs -nsc -sob -nfca -cp33 -ss -ts2 -il1 -nut

from coova-chilli.

sevan avatar sevan commented on August 16, 2024

most of those are gnu specific and not available everywhere, like hnl bbo nprs sai saf saw ncs I stopped trying after that

from coova-chilli.

ynezz avatar ynezz commented on August 16, 2024

As I see it, we've two options here:

  1. Create CODINGSTYLE.md based on @wlanmac preferences (2 spaces indent level) and modify some existing CodingStyle to have some solid source for the remaining stuff like braces, long lines, variable namings etc. Then create some supporting scripts which would help reformat our code base, add Git commit hook script and some automatic Travis checking for PRs.
  2. Steal^Wborrow some existing CODINGSTYLE.md with all supporting scripts and checks to not reinvent the wheel, then reformat complete codebase with those script and start using it.

@wlanmac is probably the one to make this tough decision :)

from coova-chilli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.