Skip to content

Fix duplicated words in documentation comments - #2773

Merged
lballabio merged 1 commit into
lballabio:masterfrom
geographybuff:fix/doubled-word-comments
Sep 9, 2026
Merged

lballabio merged 1 commit into
lballabio:masterfrom
geographybuff:fix/doubled-word-comments

Conversation

@geographybuff

@geographybuff geographybuff commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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-fixer workflow 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. Running misspell-fixer locally over the six files below reports nothing, while a control file containing recieve and seperate is flagged immediately.

Found by searching the tree for \b(\w+)\s+\1\b restricted to comment lines.

What changes are included in this PR?

Removes 8 doubled words across 6 files. Comment text only — no code changes.

File Fix
ql/cashflows/digitalcoupon.hpp (x2) strike rate for the the call option / for the the put option, on the callStrike_ and putStrike_ members
ql/cashflows/digitaliborcoupon.hpp Ibor rate coupon with digital digital call/put option
ql/cashflows/digitalcmscoupon.hpp Cms-rate coupon with digital digital call/put option
ql/experimental/coupons/digitalcmsspreadcoupon.hpp Cms-spread-rate coupon with digital digital call/put option
ql/experimental/inflation/yoycapfloortermpricesurface.hpp Heuristic: overwrite the the swap rate
ql/models/marketmodels/models/alphafinder.cpp (x2) see if if ok at some intermediate point

Deliberately left alone, as these are not typos:

  • float float swap in ql/instruments/floatfloatswap.hpp and ql/pricingengines/swaption/gaussian1dfloatfloatswaptionengine.hpp — this names the FloatFloatSwap instrument.
  • barrier barrier type in test-suite/barrieroption.cpp — column headings in a data table.
  • rank inf/inf 5/inf inf/5 5/5 in test-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 (the header-docs job in .github/workflows/doxygen.yml) — pass
  • Syntax-only compile of a translation unit including all five changed headers, g++ -std=c++17 -fsyntax-only against a CMake-generated ql/config.hpp — pass
  • Full compile of the one changed source file, g++ -std=c++17 -c -O2 -Wall ql/models/marketmodels/models/alphafinder.cpp — pass, no warnings

I could not run make docs. It fails on my machine with Docs/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.

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>
@boring-cyborg

boring-cyborg Bot commented Sep 9, 2026

Copy link
Copy Markdown

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.

@CLAassistant

CLAassistant commented Sep 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@lballabio
lballabio merged commit f27af24 into lballabio:master Sep 9, 2026
3 checks passed
@boring-cyborg

boring-cyborg Bot commented Sep 9, 2026

Copy link
Copy Markdown

Congratulations on your first merged pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants