Opened 4 weeks ago

Last modified 4 weeks ago

#29898 new defect

How can we automatically add #else and #endif comments?

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: technical-debt
Cc: nickm Actual Points:
Parent ID: Points: 0.1
Reviewer: Sponsor: Sponsor31-can

Description

In 0.3.5? we ran a script to automatically add comments to #else and #endif blocks. These comments help us work out how these macros are nested.

But since then, we've added new #else and #endif without the comments.

Should we run the script again in 0.4.1?
Should we run it before we branch off each new maint branch?
Should we automatically run it before we commit or merge?

I hope nickm has some good feedback on this idea.

Child Tickets

Change History (2)

comment:1 Changed 4 weeks ago by teor

We should also run other scripts like scripts/maint/rectify_include_paths.py

comment:2 Changed 4 weeks ago by teor

Idea: we could create a post-merge hook in master, which runs all these scripts, and creates a commit for each script that makes a change.

Most scripts should be loud but automatic.

We'll do practracker separately, because it's a special case.

Note: See TracTickets for help on using tickets.