const BaseChecker = require('./../base-checker')

const ruleId = 'avoid-sha3'
const meta = {
  type: 'security',

  docs: {
    description: `Use "keccak256" instead of deprecated "sha3".`,
    category: 'Security Rules'
  },

  isDefault: false,
  recommended: true,
  defaultSetup: 'warn',

  schema: []
}

class AvoidSha3Checker extends BaseChecker {
  constructor(reporter) {
    super(reporter, ruleId, meta)
  }

  exitIdentifier(ctx) {
    const identifier = ctx.Identifier().toString()

    if (identifier === 'sha3') {
      this.error(ctx, 'Use "keccak256" instead of deprecated "sha3"')
    }
  }
}

module.exports = AvoidSha3Checker

@@ -418,12 +418,8 @@
 %0A%0A  
-exit
 Iden
@@ -429,19 +429,20 @@
 ier(
-ctx
+node
 ) %7B%0A    
 cons
@@ -441,74 +441,21 @@
     
-const identifier = ctx.Identifier().toString()%0A%0A    if (identifier
+if (node.name
  ===
@@ -486,11 +486,12 @@
 ror(
-ctx
+node
 , 'U

Update rule: `avoid-sha3`