From fb79321412edd95913cf2a55be900c0978c0b98a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Bolonio?= Date: Thu, 28 Jul 2022 14:54:39 +0000 Subject: [PATCH 1/3] Add new a11y rubocop rule: LinkHref --- lib/rubocop/cop/github/rails_link_href.rb | 25 ++++++++++++++++++++ test/test_rails_link_href.rb | 28 +++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 lib/rubocop/cop/github/rails_link_href.rb create mode 100644 test/test_rails_link_href.rb diff --git a/lib/rubocop/cop/github/rails_link_href.rb b/lib/rubocop/cop/github/rails_link_href.rb new file mode 100644 index 00000000..f2165f7b --- /dev/null +++ b/lib/rubocop/cop/github/rails_link_href.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require "rubocop" + +module RuboCop + module Cop + module GitHub + module Accessibility + class LinkHref < Base + MSG = "Links should go somewhere, you probably want to use a `