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

protofire / solhint / #143869

09 May 2026 04:08PM UTC coverage: 97.657% (-0.2%) from 97.828%
#143869

push

589 of 672 branches covered (87.65%)

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
28
}
×
29

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