[tor-bugs] #23500 [Core Tor/Tor]: check-spaces.pl should check spaces after a comma when in functions.

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 25 00:45:12 UTC 2017


#23500: check-spaces.pl should check spaces after a comma when in functions.
-----------------------------------------+---------------------------------
 Reporter:  ewong                        |          Owner:  (none)
     Type:  enhancement                  |         Status:  needs_revision
 Priority:  Medium                       |      Milestone:  Tor:
                                         |  0.3.3.x-final
Component:  Core Tor/Tor                 |        Version:
 Severity:  Trivial                      |     Resolution:
 Keywords:  code-style, review-group-24  |  Actual Points:
Parent ID:                               |         Points:
 Reviewer:                               |        Sponsor:
-----------------------------------------+---------------------------------

Comment (by ewong):

 Replying to [comment:18 nickm]:
 > Hm. Did you use a script to add the missing spaces, or did you do it by
 hand?

 I did it by hand.

 >
 > Ideally, there should be:
 >   * one commit that changes checkSpace.pl and nothing else.
 >   * a script that we can run on master to add the missing spaces when we
 merge.  This way, we don't get any conflicts, and it's easy to verify that
 the script does only what it claims.  Maybe something like this?
 > {{{
 > perl -i -pe 's/,(\S)/, $1/g' src/{common,or,ext,test,tools}/*.[ch]
 > }}}
 >   * And then we can just run wrap the lines by hand.
 >
 > I've extracted the script as its own commit in a branch
 `ticket23500_033` in my public repository at
 https://gitweb.torproject.org/nickm/tor.git .  If it looks okay, and
 somebody confirms the steps above, I can merge it and do the rest.
 >
 > Also, is there a reason to have the checkSpaces script check for
 `[\w|\d]+` instead of just `\S`?

 My regex-fu is basic at the best, so that's what I came up with.  I had a
 major
 issue with figuring out how to get sed to regex properly.

 sorry for the mess.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23500#comment:20>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list