You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contributed bash functions are most welcome! The more we share the less we
10
+
duplicate each other. In order to keep this repo tidy, every function must be
11
+
documented in the readme and tested, the lint scripts enforce these rules.
12
+
13
+
1. Add the libraries or functions that you need
14
+
2. Add BATS tests for all new top level functions
15
+
3. Add descriptions for each function to the contents table in this readme
16
+
4. Run ./run-tests to ensure all tests pass before submitting
17
+
5. Create a PR
18
+
6. Wait for review
19
+
20
+
## Style Guide
21
+
Follow the [google shell style guide](https://google.github.io/styleguide/shell.xml#Naming_Conventions).
22
+
TL;DR:
23
+
1. Use snake_case function and variable names
24
+
1. Use `function` when declaring functions.
25
+
1. Don't use .sh extensions
26
+
27
+
## Testing
28
+
Tests are written using [BATS](https://github.com/bats-core/bats). Each lib has a `lib-name.bats` file in [tests-for-this-repo](/tests-for-this-repo).
29
+
Asserts are provided by [bats-assert-1](https://github.com/jasonkarns/bats-assert-1). Asserts provide useful debugging output when the assertion fails, eg expected x got y.
Contributed bash functions are most welcome! The more we share the less we
191
-
duplicate each other. In order to keep this repo tidy, every function must be
192
-
documented in the readme and tested, the lint scripts enforce these rules.
193
-
194
-
1. Add the libraries or functions that you need
195
-
1. Add BATS tests for all new top level functions
196
-
1. Add descriptions for each function to the contents table in this readme
197
-
1. Run ./run-tests to ensure all tests pass before submitting
198
-
1. Create a PR
199
-
1. Wait for review
200
-
201
-
## Testing
202
-
Tests are written using [BATS](https://github.com/bats-core/bats). Each lib has a `lib-name.bats` file in [tests-for-this-repo](/tests-for-this-repo).
203
-
Asserts are provided by [bats-assert-1](https://github.com/jasonkarns/bats-assert-1). Asserts provide useful debugging output when the assertion fails, eg expected x got y.
0 commit comments