From 337b7c431435543a95270792df4d7895748d58ba Mon Sep 17 00:00:00 2001 From: Leonard Lesinski <84378319+Le0X8@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:46:29 +0200 Subject: [PATCH] chore: Added CI and fixed Clippy warnings --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ .vscode/extensions.json | 16 ++++++++++++++++ .vscode/settings.json | 11 ++++++++++- src/commands/create.rs | 9 +++------ src/commands/list.rs | 12 ++++-------- src/commands/metadata.rs | 6 ++---- src/main.rs | 3 ++- 7 files changed, 57 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .vscode/extensions.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0008304 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: Run CI +on: [push, pull_request] +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: full +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - name: Set up Rust + uses: actions/checkout@v4 + - name: Install cargo-audit + run: cargo install cargo-audit + - name: Build + run: cargo build --verbose + - name: Run clippy + run: cargo clippy --verbose -- -D warnings + - name: Run audit + run: cargo audit \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..d486f31 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,16 @@ +{ + "recommendations": [ + "github.vscode-github-actions", + "ms-vscode.hexeditor", + "wakatime.vscode-wakatime", + "github.vscode-pull-request-github", + "fill-labs.dependi", + "tamasfe.even-better-toml", + "github.remotehub", + "dustypomerleau.rust-syntax", + "rust-lang.rust-analyzer", + "vadimcn.vscode-lldb", + "usernamehw.errorlens", + "gruntfuggly.todo-tree" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 68ebc15..5a89bd3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,12 @@ { - "editor.tabSize": 4 + "editor.tabSize": 4, + "errorLens.enabled": true, + "errorLens.gutterIconsEnabled": true, + "errorLens.gutterIconSet": "squareRounded", + "todo-tree.regex.regex": "(//|#|