Class: ERBLint::Linters::RequireScriptNonce

Inherits:
ERBLint::Linter show all
Includes:
ERBLint::LinterRegistry
Defined in:
lib/erb_lint/linters/require_script_nonce.rb

Overview

Allow inline script tags in ERB that have a nonce attribute. This only validates inline



13
14
15
16
17
18
# File 'lib/erb_lint/linters/require_script_nonce.rb', line 13

def run(processed_source)
  parser = processed_source.parser

  find_html_script_tags(parser)
  find_rails_helper_script_tags(parser)
end