Danke, dass du zu DefineExtractor beitragen möchtest!
Bevor du beginnst, stelle sicher, dass du die README.md gelesen hast und das Projekt lokal bauen kannst.
- Prüfe zuerst, ob das Problem bereits in den Issues gemeldet wurde.
- Falls nicht, erstelle ein neues Issue mit:
- einer klaren, beschreibenden Überschrift
- den Schritten zur Reproduktion
- dem erwarteten und dem tatsächlichen Verhalten
- Betriebssystem, Visual Studio-Version und Build-Konfiguration (Debug/Release)
- Erstelle ein Issue mit dem Label
enhancement. - Beschreibe den Anwendungsfall klar — warum ist das Feature nützlich?
- Fork das Repository und klone es lokal.
- Erstelle einen neuen Branch:
git checkout -b feature/mein-feature
- Halte dich an den bestehenden Code-Stil (C++20, keine externen Abhängigkeiten außer Catch2 für Tests).
- Schreibe Tests für jede neue Funktion oder jeden Fix in
tests/test_helpers.cpp. - Stelle sicher, dass alle Tests bestehen:
cmake --preset debug && cmake --build --preset debug --target test_helpers .\build\debug\test_helpers.exe - Stelle sicher, dass das Projekt in Debug und Release fehlerfrei baut:
cmake --build --preset debug cmake --build --preset release
- Committe deine Änderungen mit einer aussagekräftigen Commit-Nachricht.
- Öffne einen Pull Request mit einer Beschreibung der Änderungen und dem Grund dafür.
- Sprache: C++20
- Standard-Bibliothek: Nur STL — keine externen Bibliotheken im Produktionscode.
- Namenskonventionen:
camelCasefür Funktionen und Variablen,PascalCasefür Typen. - Kommentare: Englisch.
- Neue Hilfsfunktionen: Wenn möglich in
DefineExtractor/helpers.hauslagern (testbar halten). - Performance: Regex nur als letztes Mittel — zuerst
string::findals Pre-Filter prüfen.
Kurz und prägnant, auf Englisch:
fix: correct getIndent for trailing whitespace
feat: add pre-filter before regex_search
refactor: extract isAnyIfStart to helpers.h
Thank you for considering a contribution to DefineExtractor!
Make sure you have read the README.md and can build the project locally before you start.
- Check Issues first to avoid duplicates.
- Open a new issue with:
- a clear, descriptive title
- steps to reproduce
- expected vs. actual behaviour
- OS, Visual Studio version, and build configuration (Debug/Release)
- Open an issue with the
enhancementlabel. - Describe the use-case clearly — why would this feature be useful?
- Fork the repository and clone it locally.
- Create a new branch:
git checkout -b feature/my-feature
- Follow the existing code style (C++20, no external production dependencies).
- Write tests for any new function or bug fix in
tests/test_helpers.cpp. - Verify all tests pass:
cmake --preset debug && cmake --build --preset debug --target test_helpers .\build\debug\test_helpers.exe - Verify the project builds cleanly in both Debug and Release:
cmake --build --preset debug cmake --build --preset release
- Commit your changes with a meaningful message.
- Open a Pull Request describing what changed and why.
- Language: C++20
- Dependencies: STL only in production code — no external libraries.
- Naming:
camelCasefor functions and variables,PascalCasefor types. - Comments: English.
- New helpers: Extract to
DefineExtractor/helpers.hwhere possible to keep them unit-testable. - Performance: Prefer
string::findpre-filters over rawstd::regex_searchcalls on every line.
Keep them short and descriptive, in English:
fix: correct getIndent for trailing whitespace
feat: add pre-filter before regex_search
refactor: extract isAnyIfStart to helpers.h