embsim: an unknown --board should list the boards and suggest the closest
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c
- 領域
- cli, embedded-iot
調査の方向性
tools/embsim/main.c の未知のボードに関するエラーと、tools/embsim/boards.c の boards[] テーブルおよび board_find() から始めてください。tests/golden/embsim*.sh と tests/golden/embsim/ にある既存のテスト規約を確認し、その後 EmbSim の対象テストを実行してください。microbt のようなタイプミスには microbit が提案され、意味のない名前では候補を提案せずにボード一覧が表示され、終了ステータスとエラーの先頭行が変わらなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Context. EmbSim knows many boards (see embsim --help), but a wrong name only says no:
$ ./embsim --board microbt fw.elf
embsim: unknown board 'microbt'
It should list the boards and suggest the closest, for example did you mean 'microbit'?.
Where.
tools/embsim/main.c, line 221: the error. The name is tried as a board (board_find), then as a part from a device pack (board_part).tools/embsim/boards.c: line 217 hasboards[], the table of every board; line 516 hasboard_find().- Tests: the EmbSim tests live in
tests/golden/embsim*.shandtests/golden/embsim/. Add a small one rather than extending a board's own test.
Steps.
- On an unknown name, print the board names from
boards[], and the closest one if it is within a few edits. EmbSim is a separate program, so a small edit-distance function intools/embsimis fine. - Keep the exit status and the first line as they are; add lines after it.
- Add a test with a typo and with a nonsense name.
Done when --board microbt suggests microbit, a nonsense name lists the boards without a suggestion, and the test passes. Do not run tests/golden/boards.sh for this: it talks to real boards on serial ports.
Before you start: the contributor's guide has the rules. A new test counts only after it has failed against the code before your change, and a commit subject reads area: summary. Questions are welcome in the comments or in Discussions.
- 主要言語
- C
- スター
- 1
- フォーク
- 2
- 平均マージ
- 20時間 55分
- マージ済み PR(30日)
- 73
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
EmbLinkOs/EmbCC のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
EmbLinkOs/EmbCC の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area: test kind: bug preview-effort: small priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
libsdl-org/SDL#16684 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
Issue-Bug Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信