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

dart-lang / yaml_edit / 8924901229 / 5
97%
main: 97%

Build:
DEFAULT BRANCH: main
Ran 02 May 2024 01:48PM UTC
Files 9
Run time 0s
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

02 May 2024 01:42PM UTC coverage: 94.14% (+0.02%) from 94.125%
8924901229.5

push

github

web-flow
Fix 55 (#75)

Fix removal of last key from map in block-mode when value is empty.

Fixes #55.

When the value is empty the `SourceSpan` for the `YamlNode` representing
the value in a map points to the colon.

Example:
```yaml
foo:
  bar:
```

The `YamlNode` for `foo.bar` has a value of `null` and starts and ends
at the colon `:` following `bar`. This means that removal might leave
the colon behind, which causes invalid YAML.

We have the same issue when removing `foo.bar` from the following YAML
document:

```yaml
foo:
  baz: true
  bar:
```

However, in this case, we have a hack that ensures we always strip away
the any comments that follows `bar`. We do this by deleting up-to the
next newline. If we apply the same hack when removing `foo.bar` in the
first example, then it works.

One could argue that it works by accident, but it's kind of desired that
trailing comments are removed, when the value they are trailing is
removed.

739 of 785 relevant lines covered (94.14%)

6.79 hits per line

Source Files on job os:ubuntu-latest/dart:stable/platform:chrome - 8924901229.5
  • Tree
  • List 9
  • Changed 8
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8924901229
  • fe2699dd on github
  • Prev Job for on main (#8911170586.4)
  • Next Job for on main (#8954262181.5)
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