Skip to content

Commit 6a0008f

Browse files
committed
Fix doc warnings (bevyengine#3339)
# Objective - There are a few warnings when building Bevy docs for dead links - CI seems to not catch those warnings when it should ## Solution - Enable doc CI on all Bevy workspace - Fix warnings - Also noticed plugin GilrsPlugin was not added anymore when feature was enabled First commit to check that CI would actually fail with it: https://github.com/bevyengine/bevy/runs/4532652688?check_suite_focus=true Co-authored-by: François <[email protected]>
1 parent 3974e02 commit 6a0008f

File tree

11 files changed

+36
-33
lines changed

11 files changed

+36
-33
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ jobs:
273273
- name: Installs cargo-deadlinks
274274
run: cargo install --force cargo-deadlinks
275275
- name: Build and check doc
276-
run: RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-deps
276+
run: RUSTDOCFLAGS='-D warnings' cargo doc --workspace --all-features --no-deps
277277
- name: Checks dead links
278278
run: cargo deadlinks --dir target/doc/bevy
279279
continue-on-error: true

crates/bevy_input/src/gamepad.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ impl ButtonAxisSettings {
234234
}
235235
}
236236

237-
/// Monitors gamepad connection and disconnection events, updating the [GamepadLobby] resource accordingly
237+
/// Monitors gamepad connection and disconnection events, updating the [`Gamepads`] resource accordingly
238238
///
239-
/// By default, runs during `CoreStage::PreUpdate` when added via [InputPlugin].
239+
/// By default, runs during `CoreStage::PreUpdate` when added via [`InputPlugin`](crate::InputPlugin).
240240
pub fn gamepad_connection_system(
241241
mut gamepads: ResMut<Gamepads>,
242242
mut gamepad_event: EventReader<GamepadEvent>,

crates/bevy_internal/src/default_plugins.rs

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
use bevy_app::{PluginGroup, PluginGroupBuilder};
22

33
/// This plugin group will add all the default plugins:
4-
/// * [`LogPlugin`]
5-
/// * [`CorePlugin`]
6-
/// * [`TransformPlugin`]
7-
/// * [`DiagnosticsPlugin`]
8-
/// * [`InputPlugin`]
9-
/// * [`WindowPlugin`]
10-
/// * [`AssetPlugin`]
11-
/// * [`ScenePlugin`]
12-
/// * [`RenderPlugin`] - with feature `bevy_render`
13-
/// * [`SpritePlugin`] - with feature `bevy_sprite`
14-
/// * [`PbrPlugin`] - with feature `bevy_pbr`
15-
/// * [`UiPlugin`] - with feature `bevy_ui`
16-
/// * [`TextPlugin`] - with feature `bevy_text`
17-
/// * [`AudioPlugin`] - with feature `bevy_audio`
18-
/// * [`GilrsPlugin`] - with feature `bevy_gilrs`
19-
/// * [`GltfPlugin`] - with feature `bevy_gltf`
20-
/// * [`WinitPlugin`] - with feature `bevy_winit`
4+
/// * [`LogPlugin`](bevy_log::LogPlugin)
5+
/// * [`CorePlugin`](bevy_core::CorePlugin)
6+
/// * [`TransformPlugin`](bevy_transform::TransformPlugin)
7+
/// * [`DiagnosticsPlugin`](bevy_diagnostic::DiagnosticsPlugin)
8+
/// * [`InputPlugin`](bevy_input::InputPlugin)
9+
/// * [`WindowPlugin`](bevy_window::WindowPlugin)
10+
/// * [`AssetPlugin`](bevy_asset::AssetPlugin)
11+
/// * [`ScenePlugin`](bevy_scene::ScenePlugin)
12+
/// * [`RenderPlugin`](bevy_render::RenderPlugin) - with feature `bevy_render`
13+
/// * [`SpritePlugin`](bevy_sprite::SpritePlugin) - with feature `bevy_sprite`
14+
/// * [`PbrPlugin`](bevy_pbr::PbrPlugin) - with feature `bevy_pbr`
15+
/// * [`UiPlugin`](bevy_ui::UiPlugin) - with feature `bevy_ui`
16+
/// * [`TextPlugin`](bevy_text::TextPlugin) - with feature `bevy_text`
17+
/// * [`AudioPlugin`](bevy_audio::AudioPlugin) - with feature `bevy_audio`
18+
/// * [`GilrsPlugin`](bevy_gilrs::GilrsPlugin) - with feature `bevy_gilrs`
19+
/// * [`GltfPlugin`](bevy_gltf::GltfPlugin) - with feature `bevy_gltf`
20+
/// * [`WinitPlugin`](bevy_winit::WinitPlugin) - with feature `bevy_winit`
2121
///
2222
/// See also [`MinimalPlugins`] for a slimmed down option
2323
pub struct DefaultPlugins;
@@ -59,12 +59,15 @@ impl PluginGroup for DefaultPlugins {
5959

6060
#[cfg(feature = "bevy_audio")]
6161
group.add(bevy_audio::AudioPlugin::default());
62+
63+
#[cfg(feature = "bevy_gilrs")]
64+
group.add(bevy_gilrs::GilrsPlugin::default());
6265
}
6366
}
6467

6568
/// Minimal plugin group that will add the following plugins:
66-
/// * [`CorePlugin`]
67-
/// * [`ScheduleRunnerPlugin`]
69+
/// * [`CorePlugin`](bevy_core::CorePlugin)
70+
/// * [`ScheduleRunnerPlugin`](bevy_app::ScheduleRunnerPlugin)
6871
///
6972
/// See also [`DefaultPlugins`] for a more complete set of plugins
7073
pub struct MinimalPlugins;

crates/bevy_render/src/mesh/mesh/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub struct Mesh {
3535
/// Contains geometry in the form of a mesh.
3636
///
3737
/// Often meshes are automatically generated by bevy's asset loaders or primitives, such as
38-
/// [`crate::shape::Cube`] or [`crate::shape::Box`], but you can also construct
38+
/// [`shape::Cube`](crate::mesh::shape::Cube) or [`shape::Box`](crate::mesh::shape::Box), but you can also construct
3939
/// one yourself.
4040
///
4141
/// Example of constructing a mesh:

crates/bevy_render/src/render_phase/draw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub trait Draw<P: PhaseItem>: Send + Sync + 'static {
3838
pub trait PhaseItem: Send + Sync + 'static {
3939
/// The type used for ordering the items. The smallest values are drawn first.
4040
type SortKey: Ord;
41-
/// Determines the order in which the items are drawn during the corresponding [`RenderPhase`].
41+
/// Determines the order in which the items are drawn during the corresponding [`RenderPhase`](super::RenderPhase).
4242
fn sort_key(&self) -> Self::SortKey;
4343
/// Specifies the [`Draw`] function used to render the item.
4444
fn draw_function(&self) -> DrawFunctionId;

crates/bevy_render/src/render_phase/draw_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bevy_utils::tracing::debug;
55
use std::ops::Range;
66
use wgpu::{IndexFormat, RenderPass};
77

8-
/// Tracks the current [`TrackedRenderPipeline`] state to ensure draw calls are valid.
8+
/// Tracks the current [`TrackedRenderPass`] state to ensure draw calls are valid.
99
#[derive(Debug, Default)]
1010
pub struct DrawState {
1111
pipeline: Option<RenderPipelineId>,

crates/bevy_render/src/render_resource/shader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub enum ShaderReflectError {
3232
Validation(#[from] naga::valid::ValidationError),
3333
}
3434

35-
/// A shader, as defined by its [ShaderSource] and [ShaderStage]
35+
/// A shader, as defined by its [`ShaderSource`] and [`ShaderStage`](naga::ShaderStage)
3636
/// This is an "unprocessed" shader. It can contain preprocessor directives.
3737
#[derive(Debug, Clone, TypeUuid)]
3838
#[uuid = "d95bc916-6c55-4de3-9622-37e7b6969fda"]

crates/bevy_render/src/renderer/render_device.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ impl RenderDevice {
137137
Sampler::from(wgpu_sampler)
138138
}
139139

140-
/// Create a new [`SwapChain`](wgpu::SwapChain) which targets `surface`.
140+
/// Initializes [`Surface`](wgpu::Surface) for presentation.
141141
///
142142
/// # Panics
143143
///
144-
/// - A old [`SwapChainFrame`](wgpu::SwapChain) is still alive referencing an old swap chain.
145-
/// - Texture format requested is unsupported on the swap chain.
144+
/// - A old [`SurfaceTexture`](wgpu::SurfaceTexture) is still alive referencing an old surface.
145+
/// - Texture format requested is unsupported on the surface.
146146
pub fn configure_surface(&self, surface: &wgpu::Surface, config: &wgpu::SurfaceConfiguration) {
147147
surface.configure(&self.device, config)
148148
}

crates/bevy_render/src/texture/image.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ pub trait Volume {
241241
}
242242

243243
impl Volume for Extent3d {
244-
/// Calculates the volume of the [`Extent3D`].
244+
/// Calculates the volume of the [`Extent3d`].
245245
fn volume(&self) -> usize {
246246
(self.width * self.height * self.depth_or_array_layers) as usize
247247
}

crates/bevy_render/src/view/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub struct Msaa {
4343
/// The number of samples to run for Multi-Sample Anti-Aliasing. Higher numbers result in
4444
/// smoother edges. Note that WGPU currently only supports 1 or 4 samples.
4545
/// Ultimately we plan on supporting whatever is natively supported on a given device.
46-
/// Check out this issue for more info: https://github.com/gfx-rs/wgpu/issues/1832
46+
/// Check out this issue for more info: <https://github.com/gfx-rs/wgpu/issues/1832>
4747
pub samples: u32,
4848
}
4949

0 commit comments

Comments
 (0)