[Webkit-unassigned] [Bug 36573] check-webkit-style should restore the original file name if it is used from Emacs's flymake so that it can get an correct header guard name

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 24 23:21:56 PDT 2010


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





--- Comment #2 from Shinichiro Hamaji <hamaji at chromium.org>  2010-03-24 23:21:56 PST ---
(From update of attachment 51596)
> -    emacs_flymake_suffix = '_flymake.cpp'
> -    if abs_filename.endswith(emacs_flymake_suffix):
> -        abs_filename = abs_filename[:-len(emacs_flymake_suffix)] + '.cpp'
> +    abs_filename = re.sub(r'_flymake\.cpp$', '.cpp', abs_filename)

Let me confirm, is this just a refactoring?

> +        # Special case for flymake
> +        error_collector = ErrorCollector(self.assert_)
> +        self.process_file_data('mydir/Foo_flymake.h', 'h', [], error_collector)
> +        self.assertEquals(
> +            1,
> +            error_collector.result_list().count(
> +                'No #ifndef header guard found, suggested CPP variable is: %s'
> +                '  [build/header_guard] [5]' % expected_guard),
> +            error_collector.result_list())
> +

I guess what we want to ensure is "#ifndef Foo_h_" won't be warned when it is
put in "Foo_flymake.h" ? If so, please add a test case for this case.

By the way, I think putting your elisp to use check-webkit-style with flymake
may help someone. Could you show it?

-- 
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