Sha256: 600445266f9e1f8ebb8038d19b4f633f62cd6066398ff2b18ab1e267cfdf28e1
Contents?: true
Size: 466 Bytes
Versions: 2
Compression:
Stored size: 466 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Lint # @example # # bad # JSON.parse(...) # # # good # MultiJson.load(...) # class NoJSON < Cop MSG = "Use `MultiJson` instead of `JSON`." def_node_matcher :is_JSON?, "(const nil? :JSON)" def on_const(node) return unless is_JSON?(node) add_offense(node) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rf-stylez-1.0.3 | lib/rubocop/cop/lint/no_json.rb |
rf-stylez-1.0.2 | lib/rubocop/cop/lint/no_json.rb |