From 7df8e33f7416eef1beb41735834fca77b72e2a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Sat, 27 Jan 2024 19:18:46 +0100 Subject: [PATCH] docs: add explanations about external linting tools --- .github/workflows/ci.yml | 4 +++- README.md | 21 +++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cfcdac..f71406a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: configFile: ".commitlintrc.json" failOnWarnings: true - lint-prettier: + lint-general: runs-on: "ubuntu-latest" steps: - uses: "actions/checkout@v4.1.1" @@ -59,6 +59,8 @@ jobs: with: node-version: "20.11.0" + - run: "npm install --global editorconfig-checker@5.1.2" - run: "npm install --global prettier@3.2.4" + - run: "editorconfig-checker" - run: "prettier . --check" diff --git a/README.md b/README.md index fda143f..6d680ac 100644 --- a/README.md +++ b/README.md @@ -20,24 +20,41 @@ #### Rust Toolchain -The current Minimum Supported [Rust](https://www.rust-lang.org/) Version (MSRV) is **1.74.0**. +The current Minimum Supported [Rust](https://www.rust-lang.org/) Version (MSRV) is **v1.74.0**. The project is **tested** against the following Rust versions: - **Minimum Supported Rust Version (MSRV): v1.74.0** - **Latest Stable Version** +#### External Linting Tools (optional) + +**External linting tools** are used to ensure a consistent code style and commit message format. They are **used in the Continuous Integration (CI)** pipeline and **can be optionally used locally**. + +They have to be installed using [Node.js](https://nodejs.org/) >= v20.0.0 and [npm](https://www.npmjs.com/) >= v10.0.0. + +- [editorconfig-checker](https://editorconfig-checker.github.io/) (`npm install --global editorconfig-checker@5.1.2`) +- [Prettier](https://prettier.io/) v3.2.4 (`npm install --global prettier@3.2.4`) +- [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) v0.12.1 (`npm install --global markdownlint-cli2@0.12.1`) +- [commitlint](https://commitlint.js.org/#/) v18.6.0 (`npm install --global @commitlint/cli@18.6.0 @commitlint/config-conventional@18.6.0`) + ### Usage ```sh # Run a specific day's challenge (e.g. Day 1) cargo run --package day_1 -# Build, Lint, and Test +# Build, Lint, and Test Usage cargo build cargo test cargo clippy --verbose -- -D warnings cargo fmt -- --check + +# External Linting Tools Usage (optional) +editorconfig-checker +prettier . --check +markdownlint-cli2 +echo 'chore: try commitlint' | commitlint ``` ## 💡 Contributing