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

protofire / solhint / #1778

28 Jan 2020 06:12PM UTC coverage: 96.241% (-3.3%) from 99.526%
#1778

push

fvictorio
Merge branch '3.0' of github.com:protofire/solhint into 3.0

362 of 437 branches covered (82.84%)

1946 of 2022 relevant lines covered (96.24%)

43.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

44.44
/lib/common/utils.js
1
const fs = require('fs')
1✔
2
const path = require('path')
1✔
3

4
const getLocFromIndex = (text, index) => {
1✔
5
  let line = 1
×
6
  let column = 0
×
7
  let i = 0
×
8
  while (i < index) {
×
9
    if (text[i] === '\n') {
×
10
      line++
×
11
      column = 0
×
12
    } else {
13
      column++
×
14
    }
15
    i++
×
16
  }
17

18
  return { line, column }
×
19
}
20

21
const walkSync = (dir, filelist = []) => {
1✔
22
  fs.readdirSync(dir).forEach(file => {
21✔
23
    filelist = fs.statSync(path.join(dir, file)).isDirectory()
159✔
24
      ? walkSync(path.join(dir, file), filelist)
25
      : filelist.concat(path.join(dir, file))
26
  })
27
  return filelist
21✔
28
}
29

30
module.exports = {
1✔
31
  getLocFromIndex,
32
  walkSync
33
}
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