Created
October 30, 2023 06:19
-
-
Save dleavitt/283f48f3bfd7528fb00305874dbc865a to your computer and use it in GitHub Desktop.
Ruby JSON Schema
This file contains hidden or 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
| { | |
| "title": "JSON schema for RuboCop configuration files", | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "type": "object", | |
| "properties": { | |
| "require": { | |
| "$ref": "#/definitions/stringOrStrings" | |
| }, | |
| "inherit_from": { | |
| "$ref": "#/definitions/stringOrStrings" | |
| }, | |
| "inherit_gem": { | |
| "type": "object", | |
| "additionalProperties": { | |
| "$ref": "#/definitions/stringOrStrings" | |
| } | |
| }, | |
| "inherit_mode": { | |
| "$ref": "#/definitions/inheritMode" | |
| }, | |
| "AllCops": { | |
| "type": "object", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/sharedProperties" | |
| }, | |
| { | |
| "$ref": "#/definitions/allCopsProperties" | |
| } | |
| ] | |
| }, | |
| "Migration": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Bundler": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Gemspec": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Layout": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Lint": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Metrics": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Naming": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Style": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Security": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Performance": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Rails": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Capybara/RSpec": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Capybara": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "FactoryBot": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "RSpec/Capybara": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "RSpec/Rails": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "RSpec": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Minitest": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Rake": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Sequel": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "ThreadSafety": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Require": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "I18n/GetText": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "I18n/RailsI18n": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Packaging": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Sorbet": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "GraphQL": { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| "Migration/DepartmentName": { | |
| "title": "Migration/DepartmentName", | |
| "description": "Check that cop names in rubocop:disable (etc) comments are given with department name.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Bundler/DuplicatedGem": { | |
| "title": "Bundler/DuplicatedGem", | |
| "description": "Checks for duplicate gem entries in Gemfile.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemfile", | |
| "**/Gemfile", | |
| "**/gems.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Bundler/DuplicatedGroup": { | |
| "title": "Bundler/DuplicatedGroup", | |
| "description": "Checks for duplicate group entries in Gemfile.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemfile", | |
| "**/Gemfile", | |
| "**/gems.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Bundler/GemComment": { | |
| "title": "Bundler/GemComment", | |
| "description": "Add a comment describing each gem.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemfile", | |
| "**/Gemfile", | |
| "**/gems.rb" | |
| ] | |
| }, | |
| "IgnoredGems": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "OnlyFor": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Bundler/GemFilename": { | |
| "title": "Bundler/GemFilename", | |
| "description": "Enforces the filename for managing gems.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "Gemfile", | |
| "gems.rb" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "Gemfile", | |
| "gems.rb" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "Gemfile" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/Gemfile", | |
| "**/gems.rb", | |
| "**/Gemfile.lock", | |
| "**/gems.locked" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Bundler/GemVersion": { | |
| "title": "Bundler/GemVersion", | |
| "description": "Requires or forbids specifying gem versions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "required", | |
| "forbidden" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "required", | |
| "forbidden" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "required" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemfile", | |
| "**/Gemfile", | |
| "**/gems.rb" | |
| ] | |
| }, | |
| "AllowedGems": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Bundler/InsecureProtocolSource": { | |
| "title": "Bundler/InsecureProtocolSource", | |
| "description": "The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated because HTTP requests are insecure. Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "AllowHttpProtocol": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemfile", | |
| "**/Gemfile", | |
| "**/gems.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Bundler/OrderedGems": { | |
| "title": "Bundler/OrderedGems", | |
| "description": "Gems within groups in the Gemfile should be alphabetically sorted.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "TreatCommentsAsGroupSeparators": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "ConsiderPunctuation": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemfile", | |
| "**/Gemfile", | |
| "**/gems.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Gemspec/DependencyVersion": { | |
| "title": "Gemspec/DependencyVersion", | |
| "description": "Requires or forbids specifying gem dependency versions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "required", | |
| "forbidden" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "required", | |
| "forbidden" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "required" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemspec" | |
| ] | |
| }, | |
| "AllowedGems": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Gemspec/DeprecatedAttributeAssignment": { | |
| "title": "Gemspec/DeprecatedAttributeAssignment", | |
| "description": "Checks that deprecated attribute assignments are not set in a gemspec file.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemspec" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Gemspec/DevelopmentDependencies": { | |
| "title": "Gemspec/DevelopmentDependencies", | |
| "description": "Checks that development dependencies are specified in Gemfile rather than gemspec.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "Gemfile", | |
| "gems.rb", | |
| "gemspec" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "Gemfile", | |
| "gems.rb", | |
| "gemspec" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "Gemfile" | |
| }, | |
| "AllowedGems": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemspec", | |
| "**/Gemfile", | |
| "**/gems.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Gemspec/DuplicatedAssignment": { | |
| "title": "Gemspec/DuplicatedAssignment", | |
| "description": "An attribute assignment method calls should be listed only once in a gemspec.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemspec" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Gemspec/OrderedDependencies": { | |
| "title": "Gemspec/OrderedDependencies", | |
| "description": "Dependencies in the gemspec should be alphabetically sorted.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "TreatCommentsAsGroupSeparators": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "ConsiderPunctuation": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemspec" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Gemspec/RequireMFA": { | |
| "title": "Gemspec/RequireMFA", | |
| "description": "Checks that the gemspec has metadata to require Multi-Factor Authentication from RubyGems.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemspec" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Gemspec/RequiredRubyVersion": { | |
| "title": "Gemspec/RequiredRubyVersion", | |
| "description": "Checks that `required_ruby_version` of gemspec is specified and equal to `TargetRubyVersion` of .rubocop.yml.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemspec" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Gemspec/RubyVersionGlobalsUsage": { | |
| "title": "Gemspec/RubyVersionGlobalsUsage", | |
| "description": "Checks usage of RUBY_VERSION in gemspec.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.gemspec" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/AccessModifierIndentation": { | |
| "title": "Layout/AccessModifierIndentation", | |
| "description": "Check indentation of private/protected visibility modifiers.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "outdent", | |
| "indent" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "outdent", | |
| "indent" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "indent" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/ArgumentAlignment": { | |
| "title": "Layout/ArgumentAlignment", | |
| "description": "Align the arguments of a method call if they span more than one line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "with_first_argument", | |
| "with_fixed_indentation" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "with_first_argument", | |
| "with_fixed_indentation" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "with_first_argument" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/ArrayAlignment": { | |
| "title": "Layout/ArrayAlignment", | |
| "description": "Align the elements of an array literal if they span more than one line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "with_first_element", | |
| "with_fixed_indentation" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "with_first_element", | |
| "with_fixed_indentation" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "with_first_element" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/AssignmentIndentation": { | |
| "title": "Layout/AssignmentIndentation", | |
| "description": "Checks the indentation of the first line of the right-hand-side of a multi-line assignment.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/BeginEndAlignment": { | |
| "title": "Layout/BeginEndAlignment", | |
| "description": "Align ends corresponding to begins correctly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyleAlignWith": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "start_of_line", | |
| "begin" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "start_of_line", | |
| "begin" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "start_of_line" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/BlockAlignment": { | |
| "title": "Layout/BlockAlignment", | |
| "description": "Align block ends correctly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyleAlignWith": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "either", | |
| "start_of_block", | |
| "start_of_line" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "either", | |
| "start_of_block", | |
| "start_of_line" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "either" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/BlockEndNewline": { | |
| "title": "Layout/BlockEndNewline", | |
| "description": "Put end statement of multiline block on its own line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/CaseIndentation": { | |
| "title": "Layout/CaseIndentation", | |
| "description": "Indentation of when in a case/(when|in)/[else/]end.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "case", | |
| "end" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "case", | |
| "end" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "case" | |
| }, | |
| "IndentOneStep": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/ClassStructure": { | |
| "title": "Layout/ClassStructure", | |
| "description": "Enforces a configured order of definitions within a class body.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Categories": { | |
| "type": "object", | |
| "default": { | |
| "module_inclusion": [ | |
| "include", | |
| "prepend", | |
| "extend" | |
| ] | |
| } | |
| }, | |
| "ExpectedOrder": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "module_inclusion", | |
| "constants", | |
| "public_class_methods", | |
| "initializer", | |
| "public_methods", | |
| "protected_methods", | |
| "private_methods" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/ClosingHeredocIndentation": { | |
| "title": "Layout/ClosingHeredocIndentation", | |
| "description": "Checks the indentation of here document closings.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/ClosingParenthesisIndentation": { | |
| "title": "Layout/ClosingParenthesisIndentation", | |
| "description": "Checks the indentation of hanging closing parentheses.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/CommentIndentation": { | |
| "title": "Layout/CommentIndentation", | |
| "description": "Indentation of comments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowForAlignment": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/ConditionPosition": { | |
| "title": "Layout/ConditionPosition", | |
| "description": "Checks for condition placed in a confusing position relative to the keyword.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/DefEndAlignment": { | |
| "title": "Layout/DefEndAlignment", | |
| "description": "Align ends corresponding to defs correctly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyleAlignWith": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "start_of_line", | |
| "def" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "start_of_line", | |
| "def" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "start_of_line" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/DotPosition": { | |
| "title": "Layout/DotPosition", | |
| "description": "Checks the position of the dot in multi-line method calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "leading", | |
| "trailing" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "leading", | |
| "trailing" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "leading" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/ElseAlignment": { | |
| "title": "Layout/ElseAlignment", | |
| "description": "Align elses and elsifs correctly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyComment": { | |
| "title": "Layout/EmptyComment", | |
| "description": "Checks empty comment.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowBorderComment": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowMarginComment": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLineAfterGuardClause": { | |
| "title": "Layout/EmptyLineAfterGuardClause", | |
| "description": "Add empty line after guard clause.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLineAfterMagicComment": { | |
| "title": "Layout/EmptyLineAfterMagicComment", | |
| "description": "Add an empty line after magic comments to separate them from code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLineAfterMultilineCondition": { | |
| "title": "Layout/EmptyLineAfterMultilineCondition", | |
| "description": "Enforces empty line after multiline condition.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLineBetweenDefs": { | |
| "title": "Layout/EmptyLineBetweenDefs", | |
| "description": "Use empty lines between class/module/method defs.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EmptyLineBetweenMethodDefs": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "EmptyLineBetweenClassDefs": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "EmptyLineBetweenModuleDefs": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "DefLikeMacros": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowAdjacentOneLineDefs": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "NumberOfEmptyLines": { | |
| "type": "integer", | |
| "default": 1 | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLinesAroundAccessModifier": { | |
| "title": "Layout/EmptyLinesAroundAccessModifier", | |
| "description": "Keep blank lines around access modifiers.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "around", | |
| "only_before" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "around", | |
| "only_before" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "around" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLinesAroundArguments": { | |
| "title": "Layout/EmptyLinesAroundArguments", | |
| "description": "Keeps track of empty lines around method arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLinesAroundAttributeAccessor": { | |
| "title": "Layout/EmptyLinesAroundAttributeAccessor", | |
| "description": "Keep blank lines around attribute accessors.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowAliasSyntax": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "alias_method", | |
| "public", | |
| "protected", | |
| "private" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLinesAroundBeginBody": { | |
| "title": "Layout/EmptyLinesAroundBeginBody", | |
| "description": "Keeps track of empty lines around begin-end bodies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLinesAroundBlockBody": { | |
| "title": "Layout/EmptyLinesAroundBlockBody", | |
| "description": "Keeps track of empty lines around block bodies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "empty_lines", | |
| "no_empty_lines" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "empty_lines", | |
| "no_empty_lines" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_empty_lines" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLinesAroundClassBody": { | |
| "title": "Layout/EmptyLinesAroundClassBody", | |
| "description": "Keeps track of empty lines around class bodies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "empty_lines", | |
| "empty_lines_except_namespace", | |
| "empty_lines_special", | |
| "no_empty_lines", | |
| "beginning_only", | |
| "ending_only" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "empty_lines", | |
| "empty_lines_except_namespace", | |
| "empty_lines_special", | |
| "no_empty_lines", | |
| "beginning_only", | |
| "ending_only" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_empty_lines" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLinesAroundExceptionHandlingKeywords": { | |
| "title": "Layout/EmptyLinesAroundExceptionHandlingKeywords", | |
| "description": "Keeps track of empty lines around exception handling keywords.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLinesAroundMethodBody": { | |
| "title": "Layout/EmptyLinesAroundMethodBody", | |
| "description": "Keeps track of empty lines around method bodies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLinesAroundModuleBody": { | |
| "title": "Layout/EmptyLinesAroundModuleBody", | |
| "description": "Keeps track of empty lines around module bodies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "empty_lines", | |
| "empty_lines_except_namespace", | |
| "empty_lines_special", | |
| "no_empty_lines" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "empty_lines", | |
| "empty_lines_except_namespace", | |
| "empty_lines_special", | |
| "no_empty_lines" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_empty_lines" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EmptyLines": { | |
| "title": "Layout/EmptyLines", | |
| "description": "Don't use several empty lines in a row.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EndAlignment": { | |
| "title": "Layout/EndAlignment", | |
| "description": "Align ends correctly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyleAlignWith": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "keyword", | |
| "variable", | |
| "start_of_line" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "keyword", | |
| "variable", | |
| "start_of_line" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "keyword" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/EndOfLine": { | |
| "title": "Layout/EndOfLine", | |
| "description": "Use Unix-style line endings.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "native", | |
| "lf", | |
| "crlf" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "native", | |
| "lf", | |
| "crlf" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "native" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/ExtraSpacing": { | |
| "title": "Layout/ExtraSpacing", | |
| "description": "Do not use unnecessary spacing.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowForAlignment": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowBeforeTrailingComments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "ForceEqualSignAlignment": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/FirstArgumentIndentation": { | |
| "title": "Layout/FirstArgumentIndentation", | |
| "description": "Checks the indentation of the first argument in a method call.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "consistent", | |
| "consistent_relative_to_receiver", | |
| "special_for_inner_method_call", | |
| "special_for_inner_method_call_in_parentheses" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "consistent", | |
| "consistent_relative_to_receiver", | |
| "special_for_inner_method_call", | |
| "special_for_inner_method_call_in_parentheses" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "special_for_inner_method_call_in_parentheses" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/FirstArrayElementIndentation": { | |
| "title": "Layout/FirstArrayElementIndentation", | |
| "description": "Checks the indentation of the first element in an array literal.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "special_inside_parentheses", | |
| "consistent", | |
| "align_brackets" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "special_inside_parentheses", | |
| "consistent", | |
| "align_brackets" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "special_inside_parentheses" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/FirstArrayElementLineBreak": { | |
| "title": "Layout/FirstArrayElementLineBreak", | |
| "description": "Checks for a line break before the first element in a multi-line array.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowMultilineFinalElement": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/FirstHashElementIndentation": { | |
| "title": "Layout/FirstHashElementIndentation", | |
| "description": "Checks the indentation of the first key in a hash literal.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "special_inside_parentheses", | |
| "consistent", | |
| "align_braces" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "special_inside_parentheses", | |
| "consistent", | |
| "align_braces" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "special_inside_parentheses" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/FirstHashElementLineBreak": { | |
| "title": "Layout/FirstHashElementLineBreak", | |
| "description": "Checks for a line break before the first element in a multi-line hash.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowMultilineFinalElement": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/FirstMethodArgumentLineBreak": { | |
| "title": "Layout/FirstMethodArgumentLineBreak", | |
| "description": "Checks for a line break before the first argument in a multi-line method call.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowMultilineFinalElement": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/FirstMethodParameterLineBreak": { | |
| "title": "Layout/FirstMethodParameterLineBreak", | |
| "description": "Checks for a line break before the first parameter in a multi-line method parameter definition.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowMultilineFinalElement": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/FirstParameterIndentation": { | |
| "title": "Layout/FirstParameterIndentation", | |
| "description": "Checks the indentation of the first parameter in a method definition.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "consistent", | |
| "align_parentheses" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "consistent", | |
| "align_parentheses" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "consistent" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/HashAlignment": { | |
| "title": "Layout/HashAlignment", | |
| "description": "Align the elements of a hash literal if they span more than one line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowMultipleStyles": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "EnforcedHashRocketStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "key", | |
| "separator", | |
| "table" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "key", | |
| "separator", | |
| "table" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "key" | |
| }, | |
| "EnforcedColonStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "key", | |
| "separator", | |
| "table" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "key", | |
| "separator", | |
| "table" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "key" | |
| }, | |
| "EnforcedLastArgumentHashStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "always_inspect", | |
| "always_ignore", | |
| "ignore_implicit", | |
| "ignore_explicit" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "always_inspect", | |
| "always_ignore", | |
| "ignore_implicit", | |
| "ignore_explicit" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "always_inspect" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/HeredocArgumentClosingParenthesis": { | |
| "title": "Layout/HeredocArgumentClosingParenthesis", | |
| "description": "Checks for the placement of the closing parenthesis in a method call that passes a HEREDOC string as an argument.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/HeredocIndentation": { | |
| "title": "Layout/HeredocIndentation", | |
| "description": "Checks the indentation of the here document bodies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/IndentationConsistency": { | |
| "title": "Layout/IndentationConsistency", | |
| "description": "Keep indentation straight.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "normal", | |
| "indented_internal_methods" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "normal", | |
| "indented_internal_methods" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "normal" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/IndentationStyle": { | |
| "title": "Layout/IndentationStyle", | |
| "description": "Consistent indentation either with tabs only or spaces only.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "spaces", | |
| "tabs" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "spaces", | |
| "tabs" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "spaces" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/IndentationWidth": { | |
| "title": "Layout/IndentationWidth", | |
| "description": "Use 2 spaces for indentation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Width": { | |
| "type": "integer", | |
| "default": 2 | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/InitialIndentation": { | |
| "title": "Layout/InitialIndentation", | |
| "description": "Checks the indentation of the first non-blank non-comment line in a file.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/LeadingCommentSpace": { | |
| "title": "Layout/LeadingCommentSpace", | |
| "description": "Comments should start with a space.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowDoxygenCommentStyle": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowGemfileRubyComment": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/LeadingEmptyLines": { | |
| "title": "Layout/LeadingEmptyLines", | |
| "description": "Check for unnecessary blank lines at the beginning of a file.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/LineContinuationLeadingSpace": { | |
| "title": "Layout/LineContinuationLeadingSpace", | |
| "description": "Use trailing spaces instead of leading spaces in strings broken over multiple lines (by a backslash).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "leading", | |
| "trailing" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "leading", | |
| "trailing" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "trailing" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/LineContinuationSpacing": { | |
| "title": "Layout/LineContinuationSpacing", | |
| "description": "Checks the spacing in front of backslash in line continuations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/LineEndStringConcatenationIndentation": { | |
| "title": "Layout/LineEndStringConcatenationIndentation", | |
| "description": "Checks the indentation of the next line after a line that ends with a string literal and a backslash.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "aligned", | |
| "indented" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "aligned", | |
| "indented" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "aligned" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/LineLength": { | |
| "title": "Layout/LineLength", | |
| "description": "Checks that line length does not exceed the configured limit.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 120 | |
| }, | |
| "AllowHeredoc": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowURI": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "URISchemes": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "http", | |
| "https" | |
| ] | |
| }, | |
| "IgnoreCopDirectives": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineArrayBraceLayout": { | |
| "title": "Layout/MultilineArrayBraceLayout", | |
| "description": "Checks that the closing brace in an array literal is either on the same line as the last array element, or a new line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "symmetrical", | |
| "new_line", | |
| "same_line" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "symmetrical", | |
| "new_line", | |
| "same_line" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "symmetrical" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineArrayLineBreaks": { | |
| "title": "Layout/MultilineArrayLineBreaks", | |
| "description": "Checks that each item in a multi-line array literal starts on a separate line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowMultilineFinalElement": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineAssignmentLayout": { | |
| "title": "Layout/MultilineAssignmentLayout", | |
| "description": "Check for a newline after the assignment operator in multi-line assignments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "SupportedTypes": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "block", | |
| "case", | |
| "class", | |
| "if", | |
| "kwbegin", | |
| "module" | |
| ] | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "same_line", | |
| "new_line" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "same_line", | |
| "new_line" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "new_line" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineBlockLayout": { | |
| "title": "Layout/MultilineBlockLayout", | |
| "description": "Ensures newlines after multiline block do statements.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineHashBraceLayout": { | |
| "title": "Layout/MultilineHashBraceLayout", | |
| "description": "Checks that the closing brace in a hash literal is either on the same line as the last hash element, or a new line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "symmetrical", | |
| "new_line", | |
| "same_line" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "symmetrical", | |
| "new_line", | |
| "same_line" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "symmetrical" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineHashKeyLineBreaks": { | |
| "title": "Layout/MultilineHashKeyLineBreaks", | |
| "description": "Checks that each item in a multi-line hash literal starts on a separate line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowMultilineFinalElement": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineMethodArgumentLineBreaks": { | |
| "title": "Layout/MultilineMethodArgumentLineBreaks", | |
| "description": "Checks that each argument in a multi-line method call starts on a separate line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowMultilineFinalElement": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineMethodCallBraceLayout": { | |
| "title": "Layout/MultilineMethodCallBraceLayout", | |
| "description": "Checks that the closing brace in a method call is either on the same line as the last method argument, or a new line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "symmetrical", | |
| "new_line", | |
| "same_line" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "symmetrical", | |
| "new_line", | |
| "same_line" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "symmetrical" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineMethodCallIndentation": { | |
| "title": "Layout/MultilineMethodCallIndentation", | |
| "description": "Checks indentation of method calls with the dot operator that span more than one line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "aligned", | |
| "indented", | |
| "indented_relative_to_receiver" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "aligned", | |
| "indented", | |
| "indented_relative_to_receiver" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "aligned" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineMethodDefinitionBraceLayout": { | |
| "title": "Layout/MultilineMethodDefinitionBraceLayout", | |
| "description": "Checks that the closing brace in a method definition is either on the same line as the last method parameter, or a new line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "symmetrical", | |
| "new_line", | |
| "same_line" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "symmetrical", | |
| "new_line", | |
| "same_line" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "symmetrical" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineMethodParameterLineBreaks": { | |
| "title": "Layout/MultilineMethodParameterLineBreaks", | |
| "description": "Checks that each parameter in a multi-line method definition starts on a separate line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowMultilineFinalElement": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/MultilineOperationIndentation": { | |
| "title": "Layout/MultilineOperationIndentation", | |
| "description": "Checks indentation of binary operations that span more than one line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "aligned", | |
| "indented" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "aligned", | |
| "indented" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "aligned" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/ParameterAlignment": { | |
| "title": "Layout/ParameterAlignment", | |
| "description": "Align the parameters of a method definition if they span more than one line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "with_first_parameter", | |
| "with_fixed_indentation" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "with_first_parameter", | |
| "with_fixed_indentation" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "with_first_parameter" | |
| }, | |
| "IndentationWidth": { | |
| "type": "integer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/RedundantLineBreak": { | |
| "title": "Layout/RedundantLineBreak", | |
| "description": "Do not break up an expression into multiple lines when it fits on a single line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "InspectBlocks": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/RescueEnsureAlignment": { | |
| "title": "Layout/RescueEnsureAlignment", | |
| "description": "Align rescues and ensures correctly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SingleLineBlockChain": { | |
| "title": "Layout/SingleLineBlockChain", | |
| "description": "Put method call on a separate line if chained to a single line block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAfterColon": { | |
| "title": "Layout/SpaceAfterColon", | |
| "description": "Use spaces after colons.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAfterComma": { | |
| "title": "Layout/SpaceAfterComma", | |
| "description": "Use spaces after commas.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAfterMethodName": { | |
| "title": "Layout/SpaceAfterMethodName", | |
| "description": "Do not put a space between a method name and the opening parenthesis in a method definition.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAfterNot": { | |
| "title": "Layout/SpaceAfterNot", | |
| "description": "Tracks redundant space after the ! operator.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAfterSemicolon": { | |
| "title": "Layout/SpaceAfterSemicolon", | |
| "description": "Use spaces after semicolons.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAroundBlockParameters": { | |
| "title": "Layout/SpaceAroundBlockParameters", | |
| "description": "Checks the spacing inside and after block parameters pipes.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyleInsidePipes": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAroundEqualsInParameterDefault": { | |
| "title": "Layout/SpaceAroundEqualsInParameterDefault", | |
| "description": "Checks that the equals signs in parameter default assignments have or don't have surrounding space depending on configuration.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAroundKeyword": { | |
| "title": "Layout/SpaceAroundKeyword", | |
| "description": "Use a space around keywords if appropriate.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAroundMethodCallOperator": { | |
| "title": "Layout/SpaceAroundMethodCallOperator", | |
| "description": "Checks method call operators to not have spaces around them.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceAroundOperators": { | |
| "title": "Layout/SpaceAroundOperators", | |
| "description": "Use a single space around operators.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowForAlignment": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "EnforcedStyleForExponentOperator": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceBeforeBlockBraces": { | |
| "title": "Layout/SpaceBeforeBlockBraces", | |
| "description": "Checks that the left block brace has or doesn't have space before it.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "space" | |
| }, | |
| "EnforcedStyleForEmptyBraces": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceBeforeBrackets": { | |
| "title": "Layout/SpaceBeforeBrackets", | |
| "description": "Checks for receiver with a space before the opening brackets.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceBeforeComma": { | |
| "title": "Layout/SpaceBeforeComma", | |
| "description": "No spaces before commas.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceBeforeComment": { | |
| "title": "Layout/SpaceBeforeComment", | |
| "description": "Checks for missing space between code and a comment on the same line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceBeforeFirstArg": { | |
| "title": "Layout/SpaceBeforeFirstArg", | |
| "description": "Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowForAlignment": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceBeforeSemicolon": { | |
| "title": "Layout/SpaceBeforeSemicolon", | |
| "description": "No spaces before semicolons.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInLambdaLiteral": { | |
| "title": "Layout/SpaceInLambdaLiteral", | |
| "description": "Checks for spaces in lambda literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "require_no_space", | |
| "require_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "require_no_space", | |
| "require_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "require_no_space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInsideArrayPercentLiteral": { | |
| "title": "Layout/SpaceInsideArrayPercentLiteral", | |
| "description": "No unnecessary additional spaces between elements in %i/%w literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInsideArrayLiteralBrackets": { | |
| "title": "Layout/SpaceInsideArrayLiteralBrackets", | |
| "description": "Checks the spacing inside array literal brackets.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space", | |
| "compact" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space", | |
| "compact" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "EnforcedStyleForEmptyBrackets": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInsideBlockBraces": { | |
| "title": "Layout/SpaceInsideBlockBraces", | |
| "description": "Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "space" | |
| }, | |
| "EnforcedStyleForEmptyBraces": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "SpaceBeforeBlockParameters": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInsideHashLiteralBraces": { | |
| "title": "Layout/SpaceInsideHashLiteralBraces", | |
| "description": "Use spaces inside hash literal braces - or don't.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space", | |
| "compact" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space", | |
| "compact" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "space" | |
| }, | |
| "EnforcedStyleForEmptyBraces": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInsideParens": { | |
| "title": "Layout/SpaceInsideParens", | |
| "description": "No spaces after ( or before ).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "compact", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "compact", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInsidePercentLiteralDelimiters": { | |
| "title": "Layout/SpaceInsidePercentLiteralDelimiters", | |
| "description": "No unnecessary spaces inside delimiters of %i/%w/%x literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInsideRangeLiteral": { | |
| "title": "Layout/SpaceInsideRangeLiteral", | |
| "description": "No spaces inside range literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInsideReferenceBrackets": { | |
| "title": "Layout/SpaceInsideReferenceBrackets", | |
| "description": "Checks the spacing inside referential brackets.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "EnforcedStyleForEmptyBrackets": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/SpaceInsideStringInterpolation": { | |
| "title": "Layout/SpaceInsideStringInterpolation", | |
| "description": "Checks for padding/surrounding spaces inside string interpolation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "space", | |
| "no_space" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_space" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/TrailingEmptyLines": { | |
| "title": "Layout/TrailingEmptyLines", | |
| "description": "Checks trailing blank lines and final newline.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "final_newline", | |
| "final_blank_line" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "final_newline", | |
| "final_blank_line" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "final_newline" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Layout/TrailingWhitespace": { | |
| "title": "Layout/TrailingWhitespace", | |
| "description": "Avoid trailing whitespace.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowInHeredoc": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/AmbiguousAssignment": { | |
| "title": "Lint/AmbiguousAssignment", | |
| "description": "Checks for mistyped shorthand assignments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/AmbiguousBlockAssociation": { | |
| "title": "Lint/AmbiguousBlockAssociation", | |
| "description": "Checks for ambiguous block association with method when param passed without parentheses.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/AmbiguousOperator": { | |
| "title": "Lint/AmbiguousOperator", | |
| "description": "Checks for ambiguous operators in the first argument of a method invocation without parentheses.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/AmbiguousOperatorPrecedence": { | |
| "title": "Lint/AmbiguousOperatorPrecedence", | |
| "description": "Checks for expressions containing multiple binary operations with ambiguous precedence.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/AmbiguousRange": { | |
| "title": "Lint/AmbiguousRange", | |
| "description": "Checks for ranges with ambiguous boundaries.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "RequireParenthesesForMethodChains": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/AmbiguousRegexpLiteral": { | |
| "title": "Lint/AmbiguousRegexpLiteral", | |
| "description": "Checks for ambiguous regexp literals in the first argument of a method invocation without parentheses.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/AssignmentInCondition": { | |
| "title": "Lint/AssignmentInCondition", | |
| "description": "Don't use assignment in conditions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowSafeAssignment": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/BigDecimalNew": { | |
| "title": "Lint/BigDecimalNew", | |
| "description": "`BigDecimal.new()` is deprecated. Use `BigDecimal()` instead.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/BinaryOperatorWithIdenticalOperands": { | |
| "title": "Lint/BinaryOperatorWithIdenticalOperands", | |
| "description": "Checks for places where binary operator has identical operands.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/BooleanSymbol": { | |
| "title": "Lint/BooleanSymbol", | |
| "description": "Check for `:true` and `:false` symbols.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/CircularArgumentReference": { | |
| "title": "Lint/CircularArgumentReference", | |
| "description": "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ConstantDefinitionInBlock": { | |
| "title": "Lint/ConstantDefinitionInBlock", | |
| "description": "Do not define constants within a block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "enums" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ConstantOverwrittenInRescue": { | |
| "title": "Lint/ConstantOverwrittenInRescue", | |
| "description": "Checks for overwriting an exception with an exception result by use `rescue =>`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ConstantResolution": { | |
| "title": "Lint/ConstantResolution", | |
| "description": "Check that constants are fully qualified with `::`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Only": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "Ignore": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/Debugger": { | |
| "title": "Lint/Debugger", | |
| "description": "Check for debugger calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "DebuggerMethods": { | |
| "type": "object", | |
| "default": { | |
| "Kernel": [ | |
| "binding.irb", | |
| "Kernel.binding.irb" | |
| ], | |
| "Byebug": [ | |
| "byebug", | |
| "remote_byebug", | |
| "Kernel.byebug", | |
| "Kernel.remote_byebug" | |
| ], | |
| "Capybara": [ | |
| "save_and_open_page", | |
| "save_and_open_screenshot" | |
| ], | |
| "debug.rb": [ | |
| "binding.b", | |
| "binding.break", | |
| "Kernel.binding.b", | |
| "Kernel.binding.break" | |
| ], | |
| "Pry": [ | |
| "binding.pry", | |
| "binding.remote_pry", | |
| "binding.pry_remote", | |
| "Kernel.binding.pry", | |
| "Kernel.binding.remote_pry", | |
| "Kernel.binding.pry_remote", | |
| "Pry.rescue", | |
| "pry" | |
| ], | |
| "Rails": [ | |
| "debugger", | |
| "Kernel.debugger" | |
| ], | |
| "RubyJard": [ | |
| "jard" | |
| ], | |
| "WebConsole": [ | |
| "binding.console" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DeprecatedClassMethods": { | |
| "title": "Lint/DeprecatedClassMethods", | |
| "description": "Check for deprecated class method calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DeprecatedConstants": { | |
| "title": "Lint/DeprecatedConstants", | |
| "description": "Checks for deprecated constants.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "DeprecatedConstants": { | |
| "type": "object", | |
| "default": { | |
| "NIL": { | |
| "Alternative": "nil", | |
| "DeprecatedVersion": "2.4" | |
| }, | |
| "TRUE": { | |
| "Alternative": "true", | |
| "DeprecatedVersion": "2.4" | |
| }, | |
| "FALSE": { | |
| "Alternative": "false", | |
| "DeprecatedVersion": "2.4" | |
| }, | |
| "Net::HTTPServerException": { | |
| "Alternative": "Net::HTTPClientException", | |
| "DeprecatedVersion": "2.6" | |
| }, | |
| "Random::DEFAULT": { | |
| "Alternative": "Random.new", | |
| "DeprecatedVersion": "3.0" | |
| }, | |
| "Struct::Group": { | |
| "Alternative": "Etc::Group", | |
| "DeprecatedVersion": "3.0" | |
| }, | |
| "Struct::Passwd": { | |
| "Alternative": "Etc::Passwd", | |
| "DeprecatedVersion": "3.0" | |
| } | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DeprecatedOpenSSLConstant": { | |
| "title": "Lint/DeprecatedOpenSSLConstant", | |
| "description": "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DisjunctiveAssignmentInConstructor": { | |
| "title": "Lint/DisjunctiveAssignmentInConstructor", | |
| "description": "In constructor, plain assignment is preferred over disjunctive.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateBranch": { | |
| "title": "Lint/DuplicateBranch", | |
| "description": "Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "IgnoreLiteralBranches": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "IgnoreConstantBranches": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateCaseCondition": { | |
| "title": "Lint/DuplicateCaseCondition", | |
| "description": "Do not repeat values in case conditionals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateElsifCondition": { | |
| "title": "Lint/DuplicateElsifCondition", | |
| "description": "Do not repeat conditions used in if `elsif`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateHashKey": { | |
| "title": "Lint/DuplicateHashKey", | |
| "description": "Check for duplicate keys in hash literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateMagicComment": { | |
| "title": "Lint/DuplicateMagicComment", | |
| "description": "Check for duplicated magic comments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateMatchPattern": { | |
| "title": "Lint/DuplicateMatchPattern", | |
| "description": "Do not repeat patterns in `in` keywords.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateMethods": { | |
| "title": "Lint/DuplicateMethods", | |
| "description": "Check for duplicate method definitions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateRegexpCharacterClassElement": { | |
| "title": "Lint/DuplicateRegexpCharacterClassElement", | |
| "description": "Checks for duplicate elements in Regexp character classes.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateRequire": { | |
| "title": "Lint/DuplicateRequire", | |
| "description": "Check for duplicate `require`s and `require_relative`s.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/DuplicateRescueException": { | |
| "title": "Lint/DuplicateRescueException", | |
| "description": "Checks that there are no repeated exceptions used in `rescue` expressions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EachWithObjectArgument": { | |
| "title": "Lint/EachWithObjectArgument", | |
| "description": "Check for immutable argument given to each_with_object.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ElseLayout": { | |
| "title": "Lint/ElseLayout", | |
| "description": "Check for odd code arrangement in an else block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EmptyBlock": { | |
| "title": "Lint/EmptyBlock", | |
| "description": "Checks for blocks without a body.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowEmptyLambdas": { | |
| "type": "boolean", | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EmptyClass": { | |
| "title": "Lint/EmptyClass", | |
| "description": "Checks for classes and metaclasses without a body.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EmptyConditionalBody": { | |
| "title": "Lint/EmptyConditionalBody", | |
| "description": "Checks for the presence of `if`, `elsif` and `unless` branches without a body.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EmptyEnsure": { | |
| "title": "Lint/EmptyEnsure", | |
| "description": "Checks for empty ensure block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EmptyExpression": { | |
| "title": "Lint/EmptyExpression", | |
| "description": "Checks for empty expressions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EmptyFile": { | |
| "title": "Lint/EmptyFile", | |
| "description": "Enforces that Ruby source files are not empty.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EmptyInPattern": { | |
| "title": "Lint/EmptyInPattern", | |
| "description": "Checks for the presence of `in` pattern branches without a body.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EmptyInterpolation": { | |
| "title": "Lint/EmptyInterpolation", | |
| "description": "Checks for empty string interpolation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EmptyWhen": { | |
| "title": "Lint/EmptyWhen", | |
| "description": "Checks for `when` branches with empty bodies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/EnsureReturn": { | |
| "title": "Lint/EnsureReturn", | |
| "description": "Do not use return in an ensure block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ErbNewArguments": { | |
| "title": "Lint/ErbNewArguments", | |
| "description": "Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/FlipFlop": { | |
| "title": "Lint/FlipFlop", | |
| "description": "Checks for flip-flops.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/FloatComparison": { | |
| "title": "Lint/FloatComparison", | |
| "description": "Checks for the presence of precise comparison of floating point numbers.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/FloatOutOfRange": { | |
| "title": "Lint/FloatOutOfRange", | |
| "description": "Catches floating-point literals too large or small for Ruby to represent.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/FormatParameterMismatch": { | |
| "title": "Lint/FormatParameterMismatch", | |
| "description": "The number of parameters to format/sprint must match the fields.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/HashCompareByIdentity": { | |
| "title": "Lint/HashCompareByIdentity", | |
| "description": "Prefer using `Hash#compare_by_identity` than using `object_id` for keys.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/HeredocMethodCallPosition": { | |
| "title": "Lint/HeredocMethodCallPosition", | |
| "description": "Checks for the ordering of a method call where the receiver of the call is a HEREDOC.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/IdentityComparison": { | |
| "title": "Lint/IdentityComparison", | |
| "description": "Prefer `equal?` over `==` when comparing `object_id`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ImplicitStringConcatenation": { | |
| "title": "Lint/ImplicitStringConcatenation", | |
| "description": "Checks for adjacent string literals on the same line, which could better be represented as a single string literal.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/IncompatibleIoSelectWithFiberScheduler": { | |
| "title": "Lint/IncompatibleIoSelectWithFiberScheduler", | |
| "description": "Checks for `IO.select` that is incompatible with Fiber Scheduler.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/IneffectiveAccessModifier": { | |
| "title": "Lint/IneffectiveAccessModifier", | |
| "description": "Checks for attempts to use `private` or `protected` to set the visibility of a class method, which does not work.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/InheritException": { | |
| "title": "Lint/InheritException", | |
| "description": "Avoid inheriting from the `Exception` class.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "standard_error", | |
| "runtime_error" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "standard_error", | |
| "runtime_error" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "standard_error" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/InterpolationCheck": { | |
| "title": "Lint/InterpolationCheck", | |
| "description": "Checks for interpolation in a single quoted string.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/LambdaWithoutLiteralBlock": { | |
| "title": "Lint/LambdaWithoutLiteralBlock", | |
| "description": "Checks uses of lambda without a literal block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/LiteralAsCondition": { | |
| "title": "Lint/LiteralAsCondition", | |
| "description": "Checks of literals used in conditions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/LiteralInInterpolation": { | |
| "title": "Lint/LiteralInInterpolation", | |
| "description": "Checks for literals used in interpolation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/Loop": { | |
| "title": "Lint/Loop", | |
| "description": "Use Kernel#loop with break rather than begin/end/until or begin/end/while for post-loop tests.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/MissingCopEnableDirective": { | |
| "title": "Lint/MissingCopEnableDirective", | |
| "description": "Checks for a `# rubocop:enable` after `# rubocop:disable`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MaximumRangeSize": { | |
| "type": "number" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/MissingSuper": { | |
| "title": "Lint/MissingSuper", | |
| "description": "Checks for the presence of constructors and lifecycle callbacks without calls to `super`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedParentClasses": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/MixedCaseRange": { | |
| "title": "Lint/MixedCaseRange", | |
| "description": "Checks for mixed-case character ranges since they include likely unintended characters.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/MixedRegexpCaptureTypes": { | |
| "title": "Lint/MixedRegexpCaptureTypes", | |
| "description": "Do not mix named captures and numbered captures in a Regexp literal.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/MultipleComparison": { | |
| "title": "Lint/MultipleComparison", | |
| "description": "Use `&&` operator to compare multiple values.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/NestedMethodDefinition": { | |
| "title": "Lint/NestedMethodDefinition", | |
| "description": "Do not use nested method definitions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/NestedPercentLiteral": { | |
| "title": "Lint/NestedPercentLiteral", | |
| "description": "Checks for nested percent literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/NextWithoutAccumulator": { | |
| "title": "Lint/NextWithoutAccumulator", | |
| "description": "Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/NoReturnInBeginEndBlocks": { | |
| "title": "Lint/NoReturnInBeginEndBlocks", | |
| "description": "Do not `return` inside `begin..end` blocks in assignment contexts.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/NonAtomicFileOperation": { | |
| "title": "Lint/NonAtomicFileOperation", | |
| "description": "Checks for non-atomic file operations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/NonDeterministicRequireOrder": { | |
| "title": "Lint/NonDeterministicRequireOrder", | |
| "description": "Always sort arrays returned by Dir.glob when requiring files.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/NonLocalExitFromIterator": { | |
| "title": "Lint/NonLocalExitFromIterator", | |
| "description": "Do not use return in iterator to cause non-local exit.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/NumberConversion": { | |
| "title": "Lint/NumberConversion", | |
| "description": "Checks unsafe usage of number conversion methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "ago", | |
| "from_now", | |
| "second", | |
| "seconds", | |
| "minute", | |
| "minutes", | |
| "hour", | |
| "hours", | |
| "day", | |
| "days", | |
| "week", | |
| "weeks", | |
| "fortnight", | |
| "fortnights", | |
| "in_milliseconds" | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "IgnoredClasses": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "Time", | |
| "DateTime" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/NumberedParameterAssignment": { | |
| "title": "Lint/NumberedParameterAssignment", | |
| "description": "Checks for uses of numbered parameter assignment.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/OrAssignmentToConstant": { | |
| "title": "Lint/OrAssignmentToConstant", | |
| "description": "Checks unintended or-assignment to constant.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/OrderedMagicComments": { | |
| "title": "Lint/OrderedMagicComments", | |
| "description": "Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/OutOfRangeRegexpRef": { | |
| "title": "Lint/OutOfRangeRegexpRef", | |
| "description": "Checks for out of range reference for Regexp because it always returns nil.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ParenthesesAsGroupedExpression": { | |
| "title": "Lint/ParenthesesAsGroupedExpression", | |
| "description": "Checks for method calls with a space before the opening parenthesis.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/PercentStringArray": { | |
| "title": "Lint/PercentStringArray", | |
| "description": "Checks for unwanted commas and quotes in %w/%W literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/PercentSymbolArray": { | |
| "title": "Lint/PercentSymbolArray", | |
| "description": "Checks for unwanted commas and colons in %i/%I literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RaiseException": { | |
| "title": "Lint/RaiseException", | |
| "description": "Checks for `raise` or `fail` statements which are raising `Exception` class.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedImplicitNamespaces": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "Gem" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RandOne": { | |
| "title": "Lint/RandOne", | |
| "description": "Checks for `rand(1)` calls. Such calls always return `0` and most likely a mistake.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantCopDisableDirective": { | |
| "title": "Lint/RedundantCopDisableDirective", | |
| "description": "Checks for rubocop:disable comments that can be removed. Note: this cop is not disabled when disabling all cops. It must be explicitly disabled.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantCopEnableDirective": { | |
| "title": "Lint/RedundantCopEnableDirective", | |
| "description": "Checks for rubocop:enable comments that can be removed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantDirGlobSort": { | |
| "title": "Lint/RedundantDirGlobSort", | |
| "description": "Checks for redundant `sort` method to `Dir.glob` and `Dir[]`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantRegexpQuantifiers": { | |
| "title": "Lint/RedundantRegexpQuantifiers", | |
| "description": "Checks for redundant quantifiers in Regexps.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantRequireStatement": { | |
| "title": "Lint/RedundantRequireStatement", | |
| "description": "Checks for unnecessary `require` statement.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantSafeNavigation": { | |
| "title": "Lint/RedundantSafeNavigation", | |
| "description": "Checks for redundant safe navigation calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "instance_of?", | |
| "kind_of?", | |
| "is_a?", | |
| "eql?", | |
| "respond_to?", | |
| "equal?", | |
| "presence", | |
| "present?" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantSplatExpansion": { | |
| "title": "Lint/RedundantSplatExpansion", | |
| "description": "Checks for splat unnecessarily being called on literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowPercentLiteralArrayArgument": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantStringCoercion": { | |
| "title": "Lint/RedundantStringCoercion", | |
| "description": "Checks for Object#to_s usage in string interpolation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantWithIndex": { | |
| "title": "Lint/RedundantWithIndex", | |
| "description": "Checks for redundant `with_index`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RedundantWithObject": { | |
| "title": "Lint/RedundantWithObject", | |
| "description": "Checks for redundant `with_object`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RefinementImportMethods": { | |
| "title": "Lint/RefinementImportMethods", | |
| "description": "Use `Refinement#import_methods` when using `include` or `prepend` in `refine` block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RegexpAsCondition": { | |
| "title": "Lint/RegexpAsCondition", | |
| "description": "Do not use regexp literal as a condition. The regexp literal matches `$_` implicitly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RequireParentheses": { | |
| "title": "Lint/RequireParentheses", | |
| "description": "Use parentheses in the method call to avoid confusion about precedence.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RequireRangeParentheses": { | |
| "title": "Lint/RequireRangeParentheses", | |
| "description": "Checks that a range literal is enclosed in parentheses when the end of the range is at a line break.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RequireRelativeSelfPath": { | |
| "title": "Lint/RequireRelativeSelfPath", | |
| "description": "Checks for uses a file requiring itself with `require_relative`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RescueException": { | |
| "title": "Lint/RescueException", | |
| "description": "Avoid rescuing the Exception class.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/RescueType": { | |
| "title": "Lint/RescueType", | |
| "description": "Avoid rescuing from non constants that could result in a `TypeError`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ReturnInVoidContext": { | |
| "title": "Lint/ReturnInVoidContext", | |
| "description": "Checks for return in void context.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/SafeNavigationConsistency": { | |
| "title": "Lint/SafeNavigationConsistency", | |
| "description": "Check to make sure that if safe navigation is used for a method call in an `&&` or `||` condition that safe navigation is used for all method calls on that same object.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "present?", | |
| "blank?", | |
| "presence", | |
| "try", | |
| "try!" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/SafeNavigationChain": { | |
| "title": "Lint/SafeNavigationChain", | |
| "description": "Do not chain ordinary method call after safe navigation operator.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "present?", | |
| "blank?", | |
| "presence", | |
| "presence_in", | |
| "try", | |
| "try!", | |
| "in?" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/SafeNavigationWithEmpty": { | |
| "title": "Lint/SafeNavigationWithEmpty", | |
| "description": "Avoid `foo&.empty?` in conditionals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ScriptPermission": { | |
| "title": "Lint/ScriptPermission", | |
| "description": "Grant script file execute permission.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/SelfAssignment": { | |
| "title": "Lint/SelfAssignment", | |
| "description": "Checks for self-assignments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/SendWithMixinArgument": { | |
| "title": "Lint/SendWithMixinArgument", | |
| "description": "Checks for `send` method when using mixin.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ShadowedArgument": { | |
| "title": "Lint/ShadowedArgument", | |
| "description": "Avoid reassigning arguments before they were used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "IgnoreImplicitReferences": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ShadowedException": { | |
| "title": "Lint/ShadowedException", | |
| "description": "Avoid rescuing a higher level exception before a lower level exception.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ShadowingOuterLocalVariable": { | |
| "title": "Lint/ShadowingOuterLocalVariable", | |
| "description": "Do not use the same name as outer local variable for block arguments or block local variables.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/StructNewOverride": { | |
| "title": "Lint/StructNewOverride", | |
| "description": "Disallow overriding the `Struct` built-in methods via `Struct.new`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/SuppressedException": { | |
| "title": "Lint/SuppressedException", | |
| "description": "Don't suppress exceptions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowNil": { | |
| "type": "boolean", | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/SymbolConversion": { | |
| "title": "Lint/SymbolConversion", | |
| "description": "Checks for unnecessary symbol conversions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "strict", | |
| "consistent" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "strict", | |
| "consistent" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "strict" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/Syntax": { | |
| "title": "Lint/Syntax", | |
| "description": "Checks for syntax errors.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ToEnumArguments": { | |
| "title": "Lint/ToEnumArguments", | |
| "description": "Ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/ToJSON": { | |
| "title": "Lint/ToJSON", | |
| "description": "Ensure #to_json includes an optional argument.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/TopLevelReturnWithArgument": { | |
| "title": "Lint/TopLevelReturnWithArgument", | |
| "description": "Detects top level return statements with argument.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/TrailingCommaInAttributeDeclaration": { | |
| "title": "Lint/TrailingCommaInAttributeDeclaration", | |
| "description": "Checks for trailing commas in attribute declarations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/TripleQuotes": { | |
| "title": "Lint/TripleQuotes", | |
| "description": "Checks for useless triple quote constructs.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UnderscorePrefixedVariableName": { | |
| "title": "Lint/UnderscorePrefixedVariableName", | |
| "description": "Do not use prefix `_` for a variable that is used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowKeywordBlockArguments": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UnexpectedBlockArity": { | |
| "title": "Lint/UnexpectedBlockArity", | |
| "description": "Looks for blocks that have fewer arguments that the calling method expects.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Methods": { | |
| "type": "object", | |
| "default": { | |
| "chunk_while": 2, | |
| "each_with_index": 2, | |
| "each_with_object": 2, | |
| "inject": 2, | |
| "max": 2, | |
| "min": 2, | |
| "minmax": 2, | |
| "reduce": 2, | |
| "slice_when": 2, | |
| "sort": 2 | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UnifiedInteger": { | |
| "title": "Lint/UnifiedInteger", | |
| "description": "Use Integer instead of Fixnum or Bignum.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UnmodifiedReduceAccumulator": { | |
| "title": "Lint/UnmodifiedReduceAccumulator", | |
| "description": "Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UnreachableCode": { | |
| "title": "Lint/UnreachableCode", | |
| "description": "Unreachable code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UnreachableLoop": { | |
| "title": "Lint/UnreachableLoop", | |
| "description": "Checks for loops that will have at most one iteration.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| "(?-mix:(exactly|at_least|at_most)\\(\\d+\\)\\.times)" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UnusedBlockArgument": { | |
| "title": "Lint/UnusedBlockArgument", | |
| "description": "Checks for unused block arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "IgnoreEmptyBlocks": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowUnusedKeywordArguments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UnusedMethodArgument": { | |
| "title": "Lint/UnusedMethodArgument", | |
| "description": "Checks for unused method arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowUnusedKeywordArguments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "IgnoreEmptyMethods": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "IgnoreNotImplementedMethods": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UriEscapeUnescape": { | |
| "title": "Lint/UriEscapeUnescape", | |
| "description": "`URI.escape` method is obsolete and should not be used. Instead, use `CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` depending on your specific use case. Also `URI.unescape` method is obsolete and should not be used. Instead, use `CGI.unescape`, `URI.decode_www_form` or `URI.decode_www_form_component` depending on your specific use case.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UriRegexp": { | |
| "title": "Lint/UriRegexp", | |
| "description": "Use `URI::DEFAULT_PARSER.make_regexp` instead of `URI.regexp`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UselessAccessModifier": { | |
| "title": "Lint/UselessAccessModifier", | |
| "description": "Checks for useless access modifiers.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "ContextCreatingMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "MethodCreatingMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UselessAssignment": { | |
| "title": "Lint/UselessAssignment", | |
| "description": "Checks for useless assignment to a local variable.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UselessElseWithoutRescue": { | |
| "title": "Lint/UselessElseWithoutRescue", | |
| "description": "Checks for useless `else` in `begin..end` without `rescue`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UselessMethodDefinition": { | |
| "title": "Lint/UselessMethodDefinition", | |
| "description": "Checks for useless method definitions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UselessRescue": { | |
| "title": "Lint/UselessRescue", | |
| "description": "Checks for useless `rescue`s.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UselessRuby2Keywords": { | |
| "title": "Lint/UselessRuby2Keywords", | |
| "description": "Finds unnecessary uses of `ruby2_keywords`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UselessSetterCall": { | |
| "title": "Lint/UselessSetterCall", | |
| "description": "Checks for useless setter call to a local variable.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/UselessTimes": { | |
| "title": "Lint/UselessTimes", | |
| "description": "Checks for useless `Integer#times` calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Lint/Void": { | |
| "title": "Lint/Void", | |
| "description": "Possible use of operator/literal/variable in void context.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "CheckForMethodsWithNoSideEffects": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/CyclomaticComplexity": { | |
| "title": "Metrics/CyclomaticComplexity", | |
| "description": "A complexity metric that is strongly correlated to the number of test cases needed to validate a method.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 7 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/AbcSize": { | |
| "title": "Metrics/AbcSize", | |
| "description": "A calculated magnitude based on number of assignments, branches, and conditions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "CountRepeatedAttributes": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 17 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/BlockLength": { | |
| "title": "Metrics/BlockLength", | |
| "description": "Avoid long blocks with many lines.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "CountComments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 25 | |
| }, | |
| "CountAsOne": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "refine" | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "inherit_mode": { | |
| "type": "object", | |
| "default": { | |
| "merge": [ | |
| "Exclude" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/BlockNesting": { | |
| "title": "Metrics/BlockNesting", | |
| "description": "Avoid excessive block nesting.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "CountBlocks": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 3 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/ClassLength": { | |
| "title": "Metrics/ClassLength", | |
| "description": "Avoid classes longer than 100 lines of code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "CountComments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 100 | |
| }, | |
| "CountAsOne": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/CollectionLiteralLength": { | |
| "title": "Metrics/CollectionLiteralLength", | |
| "description": "Checks for `Array` or `Hash` literals with many entries.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "LengthThreshold": { | |
| "type": "integer", | |
| "default": 250 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/MethodLength": { | |
| "title": "Metrics/MethodLength", | |
| "description": "Avoid methods longer than 10 lines of code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "CountComments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 10 | |
| }, | |
| "CountAsOne": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/ModuleLength": { | |
| "title": "Metrics/ModuleLength", | |
| "description": "Avoid modules longer than 100 lines of code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "CountComments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 100 | |
| }, | |
| "CountAsOne": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/ParameterLists": { | |
| "title": "Metrics/ParameterLists", | |
| "description": "Avoid parameter lists longer than three or four parameters.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 5 | |
| }, | |
| "CountKeywordArgs": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "MaxOptionalParameters": { | |
| "type": "integer", | |
| "default": 3 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Metrics/PerceivedComplexity": { | |
| "title": "Metrics/PerceivedComplexity", | |
| "description": "A complexity metric geared towards measuring complexity for a human reader.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 8 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/AccessorMethodName": { | |
| "title": "Naming/AccessorMethodName", | |
| "description": "Check the naming of accessor methods for get_/set_.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/AsciiIdentifiers": { | |
| "title": "Naming/AsciiIdentifiers", | |
| "description": "Use only ascii symbols in identifiers and constants.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AsciiConstants": { | |
| "type": "boolean", | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/BlockForwarding": { | |
| "title": "Naming/BlockForwarding", | |
| "description": "Use anonymous block forwarding.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "anonymous", | |
| "explicit" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "anonymous", | |
| "explicit" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "anonymous" | |
| }, | |
| "BlockForwardingName": { | |
| "type": "string", | |
| "default": "block" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/BlockParameterName": { | |
| "title": "Naming/BlockParameterName", | |
| "description": "Checks for block parameter names that contain capital letters, end in numbers, or do not meet a minimal length.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MinNameLength": { | |
| "type": "integer", | |
| "default": 1 | |
| }, | |
| "AllowNamesEndingInNumbers": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowedNames": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "ForbiddenNames": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/ClassAndModuleCamelCase": { | |
| "title": "Naming/ClassAndModuleCamelCase", | |
| "description": "Use CamelCase for classes and modules.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedNames": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "module_parent" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/ConstantName": { | |
| "title": "Naming/ConstantName", | |
| "description": "Constants should use SCREAMING_SNAKE_CASE.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/FileName": { | |
| "title": "Naming/FileName", | |
| "description": "Use snake_case for source file names.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| } | |
| }, | |
| "ExpectMatchingDefinition": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "CheckDefinitionPathHierarchy": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "CheckDefinitionPathHierarchyRoots": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "lib", | |
| "spec", | |
| "test", | |
| "src" | |
| ] | |
| }, | |
| "Regex": { | |
| }, | |
| "IgnoreExecutableScripts": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowedAcronyms": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "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/HeredocDelimiterCase": { | |
| "title": "Naming/HeredocDelimiterCase", | |
| "description": "Use configured case for heredoc delimiters.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "lowercase", | |
| "uppercase" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "lowercase", | |
| "uppercase" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "uppercase" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/HeredocDelimiterNaming": { | |
| "title": "Naming/HeredocDelimiterNaming", | |
| "description": "Use descriptive heredoc delimiters.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "ForbiddenDelimiters": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| "(?i-mx:(^|\\s)(EO[A-Z]{1}|END)(\\s|$))" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/InclusiveLanguage": { | |
| "title": "Naming/InclusiveLanguage", | |
| "description": "Recommend the use of inclusive language instead of problematic terms.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "CheckIdentifiers": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "CheckConstants": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "CheckVariables": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "CheckStrings": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "CheckSymbols": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "CheckComments": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "CheckFilepaths": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "FlaggedTerms": { | |
| "type": "object", | |
| "default": { | |
| "whitelist": { | |
| "Regex": "(?-mix:white[-_\\s]?list)", | |
| "Suggestions": [ | |
| "allowlist", | |
| "permit" | |
| ] | |
| }, | |
| "blacklist": { | |
| "Regex": "(?-mix:black[-_\\s]?list)", | |
| "Suggestions": [ | |
| "denylist", | |
| "block" | |
| ] | |
| }, | |
| "slave": { | |
| "WholeWord": true, | |
| "Suggestions": [ | |
| "replica", | |
| "secondary", | |
| "follower" | |
| ] | |
| } | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/MemoizedInstanceVariableName": { | |
| "title": "Naming/MemoizedInstanceVariableName", | |
| "description": "Memoized method name should match memo instance variable name.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyleForLeadingUnderscores": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "disallowed", | |
| "required", | |
| "optional" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "disallowed", | |
| "required", | |
| "optional" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "disallowed" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/MethodName": { | |
| "title": "Naming/MethodName", | |
| "description": "Use the configured style when naming methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "camelCase" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "camelCase" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "snake_case" | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/MethodParameterName": { | |
| "title": "Naming/MethodParameterName", | |
| "description": "Checks for method parameter names that contain capital letters, end in numbers, or do not meet a minimal length.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MinNameLength": { | |
| "type": "integer", | |
| "default": 3 | |
| }, | |
| "AllowNamesEndingInNumbers": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowedNames": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "as", | |
| "at", | |
| "by", | |
| "cc", | |
| "db", | |
| "id", | |
| "if", | |
| "in", | |
| "io", | |
| "ip", | |
| "of", | |
| "on", | |
| "os", | |
| "pp", | |
| "to" | |
| ] | |
| }, | |
| "ForbiddenNames": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/BinaryOperatorParameterName": { | |
| "title": "Naming/BinaryOperatorParameterName", | |
| "description": "When defining binary operators, name the argument other.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/PredicateName": { | |
| "title": "Naming/PredicateName", | |
| "description": "Check the names of predicate methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "NamePrefix": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "is_", | |
| "has_", | |
| "have_" | |
| ] | |
| }, | |
| "ForbiddenPrefixes": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "is_", | |
| "has_", | |
| "have_" | |
| ] | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "is_a?" | |
| ] | |
| }, | |
| "MethodDefinitionMacros": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "define_method", | |
| "define_singleton_method" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/RescuedExceptionsVariableName": { | |
| "title": "Naming/RescuedExceptionsVariableName", | |
| "description": "Use consistent rescued exceptions variables naming.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "PreferredName": { | |
| "type": "string", | |
| "default": "e" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/VariableName": { | |
| "title": "Naming/VariableName", | |
| "description": "Use the configured style when naming variables.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "camelCase" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "camelCase" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "snake_case" | |
| }, | |
| "AllowedIdentifiers": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Naming/VariableNumber": { | |
| "title": "Naming/VariableNumber", | |
| "description": "Use the configured style when numbering symbols, methods and variables.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "normalcase", | |
| "non_integer" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "normalcase", | |
| "non_integer" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "normalcase" | |
| }, | |
| "CheckMethodNames": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "CheckSymbols": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowedIdentifiers": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "capture3", | |
| "iso8601", | |
| "rfc1123_date", | |
| "rfc822", | |
| "rfc2822", | |
| "rfc3339", | |
| "x86_64" | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/AccessModifierDeclarations": { | |
| "title": "Style/AccessModifierDeclarations", | |
| "description": "Checks style of how access modifiers are used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "inline", | |
| "group" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "inline", | |
| "group" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "group" | |
| }, | |
| "AllowModifiersOnSymbols": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/AccessorGrouping": { | |
| "title": "Style/AccessorGrouping", | |
| "description": "Checks for grouping of accessors in `class` and `module` bodies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "separated", | |
| "grouped" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "separated", | |
| "grouped" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "grouped" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Alias": { | |
| "title": "Style/Alias", | |
| "description": "Use alias instead of alias_method.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "prefer_alias", | |
| "prefer_alias_method" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "prefer_alias", | |
| "prefer_alias_method" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "prefer_alias" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/AndOr": { | |
| "title": "Style/AndOr", | |
| "description": "Use &&/|| instead of and/or.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "always", | |
| "conditionals" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "always", | |
| "conditionals" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "conditionals" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ArgumentsForwarding": { | |
| "title": "Style/ArgumentsForwarding", | |
| "description": "Use arguments forwarding.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowOnlyRestArgument": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "UseAnonymousForwarding": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ArrayCoercion": { | |
| "title": "Style/ArrayCoercion", | |
| "description": "Use Array() instead of explicit Array check or [*var], when dealing with a variable you want to treat as an Array, but you're not certain it's an array.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ArrayIntersect": { | |
| "title": "Style/ArrayIntersect", | |
| "description": "Use `array1.intersect?(array2)` instead of `(array1 & array2).any?`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ArrayJoin": { | |
| "title": "Style/ArrayJoin", | |
| "description": "Use Array#join instead of Array#*.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/AsciiComments": { | |
| "title": "Style/AsciiComments", | |
| "description": "Use only ascii symbols in comments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowedChars": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "©" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Attr": { | |
| "title": "Style/Attr", | |
| "description": "Checks for uses of Module#attr.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/AutoResourceCleanup": { | |
| "title": "Style/AutoResourceCleanup", | |
| "description": "Suggests the usage of an auto resource cleanup version of a method (if available).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/BarePercentLiterals": { | |
| "title": "Style/BarePercentLiterals", | |
| "description": "Checks if usage of %() or %Q() matches configuration.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "percent_q", | |
| "bare_percent" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "percent_q", | |
| "bare_percent" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "bare_percent" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/BeginBlock": { | |
| "title": "Style/BeginBlock", | |
| "description": "Avoid the use of BEGIN blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/BisectedAttrAccessor": { | |
| "title": "Style/BisectedAttrAccessor", | |
| "description": "Checks for places where `attr_reader` and `attr_writer` for the same method can be combined into single `attr_accessor`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/BlockComments": { | |
| "title": "Style/BlockComments", | |
| "description": "Do not use block comments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/BlockDelimiters": { | |
| "title": "Style/BlockDelimiters", | |
| "description": "Avoid using {...} for multi-line blocks (multiline chaining is always ugly). Prefer {...} over do...end for single-line blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "line_count_based", | |
| "semantic", | |
| "braces_for_chaining", | |
| "always_braces" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "line_count_based", | |
| "semantic", | |
| "braces_for_chaining", | |
| "always_braces" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "line_count_based" | |
| }, | |
| "ProceduralMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "benchmark", | |
| "bm", | |
| "bmbm", | |
| "create", | |
| "each_with_object", | |
| "measure", | |
| "new", | |
| "realtime", | |
| "tap", | |
| "with_object" | |
| ] | |
| }, | |
| "FunctionalMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "let", | |
| "let!", | |
| "subject", | |
| "watch" | |
| ] | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "lambda", | |
| "proc", | |
| "it" | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AllowBracesOnProceduralOneLiners": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "BracesRequiredMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/CaseEquality": { | |
| "title": "Style/CaseEquality", | |
| "description": "Avoid explicit use of the case equality operator(===).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowOnConstant": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowOnSelfClass": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/CaseLikeIf": { | |
| "title": "Style/CaseLikeIf", | |
| "description": "Identifies places where `if-elsif` constructions can be replaced with `case-when`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MinBranchesCount": { | |
| "type": "integer", | |
| "default": 3 | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/CharacterLiteral": { | |
| "title": "Style/CharacterLiteral", | |
| "description": "Checks for uses of character literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ClassAndModuleChildren": { | |
| "title": "Style/ClassAndModuleChildren", | |
| "description": "Checks style of children classes and modules.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "nested", | |
| "compact" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "nested", | |
| "compact" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "nested" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ClassCheck": { | |
| "title": "Style/ClassCheck", | |
| "description": "Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "is_a?", | |
| "kind_of?" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "is_a?", | |
| "kind_of?" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "is_a?" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ClassEqualityComparison": { | |
| "title": "Style/ClassEqualityComparison", | |
| "description": "Enforces the use of `Object#instance_of?` instead of class comparison for equality.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "==", | |
| "equal?", | |
| "eql?" | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ClassMethods": { | |
| "title": "Style/ClassMethods", | |
| "description": "Use self when defining module/class methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ClassMethodsDefinitions": { | |
| "title": "Style/ClassMethodsDefinitions", | |
| "description": "Enforces using `def self.method_name` or `class << self` to define class methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "def_self", | |
| "self_class" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "def_self", | |
| "self_class" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "def_self" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ClassVars": { | |
| "title": "Style/ClassVars", | |
| "description": "Avoid the use of class variables.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/CollectionCompact": { | |
| "title": "Style/CollectionCompact", | |
| "description": "Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject nils.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowedReceivers": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/CollectionMethods": { | |
| "title": "Style/CollectionMethods", | |
| "description": "Preferred collection methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "PreferredMethods": { | |
| "type": "object", | |
| "default": { | |
| "collect": "map", | |
| "collect!": "map!", | |
| "collect_concat": "flat_map", | |
| "inject": "reduce", | |
| "detect": "find", | |
| "find_all": "select", | |
| "member?": "include?" | |
| } | |
| }, | |
| "MethodsAcceptingSymbol": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "inject", | |
| "reduce" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ColonMethodCall": { | |
| "title": "Style/ColonMethodCall", | |
| "description": "Do not use :: for method call.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ColonMethodDefinition": { | |
| "title": "Style/ColonMethodDefinition", | |
| "description": "Do not use :: for defining class methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/CombinableLoops": { | |
| "title": "Style/CombinableLoops", | |
| "description": "Checks for places where multiple consecutive loops over the same data can be combined into a single loop.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/CommandLiteral": { | |
| "title": "Style/CommandLiteral", | |
| "description": "Use `` or %x around command literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "backticks", | |
| "percent_x", | |
| "mixed" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "backticks", | |
| "percent_x", | |
| "mixed" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "backticks" | |
| }, | |
| "AllowInnerBackticks": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/CommentAnnotation": { | |
| "title": "Style/CommentAnnotation", | |
| "description": "Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Keywords": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "TODO", | |
| "FIXME", | |
| "OPTIMIZE", | |
| "HACK", | |
| "REVIEW", | |
| "NOTE" | |
| ] | |
| }, | |
| "RequireColon": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/CommentedKeyword": { | |
| "title": "Style/CommentedKeyword", | |
| "description": "Do not place comments on the same line as certain keywords.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ComparableClamp": { | |
| "title": "Style/ComparableClamp", | |
| "description": "Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ConcatArrayLiterals": { | |
| "title": "Style/ConcatArrayLiterals", | |
| "description": "Enforces the use of `Array#push(item)` instead of `Array#concat([item])` to avoid redundant array literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ConditionalAssignment": { | |
| "title": "Style/ConditionalAssignment", | |
| "description": "Use the return value of `if` and `case` statements for assignment to a variable and variable comparison instead of assigning that variable inside of each branch.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "assign_to_condition", | |
| "assign_inside_condition" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "assign_to_condition", | |
| "assign_inside_condition" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "assign_to_condition" | |
| }, | |
| "SingleLineConditionsOnly": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "IncludeTernaryExpressions": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ConstantVisibility": { | |
| "title": "Style/ConstantVisibility", | |
| "description": "Check that class- and module constants have visibility declarations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "IgnoreModules": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Copyright": { | |
| "title": "Style/Copyright", | |
| "description": "Include a copyright notice in each file before any code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Notice": { | |
| "type": "string", | |
| "default": "^Copyright (\\(c\\) )?2[0-9]{3} .+" | |
| }, | |
| "AutocorrectNotice": { | |
| "type": "string", | |
| "default": "" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/DataInheritance": { | |
| "title": "Style/DataInheritance", | |
| "description": "Checks for inheritance from Data.define.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/DateTime": { | |
| "title": "Style/DateTime", | |
| "description": "Use Time over DateTime.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowCoercion": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/DefWithParentheses": { | |
| "title": "Style/DefWithParentheses", | |
| "description": "Use def with parentheses when there are arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Dir": { | |
| "title": "Style/Dir", | |
| "description": "Use the `__dir__` method to retrieve the canonicalized absolute path to the current file.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/DirEmpty": { | |
| "title": "Style/DirEmpty", | |
| "description": "Prefer to use `Dir.empty?('path/to/dir')` when checking if a directory is empty.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/DisableCopsWithinSourceCodeDirective": { | |
| "title": "Style/DisableCopsWithinSourceCodeDirective", | |
| "description": "Forbids disabling/enabling cops within source code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowedCops": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/DocumentationMethod": { | |
| "title": "Style/DocumentationMethod", | |
| "description": "Checks for missing documentation comment for public methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "RequireForNonPublicMethods": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Documentation": { | |
| "title": "Style/Documentation", | |
| "description": "Document classes and non-namespace modules.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedConstants": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/DocumentDynamicEvalDefinition": { | |
| "title": "Style/DocumentDynamicEvalDefinition", | |
| "description": "When using `class_eval` (or other `eval`) with string interpolation, add a comment block showing its appearance if interpolated.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/DoubleCopDisableDirective": { | |
| "title": "Style/DoubleCopDisableDirective", | |
| "description": "Checks for double rubocop:disable comments on a single line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/DoubleNegation": { | |
| "title": "Style/DoubleNegation", | |
| "description": "Checks for uses of double negation (!!).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "allowed_in_returns", | |
| "forbidden" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "allowed_in_returns", | |
| "forbidden" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "allowed_in_returns" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EachForSimpleLoop": { | |
| "title": "Style/EachForSimpleLoop", | |
| "description": "Use `Integer#times` for a simple loop which iterates a fixed number of times.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EachWithObject": { | |
| "title": "Style/EachWithObject", | |
| "description": "Prefer `each_with_object` over `inject` or `reduce`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EmptyBlockParameter": { | |
| "title": "Style/EmptyBlockParameter", | |
| "description": "Omit pipes for empty block parameters.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EmptyCaseCondition": { | |
| "title": "Style/EmptyCaseCondition", | |
| "description": "Avoid empty condition in case statements.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EmptyElse": { | |
| "title": "Style/EmptyElse", | |
| "description": "Avoid empty else-clauses.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "empty", | |
| "nil", | |
| "both" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "empty", | |
| "nil", | |
| "both" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "both" | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EmptyHeredoc": { | |
| "title": "Style/EmptyHeredoc", | |
| "description": "Checks for using empty heredoc to reduce redundancy.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EmptyLambdaParameter": { | |
| "title": "Style/EmptyLambdaParameter", | |
| "description": "Omit parens for empty lambda parameters.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EmptyLiteral": { | |
| "title": "Style/EmptyLiteral", | |
| "description": "Prefer literals to Array.new/Hash.new/String.new.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EmptyMethod": { | |
| "title": "Style/EmptyMethod", | |
| "description": "Checks the formatting of empty method definitions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "compact", | |
| "expanded" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "compact", | |
| "expanded" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "compact" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EndlessMethod": { | |
| "title": "Style/EndlessMethod", | |
| "description": "Avoid the use of multi-lined endless method definitions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "allow_single_line", | |
| "allow_always", | |
| "disallow" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "allow_single_line", | |
| "allow_always", | |
| "disallow" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "allow_single_line" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Encoding": { | |
| "title": "Style/Encoding", | |
| "description": "Use UTF-8 as the source file encoding.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EndBlock": { | |
| "title": "Style/EndBlock", | |
| "description": "Avoid the use of END blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EnvHome": { | |
| "title": "Style/EnvHome", | |
| "description": "Checks for consistent usage of `ENV['HOME']`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EvalWithLocation": { | |
| "title": "Style/EvalWithLocation", | |
| "description": "Pass `__FILE__` and `__LINE__` to `eval` method, as they are used by backtraces.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/EvenOdd": { | |
| "title": "Style/EvenOdd", | |
| "description": "Favor the use of `Integer#even?` && `Integer#odd?`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ExactRegexpMatch": { | |
| "title": "Style/ExactRegexpMatch", | |
| "description": "Checks for exact regexp match inside Regexp literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ExpandPathArguments": { | |
| "title": "Style/ExpandPathArguments", | |
| "description": "Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ExplicitBlockArgument": { | |
| "title": "Style/ExplicitBlockArgument", | |
| "description": "Consider using explicit block argument to avoid writing block literal that just passes its arguments to another block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ExponentialNotation": { | |
| "title": "Style/ExponentialNotation", | |
| "description": "When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "scientific", | |
| "engineering", | |
| "integral" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "scientific", | |
| "engineering", | |
| "integral" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "scientific" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/FetchEnvVar": { | |
| "title": "Style/FetchEnvVar", | |
| "description": "Suggests `ENV.fetch` for the replacement of `ENV[]`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowedVars": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/FileEmpty": { | |
| "title": "Style/FileEmpty", | |
| "description": "Prefer to use `File.empty?('path/to/file')` when checking if a file is empty.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/FileRead": { | |
| "title": "Style/FileRead", | |
| "description": "Favor `File.(bin)read` convenience methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/FileWrite": { | |
| "title": "Style/FileWrite", | |
| "description": "Favor `File.(bin)write` convenience methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/FloatDivision": { | |
| "title": "Style/FloatDivision", | |
| "description": "For performing float division, coerce one side only.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "left_coerce", | |
| "right_coerce", | |
| "single_coerce", | |
| "fdiv" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "left_coerce", | |
| "right_coerce", | |
| "single_coerce", | |
| "fdiv" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "single_coerce" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/For": { | |
| "title": "Style/For", | |
| "description": "Checks use of for or each in multiline loops.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "each", | |
| "for" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "each", | |
| "for" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "each" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/FormatString": { | |
| "title": "Style/FormatString", | |
| "description": "Enforce the use of Kernel#sprintf, Kernel#format or String#%.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "format", | |
| "sprintf", | |
| "percent" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "format", | |
| "sprintf", | |
| "percent" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "format" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/FormatStringToken": { | |
| "title": "Style/FormatStringToken", | |
| "description": "Use a consistent style for format string tokens.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "annotated", | |
| "template", | |
| "unannotated" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "annotated", | |
| "template", | |
| "unannotated" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "annotated" | |
| }, | |
| "MaxUnannotatedPlaceholdersAllowed": { | |
| "type": "integer", | |
| "default": 1 | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "redirect" | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/FrozenStringLiteralComment": { | |
| "title": "Style/FrozenStringLiteralComment", | |
| "description": "Add the frozen_string_literal comment to the top of files to help transition to frozen string literals by default.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "always", | |
| "always_true", | |
| "never" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "always", | |
| "always_true", | |
| "never" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "always" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/GlobalStdStream": { | |
| "title": "Style/GlobalStdStream", | |
| "description": "Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/GlobalVars": { | |
| "title": "Style/GlobalVars", | |
| "description": "Do not introduce global variables.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedVariables": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/GuardClause": { | |
| "title": "Style/GuardClause", | |
| "description": "Check for conditionals that can be replaced with guard clauses.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MinBodyLength": { | |
| "type": "integer", | |
| "default": 1 | |
| }, | |
| "AllowConsecutiveConditionals": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/HashAsLastArrayItem": { | |
| "title": "Style/HashAsLastArrayItem", | |
| "description": "Checks for presence or absence of braces around hash literal as a last array item depending on configuration.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "braces", | |
| "no_braces" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "braces", | |
| "no_braces" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "braces" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/HashConversion": { | |
| "title": "Style/HashConversion", | |
| "description": "Avoid Hash[] in favor of ary.to_h or literal hashes.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowSplatArgument": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/HashEachMethods": { | |
| "title": "Style/HashEachMethods", | |
| "description": "Use Hash#each_key and Hash#each_value.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedReceivers": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "Thread.current" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/HashExcept": { | |
| "title": "Style/HashExcept", | |
| "description": "Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods that can be replaced with `Hash#except` method.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/HashLikeCase": { | |
| "title": "Style/HashLikeCase", | |
| "description": "Checks for places where `case-when` represents a simple 1:1 mapping and can be replaced with a hash lookup.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MinBranchesCount": { | |
| "type": "integer", | |
| "default": 3 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/HashSyntax": { | |
| "title": "Style/HashSyntax", | |
| "description": "Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "ruby19", | |
| "hash_rockets", | |
| "no_mixed_keys", | |
| "ruby19_no_mixed_keys" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "ruby19", | |
| "hash_rockets", | |
| "no_mixed_keys", | |
| "ruby19_no_mixed_keys" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "ruby19" | |
| }, | |
| "EnforcedShorthandSyntax": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "always", | |
| "never", | |
| "either", | |
| "consistent" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "always", | |
| "never", | |
| "either", | |
| "consistent" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "always" | |
| }, | |
| "UseHashRocketsWithSymbolValues": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "PreferHashRocketsForNonAlnumEndingSymbols": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/HashTransformKeys": { | |
| "title": "Style/HashTransformKeys", | |
| "description": "Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/HashTransformValues": { | |
| "title": "Style/HashTransformValues", | |
| "description": "Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/IdenticalConditionalBranches": { | |
| "title": "Style/IdenticalConditionalBranches", | |
| "description": "Checks that conditional statements do not have an identical line at the end of each branch, which can validly be moved out of the conditional.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/IfInsideElse": { | |
| "title": "Style/IfInsideElse", | |
| "description": "Finds if nodes inside else, which can be converted to elsif.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowIfModifier": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/IfUnlessModifier": { | |
| "title": "Style/IfUnlessModifier", | |
| "description": "Favor modifier if/unless usage when you have a single-line body.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/IfUnlessModifierOfIfUnless": { | |
| "title": "Style/IfUnlessModifierOfIfUnless", | |
| "description": "Avoid modifier if/unless usage on conditionals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/IfWithBooleanLiteralBranches": { | |
| "title": "Style/IfWithBooleanLiteralBranches", | |
| "description": "Checks for redundant `if` with boolean literal branches.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "nonzero?" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/IfWithSemicolon": { | |
| "title": "Style/IfWithSemicolon", | |
| "description": "Do not use if x; .... Use the ternary operator instead.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ImplicitRuntimeError": { | |
| "title": "Style/ImplicitRuntimeError", | |
| "description": "Use `raise` or `fail` with an explicit exception class and message, rather than just a message.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/InPatternThen": { | |
| "title": "Style/InPatternThen", | |
| "description": "Checks for `in;` uses in `case` expressions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/InfiniteLoop": { | |
| "title": "Style/InfiniteLoop", | |
| "description": "Use Kernel#loop for infinite loops. This cop is unsafe if the body may raise a `StopIteration` exception.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/InverseMethods": { | |
| "title": "Style/InverseMethods", | |
| "description": "Use the inverse method instead of `!.method` if an inverse method is defined.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "InverseMethods": { | |
| "type": "object", | |
| "default": { | |
| "any?": "none?", | |
| "even?": "odd?", | |
| "==": "!=", | |
| "=~": "!~", | |
| "<": ">=", | |
| ">": "<=" | |
| } | |
| }, | |
| "InverseBlocks": { | |
| "type": "object", | |
| "default": { | |
| "select": "reject", | |
| "select!": "reject!" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/InlineComment": { | |
| "title": "Style/InlineComment", | |
| "description": "Avoid trailing inline comments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/InvertibleUnlessCondition": { | |
| "title": "Style/InvertibleUnlessCondition", | |
| "description": "Favor `if` with inverted condition over `unless`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "InverseMethods": { | |
| "type": "object", | |
| "default": { | |
| "!=": "==", | |
| ">": "<=", | |
| "<=": ">", | |
| "<": ">=", | |
| ">=": "<", | |
| "!~": "=~", | |
| "zero?": "nonzero?", | |
| "nonzero?": "zero?", | |
| "any?": "none?", | |
| "none?": "any?", | |
| "even?": "odd?", | |
| "odd?": "even?", | |
| "present?": "blank?", | |
| "blank?": "present?", | |
| "include?": "exclude?", | |
| "exclude?": "include?" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/IpAddresses": { | |
| "title": "Style/IpAddresses", | |
| "description": "Don't include literal IP addresses in code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowedAddresses": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "::" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/KeywordParametersOrder": { | |
| "title": "Style/KeywordParametersOrder", | |
| "description": "Enforces that optional keyword parameters are placed at the end of the parameters list.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Lambda": { | |
| "title": "Style/Lambda", | |
| "description": "Use the new lambda literal syntax for single-line blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "line_count_dependent", | |
| "lambda", | |
| "literal" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "line_count_dependent", | |
| "lambda", | |
| "literal" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "line_count_dependent" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/LambdaCall": { | |
| "title": "Style/LambdaCall", | |
| "description": "Use lambda.call(...) instead of lambda.(...).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "call", | |
| "braces" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "call", | |
| "braces" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "call" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/LineEndConcatenation": { | |
| "title": "Style/LineEndConcatenation", | |
| "description": "Use \\ instead of + or << to concatenate two string literals at line end.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MagicCommentFormat": { | |
| "title": "Style/MagicCommentFormat", | |
| "description": "Use a consistent style for magic comments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "kebab_case" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "kebab_case" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "snake_case" | |
| }, | |
| "DirectiveCapitalization": { | |
| "type": "string", | |
| "default": "lowercase" | |
| }, | |
| "ValueCapitalization": { | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MapToHash": { | |
| "title": "Style/MapToHash", | |
| "description": "Prefer `to_h` with a block over `map.to_h`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MapToSet": { | |
| "title": "Style/MapToSet", | |
| "description": "Prefer `to_set` with a block over `map.to_set`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MethodCallWithoutArgsParentheses": { | |
| "title": "Style/MethodCallWithoutArgsParentheses", | |
| "description": "Do not use parentheses for method calls with no arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MethodCallWithArgsParentheses": { | |
| "title": "Style/MethodCallWithArgsParentheses", | |
| "description": "Use parentheses for method calls with arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "IgnoreMacros": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "IncludedMacros": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowParenthesesInMultilineCall": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowParenthesesInChaining": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowParenthesesInCamelCaseMethod": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowParenthesesInStringInterpolation": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "omit_parentheses" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "omit_parentheses" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "require_parentheses" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MinMaxComparison": { | |
| "title": "Style/MinMaxComparison", | |
| "description": "Enforces the use of `max` or `min` instead of comparison for greater or less.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MultilineInPatternThen": { | |
| "title": "Style/MultilineInPatternThen", | |
| "description": "Do not use `then` for multi-line `in` statement.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NumberedParameters": { | |
| "title": "Style/NumberedParameters", | |
| "description": "Restrict the usage of numbered parameters.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "allow_single_line", | |
| "disallow" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "allow_single_line", | |
| "disallow" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "allow_single_line" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/OpenStructUse": { | |
| "title": "Style/OpenStructUse", | |
| "description": "Avoid using OpenStruct. As of Ruby 3.0, use is officially discouraged due to performance, version compatibility, and potential security issues.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/OperatorMethodCall": { | |
| "title": "Style/OperatorMethodCall", | |
| "description": "Checks for redundant dot before operator method call.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantArrayConstructor": { | |
| "title": "Style/RedundantArrayConstructor", | |
| "description": "Checks for the instantiation of array using redundant `Array` constructor.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantAssignment": { | |
| "title": "Style/RedundantAssignment", | |
| "description": "Checks for redundant assignment before returning.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantConstantBase": { | |
| "title": "Style/RedundantConstantBase", | |
| "description": "Avoid redundant `::` prefix on constant.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantCurrentDirectoryInPath": { | |
| "title": "Style/RedundantCurrentDirectoryInPath", | |
| "description": "Checks for uses a redundant current directory in path.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantDoubleSplatHashBraces": { | |
| "title": "Style/RedundantDoubleSplatHashBraces", | |
| "description": "Checks for redundant uses of double splat hash braces.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantEach": { | |
| "title": "Style/RedundantEach", | |
| "description": "Checks for redundant `each`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantFetchBlock": { | |
| "title": "Style/RedundantFetchBlock", | |
| "description": "Use `fetch(key, value)` instead of `fetch(key) { value }` when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "SafeForConstants": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantFileExtensionInRequire": { | |
| "title": "Style/RedundantFileExtensionInRequire", | |
| "description": "Checks for the presence of superfluous `.rb` extension in the filename provided to `require` and `require_relative`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantFilterChain": { | |
| "title": "Style/RedundantFilterChain", | |
| "description": "Identifies usages of `any?`, `empty?`, `none?` or `one?` predicate methods chained to `select`/`filter`/`find_all` and change them to use predicate method instead.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantHeredocDelimiterQuotes": { | |
| "title": "Style/RedundantHeredocDelimiterQuotes", | |
| "description": "Checks for redundant heredoc delimiter quotes.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantInitialize": { | |
| "title": "Style/RedundantInitialize", | |
| "description": "Checks for redundant `initialize` methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantLineContinuation": { | |
| "title": "Style/RedundantLineContinuation", | |
| "description": "Check for redundant line continuation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantRegexpArgument": { | |
| "title": "Style/RedundantRegexpArgument", | |
| "description": "Identifies places where argument can be replaced from a deterministic regexp to a string.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantRegexpConstructor": { | |
| "title": "Style/RedundantRegexpConstructor", | |
| "description": "Checks for the instantiation of regexp using redundant `Regexp.new` or `Regexp.compile`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantSelfAssignment": { | |
| "title": "Style/RedundantSelfAssignment", | |
| "description": "Checks for places where redundant assignments are made for in place modification methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantSelfAssignmentBranch": { | |
| "title": "Style/RedundantSelfAssignmentBranch", | |
| "description": "Checks for places where conditional branch makes redundant self-assignment.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RequireOrder": { | |
| "title": "Style/RequireOrder", | |
| "description": "Sort `require` and `require_relative` in alphabetical order.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SingleLineDoEndBlock": { | |
| "title": "Style/SingleLineDoEndBlock", | |
| "description": "Checks for single-line `do`...`end` blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SoleNestedConditional": { | |
| "title": "Style/SoleNestedConditional", | |
| "description": "Finds sole nested conditional nodes which can be merged into outer conditional node.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowModifier": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StaticClass": { | |
| "title": "Style/StaticClass", | |
| "description": "Prefer modules to classes with only class methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MapCompactWithConditionalBlock": { | |
| "title": "Style/MapCompactWithConditionalBlock", | |
| "description": "Prefer `select` or `reject` over `map { ... }.compact`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MethodCalledOnDoEndBlock": { | |
| "title": "Style/MethodCalledOnDoEndBlock", | |
| "description": "Avoid chaining a method call on a do...end block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MethodDefParentheses": { | |
| "title": "Style/MethodDefParentheses", | |
| "description": "Checks if the method definitions have or don't have parentheses.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "require_no_parentheses", | |
| "require_no_parentheses_except_multiline" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "require_no_parentheses", | |
| "require_no_parentheses_except_multiline" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "require_parentheses" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MinMax": { | |
| "title": "Style/MinMax", | |
| "description": "Use `Enumerable#minmax` instead of `Enumerable#min` and `Enumerable#max` in conjunction.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MissingElse": { | |
| "title": "Style/MissingElse", | |
| "description": "Require if/case expressions to have an else branches. If enabled, it is recommended that Style/UnlessElse and Style/EmptyElse be enabled. This will conflict with Style/EmptyElse if Style/EmptyElse is configured to style \"both\".", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "if", | |
| "case", | |
| "both" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "if", | |
| "case", | |
| "both" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "both" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MissingRespondToMissing": { | |
| "title": "Style/MissingRespondToMissing", | |
| "description": "Checks if `method_missing` is implemented without implementing `respond_to_missing`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MixinGrouping": { | |
| "title": "Style/MixinGrouping", | |
| "description": "Checks for grouping of mixins in `class` and `module` bodies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "separated", | |
| "grouped" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "separated", | |
| "grouped" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "separated" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MixinUsage": { | |
| "title": "Style/MixinUsage", | |
| "description": "Checks that `include`, `extend` and `prepend` exists at the top level.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ModuleFunction": { | |
| "title": "Style/ModuleFunction", | |
| "description": "Checks for usage of `extend self` in modules.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "module_function", | |
| "extend_self", | |
| "forbidden" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "module_function", | |
| "extend_self", | |
| "forbidden" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "module_function" | |
| }, | |
| "Autocorrect": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MultilineBlockChain": { | |
| "title": "Style/MultilineBlockChain", | |
| "description": "Avoid multi-line chains of blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MultilineIfThen": { | |
| "title": "Style/MultilineIfThen", | |
| "description": "Do not use then for multi-line if/unless.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MultilineIfModifier": { | |
| "title": "Style/MultilineIfModifier", | |
| "description": "Only use if/unless modifiers on single line statements.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MultilineMethodSignature": { | |
| "title": "Style/MultilineMethodSignature", | |
| "description": "Avoid multi-line method signatures.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MultilineMemoization": { | |
| "title": "Style/MultilineMemoization", | |
| "description": "Wrap multiline memoizations in a `begin` and `end` block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "keyword", | |
| "braces" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "keyword", | |
| "braces" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "keyword" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MultilineTernaryOperator": { | |
| "title": "Style/MultilineTernaryOperator", | |
| "description": "Avoid multi-line ?: (the ternary operator); use if/unless instead.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MultilineWhenThen": { | |
| "title": "Style/MultilineWhenThen", | |
| "description": "Do not use then for multi-line when statement.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MultipleComparison": { | |
| "title": "Style/MultipleComparison", | |
| "description": "Avoid comparing a variable with multiple items in a conditional, use Array#include? instead.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowMethodComparison": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "ComparisonsThreshold": { | |
| "type": "integer", | |
| "default": 2 | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/MutableConstant": { | |
| "title": "Style/MutableConstant", | |
| "description": "Do not assign mutable objects to constants.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "literals", | |
| "strict" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "literals", | |
| "strict" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "literals" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NegatedIf": { | |
| "title": "Style/NegatedIf", | |
| "description": "Favor unless over if for negative conditions (or control flow or).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "both", | |
| "prefix", | |
| "postfix" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "both", | |
| "prefix", | |
| "postfix" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "both" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NegatedIfElseCondition": { | |
| "title": "Style/NegatedIfElseCondition", | |
| "description": "Checks for uses of `if-else` and ternary operators with a negated condition which can be simplified by inverting condition and swapping branches.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NegatedUnless": { | |
| "title": "Style/NegatedUnless", | |
| "description": "Favor if over unless for negative conditions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "both", | |
| "prefix", | |
| "postfix" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "both", | |
| "prefix", | |
| "postfix" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "both" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NegatedWhile": { | |
| "title": "Style/NegatedWhile", | |
| "description": "Favor until over while for negative conditions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NestedFileDirname": { | |
| "title": "Style/NestedFileDirname", | |
| "description": "Checks for nested `File.dirname`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NestedModifier": { | |
| "title": "Style/NestedModifier", | |
| "description": "Avoid using nested modifiers.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NestedParenthesizedCalls": { | |
| "title": "Style/NestedParenthesizedCalls", | |
| "description": "Parenthesize method calls which are nested inside the argument list of another parenthesized method call.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "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" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NestedTernaryOperator": { | |
| "title": "Style/NestedTernaryOperator", | |
| "description": "Use one expression per branch in a ternary operator.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Next": { | |
| "title": "Style/Next", | |
| "description": "Use `next` to skip iteration instead of a condition at the end.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "skip_modifier_ifs", | |
| "always" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "skip_modifier_ifs", | |
| "always" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "skip_modifier_ifs" | |
| }, | |
| "MinBodyLength": { | |
| "type": "integer", | |
| "default": 3 | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NilComparison": { | |
| "title": "Style/NilComparison", | |
| "description": "Prefer x.nil? to x == nil.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "predicate", | |
| "comparison" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "predicate", | |
| "comparison" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "predicate" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NilLambda": { | |
| "title": "Style/NilLambda", | |
| "description": "Prefer `-> {}` to `-> { nil }`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NonNilCheck": { | |
| "title": "Style/NonNilCheck", | |
| "description": "Checks for redundant nil checks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "IncludeSemanticChanges": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Not": { | |
| "title": "Style/Not", | |
| "description": "Use ! instead of not.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NumberedParametersLimit": { | |
| "title": "Style/NumberedParametersLimit", | |
| "description": "Avoid excessive numbered params in a single block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 1 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NumericLiterals": { | |
| "title": "Style/NumericLiterals", | |
| "description": "Add underscores to large numeric literals to improve their readability.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MinDigits": { | |
| "type": "integer", | |
| "default": 5 | |
| }, | |
| "Strict": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowedNumbers": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NumericLiteralPrefix": { | |
| "title": "Style/NumericLiteralPrefix", | |
| "description": "Use smallcase prefixes for numeric literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedOctalStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "zero_with_o", | |
| "zero_only" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "zero_with_o", | |
| "zero_only" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "zero_with_o" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/NumericPredicate": { | |
| "title": "Style/NumericPredicate", | |
| "description": "Checks for the use of predicate- or comparison methods for numeric comparisons.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "predicate", | |
| "comparison" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "predicate", | |
| "comparison" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "predicate" | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ObjectThen": { | |
| "title": "Style/ObjectThen", | |
| "description": "Enforces the use of consistent method names `Object#yield_self` or `Object#then`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "then", | |
| "yield_self" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "then", | |
| "yield_self" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "then" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/OneLineConditional": { | |
| "title": "Style/OneLineConditional", | |
| "description": "Favor the ternary operator (?:) or multi-line constructs over single-line if/then/else/end constructs.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AlwaysCorrectToMultiline": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/OrAssignment": { | |
| "title": "Style/OrAssignment", | |
| "description": "Recommend usage of double pipe equals (||=) where applicable.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/OptionHash": { | |
| "title": "Style/OptionHash", | |
| "description": "Don't use option hashes when you can use keyword arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "SuspiciousParamNames": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "options", | |
| "opts", | |
| "args", | |
| "params", | |
| "parameters" | |
| ] | |
| }, | |
| "Allowlist": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/OptionalArguments": { | |
| "title": "Style/OptionalArguments", | |
| "description": "Checks for optional arguments that do not appear at the end of the argument list.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/OptionalBooleanParameter": { | |
| "title": "Style/OptionalBooleanParameter", | |
| "description": "Use keyword arguments when defining method with boolean argument.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "respond_to_missing?" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ParallelAssignment": { | |
| "title": "Style/ParallelAssignment", | |
| "description": "Check for simple usages of parallel assignment. It will only warn when the number of variables matches on both sides of the assignment.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ParenthesesAroundCondition": { | |
| "title": "Style/ParenthesesAroundCondition", | |
| "description": "Don't use parentheses around the condition of an if/unless/while.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowSafeAssignment": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowInMultilineConditions": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/PercentLiteralDelimiters": { | |
| "title": "Style/PercentLiteralDelimiters", | |
| "description": "Use `%`-literal delimiters consistently.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "PreferredDelimiters": { | |
| "type": "object", | |
| "default": { | |
| "default": "()", | |
| "%i": "[]", | |
| "%I": "[]", | |
| "%r": "{}", | |
| "%w": "[]", | |
| "%W": "[]" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/PercentQLiterals": { | |
| "title": "Style/PercentQLiterals", | |
| "description": "Checks if uses of %Q/%q match the configured preference.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "lower_case_q", | |
| "upper_case_q" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "lower_case_q", | |
| "upper_case_q" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "lower_case_q" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/PerlBackrefs": { | |
| "title": "Style/PerlBackrefs", | |
| "description": "Avoid Perl-style regex back references.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/PreferredHashMethods": { | |
| "title": "Style/PreferredHashMethods", | |
| "description": "Checks use of `has_key?` and `has_value?` Hash methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "short", | |
| "verbose" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "short", | |
| "verbose" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "short" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Proc": { | |
| "title": "Style/Proc", | |
| "description": "Use proc instead of Proc.new.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/QuotedSymbols": { | |
| "title": "Style/QuotedSymbols", | |
| "description": "Use a consistent style for quoted symbols.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "same_as_string_literals", | |
| "single_quotes", | |
| "double_quotes" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "same_as_string_literals", | |
| "single_quotes", | |
| "double_quotes" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "same_as_string_literals" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RaiseArgs": { | |
| "title": "Style/RaiseArgs", | |
| "description": "Checks the arguments passed to raise/fail.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "compact", | |
| "exploded" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "compact", | |
| "exploded" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "exploded" | |
| }, | |
| "AllowedCompactTypes": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RandomWithOffset": { | |
| "title": "Style/RandomWithOffset", | |
| "description": "Prefer to use ranges when generating random numbers instead of integers with offsets.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantArgument": { | |
| "title": "Style/RedundantArgument", | |
| "description": "Check for a redundant argument passed to certain methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Methods": { | |
| "type": "object", | |
| "default": { | |
| "join": "", | |
| "sum": 0, | |
| "exit": true, | |
| "exit!": false, | |
| "split": " ", | |
| "chomp": "\n", | |
| "chomp!": "\n" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantBegin": { | |
| "title": "Style/RedundantBegin", | |
| "description": "Don't use begin blocks when they are not needed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantCapitalW": { | |
| "title": "Style/RedundantCapitalW", | |
| "description": "Checks for %W when interpolation is not needed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantCondition": { | |
| "title": "Style/RedundantCondition", | |
| "description": "Checks for unnecessary conditional expressions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantConditional": { | |
| "title": "Style/RedundantConditional", | |
| "description": "Don't return true/false from a conditional.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantException": { | |
| "title": "Style/RedundantException", | |
| "description": "Checks for an obsolete RuntimeException argument in raise/fail.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantFreeze": { | |
| "title": "Style/RedundantFreeze", | |
| "description": "Checks usages of Object#freeze on immutable objects.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantInterpolation": { | |
| "title": "Style/RedundantInterpolation", | |
| "description": "Checks for strings that are just an interpolated expression.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantParentheses": { | |
| "title": "Style/RedundantParentheses", | |
| "description": "Checks for parentheses that seem not to serve any purpose.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantPercentQ": { | |
| "title": "Style/RedundantPercentQ", | |
| "description": "Checks for %q/%Q when single quotes or double quotes would do.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantRegexpCharacterClass": { | |
| "title": "Style/RedundantRegexpCharacterClass", | |
| "description": "Checks for unnecessary single-element Regexp character classes.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantRegexpEscape": { | |
| "title": "Style/RedundantRegexpEscape", | |
| "description": "Checks for redundant escapes in Regexps.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantReturn": { | |
| "title": "Style/RedundantReturn", | |
| "description": "Don't use return where it's not required.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowMultipleReturnValues": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantSelf": { | |
| "title": "Style/RedundantSelf", | |
| "description": "Don't use self where it's not needed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantSort": { | |
| "title": "Style/RedundantSort", | |
| "description": "Use `min` instead of `sort.first`, `max_by` instead of `sort_by...last`, etc.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantSortBy": { | |
| "title": "Style/RedundantSortBy", | |
| "description": "Use `sort` instead of `sort_by { |x| x }`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RedundantStringEscape": { | |
| "title": "Style/RedundantStringEscape", | |
| "description": "Checks for redundant escapes in string literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RegexpLiteral": { | |
| "title": "Style/RegexpLiteral", | |
| "description": "Use / or %r around regular expressions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "slashes", | |
| "percent_r", | |
| "mixed" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "slashes", | |
| "percent_r", | |
| "mixed" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "slashes" | |
| }, | |
| "AllowInnerSlashes": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RescueModifier": { | |
| "title": "Style/RescueModifier", | |
| "description": "Avoid using rescue in its modifier form.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/RescueStandardError": { | |
| "title": "Style/RescueStandardError", | |
| "description": "Avoid rescuing without specifying an error class.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "implicit", | |
| "explicit" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "implicit", | |
| "explicit" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "explicit" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ReturnNil": { | |
| "title": "Style/ReturnNil", | |
| "description": "Use return instead of return nil.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "return", | |
| "return_nil" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "return", | |
| "return_nil" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "return" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ReturnNilInPredicateMethodDefinition": { | |
| "title": "Style/ReturnNilInPredicateMethodDefinition", | |
| "description": "Checks if uses of `return` or `return nil` in predicate method definition.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SafeNavigation": { | |
| "title": "Style/SafeNavigation", | |
| "description": "Transforms usages of a method call safeguarded by a check for the existence of the object to safe navigation (`&.`). Autocorrection is unsafe as it assumes the object will be `nil` or truthy, but never `false`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "ConvertCodeThatCanStartToReturnNil": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "present?", | |
| "blank?", | |
| "presence", | |
| "try", | |
| "try!" | |
| ] | |
| }, | |
| "MaxChainLength": { | |
| "type": "integer", | |
| "default": 2 | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Sample": { | |
| "title": "Style/Sample", | |
| "description": "Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Integer]`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SelectByRegexp": { | |
| "title": "Style/SelectByRegexp", | |
| "description": "Prefer grep/grep_v to select/reject with a regexp match.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SelfAssignment": { | |
| "title": "Style/SelfAssignment", | |
| "description": "Checks for places where self-assignment shorthand should have been used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Semicolon": { | |
| "title": "Style/Semicolon", | |
| "description": "Don't use semicolons to terminate expressions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowAsExpressionSeparator": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Send": { | |
| "title": "Style/Send", | |
| "description": "Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SignalException": { | |
| "title": "Style/SignalException", | |
| "description": "Checks for proper usage of fail and raise.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "only_raise", | |
| "only_fail", | |
| "semantic" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "only_raise", | |
| "only_fail", | |
| "semantic" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "only_raise" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SingleArgumentDig": { | |
| "title": "Style/SingleArgumentDig", | |
| "description": "Avoid using single argument dig method.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SingleLineBlockParams": { | |
| "title": "Style/SingleLineBlockParams", | |
| "description": "Enforces the names of some block params.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Methods": { | |
| "type": "array", | |
| "items": { | |
| "type": "object" | |
| }, | |
| "default": [ | |
| { | |
| "reduce": [ | |
| "acc", | |
| "elem" | |
| ] | |
| }, | |
| { | |
| "inject": [ | |
| "acc", | |
| "elem" | |
| ] | |
| } | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SingleLineMethods": { | |
| "title": "Style/SingleLineMethods", | |
| "description": "Avoid single-line methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowIfMethodIsEmpty": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SlicingWithRange": { | |
| "title": "Style/SlicingWithRange", | |
| "description": "Checks array slicing is done with endless ranges when suitable.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SpecialGlobalVars": { | |
| "title": "Style/SpecialGlobalVars", | |
| "description": "Avoid Perl-style global variables.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "RequireEnglish": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "use_perl_names", | |
| "use_english_names", | |
| "use_builtin_english_names" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "use_perl_names", | |
| "use_english_names", | |
| "use_builtin_english_names" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "use_english_names" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StabbyLambdaParentheses": { | |
| "title": "Style/StabbyLambdaParentheses", | |
| "description": "Check for the usage of parentheses around stabby lambda arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "require_no_parentheses" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "require_no_parentheses" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "require_parentheses" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StderrPuts": { | |
| "title": "Style/StderrPuts", | |
| "description": "Use `warn` instead of `$stderr.puts`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StringChars": { | |
| "title": "Style/StringChars", | |
| "description": "Checks for uses of `String#split` with empty string or regexp literal argument.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StringConcatenation": { | |
| "title": "Style/StringConcatenation", | |
| "description": "Checks for places where string concatenation can be replaced with string interpolation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Mode": { | |
| "type": "string", | |
| "default": "aggressive" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StringHashKeys": { | |
| "title": "Style/StringHashKeys", | |
| "description": "Prefer symbols instead of strings as hash keys.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StringLiterals": { | |
| "title": "Style/StringLiterals", | |
| "description": "Checks if uses of quotes match the configured preference.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "single_quotes", | |
| "double_quotes" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "single_quotes", | |
| "double_quotes" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "single_quotes" | |
| }, | |
| "ConsistentQuotesInMultiline": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StringLiteralsInInterpolation": { | |
| "title": "Style/StringLiteralsInInterpolation", | |
| "description": "Checks if uses of quotes inside expressions in interpolated strings match the configured preference.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "single_quotes", | |
| "double_quotes" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "single_quotes", | |
| "double_quotes" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "single_quotes" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StringMethods": { | |
| "title": "Style/StringMethods", | |
| "description": "Checks if configured preferred methods are used over non-preferred.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "PreferredMethods": { | |
| "type": "object", | |
| "default": { | |
| "intern": "to_sym" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/Strip": { | |
| "title": "Style/Strip", | |
| "description": "Use `strip` instead of `lstrip.rstrip`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/StructInheritance": { | |
| "title": "Style/StructInheritance", | |
| "description": "Checks for inheritance from Struct.new.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SwapValues": { | |
| "title": "Style/SwapValues", | |
| "description": "Enforces the use of shorthand-style swapping of 2 variables.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SymbolArray": { | |
| "title": "Style/SymbolArray", | |
| "description": "Use %i or %I for arrays of symbols.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "percent", | |
| "brackets" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "percent", | |
| "brackets" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "percent" | |
| }, | |
| "MinSize": { | |
| "type": "integer", | |
| "default": 2 | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SymbolLiteral": { | |
| "title": "Style/SymbolLiteral", | |
| "description": "Use plain symbols instead of string symbols when possible.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/SymbolProc": { | |
| "title": "Style/SymbolProc", | |
| "description": "Use symbols as procs instead of blocks when possible.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowMethodsWithArguments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "define_method", | |
| "mail", | |
| "respond_to" | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AllowComments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TernaryParentheses": { | |
| "title": "Style/TernaryParentheses", | |
| "description": "Checks for use of parentheses around ternary conditions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "require_no_parentheses", | |
| "require_parentheses_when_complex" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "require_no_parentheses", | |
| "require_parentheses_when_complex" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "require_no_parentheses" | |
| }, | |
| "AllowSafeAssignment": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TopLevelMethodDefinition": { | |
| "title": "Style/TopLevelMethodDefinition", | |
| "description": "Looks for top-level method definitions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrailingBodyOnClass": { | |
| "title": "Style/TrailingBodyOnClass", | |
| "description": "Class body goes below class statement.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrailingBodyOnMethodDefinition": { | |
| "title": "Style/TrailingBodyOnMethodDefinition", | |
| "description": "Method body goes below definition.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrailingBodyOnModule": { | |
| "title": "Style/TrailingBodyOnModule", | |
| "description": "Module body goes below module statement.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrailingCommaInArguments": { | |
| "title": "Style/TrailingCommaInArguments", | |
| "description": "Checks for trailing comma in argument lists.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyleForMultiline": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "comma", | |
| "consistent_comma", | |
| "no_comma" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "comma", | |
| "consistent_comma", | |
| "no_comma" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_comma" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrailingCommaInArrayLiteral": { | |
| "title": "Style/TrailingCommaInArrayLiteral", | |
| "description": "Checks for trailing comma in array literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyleForMultiline": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "comma", | |
| "consistent_comma", | |
| "no_comma" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "comma", | |
| "consistent_comma", | |
| "no_comma" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_comma" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrailingCommaInBlockArgs": { | |
| "title": "Style/TrailingCommaInBlockArgs", | |
| "description": "Checks for useless trailing commas in block arguments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrailingCommaInHashLiteral": { | |
| "title": "Style/TrailingCommaInHashLiteral", | |
| "description": "Checks for trailing comma in hash literals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyleForMultiline": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "comma", | |
| "consistent_comma", | |
| "no_comma" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "comma", | |
| "consistent_comma", | |
| "no_comma" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "no_comma" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrailingMethodEndStatement": { | |
| "title": "Style/TrailingMethodEndStatement", | |
| "description": "Checks for trailing end statement on line of method body.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrailingUnderscoreVariable": { | |
| "title": "Style/TrailingUnderscoreVariable", | |
| "description": "Checks for the usage of unneeded trailing underscores at the end of parallel variable assignment.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "AllowNamedUnderscoreVariables": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/TrivialAccessors": { | |
| "title": "Style/TrivialAccessors", | |
| "description": "Prefer attr_* methods to trivial readers/writers.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "ExactNameMatch": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowPredicates": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowDSLWriters": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "IgnoreClassMethods": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "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" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/UnlessElse": { | |
| "title": "Style/UnlessElse", | |
| "description": "Do not use unless with else. Rewrite these with the positive case first.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/UnlessLogicalOperators": { | |
| "title": "Style/UnlessLogicalOperators", | |
| "description": "Checks for use of logical operators in an unless condition.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "forbid_mixed_logical_operators", | |
| "forbid_logical_operators" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "forbid_mixed_logical_operators", | |
| "forbid_logical_operators" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "forbid_mixed_logical_operators" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/UnpackFirst": { | |
| "title": "Style/UnpackFirst", | |
| "description": "Checks for accessing the first element of `String#unpack` instead of using `unpack1`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/VariableInterpolation": { | |
| "title": "Style/VariableInterpolation", | |
| "description": "Don't interpolate global, instance and class variables directly in strings.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/WhenThen": { | |
| "title": "Style/WhenThen", | |
| "description": "Use when x then ... for one-line cases.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/WhileUntilDo": { | |
| "title": "Style/WhileUntilDo", | |
| "description": "Checks for redundant do after while or until.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/WhileUntilModifier": { | |
| "title": "Style/WhileUntilModifier", | |
| "description": "Favor modifier while/until usage when you have a single-line body.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/WordArray": { | |
| "title": "Style/WordArray", | |
| "description": "Use %w or %W for arrays of words.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "percent", | |
| "brackets" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "percent", | |
| "brackets" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "percent" | |
| }, | |
| "MinSize": { | |
| "type": "integer", | |
| "default": 2 | |
| }, | |
| "WordRegex": { | |
| "default": "(?-mix:\\A(?:\\p{Word}|\\p{Word}-\\p{Word}|\\n|\\t)+\\z)" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/YAMLFileRead": { | |
| "title": "Style/YAMLFileRead", | |
| "description": "Checks for the use of `YAML.load`, `YAML.safe_load`, and `YAML.parse` with `File.read` argument.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/YodaCondition": { | |
| "title": "Style/YodaCondition", | |
| "description": "Forbid or enforce yoda conditions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "forbid_for_all_comparison_operators", | |
| "forbid_for_equality_operators_only", | |
| "require_for_all_comparison_operators", | |
| "require_for_equality_operators_only" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "forbid_for_all_comparison_operators", | |
| "forbid_for_equality_operators_only", | |
| "require_for_all_comparison_operators", | |
| "require_for_equality_operators_only" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "forbid_for_all_comparison_operators" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/YodaExpression": { | |
| "title": "Style/YodaExpression", | |
| "description": "Forbid the use of yoda expressions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Style/ZeroLengthPredicate": { | |
| "title": "Style/ZeroLengthPredicate", | |
| "description": "Use #empty? when testing for objects of length 0.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Security/CompoundHash": { | |
| "title": "Security/CompoundHash", | |
| "description": "When overwriting Object#hash to combine values, prefer delegating to Array#hash over writing a custom implementation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Security/Eval": { | |
| "title": "Security/Eval", | |
| "description": "The use of eval represents a serious security risk.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Security/IoMethods": { | |
| "title": "Security/IoMethods", | |
| "description": "Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`, `IO.foreach`, and `IO.readlines`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Security/JSONLoad": { | |
| "title": "Security/JSONLoad", | |
| "description": "Prefer usage of `JSON.parse` over `JSON.load` due to potential security issues. See reference for more information.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Security/MarshalLoad": { | |
| "title": "Security/MarshalLoad", | |
| "description": "Avoid using of `Marshal.load` or `Marshal.restore` due to potential security issues. See reference for more information.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Security/Open": { | |
| "title": "Security/Open", | |
| "description": "The use of `Kernel#open` and `URI.open` represent a serious security risk.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Security/YAMLLoad": { | |
| "title": "Security/YAMLLoad", | |
| "description": "Prefer usage of `YAML.safe_load` over `YAML.load` due to potential security issues. See reference for more information.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/AncestorsInclude": { | |
| "title": "Performance/AncestorsInclude", | |
| "description": "Use `A <= B` instead of `A.ancestors.include?(B)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/ArraySemiInfiniteRangeSlice": { | |
| "title": "Performance/ArraySemiInfiniteRangeSlice", | |
| "description": "Identifies places where slicing arrays with semi-infinite ranges can be replaced by `Array#take` and `Array#drop`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/BigDecimalWithNumericArgument": { | |
| "title": "Performance/BigDecimalWithNumericArgument", | |
| "description": "Convert numeric literal to string and pass it to `BigDecimal`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/BindCall": { | |
| "title": "Performance/BindCall", | |
| "description": "Use `bind_call(obj, args, ...)` instead of `bind(obj).call(args, ...)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/BlockGivenWithExplicitBlock": { | |
| "title": "Performance/BlockGivenWithExplicitBlock", | |
| "description": "Check block argument explicitly instead of using `block_given?`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/Caller": { | |
| "title": "Performance/Caller", | |
| "description": "Use `caller(n..n)` instead of `caller`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/CaseWhenSplat": { | |
| "title": "Performance/CaseWhenSplat", | |
| "description": "Reordering `when` conditions with a splat to the end of the `when` branches can improve performance.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/Casecmp": { | |
| "title": "Performance/Casecmp", | |
| "description": "Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`, or `== upcase`..", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/CollectionLiteralInLoop": { | |
| "title": "Performance/CollectionLiteralInLoop", | |
| "description": "Extract Array and Hash literals outside of loops into local variables or constants.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "MinSize": { | |
| "type": "integer", | |
| "default": 1 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/CompareWithBlock": { | |
| "title": "Performance/CompareWithBlock", | |
| "description": "Use `sort_by(&:foo)` instead of `sort { |a, b| a.foo <=> b.foo }`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/ConcurrentMonotonicTime": { | |
| "title": "Performance/ConcurrentMonotonicTime", | |
| "description": "Use `Process.clock_gettime(Process::CLOCK_MONOTONIC)` instead of `Concurrent.monotonic_time`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/ConstantRegexp": { | |
| "title": "Performance/ConstantRegexp", | |
| "description": "Finds regular expressions with dynamic components that are all constants.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/Count": { | |
| "title": "Performance/Count", | |
| "description": "Use `count` instead of `{select,find_all,filter,reject}...{size,count,length}`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/DeletePrefix": { | |
| "title": "Performance/DeletePrefix", | |
| "description": "Use `delete_prefix` instead of `gsub`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "SafeMultiline": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/DeleteSuffix": { | |
| "title": "Performance/DeleteSuffix", | |
| "description": "Use `delete_suffix` instead of `gsub`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "SafeMultiline": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/Detect": { | |
| "title": "Performance/Detect", | |
| "description": "Use `detect` instead of `select.first`, `find_all.first`, `filter.first`, `select.last`, `find_all.last`, and `filter.last`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/DoubleStartEndWith": { | |
| "title": "Performance/DoubleStartEndWith", | |
| "description": "Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "IncludeActiveSupportAliases": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/EndWith": { | |
| "title": "Performance/EndWith", | |
| "description": "Use `end_with?` instead of a regex match anchored to the end of a string.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "SafeMultiline": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/FixedSize": { | |
| "title": "Performance/FixedSize", | |
| "description": "Do not compute the size of statically sized objects except in constants.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/FlatMap": { | |
| "title": "Performance/FlatMap", | |
| "description": "Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)` or `Enumerable#collect..Array#flatten(1)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnabledForFlattenWithoutParams": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/InefficientHashSearch": { | |
| "title": "Performance/InefficientHashSearch", | |
| "description": "Use `key?` or `value?` instead of `keys.include?` or `values.include?`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/MapCompact": { | |
| "title": "Performance/MapCompact", | |
| "description": "Use `filter_map` instead of `collection.map(&:do_something).compact`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/MapMethodChain": { | |
| "title": "Performance/MapMethodChain", | |
| "description": "Checks if the `map` method is used in a chain.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/MethodObjectAsBlock": { | |
| "title": "Performance/MethodObjectAsBlock", | |
| "description": "Use block explicitly instead of block-passing a method object.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/OpenStruct": { | |
| "title": "Performance/OpenStruct", | |
| "description": "Use `Struct` instead of `OpenStruct`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/RangeInclude": { | |
| "title": "Performance/RangeInclude", | |
| "description": "Use `Range#cover?` instead of `Range#include?` (or `Range#member?`).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/IoReadlines": { | |
| "title": "Performance/IoReadlines", | |
| "description": "Use `IO.each_line` (`IO#each_line`) instead of `IO.readlines` (`IO#readlines`).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/RedundantBlockCall": { | |
| "title": "Performance/RedundantBlockCall", | |
| "description": "Use `yield` instead of `block.call`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/RedundantEqualityComparisonBlock": { | |
| "title": "Performance/RedundantEqualityComparisonBlock", | |
| "description": "Checks for uses `Enumerable#all?`, `Enumerable#any?`, `Enumerable#one?`, or `Enumerable#none?` are compared with `===` or similar methods in block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowRegexpMatch": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/RedundantMatch": { | |
| "title": "Performance/RedundantMatch", | |
| "description": "Use `=~` instead of `String#match` or `Regexp#match` in a context where the returned `MatchData` is not needed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/RedundantMerge": { | |
| "title": "Performance/RedundantMerge", | |
| "description": "Use Hash#[]=, rather than Hash#merge! with a single key-value pair.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MaxKeyValuePairs": { | |
| "type": "integer", | |
| "default": 2 | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/RedundantSortBlock": { | |
| "title": "Performance/RedundantSortBlock", | |
| "description": "Use `sort` instead of `sort { |a, b| a <=> b }`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/RedundantSplitRegexpArgument": { | |
| "title": "Performance/RedundantSplitRegexpArgument", | |
| "description": "Identifies places where `split` argument can be replaced from a deterministic regexp to a string.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/RedundantStringChars": { | |
| "title": "Performance/RedundantStringChars", | |
| "description": "Checks for redundant `String#chars`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/RegexpMatch": { | |
| "title": "Performance/RegexpMatch", | |
| "description": "Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`, `Regexp#===`, or `=~` when `MatchData` is not used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/ReverseEach": { | |
| "title": "Performance/ReverseEach", | |
| "description": "Use `reverse_each` instead of `reverse.each`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/ReverseFirst": { | |
| "title": "Performance/ReverseFirst", | |
| "description": "Use `last(n).reverse` instead of `reverse.first(n)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/SelectMap": { | |
| "title": "Performance/SelectMap", | |
| "description": "Use `filter_map` instead of `ary.select(&:foo).map(&:bar)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/Size": { | |
| "title": "Performance/Size", | |
| "description": "Use `size` instead of `count` for counting the number of elements in `Array` and `Hash`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/SortReverse": { | |
| "title": "Performance/SortReverse", | |
| "description": "Use `sort.reverse` instead of `sort { |a, b| b <=> a }`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/Squeeze": { | |
| "title": "Performance/Squeeze", | |
| "description": "Use `squeeze('a')` instead of `gsub(/a+/, 'a')`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/StartWith": { | |
| "title": "Performance/StartWith", | |
| "description": "Use `start_with?` instead of a regex match anchored to the beginning of a string.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "SafeMultiline": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/StringIdentifierArgument": { | |
| "title": "Performance/StringIdentifierArgument", | |
| "description": "Use symbol identifier argument instead of string identifier argument.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/StringInclude": { | |
| "title": "Performance/StringInclude", | |
| "description": "Use `String#include?` instead of a regex match with literal-only pattern.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/StringReplacement": { | |
| "title": "Performance/StringReplacement", | |
| "description": "Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/Sum": { | |
| "title": "Performance/Sum", | |
| "description": "Use `sum` instead of a custom array summation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "OnlySumOrWithInitialValue": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/TimesMap": { | |
| "title": "Performance/TimesMap", | |
| "description": "Checks for .times.map calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/UnfreezeString": { | |
| "title": "Performance/UnfreezeString", | |
| "description": "Use unary plus to get an unfrozen string literal.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/UriDefaultParser": { | |
| "title": "Performance/UriDefaultParser", | |
| "description": "Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Performance/ChainArrayAllocation": { | |
| "title": "Performance/ChainArrayAllocation", | |
| "description": "Instead of chaining array methods that allocate new arrays, mutate an existing array.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ActionControllerFlashBeforeRender": { | |
| "title": "Rails/ActionControllerFlashBeforeRender", | |
| "description": "Use `flash.now` instead of `flash` before `render`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ActionControllerTestCase": { | |
| "title": "Rails/ActionControllerTestCase", | |
| "description": "Use `ActionDispatch::IntegrationTest` instead of `ActionController::TestCase`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/test/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ActionFilter": { | |
| "title": "Rails/ActionFilter", | |
| "description": "Enforces consistent use of action filter methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "action", | |
| "filter" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "action", | |
| "filter" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "action" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/controllers/**/*.rb", | |
| "app/mailers/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ActionOrder": { | |
| "title": "Rails/ActionOrder", | |
| "description": "Enforce consistent ordering of controller actions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "ExpectedOrder": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "index", | |
| "show", | |
| "new", | |
| "edit", | |
| "create", | |
| "update", | |
| "destroy" | |
| ] | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/controllers/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ActiveRecordAliases": { | |
| "title": "Rails/ActiveRecordAliases", | |
| "description": "Avoid Active Record aliases: Use `update` instead of `update_attributes`. Use `update!` instead of `update_attributes!`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ActiveRecordCallbacksOrder": { | |
| "title": "Rails/ActiveRecordCallbacksOrder", | |
| "description": "Order callback declarations in the order in which they will be executed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ActiveRecordOverride": { | |
| "title": "Rails/ActiveRecordOverride", | |
| "description": "Check for overriding Active Record methods instead of using callbacks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ActiveSupportAliases": { | |
| "title": "Rails/ActiveSupportAliases", | |
| "description": "Avoid ActiveSupport aliases of standard ruby methods: `String#starts_with?`, `String#ends_with?`, `Array#append`, `Array#prepend`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ActiveSupportOnLoad": { | |
| "title": "Rails/ActiveSupportOnLoad", | |
| "description": "Use `ActiveSupport.on_load(...)` to patch Rails framework classes.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/AddColumnIndex": { | |
| "title": "Rails/AddColumnIndex", | |
| "description": "Rails migrations don't make use of a given `index` key, but also doesn't given an error when it's used, so it makes it seem like an index might be used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "db/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/AfterCommitOverride": { | |
| "title": "Rails/AfterCommitOverride", | |
| "description": "Enforces that there is only one call to `after_commit` (and its aliases - `after_create_commit`, `after_update_commit`, and `after_destroy_commit`) with the same callback name per model.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ApplicationController": { | |
| "title": "Rails/ApplicationController", | |
| "description": "Check that controllers subclass ApplicationController.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ApplicationJob": { | |
| "title": "Rails/ApplicationJob", | |
| "description": "Check that jobs subclass ApplicationJob.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ApplicationMailer": { | |
| "title": "Rails/ApplicationMailer", | |
| "description": "Check that mailers subclass ApplicationMailer.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ApplicationRecord": { | |
| "title": "Rails/ApplicationRecord", | |
| "description": "Check that models subclass ApplicationRecord.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ArelStar": { | |
| "title": "Rails/ArelStar", | |
| "description": "Enforces `Arel.star` instead of `\"*\"` for expanded columns.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/AssertNot": { | |
| "title": "Rails/AssertNot", | |
| "description": "Use `assert_not` instead of `assert !`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/test/**/*" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/AttributeDefaultBlockValue": { | |
| "title": "Rails/AttributeDefaultBlockValue", | |
| "description": "Pass method call in block for attribute option `default`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/BelongsTo": { | |
| "title": "Rails/BelongsTo", | |
| "description": "Use `optional: true` instead of `required: false` for `belongs_to` relations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Blank": { | |
| "title": "Rails/Blank", | |
| "description": "Enforces use of `blank?`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "NilOrEmpty": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "NotPresent": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "UnlessPresent": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/BulkChangeTable": { | |
| "title": "Rails/BulkChangeTable", | |
| "description": "Check whether alter queries are combinable.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Database": { | |
| "type": "string", | |
| "enum": [ | |
| "mysql", | |
| "postgresql" | |
| ] | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "db/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/CompactBlank": { | |
| "title": "Rails/CompactBlank", | |
| "description": "Checks if collection can be blank-compacted with `compact_blank`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ContentTag": { | |
| "title": "Rails/ContentTag", | |
| "description": "Use `tag.something` instead of `tag(:something)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/CreateTableWithTimestamps": { | |
| "title": "Rails/CreateTableWithTimestamps", | |
| "description": "Checks the migration for which timestamps are not included when creating a new table.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "db/**/*.rb" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/DangerousColumnNames": { | |
| "title": "Rails/DangerousColumnNames", | |
| "description": "Avoid dangerous column names.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "db/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Date": { | |
| "title": "Rails/Date", | |
| "description": "Checks the correct usage of date aware methods, such as Date.today, Date.current etc.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "strict", | |
| "flexible" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "strict", | |
| "flexible" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "flexible" | |
| }, | |
| "AllowToTime": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/DefaultScope": { | |
| "title": "Rails/DefaultScope", | |
| "description": "Avoid use of `default_scope`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Delegate": { | |
| "title": "Rails/Delegate", | |
| "description": "Prefer delegate method for delegations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforceForPrefixed": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/DelegateAllowBlank": { | |
| "title": "Rails/DelegateAllowBlank", | |
| "description": "Do not use allow_blank as an option to delegate.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/DeprecatedActiveModelErrorsMethods": { | |
| "title": "Rails/DeprecatedActiveModelErrorsMethods", | |
| "description": "Avoid manipulating ActiveModel errors hash directly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/DotSeparatedKeys": { | |
| "title": "Rails/DotSeparatedKeys", | |
| "description": "Enforces the use of dot-separated keys instead of `:scope` options in `I18n` translation methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/DuplicateAssociation": { | |
| "title": "Rails/DuplicateAssociation", | |
| "description": "Don't repeat associations in a model.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/DuplicateScope": { | |
| "title": "Rails/DuplicateScope", | |
| "description": "Multiple scopes share this same where clause.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/DurationArithmetic": { | |
| "title": "Rails/DurationArithmetic", | |
| "description": "Do not use duration as arithmetic operand with `Time.current`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/DynamicFindBy": { | |
| "title": "Rails/DynamicFindBy", | |
| "description": "Use `find_by` instead of dynamic `find_by_*`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Whitelist": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "find_by_sql", | |
| "find_by_token_for" | |
| ] | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "find_by_sql", | |
| "find_by_token_for" | |
| ] | |
| }, | |
| "AllowedReceivers": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "Gem::Specification", | |
| "page" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/EagerEvaluationLogMessage": { | |
| "title": "Rails/EagerEvaluationLogMessage", | |
| "description": "Checks that blocks are used for interpolated strings passed to `Rails.logger.debug`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/EnumHash": { | |
| "title": "Rails/EnumHash", | |
| "description": "Prefer hash syntax over array syntax when defining enums.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/EnumUniqueness": { | |
| "title": "Rails/EnumUniqueness", | |
| "description": "Avoid duplicate integers in hash-syntax `enum` declaration.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/EnvLocal": { | |
| "title": "Rails/EnvLocal", | |
| "description": "Use `Rails.env.local?` instead of `Rails.env.development? || Rails.env.test?`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/EnvironmentComparison": { | |
| "title": "Rails/EnvironmentComparison", | |
| "description": "Favor `Rails.env.production?` over `Rails.env == 'production'`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/EnvironmentVariableAccess": { | |
| "title": "Rails/EnvironmentVariableAccess", | |
| "description": "Do not access `ENV` directly after initialization.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/**/*.rb", | |
| "lib/**/*.rb" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AllowReads": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AllowWrites": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Exit": { | |
| "title": "Rails/Exit", | |
| "description": "Favor `fail`, `break`, `return`, etc. over `exit` in application or library code outside of Rake files to avoid exits during unit testing or running in production.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/**/*.rb", | |
| "config/**/*.rb", | |
| "lib/**/*.rb" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ExpandedDateRange": { | |
| "title": "Rails/ExpandedDateRange", | |
| "description": "Checks for expanded date range.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/FilePath": { | |
| "title": "Rails/FilePath", | |
| "description": "Use `Rails.root.join` for file path joining.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "slashes", | |
| "arguments" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "slashes", | |
| "arguments" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "slashes" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/FindBy": { | |
| "title": "Rails/FindBy", | |
| "description": "Prefer find_by over where.first.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "IgnoreWhereFirst": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/FindById": { | |
| "title": "Rails/FindById", | |
| "description": "Favor the use of `find` over `where.take!`, `find_by!`, and `find_by_id!` when you need to retrieve a single record by primary key when you expect it to be found.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/FindEach": { | |
| "title": "Rails/FindEach", | |
| "description": "Prefer all.find_each over all.each.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "order", | |
| "limit", | |
| "select", | |
| "lock" | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/FreezeTime": { | |
| "title": "Rails/FreezeTime", | |
| "description": "Prefer `freeze_time` over `travel_to` with an argument of the current time.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/HasAndBelongsToMany": { | |
| "title": "Rails/HasAndBelongsToMany", | |
| "description": "Prefer has_many :through to has_and_belongs_to_many.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/HasManyOrHasOneDependent": { | |
| "title": "Rails/HasManyOrHasOneDependent", | |
| "description": "Define the dependent option to the has_many and has_one associations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/HelperInstanceVariable": { | |
| "title": "Rails/HelperInstanceVariable", | |
| "description": "Do not use instance variables in helpers.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/helpers/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/HttpPositionalArguments": { | |
| "title": "Rails/HttpPositionalArguments", | |
| "description": "Use keyword arguments instead of positional arguments in http method calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "spec/**/*", | |
| "test/**/*" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/HttpStatus": { | |
| "title": "Rails/HttpStatus", | |
| "description": "Enforces use of symbolic or numeric value to define HTTP status.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "numeric", | |
| "symbolic" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "numeric", | |
| "symbolic" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "symbolic" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/I18nLazyLookup": { | |
| "title": "Rails/I18nLazyLookup", | |
| "description": "Checks for places where I18n \"lazy\" lookup can be used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "lazy", | |
| "explicit" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "lazy", | |
| "explicit" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "lazy" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/controllers/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/I18nLocaleAssignment": { | |
| "title": "Rails/I18nLocaleAssignment", | |
| "description": "Prefer the usage of `I18n.with_locale` instead of manually updating `I18n.locale` value.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "spec/**/*.rb", | |
| "test/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/I18nLocaleTexts": { | |
| "title": "Rails/I18nLocaleTexts", | |
| "description": "Enforces use of I18n and locale files instead of locale specific strings.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/IgnoredColumnsAssignment": { | |
| "title": "Rails/IgnoredColumnsAssignment", | |
| "description": "Looks for assignments of `ignored_columns` that override previous assignments.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/IgnoredSkipActionFilterOption": { | |
| "title": "Rails/IgnoredSkipActionFilterOption", | |
| "description": "Checks that `if` and `only` (or `except`) are not used together as options of `skip_*` action filter.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/controllers/**/*.rb", | |
| "app/mailers/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/IndexBy": { | |
| "title": "Rails/IndexBy", | |
| "description": "Prefer `index_by` over `each_with_object`, `to_h`, or `map`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/IndexWith": { | |
| "title": "Rails/IndexWith", | |
| "description": "Prefer `index_with` over `each_with_object`, `to_h`, or `map`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Inquiry": { | |
| "title": "Rails/Inquiry", | |
| "description": "Prefer Ruby's comparison operators over Active Support's `Array#inquiry` and `String#inquiry`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/InverseOf": { | |
| "title": "Rails/InverseOf", | |
| "description": "Checks for associations where the inverse cannot be determined automatically.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "IgnoreScopes": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/LexicallyScopedActionFilter": { | |
| "title": "Rails/LexicallyScopedActionFilter", | |
| "description": "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the class.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/controllers/**/*.rb", | |
| "app/mailers/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/LinkToBlank": { | |
| "title": "Rails/LinkToBlank", | |
| "description": "Checks that `link_to` with a `target: \"_blank\"` have a `rel: \"noopener\"` option passed to them.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/MailerName": { | |
| "title": "Rails/MailerName", | |
| "description": "Mailer should end with `Mailer` suffix.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/mailers/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/MatchRoute": { | |
| "title": "Rails/MatchRoute", | |
| "description": "Don't use `match` to define any routes unless there is a need to map multiple request types among [:get, :post, :patch, :put, :delete] to a single action using the `:via` option.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "config/routes.rb", | |
| "config/routes/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/MigrationClassName": { | |
| "title": "Rails/MigrationClassName", | |
| "description": "The class name of the migration should match its file name.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "db/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/NegateInclude": { | |
| "title": "Rails/NegateInclude", | |
| "description": "Prefer `collection.exclude?(obj)` over `!collection.include?(obj)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/NotNullColumn": { | |
| "title": "Rails/NotNullColumn", | |
| "description": "Do not add a NOT NULL column without a default value.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Database": { | |
| "type": "string", | |
| "enum": [ | |
| "mysql" | |
| ] | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "db/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/OrderById": { | |
| "title": "Rails/OrderById", | |
| "description": "Do not use the `id` column for ordering. Use a timestamp column to order chronologically.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Output": { | |
| "title": "Rails/Output", | |
| "description": "Checks for calls to puts, print, etc.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/**/*.rb", | |
| "config/**/*.rb", | |
| "db/**/*.rb", | |
| "lib/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/OutputSafety": { | |
| "title": "Rails/OutputSafety", | |
| "description": "The use of `html_safe` or `raw` may be a security risk.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Pick": { | |
| "title": "Rails/Pick", | |
| "description": "Prefer `pick` over `pluck(...).first`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Pluck": { | |
| "title": "Rails/Pluck", | |
| "description": "Prefer `pluck` over `map { ... }`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/PluckId": { | |
| "title": "Rails/PluckId", | |
| "description": "Use `ids` instead of `pluck(:id)` or `pluck(primary_key)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/PluckInWhere": { | |
| "title": "Rails/PluckInWhere", | |
| "description": "Use `select` instead of `pluck` in `where` query methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "conservative", | |
| "aggressive" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "conservative", | |
| "aggressive" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "conservative" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/PluralizationGrammar": { | |
| "title": "Rails/PluralizationGrammar", | |
| "description": "Checks for incorrect grammar when using methods like `3.day.ago`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Presence": { | |
| "title": "Rails/Presence", | |
| "description": "Checks code that can be written more easily using `Object#presence` defined by Active Support.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Present": { | |
| "title": "Rails/Present", | |
| "description": "Enforces use of `present?`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "NotNilAndNotEmpty": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "NotBlank": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "UnlessBlank": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RakeEnvironment": { | |
| "title": "Rails/RakeEnvironment", | |
| "description": "Include `:environment` as a dependency for all Rake tasks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/Rakefile", | |
| "**/*.rake" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ReadWriteAttribute": { | |
| "title": "Rails/ReadWriteAttribute", | |
| "description": "Checks for read_attribute(:attr) and write_attribute(:attr, val).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RedundantActiveRecordAllMethod": { | |
| "title": "Rails/RedundantActiveRecordAllMethod", | |
| "description": "Detect redundant `all` used as a receiver for Active Record query methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowedReceivers": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "ActionMailer::Preview", | |
| "ActiveSupport::TimeZone" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RedundantAllowNil": { | |
| "title": "Rails/RedundantAllowNil", | |
| "description": "Finds redundant use of `allow_nil` when `allow_blank` is set to certain values in model validations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RedundantForeignKey": { | |
| "title": "Rails/RedundantForeignKey", | |
| "description": "Checks for associations where the `:foreign_key` option is redundant.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RedundantPresenceValidationOnBelongsTo": { | |
| "title": "Rails/RedundantPresenceValidationOnBelongsTo", | |
| "description": "Checks for redundant presence validation on belongs_to association.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RedundantReceiverInWithOptions": { | |
| "title": "Rails/RedundantReceiverInWithOptions", | |
| "description": "Checks for redundant receiver in `with_options`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RedundantTravelBack": { | |
| "title": "Rails/RedundantTravelBack", | |
| "description": "Checks for redundant `travel_back` calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "spec/**/*.rb", | |
| "test/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ReflectionClassName": { | |
| "title": "Rails/ReflectionClassName", | |
| "description": "Use a string for `class_name` option value in the definition of a reflection.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RefuteMethods": { | |
| "title": "Rails/RefuteMethods", | |
| "description": "Use `assert_not` methods instead of `refute` methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "assert_not", | |
| "refute" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "assert_not", | |
| "refute" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "assert_not" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/test/**/*" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RelativeDateConstant": { | |
| "title": "Rails/RelativeDateConstant", | |
| "description": "Do not assign relative date to constants.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RenderInline": { | |
| "title": "Rails/RenderInline", | |
| "description": "Prefer using a template over inline rendering.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RenderPlainText": { | |
| "title": "Rails/RenderPlainText", | |
| "description": "Prefer `render plain:` over `render text:`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "ContentTypeCompatibility": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RequestReferer": { | |
| "title": "Rails/RequestReferer", | |
| "description": "Use consistent syntax for request.referer.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "referer", | |
| "referrer" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "referer", | |
| "referrer" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "referer" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RequireDependency": { | |
| "title": "Rails/RequireDependency", | |
| "description": "Do not use `require_dependency` when running in Zeitwerk mode. `require_dependency` is for autoloading in classic mode.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ResponseParsedBody": { | |
| "title": "Rails/ResponseParsedBody", | |
| "description": "Prefer `response.parsed_body` to `JSON.parse(response.body)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "spec/controllers/**/*.rb", | |
| "spec/requests/**/*.rb", | |
| "test/controllers/**/*.rb", | |
| "test/integration/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ReversibleMigration": { | |
| "title": "Rails/ReversibleMigration", | |
| "description": "Checks whether the change method of the migration file is reversible.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "db/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ReversibleMigrationMethodDefinition": { | |
| "title": "Rails/ReversibleMigrationMethodDefinition", | |
| "description": "Checks whether the migration implements either a `change` method or both an `up` and a `down` method.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "db/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RootJoinChain": { | |
| "title": "Rails/RootJoinChain", | |
| "description": "Use a single `#join` instead of chaining on `Rails.root` or `Rails.public_path`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RootPathnameMethods": { | |
| "title": "Rails/RootPathnameMethods", | |
| "description": "Use `Rails.root` IO methods instead of passing it to `File`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/RootPublicPath": { | |
| "title": "Rails/RootPublicPath", | |
| "description": "Favor `Rails.public_path` over `Rails.root` with `'public'`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/SafeNavigation": { | |
| "title": "Rails/SafeNavigation", | |
| "description": "Use Ruby's safe navigation operator (`&.`) instead of `try!`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "ConvertTry": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/SafeNavigationWithBlank": { | |
| "title": "Rails/SafeNavigationWithBlank", | |
| "description": "Avoid `foo&.blank?` in conditionals.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/SaveBang": { | |
| "title": "Rails/SaveBang", | |
| "description": "Identifies possible cases where Active Record save! or related should be used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AllowImplicitReturn": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AllowedReceivers": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/SchemaComment": { | |
| "title": "Rails/SchemaComment", | |
| "description": "Enforces the use of the `comment` option when adding a new table or column to the database during a migration.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ScopeArgs": { | |
| "title": "Rails/ScopeArgs", | |
| "description": "Checks the arguments of ActiveRecord scopes.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/SelectMap": { | |
| "title": "Rails/SelectMap", | |
| "description": "Checks for uses of `select(:column_name)` with `map(&:column_name)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ShortI18n": { | |
| "title": "Rails/ShortI18n", | |
| "description": "Use the short form of the I18n methods: `t` instead of `translate` and `l` instead of `localize`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "conservative", | |
| "aggressive" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "conservative", | |
| "aggressive" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "conservative" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/SkipsModelValidations": { | |
| "title": "Rails/SkipsModelValidations", | |
| "description": "Use methods that skips model validations with caution. See reference for more information.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "ForbiddenMethods": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "decrement!", | |
| "decrement_counter", | |
| "increment!", | |
| "increment_counter", | |
| "insert", | |
| "insert!", | |
| "insert_all", | |
| "insert_all!", | |
| "toggle!", | |
| "touch", | |
| "touch_all", | |
| "update_all", | |
| "update_attribute", | |
| "update_column", | |
| "update_columns", | |
| "update_counters", | |
| "upsert", | |
| "upsert_all" | |
| ] | |
| }, | |
| "AllowedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/SquishedSQLHeredocs": { | |
| "title": "Rails/SquishedSQLHeredocs", | |
| "description": "Checks SQL heredocs to use `.squish`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/StripHeredoc": { | |
| "title": "Rails/StripHeredoc", | |
| "description": "Enforces the use of squiggly heredoc over `strip_heredoc`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/TableNameAssignment": { | |
| "title": "Rails/TableNameAssignment", | |
| "description": "Do not use `self.table_name =`. Use Inflections or `table_name_prefix` instead.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ThreeStateBooleanColumn": { | |
| "title": "Rails/ThreeStateBooleanColumn", | |
| "description": "Add a default value and a `NOT NULL` constraint to boolean columns.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "db/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/TimeZone": { | |
| "title": "Rails/TimeZone", | |
| "description": "Checks the correct usage of time zone aware methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "strict", | |
| "flexible" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "strict", | |
| "flexible" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "flexible" | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/TimeZoneAssignment": { | |
| "title": "Rails/TimeZoneAssignment", | |
| "description": "Prefer the usage of `Time.use_zone` instead of manually updating `Time.zone` value.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "spec/**/*.rb", | |
| "test/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ToFormattedS": { | |
| "title": "Rails/ToFormattedS", | |
| "description": "Checks for consistent uses of `to_fs` or `to_formatted_s`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "to_fs", | |
| "to_formatted_s" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "to_fs", | |
| "to_formatted_s" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "to_fs" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/ToSWithArgument": { | |
| "title": "Rails/ToSWithArgument", | |
| "description": "Identifies passing any argument to `#to_s`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/TopLevelHashWithIndifferentAccess": { | |
| "title": "Rails/TopLevelHashWithIndifferentAccess", | |
| "description": "Identifies top-level `HashWithIndifferentAccess`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/TransactionExitStatement": { | |
| "title": "Rails/TransactionExitStatement", | |
| "description": "Avoid the usage of `return`, `break` and `throw` in transaction blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "TransactionMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/UniqBeforePluck": { | |
| "title": "Rails/UniqBeforePluck", | |
| "description": "Prefer the use of uniq or distinct before pluck.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "conservative", | |
| "aggressive" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "conservative", | |
| "aggressive" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "conservative" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/UniqueValidationWithoutIndex": { | |
| "title": "Rails/UniqueValidationWithoutIndex", | |
| "description": "Uniqueness validation should have a unique index on the database column.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/UnknownEnv": { | |
| "title": "Rails/UnknownEnv", | |
| "description": "Use correct environment name.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "Environments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "development", | |
| "test", | |
| "production" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/UnusedIgnoredColumns": { | |
| "title": "Rails/UnusedIgnoredColumns", | |
| "description": "Remove a column that does not exist from `ignored_columns`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/UnusedRenderContent": { | |
| "title": "Rails/UnusedRenderContent", | |
| "description": "Do not specify body content for a response with a non-content status code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/Validation": { | |
| "title": "Rails/Validation", | |
| "description": "Use validates :attribute, hash of validations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "app/models/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/WhereEquals": { | |
| "title": "Rails/WhereEquals", | |
| "description": "Pass conditions to `where` as a hash instead of manually constructing SQL.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/WhereExists": { | |
| "title": "Rails/WhereExists", | |
| "description": "Prefer `exists?(...)` over `where(...).exists?`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "exists", | |
| "where" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "exists", | |
| "where" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "exists" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/WhereMissing": { | |
| "title": "Rails/WhereMissing", | |
| "description": "Use `where.missing(...)` to find missing relationship records.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/WhereNot": { | |
| "title": "Rails/WhereNot", | |
| "description": "Use `where.not(...)` instead of manually constructing negated SQL in `where`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rails/WhereNotWithMultipleConditions": { | |
| "title": "Rails/WhereNotWithMultipleConditions", | |
| "description": "Do not use `where.not(...)` with multiple conditions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/RSpec/HaveSelector": { | |
| "title": "Capybara/RSpec/HaveSelector", | |
| "description": "Use `have_css` or `have_xpath` instead of `have_selector`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "DefaultSelector": { | |
| "type": "string", | |
| "default": "css" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/RSpec/PredicateMatcher": { | |
| "title": "Capybara/RSpec/PredicateMatcher", | |
| "description": "Prefer using predicate matcher over using predicate method directly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Strict": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "inflected", | |
| "explicit" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "inflected", | |
| "explicit" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "inflected" | |
| }, | |
| "AllowedExplicitMatchers": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/ClickLinkOrButtonStyle": { | |
| "title": "Capybara/ClickLinkOrButtonStyle", | |
| "description": "Checks for click button or link style.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "strict", | |
| "link_or_button" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "strict", | |
| "link_or_button" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "strict" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/CurrentPathExpectation": { | |
| "title": "Capybara/CurrentPathExpectation", | |
| "description": "Checks that no expectations are set on Capybara's `current_path`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/MatchStyle": { | |
| "title": "Capybara/MatchStyle", | |
| "description": "Checks for usage of deprecated style methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/NegationMatcher": { | |
| "title": "Capybara/NegationMatcher", | |
| "description": "Enforces use of `have_no_*` or `not_to` for negated expectations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "have_no", | |
| "not_to" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "have_no", | |
| "not_to" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "not_to" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/SpecificActions": { | |
| "title": "Capybara/SpecificActions", | |
| "description": "Checks for there is a more specific actions offered by Capybara.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/SpecificFinders": { | |
| "title": "Capybara/SpecificFinders", | |
| "description": "Checks if there is a more specific finder offered by Capybara.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/SpecificMatcher": { | |
| "title": "Capybara/SpecificMatcher", | |
| "description": "Checks for there is a more specific matcher offered by Capybara.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Capybara/VisibilityMatcher": { | |
| "title": "Capybara/VisibilityMatcher", | |
| "description": "Checks for boolean visibility in Capybara finders.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/AssociationStyle": { | |
| "title": "FactoryBot/AssociationStyle", | |
| "description": "Use a consistent style to define associations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "explicit", | |
| "implicit" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "explicit", | |
| "implicit" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "implicit" | |
| }, | |
| "NonImplicitAssociationMethodNames": { | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/AttributeDefinedStatically": { | |
| "title": "FactoryBot/AttributeDefinedStatically", | |
| "description": "Always declare attribute values as blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/ConsistentParenthesesStyle": { | |
| "title": "FactoryBot/ConsistentParenthesesStyle", | |
| "description": "Use a consistent style for parentheses in factory_bot calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*_spec.rb", | |
| "**/spec/**/*", | |
| "**/test/**/*", | |
| "**/features/support/factories/**/*.rb" | |
| ] | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "omit_parentheses" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "require_parentheses", | |
| "omit_parentheses" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "require_parentheses" | |
| }, | |
| "ExplicitOnly": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/CreateList": { | |
| "title": "FactoryBot/CreateList", | |
| "description": "Checks for create_list usage.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*_spec.rb", | |
| "**/spec/**/*", | |
| "**/test/**/*", | |
| "**/features/support/factories/**/*.rb" | |
| ] | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "create_list", | |
| "n_times" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "create_list", | |
| "n_times" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "create_list" | |
| }, | |
| "ExplicitOnly": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/FactoryAssociationWithStrategy": { | |
| "title": "FactoryBot/FactoryAssociationWithStrategy", | |
| "description": "Use definition in factory association instead of hard coding a strategy.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*_spec.rb", | |
| "**/spec/**/*", | |
| "**/test/**/*", | |
| "**/features/support/factories/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/FactoryClassName": { | |
| "title": "FactoryBot/FactoryClassName", | |
| "description": "Use string value when setting the class attribute explicitly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/FactoryNameStyle": { | |
| "title": "FactoryBot/FactoryNameStyle", | |
| "description": "Checks for name style for argument of FactoryBot::Syntax::Methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*_spec.rb", | |
| "**/spec/**/*", | |
| "**/test/**/*", | |
| "**/features/support/factories/**/*.rb" | |
| ] | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "symbol", | |
| "string" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "symbol", | |
| "string" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "symbol" | |
| }, | |
| "ExplicitOnly": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/IdSequence": { | |
| "title": "FactoryBot/IdSequence", | |
| "description": "Do not create a FactoryBot sequence for an id column.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/RedundantFactoryOption": { | |
| "title": "FactoryBot/RedundantFactoryOption", | |
| "description": "Checks for redundant `factory` option.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*_spec.rb", | |
| "**/spec/**/*", | |
| "**/test/**/*", | |
| "**/features/support/factories/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "FactoryBot/SyntaxMethods": { | |
| "title": "FactoryBot/SyntaxMethods", | |
| "description": "Use shorthands from `FactoryBot::Syntax::Methods` in your specs.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*_spec.rb", | |
| "**/spec/**/*", | |
| "**/test/**/*", | |
| "**/features/support/factories/**/*.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Capybara/FeatureMethods": { | |
| "title": "RSpec/Capybara/FeatureMethods", | |
| "description": "Checks for consistent method usage in feature specs.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnabledMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Rails/AvoidSetupHook": { | |
| "title": "RSpec/Rails/AvoidSetupHook", | |
| "description": "Checks that tests use RSpec `before` hook over Rails `setup` method.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Rails/HaveHttpStatus": { | |
| "title": "RSpec/Rails/HaveHttpStatus", | |
| "description": "Checks that tests use `have_http_status` instead of equality matchers.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Rails/NegationBeValid": { | |
| "title": "RSpec/Rails/NegationBeValid", | |
| "description": "Enforces use of `be_invalid` or `not_to` for negated be_valid.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "not_to", | |
| "be_invalid" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "not_to", | |
| "be_invalid" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "not_to" | |
| }, | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Rails/HttpStatus": { | |
| "title": "RSpec/Rails/HttpStatus", | |
| "description": "Enforces use of symbolic or numeric value to describe HTTP status.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "numeric", | |
| "symbolic", | |
| "be_status" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "numeric", | |
| "symbolic", | |
| "be_status" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "symbolic" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Rails/InferredSpecType": { | |
| "title": "RSpec/Rails/InferredSpecType", | |
| "description": "Identifies redundant spec type.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Inferences": { | |
| "type": "object", | |
| "default": { | |
| "channels": "channel", | |
| "controllers": "controller", | |
| "features": "feature", | |
| "generator": "generator", | |
| "helpers": "helper", | |
| "jobs": "job", | |
| "mailboxes": "mailbox", | |
| "mailers": "mailer", | |
| "models": "model", | |
| "requests": "request", | |
| "integration": "request", | |
| "api": "request", | |
| "routing": "routing", | |
| "system": "system", | |
| "views": "view" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Rails/MinitestAssertions": { | |
| "title": "RSpec/Rails/MinitestAssertions", | |
| "description": "Check if using Minitest matchers.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Rails/TravelAround": { | |
| "title": "RSpec/Rails/TravelAround", | |
| "description": "Prefer to travel in `before` rather than `around`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/AlignLeftLetBrace": { | |
| "title": "RSpec/AlignLeftLetBrace", | |
| "description": "Checks that left braces for adjacent single line lets are aligned.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/AlignRightLetBrace": { | |
| "title": "RSpec/AlignRightLetBrace", | |
| "description": "Checks that right braces for adjacent single line lets are aligned.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/AnyInstance": { | |
| "title": "RSpec/AnyInstance", | |
| "description": "Check that instances are not being stubbed globally.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/AroundBlock": { | |
| "title": "RSpec/AroundBlock", | |
| "description": "Checks that around blocks actually run the test.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Be": { | |
| "title": "RSpec/Be", | |
| "description": "Check for expectations where `be` is used without argument.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/BeEmpty": { | |
| "title": "RSpec/BeEmpty", | |
| "description": "Prefer using `be_empty` when checking for an empty array.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/BeEq": { | |
| "title": "RSpec/BeEq", | |
| "description": "Check for expectations where `be(...)` can replace `eq(...)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/BeEql": { | |
| "title": "RSpec/BeEql", | |
| "description": "Check for expectations where `be(...)` can replace `eql(...)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/BeNil": { | |
| "title": "RSpec/BeNil", | |
| "description": "Ensures a consistent style is used when matching `nil`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "be", | |
| "be_nil" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "be", | |
| "be_nil" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "be_nil" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/BeforeAfterAll": { | |
| "title": "RSpec/BeforeAfterAll", | |
| "description": "Check that before/after(:all) isn't being used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ChangeByZero": { | |
| "title": "RSpec/ChangeByZero", | |
| "description": "Prefer negated matchers over `to change.by(0)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "NegatedMatcher": { | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ClassCheck": { | |
| "title": "RSpec/ClassCheck", | |
| "description": "Enforces consistent use of `be_a` or `be_kind_of`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "be_a", | |
| "be_kind_of" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "be_a", | |
| "be_kind_of" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "be_a" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ContainExactly": { | |
| "title": "RSpec/ContainExactly", | |
| "description": "Checks where `contain_exactly` is used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ContextMethod": { | |
| "title": "RSpec/ContextMethod", | |
| "description": "`context` should not be used for specifying methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ContextWording": { | |
| "title": "RSpec/ContextWording", | |
| "description": "Checks that `context` docstring starts with an allowed prefix.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Prefixes": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "when", | |
| "with", | |
| "without" | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/DescribeClass": { | |
| "title": "RSpec/DescribeClass", | |
| "description": "Check that the first argument to the top-level describe is a constant.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "IgnoredMetadata": { | |
| "type": "object", | |
| "default": { | |
| "type": [ | |
| "channel", | |
| "controller", | |
| "helper", | |
| "job", | |
| "mailer", | |
| "model", | |
| "request", | |
| "routing", | |
| "view", | |
| "feature", | |
| "system", | |
| "mailbox", | |
| "aruba", | |
| "task" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/DescribeMethod": { | |
| "title": "RSpec/DescribeMethod", | |
| "description": "Checks that the second argument to `describe` specifies a method.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/DescribeSymbol": { | |
| "title": "RSpec/DescribeSymbol", | |
| "description": "Avoid describing symbols.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/DescribedClass": { | |
| "title": "RSpec/DescribedClass", | |
| "description": "Checks that tests use `described_class`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "SkipBlocks": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "described_class", | |
| "explicit" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "described_class", | |
| "explicit" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "described_class" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/DescribedClassModuleWrapping": { | |
| "title": "RSpec/DescribedClassModuleWrapping", | |
| "description": "Avoid opening modules and defining specs within them.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Dialect": { | |
| "title": "RSpec/Dialect", | |
| "description": "Enforces custom RSpec dialects.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "PreferredMethods": { | |
| "type": "object", | |
| "default": { | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/DuplicatedMetadata": { | |
| "title": "RSpec/DuplicatedMetadata", | |
| "description": "Avoid duplicated metadata.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/EmptyExampleGroup": { | |
| "title": "RSpec/EmptyExampleGroup", | |
| "description": "Checks if an example group does not include any tests.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/EmptyHook": { | |
| "title": "RSpec/EmptyHook", | |
| "description": "Checks for empty before and after hooks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/EmptyLineAfterExample": { | |
| "title": "RSpec/EmptyLineAfterExample", | |
| "description": "Checks if there is an empty line after example blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowConsecutiveOneLiners": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/EmptyLineAfterExampleGroup": { | |
| "title": "RSpec/EmptyLineAfterExampleGroup", | |
| "description": "Checks if there is an empty line after example group blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/EmptyLineAfterFinalLet": { | |
| "title": "RSpec/EmptyLineAfterFinalLet", | |
| "description": "Checks if there is an empty line after the last let block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/EmptyLineAfterHook": { | |
| "title": "RSpec/EmptyLineAfterHook", | |
| "description": "Checks if there is an empty line after hook blocks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowConsecutiveOneLiners": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/EmptyLineAfterSubject": { | |
| "title": "RSpec/EmptyLineAfterSubject", | |
| "description": "Checks if there is an empty line after subject block.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/EmptyMetadata": { | |
| "title": "RSpec/EmptyMetadata", | |
| "description": "Avoid empty metadata hash.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Eq": { | |
| "title": "RSpec/Eq", | |
| "description": "Use `eq` instead of `be ==` to compare objects.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ExampleLength": { | |
| "title": "RSpec/ExampleLength", | |
| "description": "Checks for long examples.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 5 | |
| }, | |
| "CountAsOne": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ExampleWithoutDescription": { | |
| "title": "RSpec/ExampleWithoutDescription", | |
| "description": "Checks for examples without a description.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "always_allow", | |
| "single_line_only", | |
| "disallow" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "always_allow", | |
| "single_line_only", | |
| "disallow" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "always_allow" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ExampleWording": { | |
| "title": "RSpec/ExampleWording", | |
| "description": "Checks for common mistakes in example descriptions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "CustomTransform": { | |
| "type": "object", | |
| "default": { | |
| "be": "is", | |
| "BE": "IS", | |
| "have": "has", | |
| "HAVE": "HAS" | |
| } | |
| }, | |
| "IgnoredWords": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "DisallowedExamples": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "works" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ExcessiveDocstringSpacing": { | |
| "title": "RSpec/ExcessiveDocstringSpacing", | |
| "description": "Checks for excessive whitespace in example descriptions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ExpectActual": { | |
| "title": "RSpec/ExpectActual", | |
| "description": "Checks for `expect(...)` calls containing literal values.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ExpectChange": { | |
| "title": "RSpec/ExpectChange", | |
| "description": "Checks for consistent style of change matcher.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "method_call", | |
| "block" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "method_call", | |
| "block" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "method_call" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ExpectInHook": { | |
| "title": "RSpec/ExpectInHook", | |
| "description": "Do not use `expect` in hooks such as `before`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ExpectOutput": { | |
| "title": "RSpec/ExpectOutput", | |
| "description": "Checks for opportunities to use `expect { ... }.to output`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/FilePath": { | |
| "title": "RSpec/FilePath", | |
| "description": "Checks that spec file paths are consistent and well-formed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*_spec*rb*", | |
| "**/spec/**/*" | |
| ] | |
| }, | |
| "CustomTransform": { | |
| "type": "object", | |
| "default": { | |
| "RuboCop": "rubocop", | |
| "RSpec": "rspec" | |
| } | |
| }, | |
| "IgnoreMethods": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "SpecSuffixOnly": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Focus": { | |
| "title": "RSpec/Focus", | |
| "description": "Checks if examples are focused.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/HookArgument": { | |
| "title": "RSpec/HookArgument", | |
| "description": "Checks the arguments passed to `before`, `around`, and `after`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "implicit", | |
| "each", | |
| "example" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "implicit", | |
| "each", | |
| "example" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "implicit" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/HooksBeforeExamples": { | |
| "title": "RSpec/HooksBeforeExamples", | |
| "description": "Checks for before/around/after hooks that come after an example.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/IdenticalEqualityAssertion": { | |
| "title": "RSpec/IdenticalEqualityAssertion", | |
| "description": "Checks for equality assertions with identical expressions on both sides.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ImplicitBlockExpectation": { | |
| "title": "RSpec/ImplicitBlockExpectation", | |
| "description": "Check that implicit block expectation syntax is not used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ImplicitExpect": { | |
| "title": "RSpec/ImplicitExpect", | |
| "description": "Check that a consistent implicit expectation style is used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "is_expected", | |
| "should" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "is_expected", | |
| "should" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "is_expected" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ImplicitSubject": { | |
| "title": "RSpec/ImplicitSubject", | |
| "description": "Checks for usage of implicit subject (`is_expected` / `should`).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "single_line_only", | |
| "single_statement_only", | |
| "disallow", | |
| "require_implicit" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "single_line_only", | |
| "single_statement_only", | |
| "disallow", | |
| "require_implicit" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "single_line_only" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/IndexedLet": { | |
| "title": "RSpec/IndexedLet", | |
| "description": "Do not set up test data using indexes (e.g., `item_1`, `item_2`).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 1 | |
| }, | |
| "AllowedIdentifiers": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/InstanceSpy": { | |
| "title": "RSpec/InstanceSpy", | |
| "description": "Checks for `instance_double` used with `have_received`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/InstanceVariable": { | |
| "title": "RSpec/InstanceVariable", | |
| "description": "Checks for instance variable usage in specs.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AssignmentOnly": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ItBehavesLike": { | |
| "title": "RSpec/ItBehavesLike", | |
| "description": "Checks that only one `it_behaves_like` style is used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "it_behaves_like", | |
| "it_should_behave_like" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "it_behaves_like", | |
| "it_should_behave_like" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "it_behaves_like" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/IteratedExpectation": { | |
| "title": "RSpec/IteratedExpectation", | |
| "description": "Check that `all` matcher is used instead of iterating over an array.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/LeadingSubject": { | |
| "title": "RSpec/LeadingSubject", | |
| "description": "Enforce that subject is the first definition in the test.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/LeakyConstantDeclaration": { | |
| "title": "RSpec/LeakyConstantDeclaration", | |
| "description": "Checks that no class, module, or constant is declared.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/LetBeforeExamples": { | |
| "title": "RSpec/LetBeforeExamples", | |
| "description": "Checks for `let` definitions that come after an example.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/LetSetup": { | |
| "title": "RSpec/LetSetup", | |
| "description": "Checks unreferenced `let!` calls being used for test setup.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MatchArray": { | |
| "title": "RSpec/MatchArray", | |
| "description": "Checks where `match_array` is used.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MessageChain": { | |
| "title": "RSpec/MessageChain", | |
| "description": "Check that chains of messages are not being stubbed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MessageExpectation": { | |
| "title": "RSpec/MessageExpectation", | |
| "description": "Checks for consistent message expectation style.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "allow", | |
| "expect" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "allow", | |
| "expect" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "allow" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MessageSpies": { | |
| "title": "RSpec/MessageSpies", | |
| "description": "Checks that message expectations are set using spies.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "have_received", | |
| "receive" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "have_received", | |
| "receive" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "have_received" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MetadataStyle": { | |
| "title": "RSpec/MetadataStyle", | |
| "description": "Use consistent metadata style.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "hash", | |
| "symbol" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "hash", | |
| "symbol" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "symbol" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MissingExampleGroupArgument": { | |
| "title": "RSpec/MissingExampleGroupArgument", | |
| "description": "Checks that the first argument to an example group is not empty.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MultipleDescribes": { | |
| "title": "RSpec/MultipleDescribes", | |
| "description": "Checks for multiple top-level example groups.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MultipleExpectations": { | |
| "title": "RSpec/MultipleExpectations", | |
| "description": "Checks if examples contain too many `expect` calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 1 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MultipleMemoizedHelpers": { | |
| "title": "RSpec/MultipleMemoizedHelpers", | |
| "description": "Checks if example groups contain too many `let` and `subject` calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowSubject": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 5 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/MultipleSubjects": { | |
| "title": "RSpec/MultipleSubjects", | |
| "description": "Checks if an example group defines `subject` multiple times.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/NamedSubject": { | |
| "title": "RSpec/NamedSubject", | |
| "description": "Checks for explicitly referenced test subjects.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "always", | |
| "named_only" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "always", | |
| "named_only" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "always" | |
| }, | |
| "IgnoreSharedExamples": { | |
| "type": "boolean", | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/NestedGroups": { | |
| "title": "RSpec/NestedGroups", | |
| "description": "Checks for nested example groups.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 3 | |
| }, | |
| "AllowedGroups": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/NoExpectationExample": { | |
| "title": "RSpec/NoExpectationExample", | |
| "description": "Checks if an example contains any expectation.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| "^expect_", | |
| "^assert_" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/NotToNot": { | |
| "title": "RSpec/NotToNot", | |
| "description": "Checks for consistent method usage for negating expectations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "not_to", | |
| "to_not" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "not_to", | |
| "to_not" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "not_to" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/OverwritingSetup": { | |
| "title": "RSpec/OverwritingSetup", | |
| "description": "Checks if there is a let/subject that overwrites an existing one.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Pending": { | |
| "title": "RSpec/Pending", | |
| "description": "Checks for any pending or skipped examples.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/PendingWithoutReason": { | |
| "title": "RSpec/PendingWithoutReason", | |
| "description": "Checks for pending or skipped examples without reason.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/PredicateMatcher": { | |
| "title": "RSpec/PredicateMatcher", | |
| "description": "Prefer using predicate matcher over using predicate method directly.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Strict": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "inflected", | |
| "explicit" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "inflected", | |
| "explicit" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "inflected" | |
| }, | |
| "AllowedExplicitMatchers": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ReceiveCounts": { | |
| "title": "RSpec/ReceiveCounts", | |
| "description": "Check for `once` and `twice` receive counts matchers usage.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ReceiveMessages": { | |
| "title": "RSpec/ReceiveMessages", | |
| "description": "Checks for multiple messages stubbed on the same object.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ReceiveNever": { | |
| "title": "RSpec/ReceiveNever", | |
| "description": "Prefer `not_to receive(...)` over `receive(...).never`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/RedundantAround": { | |
| "title": "RSpec/RedundantAround", | |
| "description": "Remove redundant `around` hook.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/RepeatedDescription": { | |
| "title": "RSpec/RepeatedDescription", | |
| "description": "Check for repeated description strings in example groups.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/RepeatedExample": { | |
| "title": "RSpec/RepeatedExample", | |
| "description": "Check for repeated examples within example groups.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/RepeatedExampleGroupBody": { | |
| "title": "RSpec/RepeatedExampleGroupBody", | |
| "description": "Check for repeated describe and context block body.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/RepeatedExampleGroupDescription": { | |
| "title": "RSpec/RepeatedExampleGroupDescription", | |
| "description": "Check for repeated example group descriptions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/RepeatedIncludeExample": { | |
| "title": "RSpec/RepeatedIncludeExample", | |
| "description": "Check for repeated include of shared examples.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ReturnFromStub": { | |
| "title": "RSpec/ReturnFromStub", | |
| "description": "Checks for consistent style of stub's return setting.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "and_return", | |
| "block" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "and_return", | |
| "block" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "and_return" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ScatteredLet": { | |
| "title": "RSpec/ScatteredLet", | |
| "description": "Checks for let scattered across the example group.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/ScatteredSetup": { | |
| "title": "RSpec/ScatteredSetup", | |
| "description": "Checks for setup scattered across multiple hooks in an example group.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/SharedContext": { | |
| "title": "RSpec/SharedContext", | |
| "description": "Checks for proper shared_context and shared_examples usage.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/SharedExamples": { | |
| "title": "RSpec/SharedExamples", | |
| "description": "Enforces use of string to titleize shared examples.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/SingleArgumentMessageChain": { | |
| "title": "RSpec/SingleArgumentMessageChain", | |
| "description": "Checks that chains of messages contain more than one element.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/SkipBlockInsideExample": { | |
| "title": "RSpec/SkipBlockInsideExample", | |
| "description": "Checks for passing a block to `skip` within examples.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/SortMetadata": { | |
| "title": "RSpec/SortMetadata", | |
| "description": "Sort RSpec metadata alphabetically.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/SpecFilePathFormat": { | |
| "title": "RSpec/SpecFilePathFormat", | |
| "description": "Checks that spec file paths are consistent and well-formed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*_spec.rb" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "CustomTransform": { | |
| "type": "object", | |
| "default": { | |
| "RuboCop": "rubocop", | |
| "RSpec": "rspec" | |
| } | |
| }, | |
| "IgnoreMethods": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "IgnoreMetadata": { | |
| "type": "object", | |
| "default": { | |
| "type": "routing" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/SpecFilePathSuffix": { | |
| "title": "RSpec/SpecFilePathSuffix", | |
| "description": "Checks that spec file paths suffix are consistent and well-formed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*_spec*rb*", | |
| "**/spec/**/*" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/StubbedMock": { | |
| "title": "RSpec/StubbedMock", | |
| "description": "Checks that message expectations do not have a configured response.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/SubjectDeclaration": { | |
| "title": "RSpec/SubjectDeclaration", | |
| "description": "Ensure that subject is defined using subject helper.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/SubjectStub": { | |
| "title": "RSpec/SubjectStub", | |
| "description": "Checks for stubbed test subjects.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/UnspecifiedException": { | |
| "title": "RSpec/UnspecifiedException", | |
| "description": "Checks for a specified error in checking raised errors.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/VariableDefinition": { | |
| "title": "RSpec/VariableDefinition", | |
| "description": "Checks that memoized helpers names are symbols or strings.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "symbols", | |
| "strings" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "symbols", | |
| "strings" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "symbols" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/VariableName": { | |
| "title": "RSpec/VariableName", | |
| "description": "Checks that memoized helper names use the configured style.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "camelCase" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "snake_case", | |
| "camelCase" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "snake_case" | |
| }, | |
| "AllowedPatterns": { | |
| "type": "array", | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/VerifiedDoubleReference": { | |
| "title": "RSpec/VerifiedDoubleReference", | |
| "description": "Checks for consistent verified double reference style.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "constant", | |
| "string" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "constant", | |
| "string" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "constant" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/VerifiedDoubles": { | |
| "title": "RSpec/VerifiedDoubles", | |
| "description": "Prefer using verifying doubles over normal doubles.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "IgnoreNameless": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "IgnoreSymbolicNames": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/VoidExpect": { | |
| "title": "RSpec/VoidExpect", | |
| "description": "Checks void `expect()`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "RSpec/Yield": { | |
| "title": "RSpec/Yield", | |
| "description": "Checks for calling a block within a stub.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertEmpty": { | |
| "title": "Minitest/AssertEmpty", | |
| "description": "This cop enforces the test to use `assert_empty` instead of using `assert(object.empty?)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertEmptyLiteral": { | |
| "title": "Minitest/AssertEmptyLiteral", | |
| "description": "This cop enforces the test to use `assert_empty` instead of using `assert_equal([], object)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertEqual": { | |
| "title": "Minitest/AssertEqual", | |
| "description": "This cop enforces the test to use `assert_equal` instead of using `assert(expected == actual)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertInDelta": { | |
| "title": "Minitest/AssertInDelta", | |
| "description": "This cop enforces the test to use `assert_in_delta` instead of using `assert_equal` to compare floats.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertOperator": { | |
| "title": "Minitest/AssertOperator", | |
| "description": "This cop enforces the use of `assert_operator(expected, :<, actual)` over `assert(expected < actual)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertPredicate": { | |
| "title": "Minitest/AssertPredicate", | |
| "description": "This cop enforces the test to use `assert_predicate` instead of using `assert(obj.a_predicate_method?)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertRaisesCompoundBody": { | |
| "title": "Minitest/AssertRaisesCompoundBody", | |
| "description": "This cop enforces the block body of `assert_raises { ... }` to be reduced to only the raising code.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertRaisesWithRegexpArgument": { | |
| "title": "Minitest/AssertRaisesWithRegexpArgument", | |
| "description": "This cop enforces checks for regular expression literals passed to `assert_raises`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertWithExpectedArgument": { | |
| "title": "Minitest/AssertWithExpectedArgument", | |
| "description": "This cop tries to detect when a user accidentally used `assert` when they meant to use `assert_equal`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertionInLifecycleHook": { | |
| "title": "Minitest/AssertionInLifecycleHook", | |
| "description": "This cop checks for usage of assertions in lifecycle hooks.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertKindOf": { | |
| "title": "Minitest/AssertKindOf", | |
| "description": "This cop enforces the test to use `assert_kind_of(Class, object)` over `assert(object.kind_of?(Class))`", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertNil": { | |
| "title": "Minitest/AssertNil", | |
| "description": "This cop enforces the test to use `assert_nil` instead of using `assert_equal(nil, something)` or `assert(something.nil?)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertIncludes": { | |
| "title": "Minitest/AssertIncludes", | |
| "description": "This cop enforces the test to use `assert_includes` instead of using `assert(collection.include?(object))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertInstanceOf": { | |
| "title": "Minitest/AssertInstanceOf", | |
| "description": "This cop enforces the test to use `assert_instance_of(Class, object)` over `assert(object.instance_of?(Class))`", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertMatch": { | |
| "title": "Minitest/AssertMatch", | |
| "description": "This cop enforces the test to use `assert_match` instead of using `assert(matcher.match(object))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertOutput": { | |
| "title": "Minitest/AssertOutput", | |
| "description": "This cop checks for opportunities to use `assert_output`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertPathExists": { | |
| "title": "Minitest/AssertPathExists", | |
| "description": "This cop enforces the test to use `assert_path_exists` instead of using `assert(File.exist?(path))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertRespondTo": { | |
| "title": "Minitest/AssertRespondTo", | |
| "description": "This cop enforces the test to use `assert_respond_to(object, :do_something)` over `assert(object.respond_to?(:do_something))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertSame": { | |
| "title": "Minitest/AssertSame", | |
| "description": "Enforces the use of `assert_same(expected, actual)` over `assert(expected.equal?(actual))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertSilent": { | |
| "title": "Minitest/AssertSilent", | |
| "description": "This cop enforces the test to use `assert_silent { ... }` instead of using `assert_output('', '') { ... }`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/AssertTruthy": { | |
| "title": "Minitest/AssertTruthy", | |
| "description": "This cop enforces the test to use `assert(actual)` instead of using `assert_equal(true, actual)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/DuplicateTestRun": { | |
| "title": "Minitest/DuplicateTestRun", | |
| "description": "This cop detects duplicate test runs caused by one test class inheriting from another.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/EmptyLineBeforeAssertionMethods": { | |
| "title": "Minitest/EmptyLineBeforeAssertionMethods", | |
| "description": "Add empty line before assertion methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/ReturnInTestMethod": { | |
| "title": "Minitest/ReturnInTestMethod", | |
| "description": "Enforces the use of `skip` instead of `return` in test methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/TestFileName": { | |
| "title": "Minitest/TestFileName", | |
| "description": "Checks if test file names start with `test_` or end with `_test.rb`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/GlobalExpectations": { | |
| "title": "Minitest/GlobalExpectations", | |
| "description": "This cop checks for deprecated global expectations.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "_", | |
| "any", | |
| "expect", | |
| "value" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "_", | |
| "any", | |
| "expect", | |
| "value" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "any" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/test/**/*", | |
| "**/*_test.rb", | |
| "**/spec/**/*", | |
| "**/*_spec.rb" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/LifecycleHooksOrder": { | |
| "title": "Minitest/LifecycleHooksOrder", | |
| "description": "Checks that lifecycle hooks are declared in the order in which they will be executed.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/LiteralAsActualArgument": { | |
| "title": "Minitest/LiteralAsActualArgument", | |
| "description": "This cop enforces correct order of `expected` and `actual` arguments for `assert_equal`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/MultipleAssertions": { | |
| "title": "Minitest/MultipleAssertions", | |
| "description": "This cop checks if test cases contain too many assertion calls.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 3 | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/NoAssertions": { | |
| "title": "Minitest/NoAssertions", | |
| "description": "This cop checks for at least one assertion (or flunk) in tests.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/NoTestCases": { | |
| "title": "Minitest/NoTestCases", | |
| "description": "Checks if test class contains any test cases.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/NonPublicTestMethod": { | |
| "title": "Minitest/NonPublicTestMethod", | |
| "description": "Detects non `public` (marked as `private` or `protected`) test methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteEmpty": { | |
| "title": "Minitest/RefuteEmpty", | |
| "description": "This cop enforces to use `refute_empty` instead of using `refute(object.empty?)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteFalse": { | |
| "title": "Minitest/RefuteFalse", | |
| "description": "Check if your test uses `refute(actual)` instead of `assert_equal(false, actual)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteEqual": { | |
| "title": "Minitest/RefuteEqual", | |
| "description": "Check if your test uses `refute_equal` instead of `assert(expected != object)` or `assert(! expected == object))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteInDelta": { | |
| "title": "Minitest/RefuteInDelta", | |
| "description": "This cop enforces the test to use `refute_in_delta` instead of using `refute_equal` to compare floats.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteIncludes": { | |
| "title": "Minitest/RefuteIncludes", | |
| "description": "This cop enforces the test to use `refute_includes` instead of using `refute(collection.include?(object))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteInstanceOf": { | |
| "title": "Minitest/RefuteInstanceOf", | |
| "description": "This cop enforces the test to use `refute_instance_of(Class, object)` over `refute(object.instance_of?(Class))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteKindOf": { | |
| "title": "Minitest/RefuteKindOf", | |
| "description": "This cop enforces the test to use `refute_kind_of(Class, object)` over `refute(object.kind_of?(Class))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteMatch": { | |
| "title": "Minitest/RefuteMatch", | |
| "description": "This cop enforces the test to use `refute_match` instead of using `refute(matcher.match(object))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteNil": { | |
| "title": "Minitest/RefuteNil", | |
| "description": "This cop enforces the test to use `refute_nil` instead of using `refute_equal(nil, something)` or `refute(something.nil?)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteOperator": { | |
| "title": "Minitest/RefuteOperator", | |
| "description": "This cop enforces the use of `refute_operator(expected, :<, actual)` over `refute(expected < actual)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefutePathExists": { | |
| "title": "Minitest/RefutePathExists", | |
| "description": "This cop enforces the test to use `refute_path_exists` instead of using `refute(File.exist?(path))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefutePredicate": { | |
| "title": "Minitest/RefutePredicate", | |
| "description": "This cop enforces the test to use `refute_predicate` instead of using `refute(obj.a_predicate_method?)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteRespondTo": { | |
| "title": "Minitest/RefuteRespondTo", | |
| "description": "This cop enforces the test to use `refute_respond_to(object, :do_something)` over `refute(object.respond_to?(:do_something))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/RefuteSame": { | |
| "title": "Minitest/RefuteSame", | |
| "description": "Enforces the use of `refute_same(expected, actual)` over `refute(expected.equal?(actual))`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/SkipEnsure": { | |
| "title": "Minitest/SkipEnsure", | |
| "description": "Checks that `ensure` call even if `skip`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/SkipWithoutReason": { | |
| "title": "Minitest/SkipWithoutReason", | |
| "description": "Checks for skipped tests missing the skipping reason.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/TestMethodName": { | |
| "title": "Minitest/TestMethodName", | |
| "description": "This cop enforces that test method names start with `test_` prefix.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/UnreachableAssertion": { | |
| "title": "Minitest/UnreachableAssertion", | |
| "description": "This cop checks for an `assert_raises` block containing any unreachable assertions.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| }, | |
| "Severity": { | |
| "type": "string", | |
| "default": "warning" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/UnspecifiedException": { | |
| "title": "Minitest/UnspecifiedException", | |
| "description": "This cop checks for a specified error in `assert_raises`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Minitest/UselessAssertion": { | |
| "title": "Minitest/UselessAssertion", | |
| "description": "Detects useless assertions (assertions that either always pass or always fail).", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": "pending" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rake/ClassDefinitionInTask": { | |
| "title": "Rake/ClassDefinitionInTask", | |
| "description": "Do not define a class or module in rake task, because it will be defined to the top level.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rake/Desc": { | |
| "title": "Rake/Desc", | |
| "description": "Describe the task with `desc` method.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rake/DuplicateTask": { | |
| "title": "Rake/DuplicateTask", | |
| "description": "Do not define tasks with the same name", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rake/DuplicateNamespace": { | |
| "title": "Rake/DuplicateNamespace", | |
| "description": "Do not define namespace with the same name", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Rake/MethodDefinitionInTask": { | |
| "title": "Rake/MethodDefinitionInTask", | |
| "description": "Do not define a method in rake task, because it will be defined to the top level.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sequel/ColumnDefault": { | |
| "title": "Sequel/ColumnDefault", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sequel/ConcurrentIndex": { | |
| "title": "Sequel/ConcurrentIndex", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sequel/JSONColumn": { | |
| "title": "Sequel/JSONColumn", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sequel/MigrationName": { | |
| "title": "Sequel/MigrationName", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sequel/SaveChanges": { | |
| "title": "Sequel/SaveChanges", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sequel/PartialConstraint": { | |
| "title": "Sequel/PartialConstraint", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "ThreadSafety/InstanceVariableInClassMethod": { | |
| "title": "ThreadSafety/InstanceVariableInClassMethod", | |
| "description": "Avoid using instance variables in class methods.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "ThreadSafety/ClassAndModuleAttributes": { | |
| "title": "ThreadSafety/ClassAndModuleAttributes", | |
| "description": "Avoid mutating class and module attributes.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "ThreadSafety/MutableClassInstanceVariable": { | |
| "title": "ThreadSafety/MutableClassInstanceVariable", | |
| "description": "Do not assign mutable objects to class instance variables.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "literals", | |
| "strict" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "literals", | |
| "strict" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "literals" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "ThreadSafety/NewThread": { | |
| "title": "ThreadSafety/NewThread", | |
| "description": "Avoid starting new threads. Let a framework like Sidekiq handle the threads.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Require/MissingRequireStatement": { | |
| "title": "Require/MissingRequireStatement", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "I18n/GetText/DecorateString": { | |
| "title": "I18n/GetText/DecorateString", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "I18n/GetText/DecorateFunctionMessage": { | |
| "title": "I18n/GetText/DecorateFunctionMessage", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "I18n/GetText/DecorateStringFormattingUsingInterpolation": { | |
| "title": "I18n/GetText/DecorateStringFormattingUsingInterpolation", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "I18n/GetText/DecorateStringFormattingUsingPercent": { | |
| "title": "I18n/GetText/DecorateStringFormattingUsingPercent", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "I18n/RailsI18n/DecorateString": { | |
| "title": "I18n/RailsI18n/DecorateString", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "I18n/RailsI18n/DecorateStringFormattingUsingInterpolation": { | |
| "title": "I18n/RailsI18n/DecorateStringFormattingUsingInterpolation", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Packaging/BundlerSetupInTests": { | |
| "title": "Packaging/BundlerSetupInTests", | |
| "description": "Using `bundler/setup` in tests is redundant. Consider removing it.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Packaging/GemspecGit": { | |
| "title": "Packaging/GemspecGit", | |
| "description": "Avoid using git to produce lists of files. Downstreams often need to build your package in an environment that does not have git (on purpose). Use some pure Ruby alternative, like `Dir` or `Dir.glob`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Packaging/RequireHardcodingLib": { | |
| "title": "Packaging/RequireHardcodingLib", | |
| "description": "Avoid using `require` with relative path to lib. Use `require` with absolute path instead.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Packaging/RequireRelativeHardcodingLib": { | |
| "title": "Packaging/RequireRelativeHardcodingLib", | |
| "description": "Avoid using `require_relative` with relative path to lib. Use `require` with absolute path instead.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/BindingConstantWithoutTypeAlias": { | |
| "title": "Sorbet/BindingConstantWithoutTypeAlias", | |
| "description": "Disallows binding the return value of `T.any`, `T.all`, `T.enum` to a constant directly. To bind the value, one must use `T.type_alias`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ConstantsFromStrings": { | |
| "title": "Sorbet/ConstantsFromStrings", | |
| "description": "Forbids constant access through meta-programming.\nFor example, things like `constantize` or `const_get` are forbidden.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ForbidSuperclassConstLiteral": { | |
| "title": "Sorbet/ForbidSuperclassConstLiteral", | |
| "description": "Forbid superclasses which are non-literal constants.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ForbidIncludeConstLiteral": { | |
| "title": "Sorbet/ForbidIncludeConstLiteral", | |
| "description": "Forbids include of non-literal constants.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ForbidUntypedStructProps": { | |
| "title": "Sorbet/ForbidUntypedStructProps", | |
| "description": "Disallows use of `T.untyped` or `T.nilable(T.untyped)` as a prop type for `T::Struct` subclasses.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ImplicitConversionMethod": { | |
| "title": "Sorbet/ImplicitConversionMethod", | |
| "description": "This cop disallows declaring implicit conversion methods, as sorbet does not support implicit conversion.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/OneAncestorPerLine": { | |
| "title": "Sorbet/OneAncestorPerLine", | |
| "description": "Enforces one ancestor per call to requires_ancestor", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/CallbackConditionalsBinding": { | |
| "title": "Sorbet/CallbackConditionalsBinding", | |
| "description": "Ensures callback conditionals are bound to the right type.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ForbidTStruct": { | |
| "title": "Sorbet/ForbidTStruct", | |
| "description": "Forbid usage of T::Struct.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ForbidTUnsafe": { | |
| "title": "Sorbet/ForbidTUnsafe", | |
| "description": "Forbid usage of T.unsafe.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ForbidTUntyped": { | |
| "title": "Sorbet/ForbidTUntyped", | |
| "description": "Forbid usage of T.untyped", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/RedundantExtendTSig": { | |
| "title": "Sorbet/RedundantExtendTSig", | |
| "description": "Forbid the usage of redundant `extend T::Sig`.\nOnly for use in applications that monkey patch `Module.include(T::Sig)` directly, where it is useful to reduce noise.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/TypeAliasName": { | |
| "title": "Sorbet/TypeAliasName", | |
| "description": "Type alias constant names must be in CamelCase.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.{rb,rbi,rake,ru}" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ObsoleteStrictMemoization": { | |
| "title": "Sorbet/ObsoleteStrictMemoization", | |
| "description": "This cop checks for the obsolete pattern for initializing instance variables that was required for older Sorbet versions in `#typed: strict` files.\nIt's no longer required, as of Sorbet 0.5.10210 See https://sorbet.org/docs/type-assertions#put-type-assertions-behind-memoization", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/BuggyObsoleteStrictMemoization": { | |
| "title": "Sorbet/BuggyObsoleteStrictMemoization", | |
| "description": "Checks for the a mistaken variant of the \"obsolete memoization pattern\" that used to be required for older Sorbet versions in `#typed: strict` files. The mistaken variant would overwrite the ivar with `nil` on every call, causing the memoized value to be discarded and recomputed on every call.\nThis cop will correct it to read from the ivar instead of `nil`, which will memoize it correctly.\nThe result of this correction will be the \"obsolete memoization pattern\", which can further be corrected by the `Sorbet/ObsoleteStrictMemoization` cop.\nSee `Sorbet/ObsoleteStrictMemoization` for more details.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ForbidExtendTSigHelpersInShims": { | |
| "title": "Sorbet/ForbidExtendTSigHelpersInShims", | |
| "description": "Forbid the use of `extend T::Sig` and `extend T::Helpers` in RBI shims", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.rbi" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ForbidRBIOutsideOfAllowedPaths": { | |
| "title": "Sorbet/ForbidRBIOutsideOfAllowedPaths", | |
| "description": "Forbids RBI files outside of the allowed paths", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AllowedPaths": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "rbi/**", | |
| "sorbet/rbi/**" | |
| ] | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.rbi" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/SingleLineRbiClassModuleDefinitions": { | |
| "title": "Sorbet/SingleLineRbiClassModuleDefinitions", | |
| "description": "Empty class and module definitions in RBI must be on a single line.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.rbi" | |
| ] | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/AllowIncompatibleOverride": { | |
| "title": "Sorbet/AllowIncompatibleOverride", | |
| "description": "Disallows using `.override(allow_incompatible: true)`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/SignatureCop": { | |
| "title": "Sorbet/SignatureCop", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/CheckedTrueInSignature": { | |
| "title": "Sorbet/CheckedTrueInSignature", | |
| "description": "Disallows the usage of `checked(true)` in signatures.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/KeywordArgumentOrdering": { | |
| "title": "Sorbet/KeywordArgumentOrdering", | |
| "description": "Enforces a compatible keyword arguments with Sorbet.\nAll keyword arguments must be at the end of the parameters list, and all keyword arguments with a default value must be after those without default values.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/SignatureBuildOrder": { | |
| "title": "Sorbet/SignatureBuildOrder", | |
| "description": "Enforces the order of parts in a signature.\nThe order is first inheritance related builders, then params, then return and finally the modifier such as: `abstract.params(...).returns(...).soft`.'", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/EnforceSignatures": { | |
| "title": "Sorbet/EnforceSignatures", | |
| "description": "Ensures all methods have a valid signature.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/EmptyLineAfterSig": { | |
| "title": "Sorbet/EmptyLineAfterSig", | |
| "description": "Ensures that there are no blank lines after signatures", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/ValidSigil": { | |
| "title": "Sorbet/ValidSigil", | |
| "description": "All files must have a valid sigil.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "RequireSigilOnAllFiles": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "SuggestedStrictness": { | |
| "type": "string", | |
| "default": "false" | |
| }, | |
| "MinimumStrictness": { | |
| "type": "string", | |
| "default": "nil" | |
| }, | |
| "ExactStrictness": { | |
| "type": "string", | |
| "default": "nil" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.{rb,rbi,rake,ru}" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/HasSigil": { | |
| "title": "Sorbet/HasSigil", | |
| "description": "Makes the Sorbet typed sigil mandatory in all files.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "SuggestedStrictness": { | |
| "type": "string", | |
| "default": "false" | |
| }, | |
| "MinimumStrictness": { | |
| "type": "string", | |
| "default": "nil" | |
| }, | |
| "ExactStrictness": { | |
| "type": "string", | |
| "default": "nil" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.{rb,rbi,rake,ru}" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/IgnoreSigil": { | |
| "title": "Sorbet/IgnoreSigil", | |
| "description": "All files must be at least at strictness `ignore`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "SuggestedStrictness": { | |
| "type": "string", | |
| "default": "ignore" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.{rb,rbi,rake,ru}" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/FalseSigil": { | |
| "title": "Sorbet/FalseSigil", | |
| "description": "All files must be at least at strictness `false`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "SuggestedStrictness": { | |
| "type": "string", | |
| "default": "false" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.{rb,rbi,rake,ru}" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/TrueSigil": { | |
| "title": "Sorbet/TrueSigil", | |
| "description": "All files must be at least at strictness `true`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "SuggestedStrictness": { | |
| "type": "string", | |
| "default": "true" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.{rb,rbi,rake,ru}" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/StrictSigil": { | |
| "title": "Sorbet/StrictSigil", | |
| "description": "All files must be at least at strictness `strict`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "SuggestedStrictness": { | |
| "type": "string", | |
| "default": "strict" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.{rb,rbi,rake,ru}" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/StrongSigil": { | |
| "title": "Sorbet/StrongSigil", | |
| "description": "All files must be at least at strictness `strong`.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": false | |
| }, | |
| "SuggestedStrictness": { | |
| "type": "string", | |
| "default": "strong" | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/*.{rb,rbi,rake,ru}" | |
| ] | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/EnforceSigilOrder": { | |
| "title": "Sorbet/EnforceSigilOrder", | |
| "description": "Ensures that Sorbet sigil comes first in a file.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Sorbet/EnforceSingleSigil": { | |
| "title": "Sorbet/EnforceSingleSigil", | |
| "description": "Ensures that there is only one Sorbet sigil in a file.", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/ArgumentDescription": { | |
| "title": "GraphQL/ArgumentDescription", | |
| "description": "Ensures all arguments have a description", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/ArgumentName": { | |
| "title": "GraphQL/ArgumentName", | |
| "description": "This cop checks whether argument names are snake_case", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/ArgumentUniqueness": { | |
| "title": "GraphQL/ArgumentUniqueness", | |
| "description": "This cop enforces arguments to be defined once per block", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/ExtractInputType": { | |
| "title": "GraphQL/ExtractInputType", | |
| "description": "Suggests using input type instead of many arguments", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MaxArguments": { | |
| "type": "integer", | |
| "default": 2 | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/graphql/mutations/**/*.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/ExtractType": { | |
| "title": "GraphQL/ExtractType", | |
| "description": "Suggests extracting fields with common prefixes to the separate type", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "MaxFields": { | |
| "type": "integer", | |
| "default": 2 | |
| }, | |
| "Prefixes": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "is", | |
| "has", | |
| "with", | |
| "avg", | |
| "min", | |
| "max" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/FieldDefinitions": { | |
| "title": "GraphQL/FieldDefinitions", | |
| "description": "Checks consistency of field definitions", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "group_definitions", | |
| "define_resolver_after_definition" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "group_definitions", | |
| "define_resolver_after_definition" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "group_definitions" | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/FieldDescription": { | |
| "title": "GraphQL/FieldDescription", | |
| "description": "Ensures all fields have a description", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/FieldHashKey": { | |
| "title": "GraphQL/FieldHashKey", | |
| "description": "Checks :hash_key option is used for appropriate fields", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/FieldMethod": { | |
| "title": "GraphQL/FieldMethod", | |
| "description": "Checks :method option is used for appropriate fields", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/FieldName": { | |
| "title": "GraphQL/FieldName", | |
| "description": "This cop checks whether field names are snake_case", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/FieldUniqueness": { | |
| "title": "GraphQL/FieldUniqueness", | |
| "description": "This cop enforces fields to be defined once", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/GraphqlName": { | |
| "title": "GraphQL/GraphqlName", | |
| "description": "This cop check proper configuration of graphql_name", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/graphql/types/**/*", | |
| "**/graphql/mutations/**/*" | |
| ] | |
| }, | |
| "EnforcedStyle": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "required", | |
| "only_override" | |
| ] | |
| }, | |
| { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "required", | |
| "only_override" | |
| ] | |
| } | |
| } | |
| ], | |
| "default": "only_override" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/LegacyDsl": { | |
| "title": "GraphQL/LegacyDsl", | |
| "description": "Checks that types are defined with class-based API", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/MaxComplexitySchema": { | |
| "title": "GraphQL/MaxComplexitySchema", | |
| "description": "Enforces max_complexity configuration in schema", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/graphql/**/*_schema.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/MaxDepthSchema": { | |
| "title": "GraphQL/MaxDepthSchema", | |
| "description": "Enforces max_depth configuration in schema", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/graphql/**/*_schema.rb" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/MultipleFieldDefinitions": { | |
| "title": "GraphQL/MultipleFieldDefinitions", | |
| "description": "Ensures that fields with multiple definitions are grouped together", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/NotAuthorizedNodeType": { | |
| "title": "GraphQL/NotAuthorizedNodeType", | |
| "description": "Detects types that implement Node interface and not have `.authorized?` check", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Include": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "default": [ | |
| "**/graphql/types/**/*" | |
| ] | |
| }, | |
| "SafeBaseClasses": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/ResolverMethodLength": { | |
| "title": "GraphQL/ResolverMethodLength", | |
| "description": "Checks resolver methods are not too long", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Max": { | |
| "type": "integer", | |
| "default": 10 | |
| }, | |
| "CountComments": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "ExcludedMethods": { | |
| "type": "array", | |
| "items": { | |
| }, | |
| "default": [ | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/ObjectDescription": { | |
| "title": "GraphQL/ObjectDescription", | |
| "description": "Ensures all types have a description", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Exclude": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/OrderedArguments": { | |
| "title": "GraphQL/OrderedArguments", | |
| "description": "Arguments should be alphabetically sorted within groups", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Order": { | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/OrderedFields": { | |
| "title": "GraphQL/OrderedFields", | |
| "description": "Fields should be alphabetically sorted within groups", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "Groups": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "Order": { | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/UnusedArgument": { | |
| "title": "GraphQL/UnusedArgument", | |
| "description": "Arguments should either be listed explicitly or **rest should be in the resolve signature", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/UnnecessaryArgumentCamelize": { | |
| "title": "GraphQL/UnnecessaryArgumentCamelize", | |
| "description": "Camelize isn't necessary if the argument name doesn't contain underscores", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/UnnecessaryFieldAlias": { | |
| "title": "GraphQL/UnnecessaryFieldAlias", | |
| "description": "Field aliases should be different than their field names", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| }, | |
| "AutoCorrect": { | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "GraphQL/UnnecessaryFieldCamelize": { | |
| "title": "GraphQL/UnnecessaryFieldCamelize", | |
| "description": "Camelize isn't necessary if the field name doesn't contain underscores", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/copProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "default": true | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "definitions": { | |
| "stringArray": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "stringOrStrings": { | |
| "oneOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "$ref": "#/definitions/stringArray" | |
| } | |
| ] | |
| }, | |
| "severity": { | |
| "type": "string", | |
| "enum": [ | |
| "info", | |
| "refactor", | |
| "convention", | |
| "warning", | |
| "error", | |
| "fatal" | |
| ] | |
| }, | |
| "inheritMode": { | |
| "type": "object", | |
| "minProperties": 1, | |
| "propertyNames": { | |
| "enum": [ | |
| "merge", | |
| "override" | |
| ] | |
| }, | |
| "additionalProperties": { | |
| "type": "array", | |
| "minItems": 1, | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "sharedProperties": { | |
| "properties": { | |
| "Include": { | |
| "type": "array" | |
| }, | |
| "Exclude": { | |
| "type": "array" | |
| }, | |
| "StyleGuideBaseURL": { | |
| "type": "string", | |
| "default": "https://rubystyle.guide" | |
| } | |
| } | |
| }, | |
| "copProperties": { | |
| "type": "object", | |
| "allOf": [ | |
| { | |
| "$ref": "#/definitions/sharedProperties" | |
| }, | |
| { | |
| "properties": { | |
| "Enabled": { | |
| "oneOf": [ | |
| { | |
| "type": "boolean" | |
| }, | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "pending" | |
| ] | |
| } | |
| ] | |
| }, | |
| "Severity": { | |
| "$ref": "#/definitions/severity" | |
| }, | |
| "Details": { | |
| "type": "string" | |
| }, | |
| "StyleGuide": { | |
| "type": "string" | |
| }, | |
| "inherit_mode": { | |
| "$ref": "#/definitions/inheritMode" | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "allCopsProperties": { | |
| "properties": { | |
| "DefaultFormatter": { | |
| "type": "string", | |
| "default": "progress" | |
| }, | |
| "DisplayCopNames": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "DisplayStyleGuide": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "DocumentationBaseURL": { | |
| "type": "string", | |
| "default": "https://docs.rubocop.org/rubocop" | |
| }, | |
| "ExtraDetails": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "StyleGuideCopsOnly": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "EnabledByDefault": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "DisabledByDefault": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "NewCops": { | |
| "type": "string", | |
| "default": "pending", | |
| "enum": [ | |
| "pending", | |
| "enable", | |
| "disable" | |
| ] | |
| }, | |
| "UseCache": { | |
| "type": "boolean", | |
| "default": true | |
| }, | |
| "MaxFilesInCache": { | |
| "type": "integer", | |
| "default": 20000 | |
| }, | |
| "CacheRootDirectory": { | |
| "type": "string" | |
| }, | |
| "AllowSymlinksInCacheRootDirectory": { | |
| "type": "boolean", | |
| "default": false | |
| }, | |
| "TargetRubyVersion": { | |
| "oneOf": [ | |
| { | |
| "type": "number" | |
| }, | |
| { | |
| "type": "string" | |
| } | |
| ] | |
| }, | |
| "SuggestExtensions": { | |
| "oneOf": [ | |
| { | |
| "type": "boolean" | |
| }, | |
| { | |
| "type": "object", | |
| "additionalProperties": { | |
| "oneOf": [ | |
| { | |
| "type": "boolean" | |
| }, | |
| { | |
| "$ref": "#/definitions/stringArray" | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| }, | |
| "RubyInterpreters": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment