Skip to content

Commit

Permalink
Deny clippy integer_arithmetic but explicitly allow it in each source…
Browse files Browse the repository at this point in the history
… file. (#235)
  • Loading branch information
Lichtso authored Dec 6, 2021
1 parent c147648 commit 6a97477
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Lint
run: |
cargo fmt --all -- --check
cargo clippy --all --tests -- --deny=warnings
cargo clippy --all --tests -- --deny=warnings --deny=clippy::integer_arithmetic
shell: bash
- name: Build and test
run: |
Expand Down
1 change: 1 addition & 0 deletions src/aligned_memory.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! Aligned memory
/// Provides u8 slices at a specified alignment
Expand Down
1 change: 1 addition & 0 deletions src/asm_parser.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Copyright 2017 Rich Lane <[email protected]>
//
// Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> or
Expand Down
1 change: 1 addition & 0 deletions src/assembler.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Copyright 2017 Rich Lane <[email protected]>
//
// Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> or
Expand Down
1 change: 1 addition & 0 deletions src/call_frames.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! Call frame handler
use crate::{
Expand Down
1 change: 1 addition & 0 deletions src/disassembler.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Copyright 2017 6WIND S.A. <[email protected]>
//
// Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> or
Expand Down
1 change: 1 addition & 0 deletions src/ebpf.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Copyright 2016 6WIND S.A. <[email protected]>
//
// Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> or
Expand Down
1 change: 1 addition & 0 deletions src/elf.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! This module relocates a BPF ELF
// Note: Typically ELF shared objects are loaded using the program headers and
Expand Down
1 change: 1 addition & 0 deletions src/insn_builder.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Copyright 2017 Alex Dukhno <[email protected]>
//
// Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> or
Expand Down
1 change: 1 addition & 0 deletions src/jit.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Derived from uBPF <https://github.com/iovisor/ubpf>
// Copyright 2015 Big Switch Networks, Inc
// (uBPF: JIT algorithm, originally in C)
Expand Down
1 change: 1 addition & 0 deletions src/memory_region.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! This module defines memory regions
use crate::{
Expand Down
1 change: 1 addition & 0 deletions src/static_analysis.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
//! Static Byte Code Analysis
use crate::disassembler::disassemble_instruction;
Expand Down
1 change: 1 addition & 0 deletions src/syscalls.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Copyright 2015 Big Switch Networks, Inc
// (Algorithms for uBPF syscalls, originally in C)
// Copyright 2016 6WIND S.A. <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions src/verifier.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Derived from uBPF <https://github.com/iovisor/ubpf>
// Copyright 2015 Big Switch Networks, Inc
// (uBPF: safety checks, originally in C)
Expand Down
1 change: 1 addition & 0 deletions src/vm.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Derived from uBPF <https://github.com/iovisor/ubpf>
// Copyright 2015 Big Switch Networks, Inc
// (uBPF: VM architecture, parts of the interpreter, originally in C)
Expand Down
1 change: 1 addition & 0 deletions src/x86.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
use crate::{
error::{EbpfError, UserDefinedError},
jit::{emit, emit_variable_length, JitCompiler, OperandSize},
Expand Down
1 change: 1 addition & 0 deletions tests/assembler.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Copyright 2017 Rich Lane <[email protected]>
//
// Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> or
Expand Down
1 change: 1 addition & 0 deletions tests/ubpf_execution.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::integer_arithmetic)]
// Copyright 2020 Solana Maintainers <[email protected]>
//
// Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> or
Expand Down

0 comments on commit 6a97477

Please sign in to comment.