[Webkit-unassigned] [Bug 32487] [check-webkit-style] cpp_style.py contains code redundant with check-webkit-style
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 14 22:50:30 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=32487
--- Comment #5 from Shinichiro Hamaji <hamaji at chromium.org> 2009-12-14 22:50:29 PST ---
(From update of attachment 44759)
Though I'm not a reviewer, I'd like to put some comments.
> +"""Does WebKit-lint on c++ files.
"on C/C++ files" would be better.
> - if file_extension in ['.cpp', '.c', '.h']:
> - line_numbers = set()
> + if file_extension not in ['.cpp', '.c', '.h']:
> + continue
> +
> + line_numbers = set()
This refactoring is nice in general, but this will conflict with the patch in
Bug 32538. Please avoid doing this.
> def main():
> - cpp_style.use_webkit_styles()
> + cpp_style._DEFAULT_FILTER_RULES = cpp_style._WEBKIT_FILTER_RULES
>
> - (files, flags) = cpp_style.parse_arguments(sys.argv[1:], ["git-commit="])
> + (files, flags) = cpp_style.parse_arguments(sys.argv[1:], ["git-commit="], True)
I prefer display_help=True to True as the meaning becomes clearer in this way.
> - sys.stderr.write("ERROR: It is not possible to check files "
> - "and a specific commit at the same time.\n" + cpp_style._USAGE)
> - sys.exit(1)
> + cpp_style.exit_with_usage('It is not possible to check files and a '
> + 'specific commit at the same time.', True)
Same as above. Please consider using display_help=True.
--
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