Last active
May 24, 2021 14:17
-
-
Save nertzy/47d18940864c3348d60a6897661522fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AllCops: | |
DisabledByDefault: true | |
Style/TopLevelMethodDefinition: | |
Enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class One | |
def two | |
2 | |
end | |
end | |
def one | |
1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
source "https://rubygems.org" | |
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } | |
gem "rubocop" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ rubocop --debug | |
For /Users/dev/projects/rubocop-bug: configuration from /Users/dev/projects/rubocop-bug/.rubocop.yml | |
Default configuration from /Users/dev/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/rubocop-1.15.0/config/default.yml | |
Inspecting 3 files | |
Scanning /Users/dev/projects/rubocop-bug/Gemfile | |
Loading cache from /Users/dev/.cache/rubocop_cache/c00b397a11a60e0fa0171c84ff7b86bed54ca9f3/6d7a3b621ca1730e04accd938619e4bdab66cfb1/9a72538d2e9b9b74fa91e1ebf6f6587f9cdb5cac | |
.Scanning /Users/dev/projects/rubocop-bug/broken.rb | |
Loading cache from /Users/dev/.cache/rubocop_cache/c00b397a11a60e0fa0171c84ff7b86bed54ca9f3/6d7a3b621ca1730e04accd938619e4bdab66cfb1/f6397e6482b48540814a82460e9e0c74f45a636e | |
.Scanning /Users/dev/projects/rubocop-bug/works.rb | |
Loading cache from /Users/dev/.cache/rubocop_cache/c00b397a11a60e0fa0171c84ff7b86bed54ca9f3/6d7a3b621ca1730e04accd938619e4bdab66cfb1/ea14c4e0525a37b192467d7a2cb78d8e2efdc75b | |
C | |
Offenses: | |
works.rb:1:1: C: Style/TopLevelMethodDefinition: Do not define methods at the top-level. | |
def one ... | |
^^^^^^^ | |
3 files inspected, 1 offense detected | |
Finished in 0.3944059999776073 seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def one | |
1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment