All of lore.kernel.org
 help / color / mirror / Atom feed
* Kconfig files indentation inconsistency in help text
@ 2011-02-11 16:21 Filip Honckiewicz
  0 siblings, 0 replies; only message in thread
From: Filip Honckiewicz @ 2011-02-11 16:21 UTC (permalink / raw)
  To: linux-kbuild

Hello!

I want to draw your attention on inconsistency in indentation in
Kconfig files. Reading Documentation/kbuild/kconfig-language.txt:
 "(...)The end of the help text is determined by
  the indentation level, this means it ends at the first line which has
 a smaller indentation than the first line of the help text."

Firstly, how the indentation should be counted?

From Documentation/CodingStyle:
"Tabs are 8 characters, and thus indentations are also 8 characters.(...)"
and
"Outside of comments, documentation and except in Kconfig, spaces are never
used for indentation, and the above example is deliberately broken."

There are places in Kconfig files that have mixed tabs and spaces like
in fs/proc/Kconfig where last line of help text in config
PROC_PAGE_MONITOR starts with ten spaces, but previous lines starts
with tab and two spaces. Allowing such inconsistence forces to make
some hacks when building entries tree which are present because e.g.
make menuconfig shows help text of PROC_PAGE_MONITOR normally despite
this eight spaces instead of one tab and two spaces. I believe that
tab + two spaces and 10 spaces are not the same even if it looks the
same in someones editor.

Another problem are entries with help texts started by blank lines,
e.g. config SPARSE_IRQ existing in kernel/irq/Kconfig. SPARSE_IRQ
depends on HAVE_SPARSE_IRQ. make manuconfig says, that HAVE_SPARSE_IRQ
is set to "y", but cannot find SPARSE_IRQ symbol. If help text "ends
at the first line which has a smaller indentation than the first line
of the help text", but it starts with blank line, then all next lines
should be treated as help text. But I suppose that there is some
nowhere written assumption that help text ends with end of file too...
Otherwise it shouldn't work.

Sorry for complainig but I think this ambiguities should be resolved
or at least written somewhere in CodingStyle or kconfig-language.txt,
but prefer to not use dirty hacks for strange exceptions;) If I could
help in some way, please tell me.

Cheers!
Filip

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-11 16:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-11 16:21 Kconfig files indentation inconsistency in help text Filip Honckiewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.