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

protofire / solhint / #143860

09 May 2026 04:07PM UTC coverage: 97.657% (-0.2%) from 97.834%
#143860

push

589 of 670 branches covered (87.91%)

2792 of 2859 relevant lines covered (97.66%)

118.89 hits per line

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

34.78
/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 = []) => {
22
  fs.readdirSync(dir).forEach((file) => {
23
    filelist = fs.statSync(path.join(dir, file)).isDirectory()
24
      ? walkSync(path.join(dir, file), filelist)
×
25
      : filelist.concat(path.join(dir, file))
26
  })
27
  return filelist
1✔
28
}
24✔
29

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