1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
---
layout: default
title: target.json
section: reference/ignore
---
# .yotta_ignore Reference
A `.yotta_ignore` file can be added to any module or target to make yotta
completely ignore any listed files. Listed files are ignored when
auto-generating build files, and when publishing to the registry (but note that
custom CMakeLists files may still refer to ignored files).
## Syntax
Glob-style syntax is supported, with one pattern per line in the ignore file.
Lines in the ignore file starting with `#` are comments and will not be parsed
by yotta.
Any file or directory that matches any pattern in the ignore file will be ignored.
Any files within an ignored directory will also be ignored.
* `*` matches zero or more of any character, but does not match a directory separator
* `?` matches any character exactly once, but does not match a directory separator
* `[]` matches any character within `[]` exactly once
If a pattern starts with a `/` then it is an **absolute** pattern, and the whole
path relative to the root of the module must match.
If a pattern does not start with a `/` then it is a **relative** pattern, and
will match files and directories with any parent hierarchy.
Note that with the relative pattern `b/c`, and a directory hierarchy `a/b/c/d/e`,
the whole of the directory `c` (including any subdirectory `d`) will be ignored.
### Examples
* Ignore all files in `test/bar/`: `/test/bar/*`
* Ignore all `.tar.gz` and `.tar.bz` files in the root directory: `/*.tar.[bg]z`
* Ignore all `.swp` files everywhere: `*.swp`
* Ignore all dotfiles files everywhere: `.*`
## Always-Ignored Files
Files matching some patterns will always be ignored by yotta, whether or not a
.yotta_ignore file is present. This list currently includes:
`/upload.tar.gz`
`/upload.tar.bz`
`/.git`
`/.hg`
`/.svn`
`/yotta_modules`
`/yotta_targets`
`/build`
`.DS_Store`
`.sw[ponml]`
`*~`
`._.*`
`.yotta.json`
|