Opened 8 years ago

Closed 8 years ago

#6699 closed task (fixed)

Remove extra blank lines before }

Reported by: Kurt Schwehr Owned by: Kurt Schwehr
Priority: normal Milestone:
Component: default Version: unspecified
Severity: trivial Keywords:
Cc:

Description

This bug is just to document how I found this type of thing.

There is no functional change with this type of cleanup. I just got tired of making these changes when I noticed them and decided to clean up the ~700 cases en mass.

It would be best to have these changes made by clang-format or some other tool, but this is a start by hand.

#!/usr/bin/env python

"""braces.py finds \n\n}."""

import sys

for filename in sys.argv[1:]:

  last = None
  for line_num, line in enumerate(open(filename)):
    line = line.strip()
    if not line:
      last = line_num
      continue
    if last and line.startswith('}'):
        print "%s:%d: %s" % (filename, line_num, line)
    last = None

You can then find them via the command line or your favorite editor. e.g. in emacs, use M-x grep.

Error: Failed to load processor bash
No macro or processor named 'bash' found

Commits so far: r35932 r35931 r35930 r35929

Change History (1)

comment:1 by Kurt Schwehr, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.