Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/atoma-network/atoma-node in…
Browse files Browse the repository at this point in the history
…to feat/sev-snp-support
  • Loading branch information
bredamatt committed Feb 6, 2025
2 parents 4902d57 + 5d1e4b6 commit 34bd00f
Show file tree
Hide file tree
Showing 12 changed files with 431 additions and 252 deletions.
14 changes: 14 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Run cargo clippy with the specified lint settings
echo "Running cargo clippy..."
cargo clippy --all-targets -- -D warnings -W clippy::pedantic -W clippy::nursery -W clippy::style -W clippy::complexity -W clippy::perf -W clippy::suspicious -W clippy::correctness

# Check if clippy succeeded
if [ $? -ne 0 ]; then
echo "Clippy found issues. Commit aborted."
exit 1
fi

echo "Clippy checks passed. Proceeding with commit."
exit 0
9 changes: 9 additions & 0 deletions .githooks/setup-hooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# Set the hooks directory
git config core.hooksPath .githooks

# Make the pre-commit hook executable
chmod +x .githooks/pre-commit

echo "Git hooks configured successfully."
5 changes: 5 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Security audit
permissions:
checks: write
contents: read
security-events: write
on:
schedule:
- cron: "0 0 * * *" # Run at midnight every day
Expand All @@ -19,3 +23,4 @@ jobs:
- uses: rustsec/audit-check@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
ignore: RUSTSEC-2023-0071
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: Upload to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
target/
.vscode/
/models/
config.toml
/config.toml
cursor.toml

.env
Expand Down
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"rust-analyzer.check.command": "clippy",
"rust-analyzer.check.extraArgs": [
"--",
"-D",
"warnings",
"-W",
"clippy::pedantic",
"-W",
"clippy::nursery",
"-W",
"clippy::style",
"-W",
"clippy::complexity",
"-W",
"clippy::perf",
"-W",
"clippy::suspicious",
"-W",
"clippy::correctness"
]
}
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Contributing guidelines

👋 Contributions are welcome!

Once you've tested your changes and verified that they work, you can commit your changes but please setup a git hook to run clippy on your changes.

## Setting Up Git Hooks

To enable the pre-commit hook, run the following command:

```bash
chmod +x ./.githooks/setup-hooks.sh
./.githooks/setup-hooks.sh
```

This script will configure the hooks directory and make the pre-commit hook executable.
Loading

0 comments on commit 34bd00f

Please sign in to comment.