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

sds / haml-lint / 29270290596
97%

Build:
DEFAULT BRANCH: main
Ran 13 Jul 2026 05:24PM UTC
Jobs 36
Files 102
Run time 2min
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

13 Jul 2026 05:24PM UTC coverage: 97.496% (+0.003%) from 97.493%
29270290596

push

github

web-flow
Add corrected/correctable flags to offense output (#676)

## Summary

Brings haml-lint's output to parity with RuboCop's JSON format by adding
two per-offense flags:

- **`corrected`** — whether the offense was fixed by auto-correct
(already tracked internally, now surfaced).
- **`correctable`** — whether the offense *could* be auto-corrected
(new).

This mirrors what `rubocop -f json` reports for the same embedded Ruby
(e.g. `"corrected": false, "correctable": true`).

## Output examples

Given `- if some_var = value` in a template, `haml-lint -r json` now
emits per offense:

```json
{
  "severity": "warning",
  "message": "Lint/AssignmentInCondition: Use `==` if ...",
  "corrected": false,
  "correctable": true,
  "location": { "line": 1 },
  "linter_name": "RuboCop"
}
```

The default text reporter marks correctable-but-uncorrected lints with
`[Correctable]`, alongside the existing `[Corrected]`:

```
verify.haml:1 [W] [Correctable] RuboCop: Lint/AssignmentInCondition: Use `==` if you meant to do a comparison ...
verify.haml:2 [W] [Correctable] TrailingWhitespace: Line contains trailing whitespace
```

Running with `-a`, a fixed offense flips to `corrected: true` (and
`[Corrected]` in text):

```json
{ "message": "Line contains trailing whitespace", "corrected": true, "correctable": true, "location": { "line": 2 } }
```

## How

- `Lint` gains a `correctable` attribute alongside `corrected`.
- Base `record_lint` defaults `correctable` to the linter's
`supports_autocorrect?`, so every HAML linter is covered without editing
each file. A linter can pass `correctable: false` for offenses it can't
fix.
- The RuboCop linter threads RuboCop's own per-offense
`offense.correctable?`, correctly distinguishing cops that support
autofix from those that don't (rather than assuming the whole linter is
correctable).
- Syntax/processing errors stay `correctable: false`.

Co-authored-by: Shane da Silva <shane@dasilva.io>

7 of 8 new or added lines in 4 files covered. (87.5%)

3154 of 3235 relevant lines covered (97.5%)

23149.0 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
95.24
0.5% lib/haml_lint/lint.rb
Jobs
ID Job ID Ran Files Coverage
1 ruby4.0-haml6.3-ubuntu - 29270290596.1 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
2 ruby3.3-haml5.2-ubuntu - 29270290596.2 13 Jul 2026 05:25PM UTC 204
96.87
GitHub Action Run
3 ruby3.3-haml5.0-ubuntu - 29270290596.3 13 Jul 2026 05:25PM UTC 204
97.12
GitHub Action Run
4 ruby4.0-haml6.0-ubuntu - 29270290596.4 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
5 ruby3.4-haml7.0-ubuntu - 29270290596.5 13 Jul 2026 05:25PM UTC 204
97.16
GitHub Action Run
6 ruby4.0-haml6.2-ubuntu - 29270290596.6 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
7 ruby3.4-haml6.2-ubuntu - 29270290596.7 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
8 ruby4.0-haml6.1-ubuntu - 29270290596.8 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
9 ruby3.4-haml5.1-ubuntu - 29270290596.9 13 Jul 2026 05:24PM UTC 204
97.13
GitHub Action Run
10 ruby3.3-haml6.4-ubuntu - 29270290596.10 13 Jul 2026 05:24PM UTC 204
97.12
GitHub Action Run
11 ruby3.3-haml7.1-ubuntu - 29270290596.11 13 Jul 2026 05:25PM UTC 204
97.15
GitHub Action Run
12 ruby3.3-haml6.2-ubuntu - 29270290596.12 13 Jul 2026 05:25PM UTC 204
97.12
GitHub Action Run
13 ruby3.3-haml6.0-ubuntu - 29270290596.13 13 Jul 2026 05:25PM UTC 204
97.12
GitHub Action Run
14 ruby3.3-haml7.0-ubuntu - 29270290596.14 13 Jul 2026 05:25PM UTC 204
97.15
GitHub Action Run
15 ruby4.0-haml7.1-ubuntu - 29270290596.15 13 Jul 2026 05:25PM UTC 204
97.16
GitHub Action Run
16 ruby4.0-haml6.4-ubuntu - 29270290596.16 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
17 ruby3.4-haml6.1-ubuntu - 29270290596.17 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
18 ruby4.0-haml7.0-ubuntu - 29270290596.18 13 Jul 2026 05:25PM UTC 204
97.16
GitHub Action Run
19 ruby3.4-haml5.0-ubuntu - 29270290596.19 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
20 ruby4.0-haml7.2-ubuntu - 29270290596.20 13 Jul 2026 05:24PM UTC 204
97.16
GitHub Action Run
21 ruby3.4-haml7.2-ubuntu - 29270290596.21 13 Jul 2026 05:24PM UTC 204
97.16
GitHub Action Run
22 ruby3.4-rubocop1.0-ubuntu - 29270290596.22 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
23 ruby3.4-haml6.0-ubuntu - 29270290596.23 13 Jul 2026 05:24PM UTC 204
97.13
GitHub Action Run
24 ruby3.3-rubocop1.0-ubuntu - 29270290596.24 13 Jul 2026 05:24PM UTC 204
97.12
GitHub Action Run
25 ruby3.4-haml6.3-ubuntu - 29270290596.25 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
26 ruby3.3-haml6.1-ubuntu - 29270290596.26 13 Jul 2026 05:24PM UTC 204
97.12
GitHub Action Run
27 ruby3.4-haml5.2-ubuntu - 29270290596.27 13 Jul 2026 05:24PM UTC 204
96.88
GitHub Action Run
28 ruby3.3-haml6.3-ubuntu - 29270290596.28 13 Jul 2026 05:25PM UTC 204
97.12
GitHub Action Run
29 ruby4.0-rubocop1.0-ubuntu - 29270290596.29 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
30 ruby3.4-haml7.1-ubuntu - 29270290596.30 13 Jul 2026 05:24PM UTC 204
97.16
GitHub Action Run
31 ruby4.0-haml5.1-ubuntu - 29270290596.31 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
32 ruby3.3-haml7.2-ubuntu - 29270290596.32 13 Jul 2026 05:24PM UTC 204
97.15
GitHub Action Run
33 ruby4.0-haml5.2-ubuntu - 29270290596.33 13 Jul 2026 05:25PM UTC 204
96.88
GitHub Action Run
34 ruby3.3-haml5.1-ubuntu - 29270290596.34 13 Jul 2026 05:24PM UTC 204
97.12
GitHub Action Run
35 ruby4.0-haml5.0-ubuntu - 29270290596.35 13 Jul 2026 05:25PM UTC 204
97.13
GitHub Action Run
36 ruby3.4-haml6.4-ubuntu - 29270290596.36 13 Jul 2026 05:24PM UTC 204
97.13
GitHub Action Run
Source Files on build 29270290596
  • Tree
  • List 102
  • Changed 101
  • Source Changed 5
  • Coverage Changed 101
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29270290596
  • 1cecd28e on github
  • Prev Build on main (#29270052965)
  • Next Build on main (#29270728869)
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