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

wooga / atlas-paket / 65 / 1
39%
master: 39%

Build:
DEFAULT BRANCH: master
Ran 18 Apr 2018 09:05AM UTC
Files 29
Run time 2s
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

18 Apr 2018 09:05AM UTC coverage: 88.889% (-0.4%) from 89.259%
65.1

push

jenkins

Fix paket.lock file parser (#38)

* Fix paket.lock file parser

Description
===========

The `paket.lock` file parser has issues with counting leading
whitespaces. The value from the old logic `def newLeadingWhitespaces =
(line =~ /\s/).size()` returns the number of all white space characters
in the current line.

The second part:

```groovy
if (newLeadingWhitespaces > currentLeadingWhitespaces) {
  currentIndent++
} else if (newLeadingWhitespaces < currentLeadingWhitespaces) {
  currentIndent--
}
```

didn't take into account when the indention level suddenly jumped from 3
to 1. I also made the method `List<String>
getAllDependencies(List<String> references)` recursive.
I added a new test covering the failing behavior

Changes
=======

![FIX] `paket.lock` file parsing
![IMPROVE] `getAllDependencies` method by making it recursive
![ADD] new test example

* Refactor the lock parser some more and add more test cases

I switched from `if` statements to `switch/case` because of esthetical
reasons. I added some more guards around the switch arms to limit
crashes. We might need to add a proper parser with error results if and
when we want to support multi type lock files.

480 of 540 relevant lines covered (88.89%)

0.89 hits per line

Source Files on job 65.1
  • Tree
  • List 0
  • Changed 29
  • Source Changed 29
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 65
  • ba02eb86 on github
  • Prev Job for on master (#65.1)
  • Next Job for on master (#66.1)
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