[tor-bugs] #29219 [Core Tor/Tor]: Write (more) guidelines for Tor coding best practices
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Jan 30 16:00:33 UTC 2019
#29219: Write (more) guidelines for Tor coding best practices
-------------------------------+--------------------
Reporter: nickm | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: 3 | Reviewer:
Sponsor: Sponsor31-can |
-------------------------------+--------------------
We should extend our best practices guidelines in doc/HACKING with
all/most of the following:
* Avoiding layer violations
* Fewer levels of block nesting
* Small functions
* Small files
* Few includes per file
* Smaller state objects
* Making new features compile-time optional modules
* incremental implementation and testing
* Fewer branches
* Fewer callers/callees per function
* "Leave it better than you find it"
* Well-bounded modules
* Fewer data dependencies
Some of these can be quantified; the ones that can be should have targets.
I'm putting an optimistically low time estimate on this one under the
assumption that we will have only minimal debate. :)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29219>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list