More strictness to default src filter for builder

This commit is contained in:
Ivan Kravets
2016-01-29 17:52:54 +02:00
parent c9616ed0fa
commit 9102a70e04
2 changed files with 6 additions and 4 deletions

View File

@ -205,7 +205,7 @@ format of this option is ``C-like long integer`` value with ``L`` suffix. The
1 Hertz is equal to ``1L``, then 16 Mhz (Mega Hertz) is equal to ``16000000L``.
The full list of ``board_f_cpu`` for the popular embedded platforms you can
find in *Boards* section of :ref:`platforms`. See "Frequency" column. You can
find in *Boards* section of :ref:`platforms`. See "Frequency" column. You can
overclock a board by specifying a ``board_f_cpu`` value other than the default.
@ -335,8 +335,9 @@ be applied in theirs order.
`GLOB Patterns <http://en.wikipedia.org/wiki/Glob_(programming)>`_ are allowed.
By default, ``src_filter`` is predefined to
``+<*> -<.git/> -<svn/> -<example*/>``, which means "includes ALL files, then
exclude ``.git`` and ``svn`` repository folders and exclude ``examples`` folder.
``+<*> -<.git/> -<svn/> -<example/> -<examples/> -<test/> -<tests/>``,
which means "includes ALL files, then
exclude ``.git`` and ``svn`` repository folders, ``example`` ... folder.
This option can be set by global environment variable
:envvar:`PLATFORMIO_SRC_FILTER`.

View File

@ -27,7 +27,8 @@ from platformio.util import pioversion_to_intstr
SRC_BUILD_EXT = ["c", "cpp", "S", "spp", "SPP", "sx", "s", "asm", "ASM"]
SRC_HEADER_EXT = ["h", "hpp"]
SRC_DEFAULT_FILTER = " ".join([
"+<*>", "-<.git%s>" % sep, "-<svn%s>" % sep, "-<example*%s>" % sep,
"+<*>", "-<.git%s>" % sep, "-<svn%s>" % sep,
"-<example%s>" % sep, "-<examples%s>" % sep,
"-<test%s>" % sep, "-<tests%s>" % sep
])