Skip to content

Commit

Permalink
ci: Run clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Jun 8, 2022
1 parent 31cfa82 commit 7a16c8e
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ on:
- '.github/workflows/ci.yml'

jobs:
Check_Formatting:
check-formatting:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -25,7 +26,8 @@ jobs:
- name: Check Formatting
run: cargo +stable fmt --all -- --check

Tests:
tests:
name: Tests
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -70,6 +72,7 @@ jobs:
with:
rust-version: ${{ matrix.rust_version }}${{ matrix.platform.host }}
targets: ${{ matrix.platform.target }}
components: clippy

- name: Install GCC Multilib
if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')
Expand All @@ -84,6 +87,11 @@ jobs:
if: matrix.platform.target != 'wasm32-unknown-unknown'
run: cd glutin && cargo doc --no-deps --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES --document-private-items

- name: Lint with clippy
shell: bash
if: matrix.rust_version != 'nightly'
run: cargo clippy --workspace --all-targets --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES -- -Dwarnings

- name: Build glutin
shell: bash
run: cd glutin && cargo $WEB build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
Expand All @@ -104,7 +112,6 @@ jobs:
if: (!contains(matrix.platform.target, 'ios') && !contains(matrix.platform.target, 'wasm32'))
run: cd glutin && cargo $WEB test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES


- name: Build with serde enabled
shell: bash
run: cd glutin && cargo $WEB build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
Expand Down
3 changes: 2 additions & 1 deletion glutin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@
[`RawContextExt`]: os/unix/trait.RawContextExt.html
"
)]
#![deny(missing_debug_implementations)]
#![deny(clippy::all, missing_debug_implementations)]
#![allow(clippy::missing_safety_doc, clippy::too_many_arguments)]
#![cfg_attr(feature = "cargo-clippy", deny(warnings))]

#[cfg(any(
target_os = "windows",
Expand Down
2 changes: 2 additions & 0 deletions glutin_egl_sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
target_os = "netbsd",
target_os = "openbsd"
))]
#![deny(clippy::all)]
#![allow(
clippy::manual_non_exhaustive,
clippy::missing_safety_doc,
clippy::unnecessary_cast,
non_camel_case_types
)]
#![cfg_attr(feature = "cargo-clippy", deny(warnings))]

pub mod egl {
pub type khronos_utime_nanoseconds_t = super::khronos_utime_nanoseconds_t;
Expand Down
2 changes: 2 additions & 0 deletions glutin_emscripten_sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![cfg(target_os = "emscripten")]
#![allow(dead_code, non_snake_case, non_camel_case_types)]
#![deny(clippy::all)]
#![cfg_attr(feature = "cargo-clippy", deny(warnings))]

use std::os::raw;

Expand Down
3 changes: 3 additions & 0 deletions glutin_examples/ios-example/rust/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![deny(clippy::all)]
#![cfg_attr(feature = "cargo-clippy", deny(warnings))]

use glutin::event::{Event, WindowEvent};
use glutin::event_loop::{ControlFlow, EventLoop};
use glutin::window::WindowBuilder;
Expand Down
2 changes: 2 additions & 0 deletions glutin_gles2_sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg(target_os = "ios")]
#![deny(clippy::all)]
#![allow(
clippy::missing_safety_doc,
clippy::too_many_arguments,
Expand All @@ -7,6 +8,7 @@
non_snake_case,
non_upper_case_globals
)]
#![cfg_attr(feature = "cargo-clippy", deny(warnings))]

pub mod gles {
include!(concat!(env!("OUT_DIR"), "/gles2_bindings.rs"));
Expand Down
2 changes: 2 additions & 0 deletions glutin_glx_sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
target_os = "netbsd",
target_os = "openbsd"
))]
#![deny(clippy::all)]
#![allow(
clippy::manual_non_exhaustive,
clippy::missing_safety_doc,
clippy::redundant_static_lifetimes,
clippy::unused_unit
)]
#![cfg_attr(feature = "cargo-clippy", deny(warnings))]

pub use self::glx::types::GLXContext;
pub use x11_dl::xlib::*;
Expand Down
2 changes: 2 additions & 0 deletions glutin_wgl_sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![cfg(any(target_os = "windows"))]
#![deny(clippy::all)]
#![allow(clippy::manual_non_exhaustive, clippy::missing_safety_doc, clippy::too_many_arguments)]
#![cfg_attr(feature = "cargo-clippy", deny(warnings))]

/// WGL bindings
pub mod wgl {
Expand Down

0 comments on commit 7a16c8e

Please sign in to comment.