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

wooga / atlas-paket / 65
39%

Build:
DEFAULT BRANCH: master
Ran 18 Apr 2018 08:58AM UTC
Jobs 1
Files 29
Run time 1s
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

pending completion
65

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.

482 of 540 relevant lines covered (89.26%)

0.89 hits per line

Jobs
ID Job ID Ran Files Coverage
1 65.1 18 Apr 2018 08:58AM UTC 0
89.26
Source Files on build 65
Detailed source file information is not available for this build.
  • Back to Repo
  • Jenkins Build #65
  • ba02eb86 on github
  • Prev Build on master (#64)
  • Next Build on master (#65)
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