Last active
December 9, 2018 16:05
-
-
Save nowlinuxing/123e22cd01292b9a9a4cf7ba9126b1bb to your computer and use it in GitHub Desktop.
Rubocop to sample snippets in ruby-2.5.3
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
inherit_from: .rubocop_todo.yml | |
Layout/SpaceBeforeBlockBraces: | |
Enabled: false | |
Style/NumericLiterals: | |
Enabled: false |
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
# This configuration was generated by | |
# `rubocop --auto-gen-config` | |
# on 2018-12-08 04:17:02 +0900 using RuboCop version 0.61.1. | |
# The point is for the user to remove these configuration records | |
# one by one as the offenses are removed from the code base. | |
# Note that changes in the inspected code, or installation of new | |
# versions of RuboCop, may require this file to be generated again. | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Layout/AlignArray: | |
Exclude: | |
- 'sample/URI/HTTP.rb' | |
# Offense count: 110 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. | |
# SupportedHashRocketStyles: key, separator, table | |
# SupportedColonStyles: key, separator, table | |
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit | |
Layout/AlignHash: | |
Enabled: false | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, IndentationWidth. | |
# SupportedStyles: with_first_parameter, with_fixed_indentation | |
Layout/AlignParameters: | |
Exclude: | |
- 'sample/CGI/Session.rb' | |
- 'sample/OpenURI.rb' | |
- 'sample/URI/LDAP.rb' | |
- 'sample/WIN32OLE.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyleAlignWith. | |
# SupportedStylesAlignWith: either, start_of_block, start_of_line | |
Layout/BlockAlignment: | |
Exclude: | |
- 'sample/OpenSSL/OCSP.rb' | |
- 'sample/Thread.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth. | |
# SupportedStyles: case, end | |
Layout/CaseIndentation: | |
Exclude: | |
- 'sample/GetoptLong.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Layout/ClosingParenthesisIndentation: | |
Exclude: | |
- 'sample/Vector.rb' | |
# Offense count: 387 | |
# Cop supports --auto-correct. | |
Layout/CommentIndentation: | |
Enabled: false | |
# Offense count: 9 | |
# Cop supports --auto-correct. | |
Layout/EmptyLineAfterGuardClause: | |
Exclude: | |
- 'sample/Module.rb' | |
- 'sample/Object.rb' | |
- 'sample/OpenSSL.rb' | |
- 'sample/OpenSSL/Cipher.rb' | |
- 'sample/OpenSSL/KDF.rb' | |
- 'sample/OpenSSL/OCSP.rb' | |
# Offense count: 76 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines. | |
Layout/EmptyLineBetweenDefs: | |
Enabled: false | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
Layout/EmptyLinesAroundAccessModifier: | |
Exclude: | |
- 'sample/BasicObject.rb' | |
- 'sample/Module.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: empty_lines, no_empty_lines | |
Layout/EmptyLinesAroundBlockBody: | |
Exclude: | |
- 'sample/DRb.rb' | |
- 'sample/Thread/Backtrace/Location.rb' | |
# Offense count: 11 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only | |
Layout/EmptyLinesAroundClassBody: | |
Exclude: | |
- 'sample/DRb.rb' | |
- 'sample/Exception.rb' | |
- 'sample/MonitorMixin.rb' | |
- 'sample/RDoc/Options.rb' | |
- 'sample/doc/syntax/modules_and_classes_rdoc.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Layout/EmptyLinesAroundExceptionHandlingKeywords: | |
Exclude: | |
- 'sample/BasicSocket.rb' | |
# Offense count: 550 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. | |
Layout/ExtraSpacing: | |
Enabled: false | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, IndentationWidth. | |
# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses | |
Layout/FirstParameterIndentation: | |
Exclude: | |
- 'sample/CGI/Util.rb' | |
- 'sample/Vector.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
# Configuration parameters: IndentationWidth. | |
Layout/IndentAssignment: | |
Exclude: | |
- 'sample/OpenSSL/Netscape/SPKI.rb' | |
# Offense count: 5 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, IndentationWidth. | |
# SupportedStyles: special_inside_parentheses, consistent, align_braces | |
Layout/IndentHash: | |
Exclude: | |
- 'sample/DRb/DRbSSLSocket/SSLConfig.rb' | |
- 'sample/GC.rb' | |
- 'sample/GC/Profiler.rb' | |
- 'sample/Gem.rb' | |
# Offense count: 15 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent | |
Layout/IndentHeredoc: | |
Exclude: | |
- 'sample/ERB.rb' | |
- 'sample/Gem/PackageTask.rb' | |
- 'sample/GetoptLong.rb' | |
- 'sample/Net/IMAP.rb' | |
- 'sample/Net/SMTP.rb' | |
- 'sample/RDoc/TomDoc.rb' | |
- 'sample/RSS/Utils.rb' | |
- 'sample/doc/syntax/literals_rdoc.rb' | |
# Offense count: 61 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: normal, rails | |
Layout/IndentationConsistency: | |
Exclude: | |
- 'sample/Complex.rb' | |
- 'sample/Encoding.rb' | |
- 'sample/MakeMakefile.rb' | |
- 'sample/OpenSSL/Config.rb' | |
- 'sample/RDoc/Markup.rb' | |
- 'sample/Time.rb' | |
- 'sample/WIN32OLE_RECORD.rb' | |
- 'sample/WIN32OLE_TYPE.rb' | |
- 'sample/WIN32OLE_VARIABLE.rb' | |
- 'sample/doc/syntax/literals_rdoc.rb' | |
- 'sample/lib/racc/rdoc/grammar_en_rdoc.rb' | |
# Offense count: 39 | |
# Cop supports --auto-correct. | |
# Configuration parameters: Width, IgnoredPatterns. | |
Layout/IndentationWidth: | |
Exclude: | |
- 'sample/BigDecimal.rb' | |
- 'sample/CGI/Session.rb' | |
- 'sample/ConditionVariable.rb' | |
- 'sample/DRb.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/MakeMakefile.rb' | |
- 'sample/Object.rb' | |
- 'sample/OpenSSL/OCSP.rb' | |
- 'sample/Process.rb' | |
- 'sample/Queue.rb' | |
- 'sample/Singleton.rb' | |
- 'sample/TracePoint.rb' | |
- 'sample/doc/marshal_rdoc.rb' | |
- 'sample/doc/syntax/exceptions_rdoc.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 63 | |
# Cop supports --auto-correct. | |
Layout/LeadingCommentSpace: | |
Exclude: | |
- 'sample/BasicSocket.rb' | |
- 'sample/Encoding.rb' | |
- 'sample/Enumerator.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/MakeMakefile.rb' | |
- 'sample/Module.rb' | |
- 'sample/Net/IMAP.rb' | |
- 'sample/OpenSSL/Netscape/SPKI.rb' | |
- 'sample/OpenSSL/PKey/DH.rb' | |
- 'sample/OpenURI/OpenRead.rb' | |
- 'sample/PP.rb' | |
- 'sample/Pathname.rb' | |
- 'sample/Thread.rb' | |
- 'sample/ThreadGroup.rb' | |
- 'sample/WIN32OLE_METHOD.rb' | |
# Offense count: 8 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: symmetrical, new_line, same_line | |
Layout/MultilineMethodCallBraceLayout: | |
Exclude: | |
- 'sample/CGI/Util.rb' | |
- 'sample/Encoding.rb' | |
- 'sample/Fiddle/CStructEntity.rb' | |
- 'sample/Fiddle/CUnionEntity.rb' | |
- 'sample/OpenSSL.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, IndentationWidth. | |
# SupportedStyles: aligned, indented, indented_relative_to_receiver | |
Layout/MultilineMethodCallIndentation: | |
Exclude: | |
- 'sample/Object.rb' | |
# Offense count: 7 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, IndentationWidth. | |
# SupportedStyles: aligned, indented | |
Layout/MultilineOperationIndentation: | |
Exclude: | |
- 'sample/CGI.rb' | |
- 'sample/FileUtils.rb' | |
- 'sample/SimpleDelegator.rb' | |
# Offense count: 32 | |
# Cop supports --auto-correct. | |
Layout/SpaceAfterColon: | |
Exclude: | |
- 'sample/Enumerator/Lazy.rb' | |
- 'sample/Hash.rb' | |
- 'sample/Method.rb' | |
- 'sample/Proc.rb' | |
- 'sample/UnboundMethod.rb' | |
# Offense count: 703 | |
# Cop supports --auto-correct. | |
Layout/SpaceAfterComma: | |
Enabled: false | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Layout/SpaceAfterNot: | |
Exclude: | |
- 'sample/Module.rb' | |
# Offense count: 12 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyleInsidePipes. | |
# SupportedStylesInsidePipes: space, no_space | |
Layout/SpaceAroundBlockParameters: | |
Exclude: | |
- 'sample/IO.rb' | |
- 'sample/OpenSSL/ASN1.rb' | |
- 'sample/REXML/Element.rb' | |
- 'sample/REXML/Elements.rb' | |
# Offense count: 19 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: space, no_space | |
Layout/SpaceAroundEqualsInParameterDefault: | |
Exclude: | |
- 'sample/Enumerator.rb' | |
- 'sample/Module.rb' | |
- 'sample/MonitorMixin.rb' | |
- 'sample/Object.rb' | |
- 'sample/Proc.rb' | |
- 'sample/TSort.rb' | |
# Offense count: 547 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AllowForAlignment. | |
Layout/SpaceAroundOperators: | |
Enabled: false | |
# Offense count: 36 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: space, no_space | |
# SupportedStylesForEmptyBraces: space, no_space | |
Layout/SpaceBeforeBlockBraces: | |
EnforcedStyleForEmptyBraces: no_space | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
Layout/SpaceBeforeComment: | |
Exclude: | |
- 'sample/IO.rb' | |
- 'sample/OpenURI/OpenRead.rb' | |
- 'sample/WIN32OLE_METHOD.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AllowForAlignment. | |
Layout/SpaceBeforeFirstArg: | |
Exclude: | |
- 'sample/Rinda/RingFinger.rb' | |
- 'sample/doc/contributing_rdoc.rb' | |
# Offense count: 11 | |
# Cop supports --auto-correct. | |
Layout/SpaceBeforeSemicolon: | |
Exclude: | |
- 'sample/Benchmark.rb' | |
- 'sample/REXML/Element.rb' | |
# Offense count: 301 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. | |
# SupportedStyles: space, no_space, compact | |
# SupportedStylesForEmptyBrackets: space, no_space | |
Layout/SpaceInsideArrayLiteralBrackets: | |
Enabled: false | |
# Offense count: 427 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. | |
# SupportedStyles: space, no_space | |
# SupportedStylesForEmptyBraces: space, no_space | |
Layout/SpaceInsideBlockBraces: | |
Enabled: false | |
# Offense count: 137 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. | |
# SupportedStyles: space, no_space, compact | |
# SupportedStylesForEmptyBraces: space, no_space | |
Layout/SpaceInsideHashLiteralBraces: | |
Enabled: false | |
# Offense count: 239 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: space, no_space | |
Layout/SpaceInsideParens: | |
Enabled: false | |
# Offense count: 28 | |
# Cop supports --auto-correct. | |
Layout/SpaceInsidePercentLiteralDelimiters: | |
Exclude: | |
- 'sample/Abbrev.rb' | |
- 'sample/Array.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/FileUtils.rb' | |
- 'sample/Numeric.rb' | |
# Offense count: 12 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. | |
# SupportedStyles: space, no_space | |
# SupportedStylesForEmptyBrackets: space, no_space | |
Layout/SpaceInsideReferenceBrackets: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/Hash.rb' | |
- 'sample/Matrix.rb' | |
- 'sample/REXML/AttlistDecl.rb' | |
# Offense count: 11 | |
Lint/AmbiguousBlockAssociation: | |
Exclude: | |
- 'sample/BasicSocket.rb' | |
- 'sample/Benchmark.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/Enumerator.rb' | |
- 'sample/Gem/RequestSet.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Resolv.rb' | |
- 'sample/Socket.rb' | |
- 'sample/doc/syntax/calling_methods_rdoc.rb' | |
# Offense count: 13 | |
Lint/AmbiguousOperator: | |
Exclude: | |
- 'sample/Enumerator/Lazy.rb' | |
- 'sample/Gem/Security.rb' | |
- 'sample/Object.rb' | |
- 'sample/doc/contributing_rdoc.rb' | |
- 'sample/doc/extension_ja_rdoc.rb' | |
- 'sample/doc/extension_rdoc.rb' | |
# Offense count: 18 | |
Lint/AmbiguousRegexpLiteral: | |
Exclude: | |
- 'sample/Kernel.rb' | |
- 'sample/MatchData.rb' | |
- 'sample/RDoc/Parser.rb' | |
- 'sample/StringScanner.rb' | |
# Offense count: 22 | |
# Configuration parameters: AllowSafeAssignment. | |
Lint/AssignmentInCondition: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/IO.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/MonitorMixin.rb' | |
- 'sample/Readline.rb' | |
- 'sample/Regexp.rb' | |
- 'sample/Socket.rb' | |
- 'sample/TCPSocket.rb' | |
- 'sample/doc/syntax/assignment_rdoc.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 1 | |
Lint/Debugger: | |
Exclude: | |
- 'sample/__/Gemfile_lock.rb' | |
# Offense count: 88 | |
Lint/DuplicateMethods: | |
Enabled: false | |
# Offense count: 2 | |
Lint/DuplicatedKey: | |
Exclude: | |
- 'sample/Hash.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AutoCorrect. | |
Lint/EmptyEnsure: | |
Exclude: | |
- 'sample/Thread.rb' | |
- 'sample/doc/syntax/exceptions_rdoc.rb' | |
# Offense count: 1 | |
Lint/EmptyWhen: | |
Exclude: | |
- 'sample/Net/HTTP.rb' | |
# Offense count: 14 | |
Lint/HandleExceptions: | |
Exclude: | |
- 'sample/CGI/Session.rb' | |
- 'sample/OptionParser/Arguable.rb' | |
- 'sample/Readline.rb' | |
- 'sample/Socket.rb' | |
- 'sample/doc/syntax/exceptions_rdoc.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 20 | |
Lint/ImplicitStringConcatenation: | |
Exclude: | |
- 'sample/File.rb' | |
- 'sample/doc/syntax/literals_rdoc.rb' | |
- 'sample/lib/racc/rdoc/grammar_en_rdoc.rb' | |
# Offense count: 1 | |
Lint/InterpolationCheck: | |
Exclude: | |
- 'sample/doc/syntax/literals_rdoc.rb' | |
# Offense count: 15 | |
Lint/LiteralAsCondition: | |
Exclude: | |
- 'sample/Enumerator.rb' | |
- 'sample/Range.rb' | |
- 'sample/Set.rb' | |
- 'sample/doc/syntax/assignment_rdoc.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
- 'sample/doc/syntax/refinements_rdoc.rb' | |
# Offense count: 1 | |
Lint/Loop: | |
Exclude: | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Lint/MultipleCompare: | |
Exclude: | |
- 'sample/Gem/Security.rb' | |
# Offense count: 7 | |
Lint/ParenthesesAsGroupedExpression: | |
Exclude: | |
- 'sample/RDoc/Markup.rb' | |
- 'sample/Time.rb' | |
- 'sample/doc/dtrace_probes_rdoc.rb' | |
- 'sample/lib/racc/rdoc/grammar_en_rdoc.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Lint/PercentStringArray: | |
Exclude: | |
- 'sample/Rinda/RingServer.rb' | |
# Offense count: 1 | |
Lint/ReturnInVoidContext: | |
Exclude: | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 166 | |
Lint/ShadowingOuterLocalVariable: | |
Enabled: false | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Lint/StringConversionInInterpolation: | |
Exclude: | |
- 'sample/Observable.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Lint/UnneededSplatExpansion: | |
Exclude: | |
- 'sample/doc/syntax/assignment_rdoc.rb' | |
# Offense count: 15 | |
Lint/UnreachableCode: | |
Exclude: | |
- 'sample/Kernel.rb' | |
- 'sample/Module.rb' | |
- 'sample/Process.rb' | |
- 'sample/StopIteration.rb' | |
- 'sample/UncaughtThrowError.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 55 | |
# Cop supports --auto-correct. | |
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. | |
Lint/UnusedBlockArgument: | |
Enabled: false | |
# Offense count: 16 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. | |
Lint/UnusedMethodArgument: | |
Exclude: | |
- 'sample/Class.rb' | |
- 'sample/Marshal.rb' | |
- 'sample/Object.rb' | |
- 'sample/Observable.rb' | |
- 'sample/Proc.rb' | |
- 'sample/Psych/Parser.rb' | |
- 'sample/WEBrick/CGI.rb' | |
- 'sample/WEBrick/HTTPServlet/AbstractServlet.rb' | |
- 'sample/WIN32OLE_EVENT.rb' | |
# Offense count: 6 | |
Lint/UriEscapeUnescape: | |
Exclude: | |
- 'sample/URI/Escape.rb' | |
# Offense count: 428 | |
Lint/UselessAssignment: | |
Enabled: false | |
# Offense count: 26 | |
Lint/UselessComparison: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/BasicObject.rb' | |
- 'sample/BigDecimal.rb' | |
- 'sample/Complex.rb' | |
- 'sample/Date.rb' | |
- 'sample/Hash.rb' | |
- 'sample/Object.rb' | |
- 'sample/Pathname.rb' | |
- 'sample/Random.rb' | |
- 'sample/Range.rb' | |
- 'sample/Rational.rb' | |
- 'sample/String.rb' | |
- 'sample/Time.rb' | |
# Offense count: 653 | |
# Configuration parameters: CheckForMethodsWithNoSideEffects. | |
Lint/Void: | |
Enabled: false | |
# Offense count: 2 | |
Metrics/AbcSize: | |
Max: 29 | |
# Offense count: 1 | |
Metrics/CyclomaticComplexity: | |
Max: 9 | |
# Offense count: 6 | |
# Configuration parameters: CountComments, ExcludedMethods. | |
Metrics/MethodLength: | |
Max: 21 | |
# Offense count: 3 | |
# Configuration parameters: CountKeywordArgs. | |
Metrics/ParameterLists: | |
Max: 7 | |
# Offense count: 1 | |
Metrics/PerceivedComplexity: | |
Max: 9 | |
# Offense count: 5 | |
Naming/AccessorMethodName: | |
Exclude: | |
- 'sample/Binding.rb' | |
- 'sample/DRb.rb' | |
- 'sample/ERB.rb' | |
- 'sample/Gem/UserInteraction.rb' | |
- 'sample/LocalJumpError.rb' | |
# Offense count: 2 | |
Naming/AsciiIdentifiers: | |
Exclude: | |
- 'sample/doc/extension_ja_rdoc.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 2 | |
Naming/ClassAndModuleCamelCase: | |
Exclude: | |
- 'sample/ERB.rb' | |
- 'sample/WIN32OLE.rb' | |
# Offense count: 3 | |
Naming/ConstantName: | |
Exclude: | |
- 'sample/Module.rb' | |
- 'sample/OptionParser.rb' | |
- 'sample/Symbol.rb' | |
# Offense count: 1794 | |
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. | |
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS | |
Naming/FileName: | |
Enabled: false | |
# Offense count: 3 | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: lowercase, uppercase | |
Naming/HeredocDelimiterCase: | |
Exclude: | |
- 'sample/Net/SMTP.rb' | |
- 'sample/Open3.rb' | |
# Offense count: 8 | |
# Configuration parameters: Blacklist. | |
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$)) | |
Naming/HeredocDelimiterNaming: | |
Exclude: | |
- 'sample/ERB.rb' | |
- 'sample/Gem/PackageTask.rb' | |
- 'sample/Gem/Specification.rb' | |
- 'sample/GetoptLong.rb' | |
- 'sample/Net/IMAP.rb' | |
- 'sample/XMP.rb' | |
- 'sample/doc/syntax/refinements_rdoc.rb' | |
# Offense count: 9 | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: snake_case, camelCase | |
Naming/MethodName: | |
Exclude: | |
- 'sample/RDoc/Markup.rb' | |
- 'sample/Symbol.rb' | |
- 'sample/WEBrick.rb' | |
- 'sample/WEBrick/CGI.rb' | |
- 'sample/WEBrick/HTTPAuth.rb' | |
- 'sample/WEBrick/HTTPServlet/AbstractServlet.rb' | |
- 'sample/WIN32OLE_EVENT.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 4 | |
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. | |
Naming/UncommunicativeBlockParamName: | |
Exclude: | |
- 'sample/Kernel.rb' | |
# Offense count: 122 | |
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. | |
# AllowedNames: io, id, to, by, on, in, at, ip, db | |
Naming/UncommunicativeMethodParamName: | |
Enabled: false | |
# Offense count: 15 | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: snake_case, camelCase | |
Naming/VariableName: | |
Exclude: | |
- 'sample/Kernel.rb' | |
- 'sample/REXML/Text.rb' | |
- 'sample/WIN32OLE_TYPE.rb' | |
- 'sample/WIN32OLE_VARIABLE.rb' | |
# Offense count: 3 | |
Performance/Caller: | |
Exclude: | |
- 'sample/Thread/Backtrace/Location.rb' | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
Performance/CompareWithBlock: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/Enumerable.rb' | |
# Offense count: 4 | |
Performance/FixedSize: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/String.rb' | |
# Offense count: 6 | |
# Cop supports --auto-correct. | |
Performance/RangeInclude: | |
Exclude: | |
- 'sample/Range.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Performance/RedundantBlockCall: | |
Exclude: | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 82 | |
# Cop supports --auto-correct. | |
Performance/RedundantMatch: | |
Exclude: | |
- 'sample/Regexp.rb' | |
- 'sample/String.rb' | |
- 'sample/doc/regexp_rdoc.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Performance/RedundantSortBy: | |
Exclude: | |
- 'sample/Enumerable.rb' | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
Performance/RegexpMatch: | |
Exclude: | |
- 'sample/Enumerable.rb' | |
- 'sample/Logger.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AutoCorrect. | |
Performance/StartWith: | |
Exclude: | |
- 'sample/Regexp.rb' | |
- 'sample/doc/regexp_rdoc.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Performance/StringReplacement: | |
Exclude: | |
- 'sample/Regexp.rb' | |
- 'sample/doc/regexp_rdoc.rb' | |
# Offense count: 2 | |
Performance/UnfreezeString: | |
Exclude: | |
- 'sample/Hash.rb' | |
- 'sample/SingleForwardable.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Performance/UriDefaultParser: | |
Exclude: | |
- 'sample/URI/RFC2396_Parser.rb' | |
# Offense count: 4 | |
Security/Eval: | |
Exclude: | |
- 'sample/Binding.rb' | |
- 'sample/OptionParser/Arguable.rb' | |
# Offense count: 3 | |
Security/MarshalLoad: | |
Exclude: | |
- 'sample/Marshal.rb' | |
- 'sample/Singleton.rb' | |
# Offense count: 5 | |
Security/Open: | |
Exclude: | |
- 'sample/Enumerable.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Process.rb' | |
- 'sample/RSS.rb' | |
- 'sample/Shellwords.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Security/YAMLLoad: | |
Exclude: | |
- 'sample/YAML.rb' | |
# Offense count: 4 | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: inline, group | |
Style/AccessModifierDeclarations: | |
Exclude: | |
- 'sample/Module.rb' | |
- 'sample/doc/syntax/modules_and_classes_rdoc.rb' | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: prefer_alias, prefer_alias_method | |
Style/Alias: | |
Exclude: | |
- 'sample/Module.rb' | |
- 'sample/MonitorMixin.rb' | |
- 'sample/doc/syntax/miscellaneous_rdoc.rb' | |
# Offense count: 13 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: always, conditionals | |
Style/AndOr: | |
Exclude: | |
- 'sample/BasicObject.rb' | |
- 'sample/CGI/Session.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/FileUtils.rb' | |
- 'sample/Hash.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Net/IMAP.rb' | |
- 'sample/OptionParser.rb' | |
- 'sample/RDoc/Markup.rb' | |
- 'sample/REXML/Parsers/BaseParser.rb' | |
- 'sample/REXML/Parsers/PullParser.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/ArrayJoin: | |
Exclude: | |
- 'sample/Array.rb' | |
# Offense count: 5 | |
# Configuration parameters: AllowedChars. | |
Style/AsciiComments: | |
Exclude: | |
- 'sample/Regexp.rb' | |
- 'sample/StringScanner.rb' | |
- 'sample/doc/regexp_rdoc.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Style/Attr: | |
Exclude: | |
- 'sample/Comparable.rb' | |
- 'sample/Range.rb' | |
# Offense count: 1 | |
Style/BeginBlock: | |
Exclude: | |
- 'sample/doc/syntax/miscellaneous_rdoc.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/BlockComments: | |
Exclude: | |
- 'sample/RDoc/Markup.rb' | |
# Offense count: 188 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods. | |
# SupportedStyles: line_count_based, semantic, braces_for_chaining | |
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object | |
# FunctionalMethods: let, let!, subject, watch | |
# IgnoredMethods: lambda, proc, it | |
Style/BlockDelimiters: | |
Enabled: false | |
# Offense count: 22 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: braces, no_braces, context_dependent | |
Style/BracesAroundHashParameters: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/DRb/DRbSSLSocket/SSLConfig.rb' | |
- 'sample/Hash.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Net/HTTP.rb' | |
- 'sample/Psych/Stream.rb' | |
- 'sample/REXML/Element.rb' | |
- 'sample/Struct.rb' | |
- 'sample/TSort.rb' | |
# Offense count: 13 | |
Style/CaseEquality: | |
Exclude: | |
- 'sample/Date.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/Hash.rb' | |
- 'sample/Regexp.rb' | |
- 'sample/Set.rb' | |
- 'sample/TSort.rb' | |
# Offense count: 9 | |
# Cop supports --auto-correct. | |
Style/CharacterLiteral: | |
Exclude: | |
- 'sample/Enumerable.rb' | |
- 'sample/Find.rb' | |
- 'sample/Shell/CommandProcessor.rb' | |
- 'sample/String.rb' | |
# Offense count: 8 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AutoCorrect, EnforcedStyle. | |
# SupportedStyles: nested, compact | |
Style/ClassAndModuleChildren: | |
Exclude: | |
- 'sample/Enumerator/Lazy.rb' | |
- 'sample/Gem/CommandManager.rb' | |
- 'sample/RDoc/Generator.rb' | |
- 'sample/RDoc/Options.rb' | |
- 'sample/RDoc/Parser.rb' | |
- 'sample/doc/syntax/modules_and_classes_rdoc.rb' | |
# Offense count: 10 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: is_a?, kind_of? | |
Style/ClassCheck: | |
Exclude: | |
- 'sample/Net/IMAP.rb' | |
- 'sample/Object.rb' | |
- 'sample/ObjectSpace.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Style/ClassMethods: | |
Exclude: | |
- 'sample/Module.rb' | |
- 'sample/Object.rb' | |
# Offense count: 9 | |
Style/ClassVars: | |
Exclude: | |
- 'sample/Module.rb' | |
- 'sample/doc/syntax/assignment_rdoc.rb' | |
# Offense count: 28 | |
# Cop supports --auto-correct. | |
Style/ColonMethodCall: | |
Exclude: | |
- 'sample/CGI.rb' | |
- 'sample/CGI/Util.rb' | |
- 'sample/DRb.rb' | |
- 'sample/GC.rb' | |
- 'sample/Object.rb' | |
- 'sample/ObjectSpace.rb' | |
- 'sample/RDoc/Markup.rb' | |
- 'sample/Timeout.rb' | |
- 'sample/URI.rb' | |
# Offense count: 21 | |
Style/CommentedKeyword: | |
Exclude: | |
- 'sample/BasicSocket.rb' | |
- 'sample/FileUtils.rb' | |
- 'sample/Forwardable.rb' | |
- 'sample/Module.rb' | |
- 'sample/Object.rb' | |
- 'sample/Observable.rb' | |
- 'sample/OptionParser.rb' | |
- 'sample/PStore.rb' | |
- 'sample/Range.rb' | |
- 'sample/SDBM.rb' | |
- 'sample/Socket.rb' | |
- 'sample/TCPServer.rb' | |
- 'sample/UDPSocket.rb' | |
- 'sample/UNIXServer.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. | |
# SupportedStyles: assign_to_condition, assign_inside_condition | |
Style/ConditionalAssignment: | |
Exclude: | |
- 'sample/GetoptLong.rb' | |
# Offense count: 6 | |
# Cop supports --auto-correct. | |
Style/DefWithParentheses: | |
Exclude: | |
- 'sample/Object.rb' | |
- 'sample/Symbol.rb' | |
# Offense count: 90 | |
Style/Documentation: | |
Enabled: false | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/EmptyBlockParameter: | |
Exclude: | |
- 'sample/Proc.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/EmptyCaseCondition: | |
Exclude: | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 12 | |
# Cop supports --auto-correct. | |
Style/EmptyLiteral: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/Forwardable.rb' | |
- 'sample/Hash.rb' | |
- 'sample/PStore.rb' | |
- 'sample/SingleForwardable.rb' | |
# Offense count: 6 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: compact, expanded | |
Style/EmptyMethod: | |
Exclude: | |
- 'sample/Object.rb' | |
- 'sample/Symbol.rb' | |
- 'sample/doc/syntax/calling_methods_rdoc.rb' | |
- 'sample/doc/syntax/modules_and_classes_rdoc.rb' | |
# Offense count: 1 | |
Style/EndBlock: | |
Exclude: | |
- 'sample/OpenSSL.rb' | |
# Offense count: 11 | |
Style/EvalWithLocation: | |
Exclude: | |
- 'sample/Binding.rb' | |
- 'sample/DRb.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/OptionParser/Arguable.rb' | |
- 'sample/Proc.rb' | |
- 'sample/SyntaxError.rb' | |
- 'sample/doc/syntax/refinements_rdoc.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Style/EvenOdd: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/Enumerable.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/ExpandPathArguments: | |
Exclude: | |
- 'sample/File.rb' | |
# Offense count: 3 | |
Style/FlipFlop: | |
Exclude: | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 14 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: each, for | |
Style/For: | |
Exclude: | |
- 'sample/Benchmark.rb' | |
- 'sample/CGI.rb' | |
- 'sample/Continuation.rb' | |
- 'sample/GetoptLong.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Shell.rb' | |
- 'sample/String.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 173 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: format, sprintf, percent | |
Style/FormatString: | |
Exclude: | |
- 'sample/File.rb' | |
- 'sample/File/Stat.rb' | |
- 'sample/FileTest.rb' | |
- 'sample/Float.rb' | |
- 'sample/IO.rb' | |
- 'sample/Integer.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Logger.rb' | |
- 'sample/Process.rb' | |
- 'sample/Process/Status.rb' | |
- 'sample/REXML/Text.rb' | |
- 'sample/Range.rb' | |
- 'sample/String.rb' | |
- 'sample/Time.rb' | |
- 'sample/doc/syntax/literals_rdoc.rb' | |
# Offense count: 43 | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: annotated, template, unannotated | |
Style/FormatStringToken: | |
Exclude: | |
- 'sample/File.rb' | |
- 'sample/File/Stat.rb' | |
- 'sample/FileTest.rb' | |
- 'sample/Float.rb' | |
- 'sample/IO.rb' | |
- 'sample/Integer.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Logger.rb' | |
- 'sample/Process.rb' | |
- 'sample/REXML/Text.rb' | |
- 'sample/String.rb' | |
# Offense count: 403 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: when_needed, always, never | |
Style/FrozenStringLiteralComment: | |
Enabled: false | |
# Offense count: 39 | |
# Configuration parameters: AllowedVariables. | |
Style/GlobalVars: | |
Exclude: | |
- 'sample/Continuation.rb' | |
- 'sample/MakeMakefile.rb' | |
- 'sample/Module.rb' | |
- 'sample/Net/POP3.rb' | |
- 'sample/OptionParser/Arguable.rb' | |
- 'sample/Signal.rb' | |
- 'sample/StringScanner.rb' | |
- 'sample/Symbol.rb' | |
- 'sample/TracePoint.rb' | |
- 'sample/doc/syntax/assignment_rdoc.rb' | |
- 'sample/doc/syntax/miscellaneous_rdoc.rb' | |
# Offense count: 4 | |
# Configuration parameters: MinBodyLength. | |
Style/GuardClause: | |
Exclude: | |
- 'sample/Find.rb' | |
- 'sample/Integer.rb' | |
- 'sample/Observable.rb' | |
# Offense count: 248 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. | |
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys | |
Style/HashSyntax: | |
Enabled: false | |
# Offense count: 18 | |
# Cop supports --auto-correct. | |
Style/IfUnlessModifier: | |
Exclude: | |
- 'sample/BasicSocket.rb' | |
- 'sample/CGI/HtmlExtension.rb' | |
- 'sample/GetoptLong.rb' | |
- 'sample/Logger.rb' | |
- 'sample/Net/IMAP.rb' | |
- 'sample/Observable.rb' | |
- 'sample/OpenSSL/KDF.rb' | |
- 'sample/OpenSSL/OCSP.rb' | |
- 'sample/Readline.rb' | |
- 'sample/WEBrick/HTTPProxyServer.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
- 'sample/doc/syntax/refinements_rdoc.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Style/InfiniteLoop: | |
Exclude: | |
- 'sample/Enumerator.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 39 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: line_count_dependent, lambda, literal | |
Style/Lambda: | |
Exclude: | |
- 'sample/Method.rb' | |
- 'sample/PP/PPMethods.rb' | |
- 'sample/PrettyPrint.rb' | |
- 'sample/Proc.rb' | |
- 'sample/TSort.rb' | |
# Offense count: 5 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: call, braces | |
Style/LambdaCall: | |
Exclude: | |
- 'sample/Method.rb' | |
- 'sample/Proc.rb' | |
# Offense count: 8 | |
# Cop supports --auto-correct. | |
Style/LineEndConcatenation: | |
Exclude: | |
- 'sample/Base64.rb' | |
- 'sample/CGI.rb' | |
- 'sample/Gem/Specification.rb' | |
- 'sample/REXML/Attributes.rb' | |
- 'sample/SimpleDelegator.rb' | |
# Offense count: 19 | |
# Cop supports --auto-correct. | |
# Configuration parameters: IgnoredMethods. | |
Style/MethodCallWithoutArgsParentheses: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/Continuation.rb' | |
- 'sample/ERB.rb' | |
- 'sample/ERB/DefMethod.rb' | |
- 'sample/Exception.rb' | |
- 'sample/File.rb' | |
- 'sample/FileUtils.rb' | |
- 'sample/Module.rb' | |
- 'sample/Process.rb' | |
- 'sample/Signal.rb' | |
- 'sample/doc/NEWS-2_3_0.rb' | |
- 'sample/doc/syntax/calling_methods_rdoc.rb' | |
# Offense count: 18 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline | |
Style/MethodDefParentheses: | |
Exclude: | |
- 'sample/Marshal.rb' | |
- 'sample/ObjectSpace.rb' | |
- 'sample/OptionParser.rb' | |
- 'sample/Psych/Parser.rb' | |
- 'sample/RDoc/Markup.rb' | |
- 'sample/RDoc/Options.rb' | |
- 'sample/RDoc/Parser.rb' | |
- 'sample/WEBrick.rb' | |
- 'sample/WEBrick/CGI.rb' | |
- 'sample/WEBrick/HTTPAuth.rb' | |
- 'sample/WEBrick/HTTPServlet/AbstractServlet.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 1 | |
Style/MethodMissingSuper: | |
Exclude: | |
- 'sample/WIN32OLE_EVENT.rb' | |
# Offense count: 1 | |
Style/MissingRespondToMissing: | |
Exclude: | |
- 'sample/WIN32OLE_EVENT.rb' | |
# Offense count: 35 | |
Style/MixinUsage: | |
Exclude: | |
- 'sample/Benchmark.rb' | |
- 'sample/BigMath.rb' | |
- 'sample/CGI.rb' | |
- 'sample/ERB/Util.rb' | |
- 'sample/Fiddle/CParser.rb' | |
- 'sample/Fiddle/CStructBuilder.rb' | |
- 'sample/Fiddle/Closure/BlockCaller.rb' | |
- 'sample/Module.rb' | |
- 'sample/Process.rb' | |
- 'sample/Socket.rb' | |
- 'sample/TCPServer.rb' | |
- 'sample/UNIXServer.rb' | |
- 'sample/doc/extension_ja_rdoc.rb' | |
- 'sample/doc/extension_rdoc.rb' | |
- 'sample/doc/syntax/modules_and_classes_rdoc.rb' | |
# Offense count: 13 | |
Style/MultilineBlockChain: | |
Exclude: | |
- 'sample/Enumerable.rb' | |
- 'sample/Socket.rb' | |
- 'sample/TracePoint.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/MultilineIfModifier: | |
Exclude: | |
- 'sample/Net/HTTP.rb' | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
Style/MultilineIfThen: | |
Exclude: | |
- 'sample/Kernel.rb' | |
- 'sample/OpenSSL/OCSP.rb' | |
- 'sample/WEBrick/HTTPProxyServer.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 10 | |
# Cop supports --auto-correct. | |
Style/MutableConstant: | |
Exclude: | |
- 'sample/BasicObject.rb' | |
- 'sample/DRb.rb' | |
- 'sample/ERB.rb' | |
- 'sample/Module.rb' | |
- 'sample/OptionParser.rb' | |
# Offense count: 6 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: both, prefix, postfix | |
Style/NegatedIf: | |
Exclude: | |
- 'sample/DRb.rb' | |
- 'sample/Module.rb' | |
- 'sample/Net/IMAP.rb' | |
- 'sample/Shell.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 10 | |
# Cop supports --auto-correct. | |
# Configuration parameters: Whitelist. | |
# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with | |
Style/NestedParenthesizedCalls: | |
Exclude: | |
- 'sample/doc/extension_ja_rdoc.rb' | |
- 'sample/doc/extension_rdoc.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, MinBodyLength. | |
# SupportedStyles: skip_modifier_ifs, always | |
Style/Next: | |
Exclude: | |
- 'sample/Shell.rb' | |
- 'sample/TSort.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: predicate, comparison | |
Style/NilComparison: | |
Exclude: | |
- 'sample/TSort.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
# Configuration parameters: IncludeSemanticChanges. | |
Style/NonNilCheck: | |
Exclude: | |
- 'sample/TSort.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Style/Not: | |
Exclude: | |
- 'sample/Net/IMAP.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 29 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedOctalStyle. | |
# SupportedOctalStyles: zero_with_o, zero_only | |
Style/NumericLiteralPrefix: | |
Exclude: | |
- 'sample/DBM.rb' | |
- 'sample/Dir.rb' | |
- 'sample/File.rb' | |
- 'sample/File/Stat.rb' | |
- 'sample/FileUtils.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Object.rb' | |
- 'sample/OpenSSL.rb' | |
- 'sample/Process.rb' | |
- 'sample/Time.rb' | |
- 'sample/doc/syntax/literals_rdoc.rb' | |
# Offense count: 144 | |
# Cop supports --auto-correct. | |
# Configuration parameters: Strict. | |
Style/NumericLiterals: | |
MinDigits: 7 | |
# Offense count: 22 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods. | |
# SupportedStyles: predicate, comparison | |
Style/NumericPredicate: | |
Exclude: | |
- 'spec/**/*' | |
- 'sample/Array.rb' | |
- 'sample/BasicSocket.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/Forwardable.rb' | |
- 'sample/IO.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Math.rb' | |
- 'sample/Net/HTTP.rb' | |
- 'sample/Object.rb' | |
- 'sample/OpenSSL/KDF.rb' | |
- 'sample/Socket.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 4 | |
Style/OptionalArguments: | |
Exclude: | |
- 'sample/doc/syntax/calling_methods_rdoc.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 12 | |
# Cop supports --auto-correct. | |
Style/ParallelAssignment: | |
Exclude: | |
- 'sample/Enumerable.rb' | |
- 'sample/Object.rb' | |
- 'sample/Singleton.rb' | |
- 'sample/Thread.rb' | |
- 'sample/Time.rb' | |
- 'sample/doc/syntax/assignment_rdoc.rb' | |
# Offense count: 55 | |
# Cop supports --auto-correct. | |
# Configuration parameters: PreferredDelimiters. | |
Style/PercentLiteralDelimiters: | |
Exclude: | |
- 'sample/Abbrev.rb' | |
- 'sample/Array.rb' | |
- 'sample/CSV.rb' | |
- 'sample/ERB.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/Enumerator.rb' | |
- 'sample/FileUtils.rb' | |
- 'sample/IO.rb' | |
- 'sample/Numeric.rb' | |
- 'sample/Shellwords.rb' | |
- 'sample/SimpleDelegator.rb' | |
- 'sample/doc/syntax/literals_rdoc.rb' | |
# Offense count: 6 | |
# Cop supports --auto-correct. | |
Style/PerlBackrefs: | |
Exclude: | |
- 'sample/Regexp.rb' | |
- 'sample/doc/regexp_rdoc.rb' | |
# Offense count: 12 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: short, verbose | |
Style/PreferredHashMethods: | |
Exclude: | |
- 'sample/CGI.rb' | |
- 'sample/CGI/Session.rb' | |
- 'sample/DRb.rb' | |
- 'sample/Hash.rb' | |
# Offense count: 11 | |
# Cop supports --auto-correct. | |
Style/Proc: | |
Exclude: | |
- 'sample/LocalJumpError.rb' | |
- 'sample/Method.rb' | |
- 'sample/Proc.rb' | |
- 'sample/Readline.rb' | |
- 'sample/SecurityError.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: compact, exploded | |
Style/RaiseArgs: | |
Exclude: | |
- 'sample/OpenSSL/SSL/SSLContext.rb' | |
- 'sample/TSort.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/RandomWithOffset: | |
Exclude: | |
- 'sample/Observable.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Style/RedundantBegin: | |
Exclude: | |
- 'sample/Thread.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Style/RedundantConditional: | |
Exclude: | |
- 'sample/BasicSocket.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/RedundantException: | |
Exclude: | |
- 'sample/OpenSSL/SSL/SSLContext.rb' | |
# Offense count: 40 | |
# Cop supports --auto-correct. | |
Style/RedundantParentheses: | |
Exclude: | |
- 'sample/Float.rb' | |
- 'sample/IO.rb' | |
- 'sample/Integer.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/NEWS.rb' | |
- 'sample/Numeric.rb' | |
- 'sample/doc/dtrace_probes_rdoc.rb' | |
- 'sample/lib/racc/rdoc/grammar_en_rdoc.rb' | |
# Offense count: 12 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AllowMultipleReturnValues. | |
Style/RedundantReturn: | |
Exclude: | |
- 'sample/Continuation.rb' | |
- 'sample/DRb.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Method.rb' | |
- 'sample/OptionParser.rb' | |
- 'sample/Proc.rb' | |
- 'sample/Tracer.rb' | |
- 'sample/UnboundMethod.rb' | |
- 'sample/WEBrick/HTTPServlet/AbstractServlet.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 11 | |
# Cop supports --auto-correct. | |
Style/RedundantSelf: | |
Exclude: | |
- 'sample/Class.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/Method.rb' | |
- 'sample/MonitorMixin.rb' | |
- 'sample/OptionParser.rb' | |
- 'sample/String.rb' | |
# Offense count: 6 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, AllowInnerSlashes. | |
# SupportedStyles: slashes, percent_r, mixed | |
Style/RegexpLiteral: | |
Exclude: | |
- 'sample/DRb.rb' | |
- 'sample/MatchData.rb' | |
- 'sample/Regexp.rb' | |
- 'sample/String.rb' | |
- 'sample/doc/regexp_rdoc.rb' | |
# Offense count: 5 | |
# Cop supports --auto-correct. | |
Style/RescueModifier: | |
Exclude: | |
- 'sample/StandardError.rb' | |
- 'sample/Time.rb' | |
# Offense count: 11 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: implicit, explicit | |
Style/RescueStandardError: | |
Exclude: | |
- 'sample/Exception.rb' | |
- 'sample/Logger.rb' | |
- 'sample/doc/syntax/exceptions_rdoc.rb' | |
- 'sample/doc/syntax/methods_rdoc.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist. | |
# Whitelist: present?, blank?, presence, try, try! | |
Style/SafeNavigation: | |
Exclude: | |
- 'sample/doc/syntax/miscellaneous_rdoc.rb' | |
# Offense count: 7 | |
# Cop supports --auto-correct. | |
Style/SelfAssignment: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/BigDecimal.rb' | |
- 'sample/Pathname.rb' | |
- 'sample/doc/syntax/assignment_rdoc.rb' | |
# Offense count: 45 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AllowAsExpressionSeparator. | |
Style/Semicolon: | |
Enabled: false | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: only_raise, only_fail, semantic | |
Style/SignalException: | |
Exclude: | |
- 'sample/Gem/Resolver/Molinillo/VersionConflict.rb' | |
# Offense count: 20 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AllowIfMethodIsEmpty. | |
Style/SingleLineMethods: | |
Exclude: | |
- 'sample/Math.rb' | |
- 'sample/Module.rb' | |
- 'sample/Object.rb' | |
- 'sample/Proc.rb' | |
- 'sample/Regexp.rb' | |
- 'sample/TSort.rb' | |
# Offense count: 57 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: use_perl_names, use_english_names | |
Style/SpecialGlobalVars: | |
Enabled: false | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
Style/StderrPuts: | |
Exclude: | |
- 'sample/IO.rb' | |
# Offense count: 3990 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. | |
# SupportedStyles: single_quotes, double_quotes | |
Style/StringLiterals: | |
Enabled: false | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: single_quotes, double_quotes | |
Style/StringLiteralsInInterpolation: | |
Exclude: | |
- 'sample/doc/syntax/assignment_rdoc.rb' | |
# Offense count: 16 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, MinSize. | |
# SupportedStyles: percent, brackets | |
Style/SymbolArray: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/BasicObject.rb' | |
- 'sample/IO.rb' | |
- 'sample/IndexError.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/OptionParser.rb' | |
- 'sample/Process.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/SymbolLiteral: | |
Exclude: | |
- 'sample/doc/syntax/literals_rdoc.rb' | |
# Offense count: 30 | |
# Cop supports --auto-correct. | |
# Configuration parameters: IgnoredMethods. | |
# IgnoredMethods: respond_to, define_method | |
Style/SymbolProc: | |
Exclude: | |
- 'sample/Array.rb' | |
- 'sample/Continuation.rb' | |
- 'sample/Date.rb' | |
- 'sample/Enumerable.rb' | |
- 'sample/Gem/RequestSet.rb' | |
- 'sample/Hash.rb' | |
- 'sample/Object.rb' | |
- 'sample/Struct.rb' | |
- 'sample/Thread.rb' | |
- 'sample/WIN32OLE_TYPE.rb' | |
- 'sample/WIN32OLE_TYPELIB.rb' | |
- 'sample/doc/syntax/refinements_rdoc.rb' | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyleForMultiline. | |
# SupportedStylesForMultiline: comma, consistent_comma, no_comma | |
Style/TrailingCommaInArrayLiteral: | |
Exclude: | |
- 'sample/GC/Profiler.rb' | |
- 'sample/WEBrick.rb' | |
- 'sample/WEBrick/AccessLog.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyleForMultiline. | |
# SupportedStylesForMultiline: comma, consistent_comma, no_comma | |
Style/TrailingCommaInHashLiteral: | |
Exclude: | |
- 'sample/Gem/Package/DigestIO.rb' | |
- 'sample/ObjectSpace.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
# Configuration parameters: AllowNamedUnderscoreVariables. | |
Style/TrailingUnderscoreVariable: | |
Exclude: | |
- 'sample/BasicSocket.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist. | |
# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym | |
Style/TrivialAccessors: | |
Exclude: | |
- 'sample/doc/syntax/assignment_rdoc.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/UnlessElse: | |
Exclude: | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
Style/UnneededInterpolation: | |
Exclude: | |
- 'sample/Binding.rb' | |
- 'sample/ObjectSpace.rb' | |
- 'sample/WIN32OLE_VARIABLE.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
Style/UnneededPercentQ: | |
Exclude: | |
- 'sample/Module.rb' | |
- 'sample/doc/syntax/literals_rdoc.rb' | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
Style/UnpackFirst: | |
Exclude: | |
- 'sample/BasicSocket.rb' | |
- 'sample/IO.rb' | |
- 'sample/String.rb' | |
# Offense count: 3 | |
# Cop supports --auto-correct. | |
Style/VariableInterpolation: | |
Exclude: | |
- 'sample/Observable.rb' | |
- 'sample/Signal.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Style/WhenThen: | |
Exclude: | |
- 'sample/Regexp.rb' | |
# Offense count: 5 | |
# Cop supports --auto-correct. | |
Style/WhileUntilDo: | |
Exclude: | |
- 'sample/Zlib/Deflate.rb' | |
- 'sample/doc/syntax/control_expressions_rdoc.rb' | |
# Offense count: 2 | |
# Cop supports --auto-correct. | |
Style/WhileUntilModifier: | |
Exclude: | |
- 'sample/Forwardable.rb' | |
- 'sample/Zlib/Deflate.rb' | |
# Offense count: 150 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle, MinSize, WordRegex. | |
# SupportedStyles: percent, brackets | |
Style/WordArray: | |
Enabled: false | |
# Offense count: 4 | |
# Cop supports --auto-correct. | |
# Configuration parameters: EnforcedStyle. | |
# SupportedStyles: all_comparison_operators, equality_operators_only | |
Style/YodaCondition: | |
Exclude: | |
- 'sample/Enumerable.rb' | |
- 'sample/IO.rb' | |
- 'sample/Kernel.rb' | |
- 'sample/Tracer.rb' | |
# Offense count: 1 | |
# Cop supports --auto-correct. | |
Style/ZeroLengthPredicate: | |
Exclude: | |
- 'sample/Forwardable.rb' | |
# Offense count: 178 | |
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. | |
# URISchemes: http, https | |
Metrics/LineLength: | |
Max: 406 |
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
#!/bin/sh | |
[ -d ruby ] || git clone git://github.com/ruby/ruby.git | |
(cd ruby && git checkout v2_5_3) | |
bundle exec rdoc --root=ruby | |
[ -d sample ] || mkdir sample | |
bundle exec ext_sample.rb | |
echo 2.5.3 > .ruby-version | |
bundle exec rubocop --auto-gen-config sample/ |
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
#!/usr/bin/env ruby | |
require 'pathname' | |
require 'fileutils' | |
require 'nokogiri' | |
class HtmlFile | |
def initialize(path) | |
@path = path | |
end | |
def load_and_parse | |
@doc = File.open(@path) { |f| Nokogiri::HTML(f) } | |
end | |
def rubies | |
@doc.xpath("//pre[@class='ruby']").map(&:inner_text) | |
end | |
end | |
class Extractor | |
SRC_DIR = Pathname("doc") | |
DST_DIR = Pathname("sample") | |
def initialize | |
end | |
def extract | |
SRC_DIR.glob("**/*.html").each do |path| | |
puts path | |
html_file = HtmlFile.new(path) | |
html_file.load_and_parse | |
dst = DST_DIR + (path.sub("doc/", "").sub(/html$/, "rb")) | |
FileUtils.mkdir_p(dst.dirname) | |
dst.open("w") do |f| | |
f.puts html_file.rubies.join("#---\n") | |
end | |
end | |
end | |
end | |
Extractor.new.extract |
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 "rdoc" | |
gem "nokogiri" | |
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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
ast (2.4.0) | |
jaro_winkler (1.5.1) | |
mini_portile2 (2.3.0) | |
nokogiri (1.8.5) | |
mini_portile2 (~> 2.3.0) | |
parallel (1.12.1) | |
parser (2.5.3.0) | |
ast (~> 2.4.0) | |
powerpack (0.1.2) | |
rainbow (3.0.0) | |
rdoc (6.0.4) | |
rubocop (0.61.1) | |
jaro_winkler (~> 1.5.1) | |
parallel (~> 1.10) | |
parser (>= 2.5, != 2.5.1.1) | |
powerpack (~> 0.1) | |
rainbow (>= 2.2.2, < 4.0) | |
ruby-progressbar (~> 1.7) | |
unicode-display_width (~> 1.4.0) | |
ruby-progressbar (1.10.0) | |
unicode-display_width (1.4.0) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
nokogiri | |
rdoc | |
rubocop | |
BUNDLED WITH | |
1.17.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment