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

Seperates linting/Rust into linting/{Rust, Rust-Typos, Rust-Audit} #1759

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 12 additions & 0 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Setup Rust Environment"
description: "Install necessary dependencies and set up Rust stable"
runs:
using: "composite"
steps:
- run: sudo apt update || true
shell: bash
- run: sudo apt-get install -y libpcap-dev
shell: bash
- run: rustup update stable && rustup default stable || rustup default stable
shell: bash

30 changes: 20 additions & 10 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,25 @@ jobs:
working-directory: rust
steps:
- uses: actions/checkout@v4
- run: sudo apt update || true
- run: sudo apt-get install -y libpcap-dev
- run: rustup update stable && rustup default stable || rustup default stable
- run: cargo install cargo-audit
- uses: ./.github/actions/setup-rust
- run: cargo clippy -- -D warnings
- run: cargo fmt --check
Rust-Typos:
runs-on: ubuntu-latest
defaults:
run:
working-directory: rust
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-rust
- run: cargo install typos-cli
- name: Clippy
run: cargo clippy -- -D warnings
- name: Audit
run: cargo audit
- run: typos
- name: Formatting
run: cargo fmt --check
Rust-Audit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: rust
steps:
- uses: actions/checkout@v4
- run: cargo install cargo-audit
- run: cargo audit
1 change: 0 additions & 1 deletion rust/src/nasl/builtin/cryptographic/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ mod helper;
mod hmac;
mod rc4;
mod rsa;

2 changes: 0 additions & 2 deletions rust/src/osp/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use super::commands::Error;
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct StringU64(u64);


impl From<i64> for StringU64 {
fn from(value: i64) -> Self {
StringU64(value as u64)
Expand Down Expand Up @@ -735,7 +734,6 @@ mod tests {
}
}


#[test]
fn init_response() {
let xml = r#"
Expand Down
Loading