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

bombsimon / wsl / 21226264594
94%

Build:
DEFAULT BRANCH: main
Ran 21 Jan 2026 09:26PM UTC
Jobs 1
Files 4
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

21 Jan 2026 09:25PM UTC coverage: 92.576% (+0.8%) from 91.751%
21226264594

push

github

web-flow
Add support for `newline-after-block` (#221)

* Add support for `newline-after-block`

This adds a new check type to enforce newline after any block (closing
`}`). In addition, it also makes the check for empty line while using
`case-max-lines` a bit more strict by now _not_ counting a trailing
comment as an empty line.

While doing this, there's a new column based logic to figure out where
the newline should go in the end of a case. If it's aligned with the
last statement of the case body the line is inserted after. If it's
aligned with then next case arm, the line is inserted before the
comment.

While working on this we're also moving to a line based check that uses
`LineStart` to make replacements and with that simplifying some comment
parsing since we only need to know the pos where the line starts. This
also allowed to add support to fix removal of whitespaces both before
_and_ after leading comments in blocks.

* Use `ast.Pos` when checking comments

We don't need to check line number to find relevant comments, if we
instead use the `ast.Pos` as long as possible we save a ton of
conversions and gets some speed improvement.

* Make `isErrNotNilCheck` check stmt type

Removes extra check for statement type before calling function.

Also adds a more detailed comment to why we skip complex groups.

* Don't create `CommentMap` for file

* Improve trailing case comments handling

* Add support to remove newline after left-aligned comment

Similar to how we do support trailing comments in a block, but no
newline after the comment, we want to support left-aligned comments in
case bodies but keep them flush against the next case.

* Improve method name

* Use constant instead of magic number

* Improve finding comments after blocks

* Consider comments when checking case total lines

* Remove more `NewCommentMap` calls

* Skip `FuncLit` for newline after block

273 of 285 new or added lines in 2 files covered. (95.79%)

2 existing lines in 1 file now uncovered.

1434 of 1549 relevant lines covered (92.58%)

229.82 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
12
93.45
0.91% wsl.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
93.45
0.91% wsl.go
Jobs
ID Job ID Ran Files Coverage
1 21226264594.1 21 Jan 2026 09:26PM UTC 4
92.58
GitHub Action Run
Source Files on build 21226264594
  • Tree
  • List 4
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21226264594
  • 456abcfe on github
  • Prev Build on main (#20947780185)
  • Next Build on main (#21226824798)
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