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

Data Driven Model for Merge Tools

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cpp
領域
testing, tooling

調査の方向性

まず ApprovalTests.cpp にある既存の merge-tool 実装と、それらが Linux、Mac、Windows でツールをどのように検索しているかを確認します。繰り返されているデータと複数バージョンに対する特別な処理を比較し、プラットフォーム固有の動作を失わずに、文書化されたケースを共通のデータ駆動設計でカバーできるかどうかを判断します。

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

説明

enhancement on_hold reporters

This is just an idea to make adding new merge tools simpler. A lot of the merge tools function quite similarly and their implementations in ApprovalTests each require the creation of at least on class per merge tool. However, given multiple versions, names, or operating systems, the number of classes required increases. This amounts to quite a bit of boilerplate when adding new merge tools. By defining a struct for storing all of the necessary data, construction of one-off classes can be avoided, and this struct can provide all of the necessary details required to find and call a diff tool from within ApprovalTests.

An example struct as follows hopefully encapsulates most of the variance between merge tools.

#include <string>
#include <vector>

enum Context {
  Background = 0;
  Foreground
};

struct DiffTool {
  std::string name;
  std::vector<std::string> search_paths;
  std::vector<std::string> names;
  std::string arguments;
  Context = Context::Background;
  unsigned int priority = 0;
};

By defining a standard search procedure for the search_paths and names, each tool can be found using the same process. The search_paths and names members would likely need to be defined in a way to only include certain values dependent on the OS.

I'm not sure how viable this is, but I wanted to get the idea out there. It would be nice to only have to define most merge tools in one place.

Note: Multiple versions of the same tool would still require special handling.

主要言語
C++
スター
340
フォーク
56
PR マージ指標
30日以内にマージされた PR はありません

環境構築

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

はじめの一歩

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

approvals/ApprovalTests.cpp のほかの issue

approvals/ApprovalTests.cpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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