2020-06-23 20:21:47 +02:00
# Contributing
2020-04-11 20:52:53 +02:00
Welcome to nushell!
2021-03-20 11:09:17 +01:00
*Note: for a more complete guide see [The nu contributor book ](https://www.nushell.sh/contributor-book/ )*
2020-04-11 20:52:53 +02:00
For speedy contributions open it in Gitpod, nu will be pre-installed with the latest build in a VSCode like editor all from your browser.
[![Open in Gitpod ](https://gitpod.io/button/open-in-gitpod.svg )](https://gitpod.io/#https://github.com/nushell/nushell)
2020-04-11 20:54:16 +02:00
To get live support from the community see our [Discord ](https://discordapp.com/invite/NtAbbGn ), [Twitter ](https://twitter.com/nu_shell ) or file an issue or feature request here on [GitHub ](https://github.com/nushell/nushell/issues/new/choose )!
2020-04-11 20:52:53 +02:00
<!-- WIP -->
2020-06-23 20:21:47 +02:00
## Developing
### Set up
2020-04-24 02:20:55 +02:00
This is no different than other Rust projects.
2020-06-23 20:21:47 +02:00
```bash
2020-04-24 02:20:55 +02:00
git clone https://github.com/nushell/nushell
cd nushell
cargo build
```
2020-06-23 20:21:47 +02:00
### Useful Commands
2020-04-24 02:20:55 +02:00
2020-08-30 05:33:28 +02:00
- Build and run Nushell:
2020-05-24 19:34:26 +02:00
2020-08-30 05:33:28 +02:00
```shell
cargo build --release & & cargo run --release
```
2020-05-24 19:34:26 +02:00
2020-10-08 04:14:59 +02:00
- Build and run with extra features:
```shell
cargo build --release --features=extra & & cargo run --release --features=extra
```
2020-08-30 05:33:28 +02:00
- Run Clippy on Nushell:
2020-05-24 19:34:26 +02:00
2020-08-30 05:33:28 +02:00
```shell
cargo clippy --all --features=stable
```
2020-05-24 19:34:26 +02:00
2020-08-30 05:33:28 +02:00
- Run all tests:
2020-04-24 02:20:55 +02:00
2020-08-30 05:33:28 +02:00
```shell
cargo test --all --features=stable
```
2020-05-24 19:34:26 +02:00
2020-08-30 05:33:28 +02:00
- Run all tests for a specific command
2020-05-24 19:34:26 +02:00
2020-08-30 05:33:28 +02:00
```shell
cargo test --package nu-cli --test main -- commands::< command_name_here >
```
2020-05-24 19:34:26 +02:00
2020-08-30 05:33:28 +02:00
- Check to see if there are code formatting issues
2020-05-24 19:34:26 +02:00
2020-08-30 05:33:28 +02:00
```shell
cargo fmt --all -- --check
```
2020-05-24 19:34:26 +02:00
2020-08-30 05:33:28 +02:00
- Format the code in the project
2020-05-24 19:34:26 +02:00
2020-08-30 05:33:28 +02:00
```shell
cargo fmt --all
```
2020-10-08 04:14:59 +02:00
### Debugging Tips
- To view verbose logs when developing, enable the `trace` log level.
```shell
2022-03-25 23:56:40 +01:00
cargo build --release --features=extra & & cargo run --release --features=extra -- --log-level trace
2020-10-08 04:14:59 +02:00
```