Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add rust husky #977

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .eslintrc.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/calimero_node_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:

# Install and build node-ui
- name: Install node-ui dependencies with pnpm
run: pnpm install --prefix ./node-ui
run: cd ./node-ui && pnpm install

- name: Build node-ui
run: pnpm --filter ./node-ui run build
run: cd ./node-ui && pnpm build

- name: Setup rust toolchain
run: rustup toolchain install stable --profile minimal
Expand All @@ -53,7 +53,7 @@ jobs:

- name: Install target for ${{ matrix.target }}
run: rustup target add ${{ matrix.target }}

- name: Install dependencies for cross-compilation
run: |
sudo apt-get update
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
OPENSSL_STATIC: ${{ env.OPENSSL_STATIC }}
RUSTFLAGS: "-C link-arg=-lstdc++ -C link-arg=-lpthread -C link-arg=-lc"
run: cargo zigbuild -p meroctl --release --target ${{ matrix.target }}

- name: Build meroctl for x86_64
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo build -p meroctl --release --target ${{ matrix.target }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/calimero_node_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

# Install and build node-ui
- name: Install node-ui dependencies with pnpm
run: pnpm install --prefix ./node-ui
run: cd ./node-ui && pnpm install

- name: Build node-ui
run: pnpm --filter ./node-ui run build
run: cd ./node-ui && pnpm build

- name: Install rustup and Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Rust

on:
push:
branches: ['master']
branches: ["master"]
pull_request:
branches: ['master']
branches: ["master"]

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -50,17 +50,17 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
node-version: "20"

- name: Install pnpm
run: npm install -g pnpm

# Install and build node-ui
- name: Install node-ui dependencies with pnpm
run: pnpm install --prefix ./node-ui
run: cd ./node-ui && pnpm install

- name: Build node-ui
run: pnpm --filter ./node-ui run build
run: cd ./node-ui && pnpm build

- name: Setup rust toolchain
run: rustup toolchain install stable --profile minimal
Expand Down
3 changes: 1 addition & 2 deletions .husky/pre-commit → .husky/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

echo "Running pre-commit hook..."

# Check for changes in Markdown or MDX files
if git diff --cached --name-only | grep -qE '\.mdx?$'; then
echo "Markdown or MDX files have been changed."
pnpm format:md
dprint fmt
fi

# Check for changes in Rust files
Expand Down
6 changes: 0 additions & 6 deletions .prettierignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these accounted for someway with dprint?

This file was deleted.

5 changes: 3 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][], version 2.1, available
at [v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
This Code of Conduct is adapted from the
[Contributor Covenant][Contributor Covenant], version 2.1, available at
[v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

Community Impact Guidelines were inspired by Mozilla's code of conduct
enforcement ladder.
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ Thank you for dedicating your time to contribute to our project.
This guide outlines the contribution workflow to make the process smooth and
effective for everyone.

Start by reading the [README][] to understand the project better.
Start by reading the [README][README] to understand the project better.

## Project Status

This project is actively being developed.

You can check out the open [Issues][], monitor the development progress, and
contribute.
You can check out the open [Issues][Issues], monitor the development progress,
and contribute.

## Getting Started

There are several ways you can contribute:
There are several ways you can contribute :

- Solve open [Issues][]
- Solve open [Issues][Issues]
- Report bugs or suggest features
- Enhance the documentation

Expand All @@ -39,12 +39,12 @@ general guidelines:

- Follow the repository’s formatting guidelines.

- Update the [README][] file if your changes affect it.
- Update the [README][README] file if your changes affect it.

## Issues

Use [Issues][] to report problems, request features, or discuss changes before
creating a PR.
Use [Issues][Issues] to report problems, request features, or discuss changes
before creating a PR.

### Solving an Issue

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

We contributors to Calimero:

- License all our contributions to the project under the [Apache License,
Version 2.0][Apache license].
- License all our contributions to the project under the
[Apache License, Version 2.0][Apache license].

- Have the legal rights to license our contributions ourselves, or get
permission to license them from our employers, clients, or others who may have
them.

- Sign off on our commits with the [Developer Certificate of Origin (DCO)
Version 1.1][DCO].
- Sign off on our commits with the
[Developer Certificate of Origin (DCO) Version 1.1][DCO].

- Previously we added our names and GitHub handles to this `CONTRIBUTORS.md`
file. We leave these names here to record the commits that came before.
Expand Down
Loading
Loading