Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Linter: no-else-return failing to detect return in this case

オープン
#339 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
godot, rust
領域
tooling

調査の方向性

no-else-return ルールの linter 実装から始め、提供された入れ子の if/else スニペットで警告を再現します。前の分岐が続行可能な場合に、ルールが最後の else を不要として報告しなくなり、このケースの回帰テストがカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

There is a bug in your linter that causes it to not recognize that the designated block can fail the if statement and skip the return statement:

  1. The incorrect warning is:
    “WARNING on line 75 (no-else-return)
    Unnecessary 'else' after 'if'/'elif' blocks that end with 'return'”

  2. The code that triggered this error is:
    ...
    #Return false if vector_angle falls between start_arc and end_arc.
    #This will ensure that weapons can only fire within their designated arcs.
    if end_arc > start_arc:
    if vector_angle > end_arc or vector_angle < start_arc:
    return false
    else:
    if vector_angle > end_arc and vector_angle < start_arc:
    return false

    #Ensure target is within range
    if vector_to_target.length() > ability_range:
    return false
    else:
    return true

主要言語
Rust
スター
468
フォーク
39
平均マージ
6時間 24分
マージ済み PR(30日)
3

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GDQuest/GDScript-formatter のほかの issue

GDQuest/GDScript-formatter の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。