-
Notifications
You must be signed in to change notification settings - Fork 402
[Merged by Bors] - Code validation and format checking #281
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
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4df6418
Add code validation and format checks
8f3649b
Add missing no_run
982d2a6
Remove alsa and udev dependencies
4b28cac
Reorder code block attributes
2abe3b3
Add code block attribute note in CONTRIBUTING.md
e03c037
Fix phrasing mistake
37b838d
Add guidance for testing code in CONTRIBUTING.md
2fa0f26
Remove code formatting changes
0247418
Merge branch 'new-book' into code_validation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,5 @@ public | |
| content/assets | ||
| content/learn/errors | ||
| content/examples | ||
| code-validation/target | ||
| code-validation/Cargo.lock | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [package] | ||
| name = "code-validation" | ||
| version = "0.1.0" | ||
| edition = "2021" | ||
|
|
||
| [dependencies] | ||
| bevy = "0.6.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| use_field_init_shorthand = true | ||
| newline_style = "Unix" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| //! This crate is used to validate the rust code of the `bevy` website. | ||
| //! | ||
| //! It is currently used to validate the rust code of the offical `bevy` book. | ||
| //! The modules represents the folder structure of the website. | ||
| mod learn { | ||
This conversation was marked as resolved.
Show resolved
Hide resolved
|
||
| #[doc = include_str!("../../content/learn/book/_index.md")] | ||
| mod book { | ||
| #[doc = include_str!("../../content/learn/book/assets/_index.md")] | ||
| mod assets { | ||
| #[doc = include_str!("../../content/learn/book/assets/custom-assets/_index.md")] | ||
| mod custom_assets {} | ||
| #[doc = include_str!("../../content/learn/book/assets/hot-reloading/_index.md")] | ||
| mod hot_reloading {} | ||
| #[doc = include_str!("../../content/learn/book/assets/loading-assets/_index.md")] | ||
| mod loading_assets {} | ||
| #[doc = include_str!("../../content/learn/book/assets/scenes/_index.md")] | ||
| mod scenes {} | ||
| #[doc = include_str!("../../content/learn/book/assets/working-with-handles/_index.md")] | ||
| mod working_with_handles {} | ||
| } | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/audio/_index.md")] | ||
| mod audio { | ||
| #[doc = include_str!("../../content/learn/book/audio/audio-basics/_index.md")] | ||
| mod audio_basics {} | ||
| } | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/development-practices/_index.md")] | ||
| mod development_practices { | ||
| #[doc = include_str!("../../content/learn/book/development-practices/boilerplate-reduction/_index.md")] | ||
| mod boilerplate_reduction {} | ||
| #[doc = include_str!("../../content/learn/book/development-practices/error-handling/_index.md")] | ||
| mod error_handling {} | ||
| #[doc = include_str!("../../content/learn/book/development-practices/fast-compiles/_index.md")] | ||
| mod fast_compiles {} | ||
| #[doc = include_str!("../../content/learn/book/development-practices/organizing-your-code/_index.md")] | ||
| mod organizing_your_code {} | ||
| #[doc = include_str!("../../content/learn/book/development-practices/testing/_index.md")] | ||
| mod testing {} | ||
| } | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/ecs/_index.md")] | ||
| mod ecs { | ||
| #[doc = include_str!("../../content/learn/book/ecs/commands/_index.md")] | ||
| mod commands {} | ||
| #[doc = include_str!("../../content/learn/book/ecs/entities-components/_index.md")] | ||
| mod entities_components {} | ||
| #[doc = include_str!("../../content/learn/book/ecs/exclusive-world-access/_index.md")] | ||
| mod exclusive_world_access {} | ||
| #[doc = include_str!("../../content/learn/book/ecs/filtering-queries/_index.md")] | ||
| mod filtering_queries {} | ||
| #[doc = include_str!("../../content/learn/book/ecs/generic-systems/_index.md")] | ||
| mod generic_systems {} | ||
| #[doc = include_str!("../../content/learn/book/ecs/reliable-change-detection/_index.md")] | ||
| mod reliable_change_detection {} | ||
| #[doc = include_str!("../../content/learn/book/ecs/resources/_index.md")] | ||
| mod resources {} | ||
| #[doc = include_str!("../../content/learn/book/ecs/systems-queries/_index.md")] | ||
| mod system_queries {} | ||
| } | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/game-logic/_index.md")] | ||
| mod game_logic { | ||
| #[doc = include_str!("../../content/learn/book/game-logic/async-tasks/_index.md")] | ||
| mod async_tasks {} | ||
| #[doc = include_str!("../../content/learn/book/game-logic/custom-execution/_index.md")] | ||
| mod custom_execution {} | ||
| #[doc = include_str!("../../content/learn/book/game-logic/events/_index.md")] | ||
| mod events {} | ||
| #[doc = include_str!("../../content/learn/book/game-logic/run-criteria/_index.md")] | ||
| mod run_criteria {} | ||
| #[doc = include_str!("../../content/learn/book/game-logic/states/_index.md")] | ||
| mod states {} | ||
| #[doc = include_str!("../../content/learn/book/game-logic/system-ordering/_index.md")] | ||
| mod system_ordering {} | ||
| #[doc = include_str!("../../content/learn/book/game-logic/time/_index.md")] | ||
| mod time {} | ||
| } | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/graphics/_index.md")] | ||
| mod graphics { | ||
| #[doc = include_str!("../../content/learn/book/graphics/2d/_index.md")] | ||
| mod two_dimensional { | ||
| #[doc = include_str!("../../content/learn/book/graphics/2d/sprite-sheets/_index.md")] | ||
| mod sprite_sheets {} | ||
| #[doc = include_str!("../../content/learn/book/graphics/2d/sprites/_index.md")] | ||
| mod sprites {} | ||
| } | ||
| #[doc = include_str!("../../content/learn/book/graphics/3d/_index.md")] | ||
| mod three_dimensional { | ||
| #[doc = include_str!("../../content/learn/book/graphics/3d/meshes/_index.md")] | ||
| mod meshes {} | ||
| #[doc = include_str!("../../content/learn/book/graphics/3d/pbr/_index.md")] | ||
| mod pbr {} | ||
| } | ||
| #[doc = include_str!("../../content/learn/book/graphics/cameras/_index.md")] | ||
| mod cameras {} | ||
| #[doc = include_str!("../../content/learn/book/graphics/parent-child-hierarchy/_index.md")] | ||
| mod parent_child_hierarchy {} | ||
| #[doc = include_str!("../../content/learn/book/graphics/rendering-internals/_index.md")] | ||
| mod rendering_internals { | ||
| #[doc = include_str!("../../content/learn/book/graphics/rendering-internals/shader-basics/_index.md")] | ||
| mod shader_basics {} | ||
| } | ||
| #[doc = include_str!("../../content/learn/book/graphics/transforms/_index.md")] | ||
| mod transforms {} | ||
| #[doc = include_str!("../../content/learn/book/graphics/windowing/_index.md")] | ||
| mod windowing {} | ||
| } | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/input/_index.md")] | ||
| mod input { | ||
| #[doc = include_str!("../../content/learn/book/input/gamepad/_index.md")] | ||
| mod gamepad {} | ||
| #[doc = include_str!("../../content/learn/book/input/input-basics/_index.md")] | ||
| mod input_basics {} | ||
| #[doc = include_str!("../../content/learn/book/input/keyboard/_index.md")] | ||
| mod keyboard {} | ||
| #[doc = include_str!("../../content/learn/book/input/mouse/_index.md")] | ||
| mod mouse {} | ||
| #[doc = include_str!("../../content/learn/book/input/touch/_index.md")] | ||
| mod touch {} | ||
| } | ||
|
|
||
| // Not testing migration guides, because of breaking api changes. | ||
| mod migration_guides {} | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/next-steps/_index.md")] | ||
| mod next_steps {} | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/performance-optimizations/_index.md")] | ||
| mod performance_optimizations { | ||
| #[doc = include_str!("../../content/learn/book/performance-optimizations/component-storage/_index.md")] | ||
| mod component_storage {} | ||
| #[doc = include_str!("../../content/learn/book/performance-optimizations/diagnostics-benchmarking/_index.md")] | ||
| mod diagnostics_benchmarking {} | ||
| #[doc = include_str!("../../content/learn/book/performance-optimizations/indexes/_index.md")] | ||
| mod indexes {} | ||
| #[doc = include_str!("../../content/learn/book/performance-optimizations/parallel-iteration/_index.md")] | ||
| mod parallel_iteration {} | ||
| } | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/platforms/_index.md")] | ||
| mod platforms { | ||
| #[doc = include_str!("../../content/learn/book/platforms/android/_index.md")] | ||
| mod android {} | ||
| #[doc = include_str!("../../content/learn/book/platforms/ios/_index.md")] | ||
| mod ios {} | ||
| #[doc = include_str!("../../content/learn/book/platforms/web/_index.md")] | ||
| mod web {} | ||
| } | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/ui/_index.md")] | ||
| mod ui { | ||
| #[doc = include_str!("../../content/learn/book/ui/ui-basics/_index.md")] | ||
| mod ui_basics {} | ||
| } | ||
|
|
||
| #[doc = include_str!("../../content/learn/book/welcome/_index.md")] | ||
| mod welcome { | ||
| #[doc = include_str!("../../content/learn/book/welcome/apps/_index.md")] | ||
| mod apps {} | ||
| #[doc = include_str!("../../content/learn/book/welcome/plugins/_index.md")] | ||
| mod plugins {} | ||
| #[doc = include_str!("../../content/learn/book/welcome/setup/_index.md")] | ||
| mod setup {} | ||
| } | ||
| } | ||
| } | ||
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.