Skip to content

Commit

Permalink
Increment minor version to 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
myint committed Nov 2, 2013
1 parent f64be39 commit a26ae29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cpp/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.4'
__version__ = '0.2'
13 changes: 8 additions & 5 deletions cpp/find_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def _add_warning(self, msg, node, filename=None):
def show_warnings(self):
for filename, line_num, msg in sorted(self.warnings):
if line_num == 0:
print('%s: %s' % (filename, msg))
print('{}: {}'.format(filename, msg))
else:
print('%s:%d: %s' % (filename, line_num, msg))
print('{}:{}: {}'.format(filename, line_num, msg))

def find_warnings(self):
if is_header_file(self.filename):
Expand Down Expand Up @@ -460,7 +460,7 @@ def _check_public_functions(self, primary_header, all_headers):
if declared_only:
node = public_symbols[name]
if not node.templated_types:
msg = "'%s' declared but not defined" % name
msg = "'{}' declared but not defined".format(name)
self._add_warning(msg, node, primary_header.filename)

def _get_primary_header(self, included_files):
Expand All @@ -482,7 +482,9 @@ def _find_source_warnings(self):
# be something to warn against. I expect this will either
# be configurable or removed in the future. But it's easy
# to check for now.
msg = "'%s' forward declaration not expected in source file" % node.name
msg = (
"'{}' forward declaration not expected in source file".format(
node.name))
self._add_warning(msg, node)

# A primary header is optional. However, when looking up
Expand All @@ -505,7 +507,8 @@ def _find_source_warnings(self):
]
for (node, _) in included_files.values():
if node.filename in includes:
msg = "'%s' already #included in '%s'" % (node.filename, primary_header.filename)
msg = "'{}' already #included in '{}'".format(
node.filename, primary_header.filename)
self._add_warning(msg, node)

# TODO(nnorwitz): other warnings to add:
Expand Down

0 comments on commit a26ae29

Please sign in to comment.