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

protofire / solhint / #143847

09 May 2026 04:07PM UTC coverage: 92.035% (-5.8%) from 97.831%
#143847

push

400 of 483 branches covered (82.82%)

1063 of 1155 relevant lines covered (92.03%)

117.56 hits per line

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

87.5
/../lib/rules/security/avoid-sha3.js
1
const BaseChecker = require('../base-checker')
1✔
2

3
const ruleId = 'avoid-sha3'
1✔
4
const meta = {
1✔
5
  type: 'security',
6

7
  docs: {
8
    description: `Use "keccak256" instead of deprecated "sha3".`,
9
    category: 'Security Rules',
10
    notes: [
11
      {
12
        note: 'Solhint allows this rule to automatically fix the code with `--fix` option',
13
      },
14
    ],
15
  },
16

17
  recommended: true,
18
  defaultSetup: 'warn',
19
  fixable: true,
20

21
  schema: null,
22
}
199✔
23

24
class AvoidSha3Checker extends BaseChecker {
25
  constructor(reporter) {
26
    super(reporter, ruleId, meta)
2✔
27
  }
1✔
28

×
29
  Identifier(node) {
30
    if (node.name === 'sha3') {
31
      this.error(node, 'Use "keccak256" instead of deprecated "sha3"', (fixer) =>
32
        fixer.replaceTextRange(node.range, 'keccak256'),
33
      )
34
    }
1✔
35
  }
36
}
37

38
module.exports = AvoidSha3Checker
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