From 0ea6c3a5f5ac792fe9fb657ec4b19123b9049c59 Mon Sep 17 00:00:00 2001 From: akshat Date: Mon, 23 Sep 2024 17:25:20 +0530 Subject: [PATCH] Add formatting guidelines to CONTRIBUTING doc --- .../workflows/{test_lint_fmt.yml => test_fmt_lint.yml} | 6 +++--- CONTRIBUTING.md | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) rename .github/workflows/{test_lint_fmt.yml => test_fmt_lint.yml} (99%) diff --git a/.github/workflows/test_lint_fmt.yml b/.github/workflows/test_fmt_lint.yml similarity index 99% rename from .github/workflows/test_lint_fmt.yml rename to .github/workflows/test_fmt_lint.yml index 281e99e9..83dea702 100644 --- a/.github/workflows/test_lint_fmt.yml +++ b/.github/workflows/test_fmt_lint.yml @@ -22,8 +22,6 @@ jobs: RABBITMQ_DEFAULT_PASS: top-gun steps: - uses: actions/checkout@v3 - - name: Check formatting - run: clj -M:cljfmt check - name: Run tests run: clj -X:test env: @@ -33,11 +31,13 @@ jobs: GOOSE_TEST_RABBITMQ_PORT: 5672 GOOSE_TEST_RABBITMQ_USERNAME: goose GOOSE_TEST_RABBITMQ_PASSWORD: top-gun - lint: + fmt_lint: runs-on: ubuntu-20.04 container: cljkondo/clj-kondo:2022.10.05-alpine steps: - uses: actions/checkout@v3 + - name: Check formatting + run: clj -M:cljfmt check - name: Lint src run: clj-kondo --lint src/ - name: Lint test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8d6413c..df7822eb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,6 +28,16 @@ $ clj -X:test # Running all tests. $ docker-compose down # ...when you're done. ``` +Formatting +-------- +- Goose adheres to the [weavejester/cljfmt](https://clojars.org/dev.weavejester/cljfmt) library to maintain consistent code formatting. +- Install the appropriate plugin for your IDE to ensure compliance. + +```shell +$ clj -M:cljfmt fix # Automatically fix formatting issues. +$ clj -M:cljfmt check # Check any formatting inconsistencies. +``` + Linting -------- - Install [clj-kondo v2022.10.05](https://github.com/clj-kondo/clj-kondo/blob/master/doc/install.md#installation-script-macos-and-linux)