Repository navigation
Defaults are now RuboCop's
Without a config, rustocop now reports what RuboCop 1.92 reports with its own defaults. If you relied on rustocop's previous defaults, check your results after upgrading:
- String quotes:
Style/StringLiterals,Style/StringLiteralsInInterpolationandStyle/QuotedSymbolsdefault to single quotes.--fixon a project without a config now rewrites double-quoted strings. - Cops now on by default: the Metrics cops,
Style/DocumentationandStyle/FrozenStringLiteralComment. - Pending cops: cops that RuboCop marks pending run only with
new_cops = "enable"(RuboCop'sAllCops: NewCops: enable). - Setting a maximum no longer switches a cop on.
To keep the old behaviour, set those cops in rustocop.toml or .rubocop.yml.
.rubocop.yml is read as RuboCop reads it
- Inheritance and defaults: a
.rubocop.ymlis laid over RuboCop's realconfig/default.yml, with its inheritance rules and its obsolete-configuration errors and warnings. - Path matching:
IncludeandExcludefollow RuboCop's path matching, including Ruby'sfnmatch. - File discovery: files are picked as RuboCop's
TargetFinderpicks them, and a folder with its own.rubocop.ymlruns with it. - Gemspec target Ruby: the target Ruby version comes from a gemspec as RuboCop's
TargetRubytakes it. - Departments: they enable and disable their cops as in RuboCop.
rubocop-performance
- Loading: a config that loads the plugin gets its defaults and its cops. It can use
plugins:orrequire:in.rubocop.yml, or the newplugins = ["rubocop-performance"]inrustocop.toml. The gem doesn't need to be installed. - Ported cops:
Performance/BindCall,Caller,CompareWithBlock,Count,DeletePrefix,DeleteSuffix,Detect,DoubleStartEndWithandEndWith. More will follow. - Testing: each ported cop runs the plugin's own spec examples in CI.
- Directives: may name the cops of any extension a config loads, as in RuboCop.
Also
- Output paths: file paths are shown relative to the current directory, as RuboCop shows them.
- Faster binaries: release binaries are built with fat LTO and one codegen unit.
- Cop fixes: many cop-level fixes. Cops that read another cop's settings now follow them, as in RuboCop. Percent-array words are escaped and encoded exactly as RuboCop does.
Full Changelog: v1.8.0...v1.9.0