Skip to content

Commit

Permalink
Check for conflicting command-line option names in CI (#746)
Browse files Browse the repository at this point in the history
* Run `completions` subcommand in CI to check for conflicting option names

* Fix conflicting short option name for `checksum-md5` subcommand
  • Loading branch information
jessebraham authored Feb 6, 2025
1 parent a105cb0 commit cc7c43d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:

check:
name: Check (${{ matrix.platform.target }})
runs-on: ${{ matrix.platform.os }}

strategy:
fail-fast: false
matrix:
Expand All @@ -39,16 +41,15 @@ jobs:
- os: "ubuntu-22.04"
target: "x86_64-unknown-linux-musl"
arch: "x86_64"
- os: "windows-2022"
target: "x86_64-pc-windows-msvc"
arch: "x86_64"
- os: "ubuntu-22.04"
target: "aarch64-unknown-linux-gnu"
arch: "arm64"
- os: "ubuntu-22.04"
target: "armv7-unknown-linux-gnueabihf"
arch: "armhf"
runs-on: ${{ matrix.platform.os }}
- os: "windows-2022"
target: "x86_64-pc-windows-msvc"
arch: "x86_64"

steps:
- uses: actions/checkout@v4
Expand All @@ -60,8 +61,13 @@ jobs:

- run: cargo check

- run: cargo run --package=cargo-espflash -- espflash completions bash
- run: cargo run --package=espflash -- completions bash

check-lib:
name: Check lib (${{ matrix.platform.target }})
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
Expand All @@ -72,7 +78,6 @@ jobs:
arch: "arm64"
- target: "armv7-unknown-linux-gnueabihf"
arch: "armhf"
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand All @@ -87,6 +92,8 @@ jobs:

msrv:
name: Check lib MSRV (${{ matrix.platform.target }})
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
Expand All @@ -97,7 +104,6 @@ jobs:
arch: "arm64"
- target: "armv7-unknown-linux-gnueabihf"
arch: "armhf"
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion espflash/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ pub struct MonitorArgs {
#[non_exhaustive]
pub struct ChecksumMd5Args {
/// Start address
#[clap(short, long, value_parser=parse_u32)]
#[clap(long, value_parser=parse_u32)]
address: u32,
/// Length
#[clap(short, long, value_parser=parse_u32)]
Expand Down

0 comments on commit cc7c43d

Please sign in to comment.