Commit Graph

102 Commits

Author SHA1 Message Date
Krasimir Angelov c4b804c6db Rename API::Internal class to API::Internal::Base
so that we can use API::Internal namespace.

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/61927.
2019-09-04 10:07:49 +12:00
Peter Leitzen e0ce29ad06 Provide filename and line number for `class_eval`
This commit removes one RuboCop offense from its todo file.
2019-09-02 18:05:33 +00:00
Stan Hu 07a308ad1b Enable Rubocop Performance/ReverseEach
`Array.reverse_each` is faster than `Array.reverse.each` because:

* reverse.each creates a new array then loops each element
* reverse_each loops in reverse order (no intermediate array created)
2019-07-24 14:08:25 -07:00
Stan Hu 3e001d29cc Enable Rubocop Performance/InefficientHashSearch
When used with a Hash, `.keys.include?` is bad because:

1. It performs a O(n) search instead of the efficient `.has_key?`
2. It clones all keys into separate array.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64975
2019-07-24 11:47:58 -07:00
James Fargher 398c0e48f7 Remove now unused KubernetesService methods
Now that KubernetesService can no longer be a DeploymentPlatform we can
remove all kubernetes client code and KubernetesService edge cases.
2019-07-05 06:41:07 +12:00
James Fargher 6b9157d5dc Make KubernetesService readonly
We are deprecating this service in favor of instance wide clusters.
Therefore we removed some code that is not anymore needed for a
readonly cluster and also we added some flags to allow for this
deprecation. These flags are to be removed in the next release when
we finally completelly remove KubernetesService.
2019-06-18 00:01:56 +00:00
Stan Hu 525a9f927c Update .rubocop_todo.yml 2019-05-05 03:24:28 -07:00
Stan Hu 17db4bf0d2 Regenerate Rubocop rules 2019-05-05 03:24:28 -07:00
Stan Hu d40298c858 Upgrade to Rubocop 0.68.1
This adds Ruby 2.6 support.
2019-05-05 03:24:27 -07:00
Sean McGivern cd9ae6bb82 Revert "Remove HipChat integration from GitLab"
This reverts commit a5378665a1.
2019-04-10 12:58:18 +01:00
Nick Thomas a5378665a1
Remove HipChat integration from GitLab 2019-02-08 18:20:38 +00:00
Semyon Pupkov 63d220f237 Fix ReturnInVoidContext rubocop offense 2019-02-01 14:04:26 +05:00
Andrew Newdigate ff0b2cc61f Re-enable MethodCallWithoutArgsParentheses Cop
Re-enables and autocorrects all instances of the
Style/MethodCallWithoutArgsParentheses rule
2019-01-29 21:05:30 +02:00
Rémy Coutable 3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Semyon Pupkov c379973bce chore(rubocop): fix Style/TrivialAccessors issues 2019-01-16 13:53:04 +05:00
Rémy Coutable d8c4252273 Merge branch 'fix-rspec-offcense' into 'master'
Fix RSpec/HookArgument rubocop offense

See merge request gitlab-org/gitlab-ce!23776
2018-12-17 09:47:48 +00:00
Semyon Pupkov db267fa31b Fix RSpec/HookArgument rubocop offense 2018-12-11 11:29:58 +05:00
Semyon Pupkov 7b98257453 Fix ConstantName rubocop offense 2018-12-09 22:45:48 +05:00
Rémy Coutable 5d2b319de5 Merge branch 'fix-todo-cops' into 'master'
Fix todo cops

See merge request gitlab-org/gitlab-ce!21850
2018-10-04 10:17:43 +00:00
Alejandro Rodríguez a99bf447a2 Remove Gitlab::Git::Repository#rugged and Gollum code
Cleanup code, and refactor tests that still use Rugged. After this, there should
be no Rugged code that access the instance's repositories on non-test
environments. There is still some rugged code for other tasks like the
repository import task, but since it doesn't access any repository storage path
it can stay.
2018-10-02 16:34:28 -03:00
Semyon Pupkov 869d8e814e Fix UriDefaultParser cop 2018-09-21 12:37:57 +05:00
Semyon Pupkov 2d0839e542 Fix UnneededRequireStatement cop 2018-09-21 12:37:57 +05:00
Semyon Pupkov b1a4c123f1 Remove unused cops from todo 2018-09-21 12:37:57 +05:00
Semyon Pupkov 87b85ef81c Fix DynamicAttributeDefinedStatically cop 2018-09-21 12:37:57 +05:00
Semyon Pupkov 67cdb1d1be Fix SpaceInsidePercentLiteralDelimiters cop 2018-09-20 21:54:14 +05:00
Semyon Pupkov 6c0907894f Fix SpaceInsideArrayLiteralBrackets cop 2018-09-20 21:49:26 +05:00
Semyon Pupkov 6c31b607de Fix SpaceBeforeFirstArg cop 2018-09-20 21:47:34 +05:00
Semyon Pupkov def3ab2971 Fix rubocop Style/ZeroLengthPredicate 2018-09-18 14:31:17 +05:00
Rémy Coutable e874fdbacc
Explicitly disable the Style/SafeNavigation cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-08-10 17:17:08 +02:00
Lin Jen-Shin 612f5e63b3 Update rubocop to get rid of a warning in other MR 2018-07-09 21:12:31 +08:00
Winnie Hellmann 3db2f32759 Enable Capybara/FeatureMethods cop 2018-07-05 06:32:05 +00:00
Marin Jankovski dd72134eba
Move the trigger-build script into one location to serve both omnibus and cloud-native triggers. 2018-06-14 16:31:32 +02:00
Francisco Javier López 4d3f7ae1ef
Removed API endpoint and specs 2018-05-30 18:23:07 +02:00
Rémy Coutable 023d4f6f2f
Move spec helpers/matchers/shared examples/contexts to their relevant folder
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-04-23 12:20:30 +02:00
Horatiu Eugen Vlad 1ad5df49b1 Moved o_auth/saml/ldap modules under gitlab/auth 2018-02-28 16:53:02 +01:00
Takuya Noguchi 2b6307f6ad Enable RuboCop Style/RegexpLiteral 2018-02-01 02:06:07 +09:00
Rémy Coutable a38739a47e Update gitlab-styles and re-enable the RSpec/SingleLineHook cop again
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-01-25 11:07:30 +01:00
Rémy Coutable 0c2e8ef857
Update rubocop, rubocop-rspec, and gitlab-styles
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-01-18 18:45:05 +01:00
Rémy Coutable a2d39b8010 Use gitlab-styles
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-12-22 08:34:44 -06:00
Maxim Rydkin 380dff622f exclude spec/ and features/ from `Style/PredicateName` cop 2017-08-29 11:51:15 +03:00
Maxim Rydkin e637f80243 add changelog 2017-08-29 11:14:42 +03:00
Maxim Rydkin 90112f57d2 replace `is_member_of` with `member_of?` 2017-08-29 11:14:42 +03:00
Maxim Rydkin e6c7c11a5b replace `has_matching_label` with `has_matching_label?` 2017-08-29 11:14:42 +03:00
Maxim Rydkin 48d3e5fac6 replace `is_edited?` with `edited?` 2017-08-29 11:14:41 +03:00
Robert Speicher 4edfad9678 Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
Robert Speicher c8b802471b Enable the RSpec/HookArgument cop and auto-correct offenses 2017-08-10 19:29:42 -04:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Takuya Noguchi 618c3e7d2a Bump rubocop to 0.49.1 and rubocop-rspec to 1.15.1 2017-08-01 09:05:25 +09:00
Rémy Coutable 1b0c6ffd51 Disable RSpec/BeforeAfterAll and enable RSpec/ImplicitExpect cops
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-30 17:52:27 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00