Opened 8 months ago

Closed 5 months ago

#29898 closed defect (implemented)

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

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


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

#30539closednickmAdd an "autostyle" target to apply all of our automatic restyling things.Core Tor/Tor

Change History (8)

comment:1 Changed 8 months ago by teor

We should also run other scripts like scripts/maint/

comment:2 Changed 8 months 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.

comment:3 Changed 6 months ago by nickm

Keywords: 041-should added

comment:4 Changed 6 months ago by nickm

Owner: set to nickm
Status: newaccepted

comment:5 Changed 6 months ago by nickm

Keywords: 041-should removed

I think for 0.4.1 we should do the child ticket here, and look into automation later.

comment:6 Changed 6 months ago by nickm

Keywords: 041-deferred-20190530 added

Marking these tickets as deferred from 041.

comment:7 Changed 6 months ago by nickm

Milestone: Tor: 0.4.1.x-finalTor: 0.4.2.x-final

comment:8 Changed 5 months ago by nickm

Resolution: implemented
Status: acceptedclosed

"autostyle" is now part of our release process for 0.4.1 and later.

Note: See TracTickets for help on using tickets.