From 56e03ae80da9444bcf2c7c72b0dc5d29a50b025a Mon Sep 17 00:00:00 2001 From: ptarjan Date: Wed, 20 Apr 2016 01:32:03 -0700 Subject: [PATCH] Show custom cops in --show-cops --- CHANGELOG.md | 1 + lib/rubocop/cli.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e4b256ff06..af4faecd70e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ * [#2874](https://github.com/bbatsov/rubocop/issues/2874): Fix bug when the closing parenthesis is preceded by a newline in array and hash literals in `Style/RedundantParentheses`. ([@lumeet][]) * [#3049](https://github.com/bbatsov/rubocop/issues/3049): Make `Lint/UselessAccessModifier` detect conditionally defined methods and correctly handle dynamically defined methods and singleton class methods. ([@owst][]) * [#3004](https://github.com/bbatsov/rubocop/pull/3004): Don't add `Style/Alias` offenses for use of `alias` in `instance_eval` blocks, since object instances don't respond to `alias_method`. ([@magni-][]) +* [#3061](https://github.com/bbatsov/rubocop/pull/3061): Custom cops now show up in --show-cops. ([@ptarjan][]) ### Changes diff --git a/lib/rubocop/cli.rb b/lib/rubocop/cli.rb index 07eda18407c..648cda9ff27 100644 --- a/lib/rubocop/cli.rb +++ b/lib/rubocop/cli.rb @@ -97,6 +97,8 @@ def apply_default_formatter end def print_available_cops + # Load the configs so the require()s are done for custom cops + @config_store.for(Dir.pwd) cops = Cop::Cop.all show_all = @options[:show_cops].empty?