From 6c29019b0ec1c3db9370b1d935f65e9578117c05 Mon Sep 17 00:00:00 2001 From: Tom Kunc Date: Tue, 22 Nov 2022 14:14:59 +1100 Subject: [PATCH] Edit approval workflow and update miscellanea --- .github/workflows/main.yml | 9 +++++++++ CONTRIBUTING.md | 14 ++++++++++++++ Cargo.lock | 9 ++++++++- Cargo.toml | 3 ++- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5574ee7..fd5d059 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,3 +40,12 @@ jobs: toolchain: stable - run: rustup component add rustfmt - run: cargo fmt --check + + macrokata-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - run: cargo run --bin macrokata -- check-all diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1f8c631 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,14 @@ +# Contributing to Macrokata + +Thank you for your interest in helping with MacroKata. + +These instructions are probably incomplete (feel free to PR to add to them)! + +## What are `solution.diff` files? + +Since we have to maintain two separate files (the starter code, and the solution code), +it's very easy to make a change in one that affects the other. + +Therefore, `solution.diff` files describe what the correct diff is between a starter +code and solution code. If you intentionally change this, use the `macrokata update-diff` +command to update the file. Part of any PR will be checking that this diff is sane. diff --git a/Cargo.lock b/Cargo.lock index ec99b86..f6a6250 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -85,6 +85,12 @@ dependencies = [ "wasi", ] +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + [[package]] name = "hashbrown" version = "0.12.3" @@ -124,10 +130,11 @@ checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" [[package]] name = "macrokata" -version = "0.2.0" +version = "0.2.1" dependencies = [ "atty", "clap", + "glob", "imara-diff", ] diff --git a/Cargo.toml b/Cargo.toml index 9aa9d05..e591589 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "macrokata" -version = "0.2.0" +version = "0.2.1" edition = "2021" default-run = "macrokata" @@ -109,3 +109,4 @@ path = "exercises/12_hygienic_macros/solutions/main.rs" atty = "0.2.14" clap = { version = "4.0.26", features = ["derive"] } imara-diff = "0.1.5" +glob = "0.3.0"