Skip to content

Latest commit

 

History

History
143 lines (93 loc) · 3.31 KB

CONTRIBUTING.md

File metadata and controls

143 lines (93 loc) · 3.31 KB

Contributing to the Phylum CLI

Contributions are welcome and appreciated!

Table of Contents:

  1. Bug Reports
  2. Feature Requests
  3. Patches / Pull Requests
    1. Testing
    2. Documentation
    3. Style
  4. Contact

Bug Reports

Report bugs in the GitHub issue tracker.

Please use the template, which should remind you to include:

  • A clear and concise description of the bug
  • Detailed steps to reproduce the bug
  • Expected behavior
  • Screenshots, where appropriate
  • Additional context
    • Your operating system name and version
    • Any details about your local setup that might be helpful in troubleshooting

Security issues should be disclosed following the security policy.

Feature Requests

Request new features in the GitHub issue tracker, by following the suggested template.

Patches / Pull Requests

All patches have to be sent on Github as pull requests.

All Pull Requests must have an associated issue and should include tests and documentation where appropriate.

Testing

The CLI is tested using Rust's built in tools:

cargo test

To validate none of the pre-release features have been broken, you can pass the --all-features flag:

cargo test --all-features

Documentation

Code should be documented where appropriate. The existing code can be used as guidance and the general rustfmt rules should be followed for formatting.

All user-facing CLI changes require regenerating the CLI documentation. This is automatically validated by CI and can be done with the following command:

cargo run -p xtask gendocs

You can add a file to the doc_templates directory to add extra detail to a command's CLI documentation.

Style

Rust

General code format is maintained using rustfmt:

cargo fmt

Some additional style lints are enforced with clippy:

cargo clippy

This should also pass for all pre-release features:

cargo clippy --all-features

Extensions

First-party extensions are written in TypeScript. Extensions code must be formatted and checked with deno. See the deno manual for installation instructions.

To apply formatting

deno fmt

To run lint checks

deno lint

Shell scripts

Additionally, there are a couple of script files that are part of the Phylum CLI project. These are linted by using shellcheck. The following command performs a full analysis on all scripts in the repository:

shellcheck -o all -S style -s sh $(find . -iname "*.sh")

Contact

If there are any outstanding questions about contributing to the Phylum CLI, they can be asked on the issue tracker.

As an alternative, you can also contact [email protected] for issues with using the Phylum CLI.