[READ-ONLY] Mirror of https://github.com/Tamschi/loess. Trying something...
loess CONTRIBUTING.md
2.5 kB
Markdown

Contributing to Loess #

Please create a GitHub issue for your idea before starting work on a merge-request.
Doing so makes it easier to see if the change is likely to be merged once complete.

When you start work on your change, please create a draft PR for ongoing discussion.

Guidelines #

Don't use procedural macros in and (in most cases) don't add dependencies to other crates to Loess.

The loess-rust crate is organised roughly like The Rust Reference, with opaque implementations split into a separate subfolder. Type names should correspond directly to named grammar symbols or other applicable names in The Rust Reference.

Grammar symbols should be documented to show their immediate pattern in the module overview. (See loess-rust for examples. grammar! can generate this documentation for you in some cases.) This is not required for temporary opaque implementations, which instead should identify themselves as such.

I'm open to adding additional feature-gated grammars for common text file formats, as long as they can be parsed accurately on stable Rust. (That means no YAML, but JSON would be okay.)
Type names may be reused between distinct grammars, but must not be reused within the same grammar. Where a name collides with a Rust keyword, the respective raw identifier (r#…) should be used if available.

You may introduce new macro_rules! macros to avoid large amounts of repetitive code. Please keep them reasonably simple (but try to match my standards, which mainly means optional trailing repeat-separators should be supported in the input).

Try to focus on what you need as a consume and don't aim for completeness for completeness's sake. That saves work for us both 🙂

Formatting #

Please format with:

cargo +nightly fmt

Testing #

Please test with:

cargo test

Publishing #

Check whether a version change is necessary with:

# cargo binstall cargo-semver-checks
# OR
# cargo install --locked cargo-semver-checks
cargo semver-checks

Publish with:

cargo publish --dry-run --locked
cargo publish --locked