module SCSSLint
  # Checks that `@extend` is always used with a placeholder selector.
  class Linter::PlaceholderInExtend < Linter
    include LinterRegistry

    def visit_extend(node)
      # The array returned by the parser is a bit awkward in that it splits on
      # every word boundary (so %placeholder becomes ['%', 'placeholder']).
      selector = node.selector.join

      add_lint(node) unless selector.start_with?('%')
    end

    def description
      'Always use placeholder selectors (e.g. %some-placeholder) with @extend'
    end
  end
end

module SCSSLint
  # Checks that `@extend` is always used with a placeholder selector.
  class Linter::PlaceholderInExtend < Linter
    include LinterRegistry

    def visit_extend(node)
      # The array returned by the parser is a bit awkward in that it splits on
      # every word boundary (so %placeholder becomes ['%', 'placeholder']).
      selector = node.selector.join

      unless selector.start_with?('%')
        add_lint(node,
                 'Prefer using placeholder selectors (e.g. %some-placeholder) with @extend')
      end
    end
  end
end

Remove description method from PlaceholderInExtend
Remove description method from PlaceholderInExtend

The `description` method is being deprecated.

Change-Id: I755e28a599f1cccdd38dafec1bf549e3f6b7e664
Reviewed-on: http://gerrit.causes.com/36723
Tested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>
Reviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94a402f33d@causes.com>
