Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 328
    • Issues 328
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 31
    • Merge requests 31
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #29219
Closed
Open
Issue created Jan 30, 2019 by Nick Mathewson@nickm🌻Owner

Write (more) guidelines for Tor coding best practices

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. :)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking