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

protofire / solhint / #1749

28 Jan 2020 06:12PM UTC coverage: 96.241% (-1.3%) from 97.582%
#1749

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

90.91
/test/common/contract-builder.js
1
const { times } = require('lodash')
1✔
2

3
function contractWith(code) {
4
  return `
135✔
5
      pragma solidity 0.4.4;
6
        
7
        
8
      contract A {
9
        ${code}
10
      }
11
    `
12
}
13

14
function funcWith(statements) {
15
  return contractWith(`
56✔
16
        function b() public {
17
          ${statements}
18
        }
19
    `)
20
}
21

22
function modifierWith(statements) {
23
  return contractWith(`
1✔
24
        modifier b() {
25
          ${statements}
26
        }
27
    `)
28
}
29

30
function multiLine(...args) {
31
  return args.join('\n')
16✔
32
}
33

34
function contractWithPrettier(code) {
35
  return `pragma solidity 0.4.4;
×
36

37
contract A {
38
  ${code}
39
}
40
`
41
}
42

43
function stateDef(count) {
44
  return repeatLines('        uint private a;', count)
3✔
45
}
46

47
function constantDef(count) {
48
  return repeatLines('        uint private constant TEST = 1;', count)
1✔
49
}
50

51
function repeatLines(line, count) {
52
  return times(count)
4✔
53
    .map(() => line)
56✔
54
    .join('\n')
55
}
56

57
module.exports = {
1✔
58
  contractWith,
59
  funcWith,
60
  modifierWith,
61
  multiLine,
62
  contractWithPrettier,
63
  stateDef,
64
  constantDef,
65
  repeatLines
66
}
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