Philippe Mathieu-Daudé <[email protected]> writes:
> Follow the convention to use the .inc extension for .c/.h files
> re-included, as docummented in Coding Style since commit 6a0057aa22:
>
> If you do use template header files they should be named with
> the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are
> being included for expansion.
>
> Most of the codebase already uses this extension:
>
> $ git ls-files | fgrep .inc | wc -l
> 155
Ahh prescient as I've just added this hack to the loc tool I'm using:
modified src/lib.rs
@@ -338,7 +338,7 @@ pub fn lang_from_ext(filepath: &str) -> Lang {
"at" => AmbientTalk,
"awk" => Awk,
"bat" | "btm" | "cmd" => Batch,
- "c" | "ec" | "pgc" => C,
+ "c" | "ec" | "pgc" | "inc" => C,
"cc" | "cpp" | "cxx" | "c++" | "pcc" => Cpp,
"cfc" => ColdFusionScript,
"cmake" => CMake,
while gathering loc stats for the project.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro