From 5ca64cb020c4378c6ddd2b40a85ada11d9bd3cc8 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 21 Nov 2023 12:05:54 +0200 Subject: [PATCH] spellcheck, dependency audit, lint in gh --- .circleci/config.yml | 4 ---- .github/spellcheck-settings.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/lint.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/spellcheck.yml | 18 ++++++++++++++++++ Makefile | 5 ----- 5 files changed, 76 insertions(+), 9 deletions(-) create mode 100644 .github/spellcheck-settings.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/spellcheck.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index f4e1941d..a6664f9d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -119,10 +119,6 @@ commands: - restore_cache: keys: - v3-dependencies-{{ arch }}-{{ checksum "Cargo.toml" }} - - run: - name: Check formatting - shell: /bin/bash -l -eo pipefail - command: make lint - run: name: Build debug shell: /bin/bash -l -eo pipefail diff --git a/.github/spellcheck-settings.yml b/.github/spellcheck-settings.yml new file mode 100644 index 00000000..f9cc6c2e --- /dev/null +++ b/.github/spellcheck-settings.yml @@ -0,0 +1,28 @@ +matrix: +- name: Markdown + expect_match: false + apsell: + lang: en + d: en_US + ignore-case: true + dictionary: + wordlists: + - .github/wordlist.txt + output: wordlist.dic + pipeline: + - pyspelling.filters.markdown: + markdown_extensions: + - markdown.extensions.extra: + - pyspelling.filters.html: + comments: false + attributes: + - alt + ignores: + - ':matches(code, pre)' + - code + - pre + - blockquote + - img + sources: + - '*.md' + - 'docs/*.md' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..4946a4b9 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +name: Spellcheck + +on: + + pull_request: + +jobs: + linters: + name: Lint check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + components: rustfmt, clippy, + - run: cargo fmt -- --check + + pants: + name: Check dependencies + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + components: rustfmt, clippy, + - run: cargo pants --dev --verbose diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 00000000..743cd34c --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,18 @@ +name: Spellcheck + +on: + pull_request: + paths: + - 'docs/*' + - 'README.md' + +jobs: + spellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Spellcheck + uses: rojopolis/spellcheck-github-actions@0.30.0 + with: + config_path: .github/spellcheck-settings.yml + task_name: Markdown diff --git a/Makefile b/Makefile index a06c8e77..687afe74 100644 --- a/Makefile +++ b/Makefile @@ -45,11 +45,6 @@ TARGET=$(TARGET_DIR)/$(MODULE_NAME) #---------------------------------------------------------------------------------------------- -lint: - cargo fmt -- --check - -.PHONY: lint - #---------------------------------------------------------------------------------------------- RUST_SOEXT.linux=so