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.
Note:
See TracTickets
for help on using tickets.
r35935 r35934 r35933