Commits on Source 45
-
Peter Leitzen authored
Changelog: fixed
-
Rémy Coutable authored
Cop/GemFetcher: Match also when gem version is used See merge request !148 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
David Dieulivol <ddieulivol@gitlab.com> Approved-by:
Rémy Coutable <remy@rymai.me> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
* RuboCop 1.43.0 * RuboCop GraphQL 0.18 * RuboCop Performance 1.15 * RuboCop Rails 2.17 * RuboCop RSpec 2.16 Changelog: changed
-
Doug Stull authored
Update RuboCop to 1.43.0 and RuboCop RSpec See merge request !146 Merged-by:
Doug Stull <dstull@gitlab.com> Approved-by:
David Dieulivol <ddieulivol@gitlab.com> Approved-by:
Doug Stull <dstull@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
* Lint/AmbiguousAssignment * Lint/AmbiguousOperatorPrecedence * Lint/AmbiguousRange * Lint/ConstantOverwrittenInRescue * Lint/DeprecatedConstants * Lint/DuplicateBranch * Lint/DuplicateMagicComment * Lint/DuplicateRegexpCharacterClassElement * Lint/EmptyBlock * Lint/EmptyClass * Lint/EmptyInPattern
-
Rémy Coutable authored
Enable a set of Lint/* cops See merge request !141 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
Alina Mihaila <amihaila@gitlab.com> Approved-by:
Rémy Coutable <remy@rymai.me> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Peter Leitzen authored
* Upgrade rake to make it work with newer Ruby version * Upgrade rspec-parameterized to make it work with Ruby 3.2 Error: Refinement#include has been removed -
Doug Stull authored
CI: Test more Ruby versions See merge request !147 Merged-by:
Doug Stull <dstull@gitlab.com> Approved-by:
Doug Stull <dstull@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Peter Leitzen authored
Changelog: added
-
Rémy Coutable authored
Enable cop Security/CompoundHash See merge request !150 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
David Dieulivol <ddieulivol@gitlab.com> Approved-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Rémy Coutable <remy@rymai.me> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Enabling: - Lint/UnusedBlockArgument - Lint/UnusedMethodArgument Changelog: changed
-
Peter Leitzen authored
Enabling unused arguments rules See merge request !149 Merged-by:
Peter Leitzen <pleitzen@gitlab.com> Approved-by:
Peter Leitzen <pleitzen@gitlab.com> Co-authored-by:
Omar Qunsul <oqunsul@gitlab.com>
-
This commit moves all cops related to GitlabSecurity from rubocop-gitlab-security into gitlab-styles. It also adds missing specs and modernizes the implementation where possible. GitlabSecurity/JsonSerialization is an exception and it still inherits from a deprecated RuboCop class (see InternalAffairs/InheritDeprecatedCopClass). Contributes to gitlab-org/rubocop-gitlab-security#5 Changelog: added
-
Rémy Coutable authored
Add GitlabSecurity cops from rubocop-gitlab-security See merge request !151 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
Sean McGivern <sean@gitlab.com> Approved-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Peter Leitzen <pleitzen@gitlab.com> Reviewed-by:
Sean McGivern <sean@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Peter Leitzen authored
Minimal coverage is only enabled on CI to not prevent specs from failing locally when run individually.
-
Doug Stull authored
CI: Track spec coverage via simplecov See merge request !152 Merged-by:
Doug Stull <dstull@gitlab.com> Approved-by:
Doug Stull <dstull@gitlab.com> Reviewed-by:
Peter Leitzen <pleitzen@gitlab.com> Reviewed-by:
Doug Stull <dstull@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Example: # bad collection.each do puts _1 end collection.each { puts _1 } # good collection.each do |item| end Changelog: added -
Rémy Coutable authored
Enable Style/NumberedParameters disallowing use of _1 See merge request !153 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
Alina Mihaila <amihaila@gitlab.com> Approved-by:
Alper Akgun <aakgun@gitlab.com>
Approved-by: Vitali Tatarintev <vtatarintev@gitlab.com> Approved-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Rémy Coutable <remy@rymai.me> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Running integration specs like `yml_spec.rb` takes 15s of total 17s. This is slow when run in lefthook before each push and might annoy developers. For this reason, we exclude these specs. They are still run in CI. Because we exclude `spec/` now the coverage decreased to 98.73.
-
Doug Stull authored
Don't run integration specs in lefthook See merge request !155 Merged-by:
Doug Stull <dstull@gitlab.com> Approved-by:
Doug Stull <dstull@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Additionally to identifiers etc. this cop also checks strings for misused terms. It also fixes remaining offenses for Naming/InclusiveLanguage. Changelog: added
-
Rémy Coutable authored
Enable Naming/InclusiveLanguage cop rule See merge request !159 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
Kassio Borges <kborges@gitlab.com>
Approved-by: David Dieulivol <ddieulivol@gitlab.com> Approved-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Rémy Coutable <remy@rymai.me> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Because Style/NumberedParameters was enabled and configured to disallow any use of numbered parameters (_1 etc.) there's no need to enable Style/NumberedParametersLimi. Changelog: added
-
Rémy Coutable authored
Disable Style/NumberedParametersLimit permanently See merge request !154 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Rémy Coutable <remy@rymai.me> Co-authored-by:
Thong Kuah <tkuah@gitlab.com>
-
Now, we are also allowing RuboCop to suggest extensions again. Changelog: added
-
Rémy Coutable authored
Add rubocop-rake as a development dependency Closes #39 See merge request !161 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
Alina Mihaila <amihaila@gitlab.com> Approved-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Peter Leitzen <pleitzen@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Use RuboCop's Include/Exclude directives instead. BREAKING CHANGE: Previously, we checked for app/models/**/*.rb and ee/app/models/**/*.rb. In this commit we are only adding app/models/**/*.rb back as most projects using gitlab-styles won't have a ee/ folder. Projects (most likely on gitlab-org/gitlab) which do have an ee/ folder must add the following configuration to `.rubocop.yml`: Cop/ActiveRecordDependent: Include: - app/models/**/*.rb - ee/app/models/**/*.rb - jh/app/models/**/*.rb Cop/ActiveRecordSerialize: Include: - app/models/**/*.rb - ee/app/models/**/*.rb - jh/app/models/**/*.rb Cop/PolymorphicAssociations: Include: - app/models/**/*.rb - ee/app/models/**/*.rb - jh/app/models/**/*.rb Changelog: changed -
Doug Stull authored
Stop checking for models location programmatically See merge request !156 Merged-by:
Doug Stull <dstull@gitlab.com> Approved-by:
Jennifer Li <jli@gitlab.com> Approved-by:
Doug Stull <dstull@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Peter Leitzen authored
This commit fixes the autocorrection functionality for Cop/LineBreakAfterGuardClauses and improves its spec coverage. Changelog: fixed
-
Doug Stull authored
Fix autocorrection for Cop/LineBreakAfterGuardClauses See merge request !157 Merged-by:
Doug Stull <dstull@gitlab.com> Approved-by:
David Dieulivol <ddieulivol@gitlab.com> Approved-by:
Doug Stull <dstull@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Finding the relevant files is performed by test_file_finder.
-
Doug Stull authored
Run only relevant specs in lefthook See merge request !162 Merged-by:
Doug Stull <dstull@gitlab.com> Approved-by:
David Dieulivol <ddieulivol@gitlab.com> Approved-by:
Doug Stull <dstull@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Peter Leitzen authored
Use RuboCop's `Include` directive instead. With this the cop is now also inspecting controller concerns (not ending with _controller.rb). This commit also refactors to cop to use the RESTRICT_ON_SEND optimization and improves code coverage. Changelog: fixed
-
Doug Stull authored
Cop/RedirectWithStatus: Stop checking location programmatically See merge request !158 Merged-by:
Doug Stull <dstull@gitlab.com> Approved-by:
Doug Stull <dstull@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Peter Leitzen authored
This commit enables the following cops: * Lint/IncompatibleIoSelectWithFiberScheduler * Lint/LambdaWithoutLiteralBlock * Lint/NonAtomicFileOperation * Lint/NoReturnInBeginEndBlocks * Lint/OrAssignmentToConstant * Lint/RedundantDirGlobSort * Lint/RefinementImportMethods * Lint/RequireRangeParentheses * Lint/RequireRelativeSelfPath * Lint/SymbolConversion * Lint/ToEnumArguments * Lint/TripleQuotes * Lint/UnexpectedBlockArity * Lint/UnmodifiedReduceAccumulator * Lint/UselessRuby2Keywords It also disables the following cops explicitly: * Lint/NumberedParameterAssignment Changelog: added
-
Peter Leitzen authored
Enable another set of Lint/* cops See merge request !160 Merged-by:
Peter Leitzen <pleitzen@gitlab.com> Approved-by:
Jennifer Li <jli@gitlab.com> Approved-by:
Doug Stull <dstull@gitlab.com>
-
Fix all offenses. Changelog: added
-
Rémy Coutable authored
Enable cop Layout/EmptyLineAfterMagicComment Closes #31 See merge request !163 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
Brian Williams <bwilliams@gitlab.com>
Approved-by: Rémy Coutable <remy@rymai.me> Reviewed-by:
Rémy Coutable <remy@rymai.me> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Peter Leitzen authored
Capybara cops have been extracted into rubocop-capybara and moved from RSpec/Capybara/* into Capybara/*. Changelog: changed
-
Rémy Coutable authored
Upgrade rubocop-rspec to 2.18.1 See merge request !164 Merged-by:
Rémy Coutable <remy@rymai.me> Approved-by:
Jennifer Li <jli@gitlab.com> Approved-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Rémy Coutable <remy@rymai.me> Reviewed-by:
Peter Leitzen <pleitzen@gitlab.com> Co-authored-by:
Peter Leitzen <pleitzen@gitlab.com>
-
Brian Williams authored
-
Peter Leitzen authored
Fix false negative when a safe accessor is used Closes #54 Changelog: other See merge request !165 Merged-by:
Peter Leitzen <pleitzen@gitlab.com> Approved-by:
Nao Hashizume <nhashizume@gitlab.com> Approved-by:
Peter Leitzen <pleitzen@gitlab.com> Reviewed-by:
Nao Hashizume <nhashizume@gitlab.com> Co-authored-by:
Brian Williams <bwilliams@gitlab.com> -
Albert authored
-
Peter Leitzen authored
Disable Style/ArrayCoercion due to safety concern Changelog: removed See merge request !166 Merged-by:
Peter Leitzen <pleitzen@gitlab.com> Approved-by:
Thong Kuah <tkuah@gitlab.com> Approved-by:
Peter Leitzen <pleitzen@gitlab.com> Co-authored-by:
Albert Salim <asalim@gitlab.com>
-
Omar Qunsul authored