[PATCH] Check code stype in Emacs: gdb-code-style.el

Eli Zaretskii eliz@gnu.org
Sat Apr 14 12:24:00 GMT 2012


> From: Yao Qi <yao@codesourcery.com>
> Date: Sat, 14 Apr 2012 12:43:34 +0800
> 
> gdb-code-style.el gives some checks, and highlight corresponding parts
> if they are violations on a certain rule or convention in gdb development.
> So far, it only has two, and I'd like to push more, if it is the right
> way to go.

Thanks.

> +;; Don't include these files directly.
> +(defun gdb-include-hook ()
> +  (font-lock-add-keywords
> +   nil
> +   '(("\\<include[ ]*\\(<\\(stat\\|dirent\\|wait\\|sys/wait\\|assert\\)\\.h>\\)" 1 font-lock-warning-face t))))

This catches '#include <stat.h>', but doesn't catch '#include "sys/stat.h"'.



More information about the Gdb-patches mailing list