I think you could simplify this by using `each_with_object` instead of `inject`.

```ruby
    def check_node(node)
      node.children.each_with_object({}) do |child, rules_seen|
        next unless child.is_a?(Sass::Tree::RuleNode)

        rule = child.rule.join
        if known = known_rule?(rules_seen, rule)
          add_lint child.line,
                   "Merge rule `#{rule}` with identical rule at same level " \
                   "one line #{known[1].line}"
        else
          rules_seen[rule] = child
        end
      end
    end
```