def check_ref (manual, file, m):
global fixes_count, bad_refs_count
bad_ref = False
+ fixed = True
type = m.group (1)
original_name = m.group (2)
name = whitespace_re.sub (' ', original_name). strip ()
explicit_type = type
new_name = name
- if type != 'ref' and type == manual and not commented_out:
+ if type != 'ref' and type == manual and not commented_out and useful_fix:
bad_ref = True
stdout.write ("\n%s: %d: `%s': external %s x-ref should be internal\n"
% (file, line, name, type))
bad_refs_count += int (bad_ref)
if bad_ref and not useful_fix:
stdout.write ("*** Warning: this file is automatically generated, \
-please fix the code source manually.\n")
+please fix the code source instead of generated documentation.\n")
# compute returned string
if new_name == name:
log.write ("Operation refused by user: %s\nExiting.\n" % instance)
sys.exit (3)
-log.write ("Done, %d bad x-refs found, fixed %d.\n" %
+log.write ("Done: %d bad x-refs found, fixed %d.\n" %
(bad_refs_count, fixes_count))