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

C#: calls through ?., extension methods, method groups and calls on a method result are not linked

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
devtools

調査の方向性

Start with the C# call and reference indexing paths, then trace how they resolve receiver types and method groups. Use the supplied Consumer.cs examples to reproduce each missing edge and check callers or impact on the indexed methods; done means the expected calls and references appear for all five cases.

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

説明

Version: 1.6.2 (latest release). The Unreleased changelog on main at 69af19a (2026-10-24) has C# entries for initializers and for calls on new X(), none for these cases. I could not run main.

Repro

Consumer.cs

using System;
using System.Threading.Tasks;

public class Mailer
{
    public void Send(string to) { }
}

public static class TextExtensions
{
    public static string Shout(this string text) => text.ToUpper();
}

public class Worker
{
    public void Run() { }
}

public class Consumer
{
    private readonly Mailer _mailer = new Mailer();
    private Mailer? _maybe;

    public void Plain() { _mailer.Send("a"); }

    public void NullConditional() { _maybe?.Send("b"); }

    public void Chained() { GetMailer().Send("c"); }

    public string Extension() => "hi".Shout();

    public Task MethodGroupArgument()
    {
        var worker = new Worker();
        return Task.Run(worker.Run);
    }

    public Action MethodGroupAssignment()
    {
        var worker = new Worker();
        Action later = worker.Run;
        return later;
    }

    private Mailer GetMailer() => _mailer;
}
$ codegraph callers Mailer.Send --json         → caller Plain only (edge at line 24)
$ codegraph callers TextExtensions.Shout --json → no callers
$ codegraph callers Worker.Run --json           → no callers

The index has no calls edge for lines 26, 28, 30, 35 and 41.

Expected
Line Code Expected link
26 _maybe?.Send("b") NullConditional → Mailer.Send (field typed Mailer?)
28 GetMailer().Send("c") Chained → Mailer.Send (declared return type of GetMailer)
30 "hi".Shout() Extension → TextExtensions.Shout (first parameter this string)
35 Task.Run(worker.Run) MethodGroupArgument references Worker.Run
41 Action later = worker.Run; MethodGroupAssignment references Worker.Run

For the two method groups, a references edge would be enough: they are not calls at that point, but today callers and impact on Worker.Run say that nothing uses it.

主要言語
C
スター
73.2k
フォーク
4.7k
平均マージ
3時間 15分
マージ済み PR(30日)
576

環境構築

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

はじめの一歩

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

colbymchenry/codegraph のほかの issue

colbymchenry/codegraph の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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