Skip to content

Add github actions CI and remove travis CI #1

Add github actions CI and remove travis CI

Add github actions CI and remove travis CI #1

Triggered via push May 3, 2024 06:31
Status Failure
Total duration 29s
Artifacts

ci.yml

on: push
Matrix: build-and-test
Fit to window
Zoom out
Zoom in

Annotations

35 errors and 18 warnings
build-and-test (1.42.0)
The process '/Users/runner/.cargo/bin/rustup' failed with exit code 1
build-and-test (beta)
The job was canceled because "_1_42_0" failed.
build-and-test (beta)
The operation was canceled.
build-and-test (stable)
The job was canceled because "_1_42_0" failed.
build-and-test (stable)
The operation was canceled.
casting to the same type is unnecessary (`u32` -> `u32`): src/lib.rs#L354
error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/lib.rs:354:29 | 354 | pfioc_rule.action = ffi::pfvar::PF_GET_NONE as u32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ffi::pfvar::PF_GET_NONE` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
this expression creates a reference which is immediately dereferenced by the compiler: src/lib.rs#L301
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:301:48 | 301 | setup_pfioc_state_kill(&pfsync_state, &mut pfioc_state_kill); | ^^^^^^^^^^^^^ help: change this to: `pfsync_state` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
casting to the same type is unnecessary (`u32` -> `u32`): src/lib.rs#L273
error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/lib.rs:273:29 | 273 | pfioc_rule.action = ffi::pfvar::PF_CHANGE_ADD_TAIL as u32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ffi::pfvar::PF_CHANGE_ADD_TAIL` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u32` -> `u32`): src/lib.rs#L242
error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/lib.rs:242:29 | 242 | pfioc_rule.action = ffi::pfvar::PF_CHANGE_ADD_TAIL as u32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ffi::pfvar::PF_CHANGE_ADD_TAIL` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
this expression creates a reference which is immediately dereferenced by the compiler: src/lib.rs#L236
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:236:58 | 236 | pfioc_rule.ticket = utils::get_ticket(self.fd(), &anchor, AnchorKind::Filter)?; | ^^^^^^^ help: change this to: `anchor` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
you should consider adding a `Default` implementation for `AnchorChange`: src/transaction.rs#L206
error: you should consider adding a `Default` implementation for `AnchorChange` --> src/transaction.rs:206:5 | 206 | / pub fn new() -> Self { 207 | | AnchorChange { 208 | | filter_rules: None, 209 | | redirect_rules: None, 210 | | } 211 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 204 + impl Default for AnchorChange { 205 + fn default() -> Self { 206 + Self::new() 207 + } 208 + } |
casting to the same type is unnecessary (`u32` -> `u32`): src/transaction.rs#L112
error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/transaction.rs:112:29 | 112 | pfioc_rule.action = ffi::pfvar::PF_CHANGE_NONE as u32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ffi::pfvar::PF_CHANGE_NONE` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
this expression creates a reference which is immediately dereferenced by the compiler: src/transaction.rs#L76
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/transaction.rs:76:45 | 76 | Self::new_trans_element(&anchor, RulesetKind::Redirect) | ^^^^^^^ help: change this to: `anchor` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
dereferencing a tuple pattern where every element takes a reference: src/transaction.rs#L75
error: dereferencing a tuple pattern where every element takes a reference --> src/transaction.rs:75:53 | 75 | .chain(redirect_changes.iter().map(|&(ref anchor, _)| { | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 75 - .chain(redirect_changes.iter().map(|&(ref anchor, _)| { 75 + .chain(redirect_changes.iter().map(|(anchor, _)| { |
this expression creates a reference which is immediately dereferenced by the compiler: src/transaction.rs#L74
error: this expression creates a reference which is immediately dereferenced by the compiler --> src/transaction.rs:74:65 | 74 | .map(|&(ref anchor, _)| Self::new_trans_element(&anchor, RulesetKind::Filter)) | ^^^^^^^ help: change this to: `anchor` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `-D clippy::needless-borrow` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
dereferencing a tuple pattern where every element takes a reference: src/transaction.rs#L74
error: dereferencing a tuple pattern where every element takes a reference --> src/transaction.rs:74:23 | 74 | .map(|&(ref anchor, _)| Self::new_trans_element(&anchor, RulesetKind::Filter)) | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `-D clippy::needless-borrowed-reference` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_borrowed_reference)]` help: try removing the `&` and `ref` parts | 74 - .map(|&(ref anchor, _)| Self::new_trans_element(&anchor, RulesetKind::Filter)) 74 + .map(|(anchor, _)| Self::new_trans_element(&anchor, RulesetKind::Filter)) |
you should consider adding a `Default` implementation for `Transaction`: src/transaction.rs#L27
error: you should consider adding a `Default` implementation for `Transaction` --> src/transaction.rs:27:5 | 27 | / pub fn new() -> Self { 28 | | Transaction { 29 | | change_by_anchor: HashMap::new(), 30 | | } 31 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `-D clippy::new-without-default` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::new_without_default)]` help: try adding this | 25 + impl Default for Transaction { 26 + fn default() -> Self { 27 + Self::new() 28 + } 29 + } |
writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do: src/pooladdr.rs#L106
error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do --> src/pooladdr.rs:106:28 | 106 | fn create_palist(pool: &mut Vec<ffi::pfvar::pf_pooladdr>) -> ffi::pfvar::pf_palist { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut [ffi::pfvar::pf_pooladdr]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do: src/pooladdr.rs#L97
error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do --> src/pooladdr.rs:97:28 | 97 | fn link_elements(pool: &mut Vec<ffi::pfvar::pf_pooladdr>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut [ffi::pfvar::pf_pooladdr]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `-D clippy::ptr-arg` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::ptr_arg)]`
unsafe function's docs miss `# Safety` section: src/pooladdr.rs#L83
error: unsafe function's docs miss `# Safety` section --> src/pooladdr.rs:83:5 | 83 | pub unsafe fn to_palist(&self) -> ffi::pfvar::pf_palist { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc = note: `-D clippy::missing-safety-doc` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::missing_safety_doc)]`
this `impl` can be derived: src/rule/tcp_flags.rs#L24
error: this `impl` can be derived --> src/rule/tcp_flags.rs:24:1 | 24 | / impl Default for TcpFlag { 25 | | fn default() -> Self { 26 | | TcpFlag::Any 27 | | } 28 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 12 + #[derive(Default)] 13 | pub enum TcpFlag { | help: ...and mark the default variant | 13 ~ #[default] 14 ~ Any, |
this `impl` can be derived: src/rule/state_policy.rs#L19
error: this `impl` can be derived --> src/rule/state_policy.rs:19:1 | 19 | / impl Default for StatePolicy { 20 | | fn default() -> Self { 21 | | StatePolicy::None 22 | | } 23 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 12 + #[derive(Default)] 13 | pub enum StatePolicy { | help: ...and mark the default variant | 13 ~ #[default] 14 ~ None, |
this `impl` can be derived: src/rule/interface.rs#L26
error: this `impl` can be derived --> src/rule/interface.rs:26:1 | 26 | / impl Default for Interface { 27 | | fn default() -> Self { 28 | | Interface::Any 29 | | } 30 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 21 + #[derive(Default)] 22 | pub enum Interface { | help: ...and mark the default variant | 22 ~ #[default] 23 ~ Any, |
this `impl` can be derived: src/rule/port.rs#L19
error: this `impl` can be derived --> src/rule/port.rs:19:1 | 19 | / impl Default for Port { 20 | | fn default() -> Self { 21 | | Port::Any 22 | | } 23 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 13 + #[derive(Default)] 14 | pub enum Port { | help: ...and mark the default variant | 14 ~ #[default] 15 ~ Any, |
this `impl` can be derived: src/rule/route.rs#L19
error: this `impl` can be derived --> src/rule/route.rs:19:1 | 19 | / impl Default for Route { 20 | | fn default() -> Self { 21 | | Route::NoRoute 22 | | } 23 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 12 + #[derive(Default)] 13 | pub enum Route { | help: ...and mark the default variant | 13 ~ #[default] 14 ~ NoRoute, |
this `impl` can be derived: src/rule/proto.rs#L18
error: this `impl` can be derived --> src/rule/proto.rs:18:1 | 18 | / impl Default for Proto { 19 | | fn default() -> Self { 20 | | Proto::Any 21 | | } 22 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 10 + #[derive(Default)] 11 | pub enum Proto { | help: ...and mark the default variant | 11 ~ #[default] 12 ~ Any, |
this `impl` can be derived: src/rule/ip.rs#L44
error: this `impl` can be derived --> src/rule/ip.rs:44:1 | 44 | / impl Default for Ip { 45 | | fn default() -> Self { 46 | | Ip::Any 47 | | } 48 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 19 + #[derive(Default)] 20 | pub enum Ip { | help: ...and mark the default variant | 20 ~ #[default] 21 ~ Any, |
this `impl` can be derived: src/rule/direction.rs#L19
error: this `impl` can be derived --> src/rule/direction.rs:19:1 | 19 | / impl Default for Direction { 20 | | fn default() -> Self { 21 | | Direction::Any 22 | | } 23 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 13 + #[derive(Default)] 14 | pub enum Direction { | help: ...and mark the default variant | 14 ~ #[default] 15 ~ Any, |
this `impl` can be derived: src/rule/addr_family.rs#L19
error: this `impl` can be derived --> src/rule/addr_family.rs:19:1 | 19 | / impl Default for AddrFamily { 20 | | fn default() -> Self { 21 | | AddrFamily::Any 22 | | } 23 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-D clippy::derivable-impls` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it... | 13 + #[derive(Default)] 14 | pub enum AddrFamily { | help: ...and mark the default variant | 14 ~ #[default] 15 ~ Any, |
casting to the same type is unnecessary (`u32` -> `u32`): src/utils.rs#L49
error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/utils.rs:49:25 | 49 | pfioc_rule.action = ffi::pfvar::PF_CHANGE_GET_TICKET as u32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ffi::pfvar::PF_CHANGE_GET_TICKET` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
unused import: `IdUnaryModifier`: src/rule/gid.rs#L9
error: unused import: `IdUnaryModifier` --> src/rule/gid.rs:9:26 | 9 | pub use super::uid::{Id, IdUnaryModifier}; | ^^^^^^^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]`
constants have by default a `'static` lifetime: src/ffi/pfvar.rs#L118
error: constants have by default a `'static` lifetime --> src/ffi/pfvar.rs:118:32 | 118 | pub const PF_RESERVED_ANCHOR: &'static [u8; 4usize] = b"_pf\0"; | -^^^^^^^------------- help: consider removing `'static`: `&[u8; 4usize]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes = note: `-D clippy::redundant-static-lifetimes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::redundant_static_lifetimes)]`
build-and-test (nightly)
The job was canceled because "_1_42_0" failed.
build-and-test (nightly)
The operation was canceled.
linting
Clippy had exited with the 101 exit code
build-and-test (1.42.0)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/toolchain@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
build-and-test (1.42.0)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
formatting
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/toolchain@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
formatting
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-and-test (nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-and-test (nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-and-test (nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-and-test (nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
linting
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
linting
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/