2019-06-06 05:31:48 -05:00
|
|
|
require:
|
|
|
|
- rubocop-rails
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
- rubocop-rspec
|
|
|
|
- rubocop-performance
|
2019-06-06 05:31:48 -05:00
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
AllCops:
|
2022-11-27 13:41:39 -06:00
|
|
|
TargetRubyVersion: 2.7
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
DisplayCopNames: true
|
|
|
|
DisplayStyleGuide: true
|
|
|
|
ExtraDetails: true
|
|
|
|
UseCache: true
|
|
|
|
CacheRootDirectory: tmp
|
|
|
|
NewCops: enable
|
2017-06-01 10:24:30 -05:00
|
|
|
Exclude:
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
- db/schema.rb
|
2022-03-20 22:46:11 -05:00
|
|
|
- 'app/views/**/*'
|
|
|
|
- 'config/**/*'
|
|
|
|
- 'bin/*'
|
|
|
|
- 'Rakefile'
|
|
|
|
- 'node_modules/**/*'
|
|
|
|
- 'Vagrantfile'
|
|
|
|
- 'vendor/**/*'
|
|
|
|
- 'lib/json_ld/*'
|
|
|
|
- 'lib/templates/**/*'
|
2016-09-29 14:28:21 -05:00
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
Bundler/OrderedGems:
|
2016-09-29 14:28:21 -05:00
|
|
|
Enabled: false
|
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
Layout/AccessModifierIndentation:
|
|
|
|
EnforcedStyle: indent
|
2016-10-22 12:38:47 -05:00
|
|
|
|
2017-06-08 06:24:28 -05:00
|
|
|
Layout/EmptyLineAfterMagicComment:
|
|
|
|
Enabled: false
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Layout/EmptyLineAfterGuardClause:
|
|
|
|
Enabled: false
|
|
|
|
|
2022-03-12 01:33:11 -06:00
|
|
|
Layout/EmptyLineBetweenDefs:
|
|
|
|
AllowAdjacentOneLineDefs: true
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Layout/EmptyLinesAroundAttributeAccessor:
|
|
|
|
Enabled: true
|
|
|
|
|
2022-02-24 17:34:14 -06:00
|
|
|
Layout/FirstHashElementIndentation:
|
|
|
|
EnforcedStyle: consistent
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Layout/HashAlignment:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Layout/SpaceAroundMethodCallOperator:
|
|
|
|
Enabled: true
|
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
Layout/SpaceInsideHashLiteralBraces:
|
|
|
|
EnforcedStyle: space
|
2016-10-22 12:38:47 -05:00
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Lint/DeprecatedOpenSSLConstant:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Lint/DuplicateElsifCondition:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Lint/MixedRegexpCaptureTypes:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Lint/RaiseException:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Lint/StructNewOverride:
|
|
|
|
Enabled: true
|
|
|
|
|
2020-07-14 12:05:07 -05:00
|
|
|
Lint/UselessAccessModifier:
|
|
|
|
ContextCreatingMethods:
|
|
|
|
- class_methods
|
|
|
|
|
2016-11-15 09:56:29 -06:00
|
|
|
Metrics/AbcSize:
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
Max: 34 # RuboCop default 17
|
2020-08-31 20:04:00 -05:00
|
|
|
Exclude:
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
- 'lib/**/*cli*.rb'
|
|
|
|
- db/*migrate/**/*
|
|
|
|
- lib/paperclip/color_extractor.rb
|
|
|
|
- app/workers/scheduler/follow_recommendations_scheduler.rb
|
|
|
|
- app/services/activitypub/fetch*_service.rb
|
|
|
|
- lib/paperclip/**/*
|
|
|
|
CountRepeatedAttributes: false
|
|
|
|
AllowedMethods:
|
|
|
|
- update_media_attachments!
|
|
|
|
- account_link_to
|
|
|
|
- attempt_oembed
|
|
|
|
- build_crutches
|
|
|
|
- calculate_scores
|
|
|
|
- cc
|
|
|
|
- dump_actor!
|
|
|
|
- filter_from_home?
|
|
|
|
- hydrate
|
|
|
|
- import_bookmarks!
|
|
|
|
- import_relationships!
|
|
|
|
- initialize
|
|
|
|
- link_to_mention
|
|
|
|
- log_target
|
|
|
|
- matches_time_window?
|
|
|
|
- parse_metadata
|
|
|
|
- perform_statuses_search!
|
|
|
|
- privatize_media_attachments!
|
|
|
|
- process_update
|
|
|
|
- publish_media_attachments!
|
|
|
|
- remotable_attachment
|
|
|
|
- render_initial_state
|
|
|
|
- render_with_cache
|
|
|
|
- searchable_by
|
|
|
|
- self.cached_filters_for
|
|
|
|
- set_fetchable_attributes!
|
|
|
|
- signed_request_actor
|
|
|
|
- statuses_to_delete
|
|
|
|
- update_poll!
|
2016-10-22 12:38:47 -05:00
|
|
|
|
2017-06-08 06:24:28 -05:00
|
|
|
Metrics/BlockLength:
|
2020-08-31 20:04:00 -05:00
|
|
|
Max: 55
|
2017-06-08 06:24:28 -05:00
|
|
|
Exclude:
|
2020-08-31 20:04:00 -05:00
|
|
|
- 'lib/mastodon/*_cli.rb'
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
CountComments: false
|
|
|
|
CountAsOne: [array, heredoc]
|
|
|
|
AllowedMethods:
|
|
|
|
- task
|
|
|
|
- namespace
|
|
|
|
- class_methods
|
|
|
|
- included
|
2017-06-08 06:24:28 -05:00
|
|
|
|
2016-11-15 09:56:29 -06:00
|
|
|
Metrics/BlockNesting:
|
|
|
|
Max: 3
|
2020-08-31 20:04:00 -05:00
|
|
|
Exclude:
|
|
|
|
- 'lib/mastodon/*_cli.rb'
|
2016-11-15 09:56:29 -06:00
|
|
|
|
|
|
|
Metrics/ClassLength:
|
|
|
|
CountComments: false
|
2022-07-04 19:41:40 -05:00
|
|
|
Max: 500
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
CountAsOne: [array, heredoc]
|
2020-08-31 20:04:00 -05:00
|
|
|
Exclude:
|
|
|
|
- 'lib/mastodon/*_cli.rb'
|
2016-11-15 09:56:29 -06:00
|
|
|
|
|
|
|
Metrics/CyclomaticComplexity:
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
Max: 12
|
2020-08-31 20:04:00 -05:00
|
|
|
Exclude:
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
- lib/mastodon/*cli*.rb
|
|
|
|
- db/*migrate/**/*
|
|
|
|
AllowedMethods:
|
|
|
|
- attempt_oembed
|
|
|
|
- blocked?
|
|
|
|
- build_crutches
|
|
|
|
- calculate_scores
|
|
|
|
- cc
|
|
|
|
- discover_endpoint!
|
|
|
|
- filter_from_home?
|
|
|
|
- hydrate
|
|
|
|
- klass
|
|
|
|
- link_to_mention
|
|
|
|
- log_target
|
|
|
|
- matches_time_window?
|
|
|
|
- patch_for_forwarding!
|
|
|
|
- preprocess_attributes!
|
|
|
|
- process_update
|
|
|
|
- remotable_attachment
|
|
|
|
- scan_text!
|
|
|
|
- self.cached_filters_for
|
|
|
|
- set_fetchable_attributes!
|
|
|
|
- setup_redis_env_url
|
|
|
|
- update_media_attachments!
|
2016-11-15 09:56:29 -06:00
|
|
|
|
2020-05-10 09:42:48 -05:00
|
|
|
Layout/LineLength:
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
Max: 140 # RuboCop default 120
|
|
|
|
AllowHeredoc: true
|
2017-06-01 10:24:30 -05:00
|
|
|
AllowURI: true
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
IgnoreCopDirectives: true
|
|
|
|
AllowedPatterns:
|
|
|
|
# Allow comments to be long lines
|
|
|
|
- !ruby/regexp / \# .*$/
|
|
|
|
- !ruby/regexp /^\# .*$/
|
|
|
|
Exclude:
|
|
|
|
- lib/**/*cli*.rb
|
|
|
|
- db/*migrate/**/*
|
|
|
|
- db/seeds/**/*
|
2017-06-01 10:24:30 -05:00
|
|
|
|
2016-11-15 09:56:29 -06:00
|
|
|
Metrics/MethodLength:
|
2017-06-01 10:24:30 -05:00
|
|
|
CountComments: false
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
CountAsOne: [array, heredoc]
|
|
|
|
Max: 25 # RuboCop default 10
|
2020-08-31 20:04:00 -05:00
|
|
|
Exclude:
|
|
|
|
- 'lib/mastodon/*_cli.rb'
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
AllowedMethods:
|
|
|
|
- account_link_to
|
|
|
|
- attempt_oembed
|
|
|
|
- body_with_limit
|
|
|
|
- build_crutches
|
|
|
|
- cached_filters_for
|
|
|
|
- calculate_scores
|
|
|
|
- check_webfinger!
|
|
|
|
- clean_feeds!
|
|
|
|
- collection_items
|
|
|
|
- collection_presenter
|
|
|
|
- copy_account_notes!
|
|
|
|
- deduplicate_accounts!
|
|
|
|
- deduplicate_conversations!
|
|
|
|
- deduplicate_local_accounts!
|
|
|
|
- deduplicate_statuses!
|
|
|
|
- deduplicate_tags!
|
|
|
|
- deduplicate_users!
|
|
|
|
- discover_endpoint!
|
|
|
|
- extract_extra_uris_with_indices
|
|
|
|
- extract_hashtags_with_indices
|
|
|
|
- extract_mentions_or_lists_with_indices
|
|
|
|
- filter_from_home?
|
|
|
|
- from_elasticsearch
|
|
|
|
- handle_explicit_update!
|
|
|
|
- handle_mark_as_sensitive!
|
|
|
|
- hsl_to_rgb
|
|
|
|
- import_bookmarks!
|
|
|
|
- import_domain_blocks!
|
|
|
|
- import_relationships!
|
|
|
|
- ldap_options
|
|
|
|
- matches_time_window?
|
|
|
|
- outbox_presenter
|
|
|
|
- pam_get_user
|
|
|
|
- parallelize_with_progress
|
|
|
|
- parse_and_transform
|
|
|
|
- patch_for_forwarding!
|
|
|
|
- populate_home
|
|
|
|
- post_process_style
|
|
|
|
- preload_cache_collection_target_statuses
|
|
|
|
- privatize_media_attachments!
|
|
|
|
- provides_callback_for
|
|
|
|
- publish_media_attachments!
|
|
|
|
- relevant_account_timestamp
|
|
|
|
- remotable_attachment
|
|
|
|
- rgb_to_hsl
|
|
|
|
- rss_status_content_format
|
|
|
|
- set_fetchable_attributes!
|
|
|
|
- setup_redis_env_url
|
|
|
|
- signed_request_actor
|
|
|
|
- to_preview_card_attributes
|
|
|
|
- upgrade_storage_filesystem
|
|
|
|
- upgrade_storage_s3
|
|
|
|
- user_settings_params
|
|
|
|
- hydrate
|
|
|
|
- cc
|
|
|
|
- self_destruct
|
2016-11-15 09:56:29 -06:00
|
|
|
|
|
|
|
Metrics/ModuleLength:
|
|
|
|
CountComments: false
|
|
|
|
Max: 200
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
CountAsOne: [array, heredoc]
|
2016-11-15 09:56:29 -06:00
|
|
|
|
2016-10-22 12:38:47 -05:00
|
|
|
Metrics/ParameterLists:
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
Max: 5 # RuboCop default 5
|
|
|
|
CountKeywordArgs: true # RuboCop default true
|
|
|
|
MaxOptionalParameters: 3 # RuboCop default 3
|
|
|
|
Exclude:
|
|
|
|
- app/models/concerns/account_interactions.rb
|
|
|
|
- app/services/activitypub/fetch_remote_account_service.rb
|
|
|
|
- app/services/activitypub/fetch_remote_actor_service.rb
|
2016-10-22 12:38:47 -05:00
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
Metrics/PerceivedComplexity:
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
Max: 16 # RuboCop default 8
|
|
|
|
AllowedMethods:
|
|
|
|
- attempt_oembed
|
|
|
|
- build_crutches
|
|
|
|
- calculate_scores
|
|
|
|
- deduplicate_users!
|
|
|
|
- discover_endpoint!
|
|
|
|
- filter_from_home?
|
|
|
|
- hydrate
|
|
|
|
- patch_for_forwarding!
|
|
|
|
- process_update
|
|
|
|
- remove_orphans
|
|
|
|
- update_media_attachments!
|
2017-06-01 10:24:30 -05:00
|
|
|
|
2018-08-26 12:22:46 -05:00
|
|
|
Naming/MemoizedInstanceVariableName:
|
|
|
|
Enabled: false
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Naming/MethodParameterName:
|
|
|
|
Enabled: true
|
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
Rails:
|
|
|
|
Enabled: true
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Rails/ApplicationController:
|
2019-12-02 11:25:43 -06:00
|
|
|
Enabled: false
|
2020-08-31 20:04:00 -05:00
|
|
|
Exclude:
|
|
|
|
- 'app/controllers/well_known/**/*.rb'
|
2019-12-02 11:25:43 -06:00
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Rails/BelongsTo:
|
2017-06-01 10:24:30 -05:00
|
|
|
Enabled: false
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Rails/ContentTag:
|
2017-06-08 06:24:28 -05:00
|
|
|
Enabled: false
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Rails/EnumHash:
|
2018-08-26 12:22:46 -05:00
|
|
|
Enabled: false
|
|
|
|
|
2018-09-14 10:42:22 -05:00
|
|
|
Rails/Exit:
|
|
|
|
Exclude:
|
|
|
|
- 'lib/mastodon/*'
|
2019-03-28 11:56:25 -05:00
|
|
|
- 'lib/cli.rb'
|
2018-09-14 10:42:22 -05:00
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Rails/FilePath:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Rails/HasAndBelongsToMany:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Rails/HasManyOrHasOneDependent:
|
|
|
|
Enabled: false
|
|
|
|
|
2019-06-06 05:31:48 -05:00
|
|
|
Rails/HelperInstanceVariable:
|
|
|
|
Enabled: false
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Rails/HttpStatus:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Rails/IndexBy:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Rails/InverseOf:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Rails/LexicallyScopedActionFilter:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Rails/OutputSafety:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Rails/RakeEnvironment:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Rails/RedundantForeignKey:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Rails/SkipsModelValidations:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Rails/UniqueValidationWithoutIndex:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Style/AccessorGrouping:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Style/AccessModifierDeclarations:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Style/ArrayCoercion:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Style/BisectedAttrAccessor:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Style/CaseLikeIf:
|
|
|
|
Enabled: false
|
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
Style/ClassAndModuleChildren:
|
|
|
|
Enabled: false
|
2016-10-22 12:38:47 -05:00
|
|
|
|
|
|
|
Style/CollectionMethods:
|
|
|
|
Enabled: true
|
|
|
|
PreferredMethods:
|
|
|
|
find_all: 'select'
|
|
|
|
|
|
|
|
Style/Documentation:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Style/DoubleNegation:
|
2016-11-15 09:56:29 -06:00
|
|
|
Enabled: true
|
2016-10-22 12:38:47 -05:00
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Style/ExpandPathArguments:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Style/ExponentialNotation:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Style/FormatString:
|
|
|
|
Enabled: false
|
|
|
|
|
2019-12-02 11:25:43 -06:00
|
|
|
Style/FormatStringToken:
|
|
|
|
Enabled: false
|
|
|
|
|
2016-10-22 12:38:47 -05:00
|
|
|
Style/FrozenStringLiteralComment:
|
2016-11-15 09:56:29 -06:00
|
|
|
Enabled: true
|
2016-10-22 12:38:47 -05:00
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
Style/GuardClause:
|
2016-10-22 12:38:47 -05:00
|
|
|
Enabled: false
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Style/HashAsLastArrayItem:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Style/HashEachMethods:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Style/HashLikeCase:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Style/HashTransformKeys:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Style/HashTransformValues:
|
|
|
|
Enabled: false
|
|
|
|
|
2022-11-17 04:05:39 -06:00
|
|
|
Style/HashSyntax:
|
|
|
|
Enabled: true
|
|
|
|
EnforcedStyle: ruby19_no_mixed_keys
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Style/IfUnlessModifier:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Style/InverseMethods:
|
|
|
|
Enabled: false
|
|
|
|
|
2016-11-15 09:56:29 -06:00
|
|
|
Style/Lambda:
|
|
|
|
Enabled: false
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Style/MutableConstant:
|
|
|
|
Enabled: false
|
|
|
|
|
2017-06-08 06:24:28 -05:00
|
|
|
Style/PercentLiteralDelimiters:
|
|
|
|
PreferredDelimiters:
|
|
|
|
'%i': '()'
|
|
|
|
'%w': '()'
|
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
Style/PerlBackrefs:
|
|
|
|
AutoCorrect: false
|
2016-11-15 09:56:29 -06:00
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Style/RedundantFetchBlock:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Style/RedundantFileExtensionInRequire:
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
Style/RedundantRegexpCharacterClass:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Style/RedundantRegexpEscape:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Style/RedundantReturn:
|
|
|
|
Enabled: true
|
|
|
|
|
2022-06-09 15:25:23 -05:00
|
|
|
Style/RedundantBegin:
|
|
|
|
Enabled: false
|
|
|
|
|
2017-06-01 10:24:30 -05:00
|
|
|
Style/RegexpLiteral:
|
2017-05-01 09:31:02 -05:00
|
|
|
Enabled: false
|
|
|
|
|
2020-08-31 20:04:00 -05:00
|
|
|
Style/RescueStandardError:
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
Enabled: true
|
2020-08-31 20:04:00 -05:00
|
|
|
|
|
|
|
Style/SignalException:
|
|
|
|
Enabled: false
|
|
|
|
|
|
|
|
Style/SlicingWithRange:
|
|
|
|
Enabled: true
|
|
|
|
|
2017-06-08 06:24:28 -05:00
|
|
|
Style/SymbolArray:
|
|
|
|
Enabled: false
|
|
|
|
|
2018-06-04 07:49:10 -05:00
|
|
|
Style/TrailingCommaInArrayLiteral:
|
|
|
|
EnforcedStyleForMultiline: 'comma'
|
|
|
|
|
|
|
|
Style/TrailingCommaInHashLiteral:
|
2017-06-01 10:24:30 -05:00
|
|
|
EnforcedStyleForMultiline: 'comma'
|
2020-08-31 20:04:00 -05:00
|
|
|
|
|
|
|
Style/UnpackFirst:
|
|
|
|
Enabled: false
|
linting: RuboCop update, config fixes (#20574)
* fix(rubocop): update gems and add performance and rspec
fix(rubocop): update gems and add performance and rspec
- update present rubocop gems
- add rubocop-rspec and rubocop-performance gems
- move rubocop gems to gem group :development, :test in order to
make linting in a github action that runs with RAILS_ENV=test possible
* feat(rubocop): disable some annoyance RSpec cops
To mee these prooved to be more annoying than helpful.
If not agreed, they can be enabled any time.
* fix(rubocop): do not ignore spec/**/*
Because rubocop-rspec should lint the specs as well, and they
deserve to be readable in general. It is relevant code, after all.
* fix(rubocop): change ignore db/**/* to db/schema.rb
because rails cops do some lints for migrations.
E.g. reversable migrations linting and more.
* fix(rubocop): tune rules configs
Bunch of commits squashed:
fix(rubocop): enable Layout/LineLength cop
Because this project has code with line lenghts > 500 chars.
This is not good practice at all, so I strongly suggest to
change the practice in the future.
But allow heredoc, URI and comments to still be long lines
and make the default Max: 120 explicit, by repeating it in the
config. To me this max length seems reasonable. Perhaps
a bit more could be ok for some. But > 500 chars in one line
Seems to be way too long IMHO.
fix(rubocop): Metrics/CyclomaticComplexity Max to 12
The default is 7, perhaps quite strict. But 25 is too loose,
the rule becomes pointless like that.
fix(rubocop): AllCops ruby version, cacheing and more info
- fix the target ruby version from 2.5 to 3.0
- have the cop error messages to be more informative and helpful
- enable cacheing in /tmp
fix(rubocop): Metrics/AbcSize to 34 from 115
Rubocops default is 17. If the rule is at 115 is becomes
pointless.
fix(rubocop): Metrics/BlockLength improvements
- instead of ignoring tasks completely, ignore only the
long blocks that are specific to tasks (task, namespace)
- ignore also concern specific block methods (included, class_methods)
fix(rubocop): Metrics/ClassLength count heredoc array as one line
fix(rubocop): Metrics/MethodLength Max to 25
- the default is 10, but 65 is too loose, so perhaps 25?
fix(rubocop): Metrics/ModuleLength array and heredoc count as one
fix(rubocop): Metrics/PerceivedComplexity to 16 from 25
Rubocops default is 8, so how about only doubling that, instead
of > than tripple it?
fix(rubocop): enable Style/RedundantAssignment
Because I think that this rule would never really hurt,
but improve code quality and readability.
fix(rubocop): enable Style/RescueStandardError
I think everyone that ever had to debug what this can bring
will hopefully agree that this rule totally makes sense.
In the super rare exeptions where this is totally needed,
it can be excluded by disabling comment in that place.
fix(rubocop): Metrics/ParameterLists add explicit defaults and some excludes
2022-12-15 09:39:59 -06:00
|
|
|
|
|
|
|
RSpec/ScatteredSetup:
|
|
|
|
Enabled: false
|
|
|
|
RSpec/ImplicitExpect:
|
|
|
|
Enabled: false
|
|
|
|
RSpec/NamedSubject:
|
|
|
|
Enabled: false
|
|
|
|
RSpec/DescribeClass:
|
|
|
|
Enabled: false
|
|
|
|
RSpec/LetSetup:
|
|
|
|
Enabled: false
|