Fix duplicated words in documentation comments - #2773
Merged
lballabio merged 1 commit intoSep 9, 2026
Merged
Conversation
Removes eight accidentally doubled words across six files: "for the the call/put option" in DigitalCoupon, "with digital digital call/put option" in the Ibor, CMS and CMS-spread digital coupons, "overwrite the the swap rate" in YoYCapFloorTermPriceSurface, and "see if if ok" twice in alphafinder.cpp. Comment text only, with no code changes. Six of the eight are Doxygen //! comments on public classes and data members, so they appear in the generated reference documentation. The misspell-fixer workflow does not catch these: it matches misspelled words and a correctly spelled word repeated twice is not a misspelling. Deliberately left alone: "float float swap" in floatfloatswap.hpp and gaussian1dfloatfloatswaptionengine.hpp, which names the FloatFloatSwap instrument, and the "barrier barrier type" column headings in the barrieroption test tables. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it. |
|
Congratulations on your first merged pull request! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Several comments contain accidentally doubled words —
strike rate for the the call option,with digital digital call/put option,see if if ok. Six of the eight are Doxygen//!comments on public classes and data members, so they render in the generated reference documentation.These survive automated checking. The
misspell-fixerworkflow runs on every push and auto-opens correction PRs (e.g. #796), but it matches misspelled words; a correctly spelled word repeated twice is not a misspelling, so it cannot detect these. Runningmisspell-fixerlocally over the six files below reports nothing, while a control file containingrecieveandseperateis flagged immediately.Found by searching the tree for
\b(\w+)\s+\1\brestricted to comment lines.What changes are included in this PR?
Removes 8 doubled words across 6 files. Comment text only — no code changes.
ql/cashflows/digitalcoupon.hpp(x2)strike rate for the the call option/for the the put option, on thecallStrike_andputStrike_membersql/cashflows/digitaliborcoupon.hppIbor rate coupon with digital digital call/put optionql/cashflows/digitalcmscoupon.hppCms-rate coupon with digital digital call/put optionql/experimental/coupons/digitalcmsspreadcoupon.hppCms-spread-rate coupon with digital digital call/put optionql/experimental/inflation/yoycapfloortermpricesurface.hppHeuristic: overwrite the the swap rateql/models/marketmodels/models/alphafinder.cpp(x2)see if if ok at some intermediate pointDeliberately left alone, as these are not typos:
float float swapinql/instruments/floatfloatswap.hppandql/pricingengines/swaption/gaussian1dfloatfloatswaptionengine.hpp— this names theFloatFloatSwapinstrument.barrier barrier typeintest-suite/barrieroption.cpp— column headings in a data table.rank inf/inf 5/inf inf/5 5/5intest-suite/nthtodefault.cpp.Testing
No new tests. The change is confined to comments, so there is no behaviour to cover.
Checks run locally on Linux x86_64, g++ 13.3.0, Boost 1.83, C++17:
./tools/check_all_header_docs.sh(theheader-docsjob in.github/workflows/doxygen.yml) — passg++ -std=c++17 -fsyntax-onlyagainst a CMake-generatedql/config.hpp— passg++ -std=c++17 -c -O2 -Wall ql/models/marketmodels/models/alphafinder.cpp— pass, no warningsI could not run
make docs. It fails on my machine withDocs/quantlibheader.html: error: Remaining begin replacement with marker 'HTML_DYNAMIC_SECTIONS', and it fails identically on an unmodified checkout of master, so this is a local Doxygen version mismatch (1.9.8 from Ubuntu, against the newer Homebrew Doxygen the macOS CI job uses) and not an effect of this PR. The Doxygen job on this PR will be the first real run of that check.I also did not run the full test-suite; no changed line is code.
AI disclosure
This contribution was AI-assisted. Claude Code (Claude Opus 5) performed the tree-wide doubled-word search, made the 8 line edits, and ran the checks listed above. The check commands were executed by the AI and have not been independently re-run by hand.