• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / revdiff / 24880187567
89%
master: 90%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v1.6.1
DEFAULT BRANCH: master
Ran 24 Apr 2026 08:33AM UTC
Jobs 1
Files 60
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Apr 2026 08:32AM UTC coverage: 89.455% (+0.02%) from 89.433%
24880187567

Pull #149

github

umputun
fix(themes): heal misplaced theme line and round-trip tests

Code-review followup to the #148 fix.

The replace-in-place branch of patchConfigTheme was matching the first
`theme = ...` line anywhere in the file and rewriting it at the same
location. If a user's config was already corrupted by the pre-fix persist
path (theme line stuck inside `[color options]`), the new binary kept
rewriting at the wrong location and go-flags still reported
`unknown option: theme` on next startup.

Make the scan section-aware: track the active INI section while walking
lines; replace in place only when the found line lives in the default
scope ([Application Options] or the unnamed top-of-file section);
otherwise delete the stray line and run the insertion path so the new
entry lands before the first non-[Application Options] header.

Also split the scan and insertion-position logic into two helper methods
on *themeCatalog to keep cyclomatic complexity within the linter limit.

Add an end-to-end regression test that round-trips patched files through
flags.NewIniParser and asserts opts.Theme resolves without error,
covering three testdata fixtures (good / no-theme-yet / corrupted). This
is the assertion that would have caught #148 originally.

Related to #148
Pull Request #149: fix(themes): persist theme into Application Options section

39 of 41 new or added lines in 1 file covered. (95.12%)

1 existing line in 1 file now uncovered.

8432 of 9426 relevant lines covered (89.45%)

551.88 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
85.05
1.46% app/themes.go

Coverage Regressions

Lines Coverage ∆ File
1
85.05
1.46% app/themes.go
Jobs
ID Job ID Ran Files Coverage
1 24880187567.1 24 Apr 2026 08:33AM UTC 60
89.45
GitHub Action Run
Source Files on build 24880187567
  • Tree
  • List 60
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #149
  • PR Base - master (#24860662493)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc