Skip to content

Commit 4010d9e

Browse files
committed
Document the process of skipping/ignoring/opting-out of an individual hook function
1 parent 966b97e commit 4010d9e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/Developer-Guide_Extensions-Hooks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
## Hooks
66

77
- Hooks are listed in the order they are called.
8+
- Individual/specific hook functions can be [skipped/ignored/opted-out](/Developer-Guide_Extensions#opt-out-of-individual-hook-functions).
89

910
### `post_family_config`
1011

docs/Developer-Guide_Extensions.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,13 @@ They're the same, except:
9797
- Directory-based extensions will be passed a `${EXTENSION_DIR}` environment variable.
9898
- That is useful if there are other files/assets that belong together with that extension. An example would be a template file, some configuration file, or other static asset that is directly related to the extension.
9999
- Using directory-based extensions and `${EXTENSION_DIR}` allows for easy moving and PR'ing of user extensions.
100+
101+
# Opt-out of individual hook functions
102+
103+
Any function making use of the extension framework [generally of the form `hook_name__individual_function`] can be skipped in a board or family config, by way of
104+
105+
```bash
106+
unset -f hook_name__individual_function
107+
```
108+
109+
Doing so is at the board/family maintainer's own risk and doing so is officially unsupported. Consider splitting the function into pieces so that only the part the board/family cannot tolerate is skipped.

0 commit comments

Comments
 (0)