Opened 7 weeks ago

Closed 7 weeks ago

#32887 closed defect (implemented)

Remove use of NS() macros to make our code more indentable?

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: refactor
Cc: catalyst, teor Actual Points:
Parent ID: Points: 0.5
Reviewer: Sponsor:

Description

clang-format doesn't do very well with our NS() macros defined in test.h. And we don't actually use those macros very much, and we haven't used them for new tests in a while. Shall we remove them?

Child Tickets

Attachments (1)

un_ns.pl (885 bytes) - added by nickm 7 weeks ago.

Download all attachments as: .zip

Change History (6)

Changed 7 weeks ago by nickm

Attachment: un_ns.pl added

comment:1 Changed 7 weeks ago by nickm

I've attached a perl script that works for me to remove the NS_* macros from the 10/131 test modules that use them. The result is not beautiful, but it is a start.

comment:2 Changed 7 weeks ago by dgoulet

I've never used those nor know how to properly take advantage of them. I'm all for removing code overall :). +1

comment:3 Changed 7 weeks ago by nickm

Points: 0.5
Status: assignedneeds_review

See branch disable_ns_macro with PR at https://github.com/torproject/tor/pull/1645 . It is mostly an automatically generated commit, with some preliminaries and cleanup.

comment:4 Changed 7 weeks ago by ahf

Status: needs_reviewmerge_ready

I've gone over each line and it looks fine. The Perl script to do the conversion was to the best of my knowledge also OK, but I did not try to re-run it to see if it yields the same output.

OK to merge from me.

comment:5 Changed 7 weeks ago by nickm

Resolution: implemented
Status: merge_readyclosed

Great; merged!

Note: See TracTickets for help on using tickets.