mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-26 20:00:32 +00:00
Add a CI workflow for checking links in .rs, .md, and .toml files acc… (#4098)
* Add a CI workflow for checking links in .rs, .md, and .toml files accross esp-hal workspace fix dead links * exclude unpublished crate documentation's links * Add .lycheeignore with excluded links * play with patterns * don't forget to remove
This commit is contained in:
parent
f41c86a902
commit
a5a0833318
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -7,7 +7,7 @@ To help us review it efficiently, please ensure you've gone through the followin
|
||||
- [ ] I have updated existing examples or added new ones (if applicable).
|
||||
- [ ] I have used `cargo xtask fmt-packages` command to ensure that all changed code is formatted correctly.
|
||||
- [ ] My changes were added to the [`CHANGELOG.md`](https://github.com/esp-rs/esp-hal/blob/main/esp-hal/CHANGELOG.md) in the **_proper_** section.
|
||||
- [ ] I have added necessary changes to user code to the [Migration Guide](https://github.com/esp-rs/esp-hal/blob/main/esp-hal/MIGRATING-0.21.md).
|
||||
- [ ] I have added necessary changes to user code to the latest [Migration Guide](https://github.com/esp-rs/esp-hal/blob/main/esp-hal).
|
||||
- [ ] My changes are in accordance to the [esp-rs developer guidelines](https://github.com/esp-rs/esp-hal/blob/main/documentation/DEVELOPER-GUIDELINES.md)
|
||||
|
||||
#### Extra:
|
||||
|
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@ -190,3 +190,25 @@ jobs:
|
||||
|
||||
# Run host tests for all applicable packages:
|
||||
- run: cargo xtask host-tests
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Check links in .rs, .md, and .toml files
|
||||
|
||||
link-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: lycheeverse/lychee-action@v2
|
||||
with:
|
||||
args: |
|
||||
--verbose
|
||||
--no-progress
|
||||
--format detailed
|
||||
--timeout 7
|
||||
--max-concurrency 6
|
||||
--accept "200,301,302"
|
||||
--exclude-path ".*/target/.*|.*/static\.files/.*|.*/docs/.*"
|
||||
'./**/*.rs'
|
||||
'./**/*.md'
|
||||
'./**/*.toml'
|
||||
|
||||
|
28
.lycheeignore
Normal file
28
.lycheeignore
Normal file
@ -0,0 +1,28 @@
|
||||
# Local/private network addresses
|
||||
# Local/private network addresses (protocol-aware)
|
||||
^https?://localhost
|
||||
^https?://127\.0\.0\.1
|
||||
^https?://0\.0\.0\.0
|
||||
.*\.local
|
||||
^https?://192\.168\..*
|
||||
^https?://10\..*
|
||||
^https?://172\.(1[6-9]|2[0-9]|3[0-1])\..*
|
||||
|
||||
# Template placeholders
|
||||
%7B[^%]+%7D
|
||||
\{[^}]+\}
|
||||
|
||||
# GitHub compare links (ignore only these)
|
||||
^https://github\.com/.*/compare/.*\.\.\..*
|
||||
|
||||
# GitHub patterns
|
||||
releases/tag/$
|
||||
|
||||
# Shield.io badges
|
||||
img\.shields\.io/badge/MSRV-
|
||||
|
||||
# TODO: remove once released
|
||||
docs\.espressif\.com/projects/rust/esp-preempt/latest/
|
||||
docs\.espressif\.com/projects/rust/esp-radio-preempt-driver/latest/
|
||||
docs\.espressif\.com/projects/rust/esp-radio/latest/
|
||||
docs\.espressif\.com/projects/rust/esp-sync/latest/
|
@ -54,7 +54,7 @@ When browsing the examples, we recommend viewing the tag for the `esp-hal` relea
|
||||
- [The Embedded Rust Book](https://docs.rust-embedded.org/book/index.html)
|
||||
- [The Embedonomicon](https://docs.rust-embedded.org/embedonomicon/)
|
||||
- [The Rust on ESP Book](https://docs.espressif.com/projects/rust/esp-hal/latest/)
|
||||
- [Embedded Rust (no_std) on Espressif](https://esp-rs.github.io/no_std-training/)
|
||||
- [Embedded Rust (no_std) on Espressif](https://docs.espressif.com/projects/rust/no_std-training/)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
@ -126,7 +126,7 @@ This will use `rustfmt` to ensure that all source code is formatted correctly pr
|
||||
* Resolve merge conflicts if they arise, using resources like [this git tutorial] for help.
|
||||
|
||||
[Link your PR]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
|
||||
[Allow edits from maintainers]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-forkmember
|
||||
[Allow edits from maintainers]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests
|
||||
[Changelog]: esp-hal/CHANGELOG.md
|
||||
[migration guide]: esp-hal/MIGRATING-0.20.md
|
||||
[suggested changes]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request
|
||||
|
@ -39,7 +39,6 @@ mod calibration;
|
||||
// https://github.com/espressif/esp-idf/blob/903af13e8/components/soc/esp32c3/include/soc/regi2c_saradc.h
|
||||
// https://github.com/espressif/esp-idf/blob/903af13e8/components/soc/esp32c6/include/soc/regi2c_saradc.h
|
||||
// https://github.com/espressif/esp-idf/blob/903af13e8/components/soc/esp32h2/include/soc/regi2c_saradc.h
|
||||
// https://github.com/espressif/esp-idf/blob/903af13e8/components/soc/esp32h4/include/soc/regi2c_saradc.h
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(adc_adc1)] {
|
||||
const ADC_VAL_MASK: u16 = 0xfff;
|
||||
|
@ -17,7 +17,7 @@
|
||||
//! Visit the [Debug Assist] example for an example of using the Debug
|
||||
//! Assistant.
|
||||
//!
|
||||
//! [Debug Assist]: https://github.com/esp-rs/esp-hal/blob/main/examples/src/bin/debug_assist.rs
|
||||
//! [Debug Assist]: https://github.com/esp-rs/esp-hal/blob/main/examples/peripheral/debug_assist/src/main.rs
|
||||
//!
|
||||
//! ## Implementation State
|
||||
//! - Bus write access logging is not available via this API
|
||||
|
@ -30,7 +30,7 @@
|
||||
//! ## Examples
|
||||
//! Visit the [HMAC] example to learn how to use the HMAC accelerator
|
||||
//!
|
||||
//! [HMAC]: https://github.com/esp-rs/esp-hal/blob/main/examples/src/bin/hmac.rs
|
||||
//! [HMAC]: https://github.com/esp-rs/esp-hal/blob/main/examples/peripheral/hmac/src/main.rs
|
||||
|
||||
use core::convert::Infallible;
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
//! Visit the [USB Serial] example for an example of using the USB OTG
|
||||
//! peripheral.
|
||||
//!
|
||||
//! [USB Serial]: https://github.com/esp-rs/esp-hal/blob/main/examples/src/bin/usb_serial.rs
|
||||
//! [USB Serial]: https://github.com/esp-rs/esp-hal/blob/main/examples/peripheral/usb_serial/src/main.rs
|
||||
//!
|
||||
//! ## Implementation State
|
||||
//! - Low-speed (LS) is not supported.
|
||||
|
@ -17,7 +17,7 @@
|
||||
//! detailed study of how to use this LP Core please visit [the repository
|
||||
//! with corresponding example].
|
||||
//!
|
||||
//! [the repository with corresponding example]: https://github.com/esp-rs/esp-hal/blob/main/examples/src/bin/lp_core_basic.rs
|
||||
//! [the repository with corresponding example]: https://github.com/esp-rs/esp-hal/blob/main/examples/peripheral/lp_core/src/main.rs
|
||||
|
||||
use crate::peripherals::{LP_AON, LP_CORE, LP_PERI, LPWR, PMU};
|
||||
|
||||
|
@ -97,7 +97,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
{
|
||||
let message = format!(
|
||||
"esp-radio should be built with optimization level 2, 3 or s - yours is {level}.
|
||||
See https://github.com/esp-rs/esp-radio",
|
||||
See https://github.com/esp-rs/esp-hal/tree/main/esp-radio",
|
||||
);
|
||||
print_warning(message);
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ const SSID: &str = env!("SSID");
|
||||
const PASSWORD: &str = env!("PASSWORD");
|
||||
const STATIC_IP: &str = env!("STATIC_IP");
|
||||
const GATEWAY_IP: &str = env!("GATEWAY_IP");
|
||||
const FERRIS_GIF: &str = "https://rustacean.net/more-crabby-things/dancing-ferris.gif";
|
||||
|
||||
#[main]
|
||||
fn main() -> ! {
|
||||
@ -158,16 +159,20 @@ fn main() -> ! {
|
||||
}
|
||||
|
||||
if !time_out {
|
||||
socket.write_all(
|
||||
b"HTTP/1.0 200 OK\r\n\r\n\
|
||||
<html>\
|
||||
<body>\
|
||||
<h1>Hello Rust! Hello esp-radio!</h1>\
|
||||
<img src=\"https://rustacean.net/more-crabby-things/dancing-ferris.gif\"/>
|
||||
</body>\
|
||||
</html>\r\n\
|
||||
"
|
||||
).unwrap();
|
||||
if !time_out {
|
||||
write!(
|
||||
socket,
|
||||
"HTTP/1.0 200 OK\r\n\r\n\
|
||||
<html>\
|
||||
<body>\
|
||||
<h1>Hello Rust! Hello esp-radio!</h1>\
|
||||
<img src=\"{}\"/>\
|
||||
</body>\
|
||||
</html>\r\n",
|
||||
FERRIS_GIF
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
socket.flush().unwrap();
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ fn main() {
|
||||
match args.extcap.run().unwrap() {
|
||||
ExtcapStep::Interfaces(interfaces_step) => {
|
||||
let metadata = Metadata {
|
||||
help_url: "http://github.com/esp-rs/esp-radio".into(),
|
||||
help_url: "https://github.com/esp-rs/esp-hal/tree/main/esp-radio".into(),
|
||||
display_description: "esp-radio".into(),
|
||||
..r_extcap::cargo_metadata!()
|
||||
};
|
||||
|
@ -56,7 +56,7 @@ fn main() {
|
||||
match args.extcap.run().unwrap() {
|
||||
ExtcapStep::Interfaces(interfaces_step) => {
|
||||
let metadata = Metadata {
|
||||
help_url: "http://github.com/esp-rs".into(),
|
||||
help_url: "https://github.com/esp-rs/esp-hal/tree/main/esp-radio/src/ieee802154".into(),
|
||||
display_description: "esp-ieee802154".into(),
|
||||
..r_extcap::cargo_metadata!()
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user