[Webkit-unassigned] [Bug 32538] [check-webkit-style] Add support for TAB check against text files

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 16 09:48:32 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32538





--- Comment #15 from Chris Jerdonek <chris.jerdonek at gmail.com>  2009-12-16 09:48:31 PST ---
(In reply to comment #12)
> Created an attachment (id=44956)
 --> (https://bugs.webkit.org/attachment.cgi?id=44956) [details]
> Proposed patch (rev.3)

Last comment:

> +    try:
> +        # Do not suuprot for filename='-. cpp_style handles it.
> +        lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
> +    except IOError:
> +        sys.stderr.write("Skipping input '%s': Can't open for reading\n" % filename)
> +        return

This chunk of code is nearly identical to the corresponding chunk of code in
cpp_style.process_file (except cpp_style's also has the filename == '-' logic).
 For maintainability, it looks like it would be better to refactor so both
files use a common "get_lines" function.  Perhaps that new function could
accept filename "-", but in text_style.py you could check for "-" before
calling get_lines.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list