- Feb 17, 2020
-
-
GitLab Bot authored
-
- Feb 14, 2020
-
-
GitLab Bot authored
-
- Feb 13, 2020
-
-
GitLab Bot authored
-
- Feb 04, 2020
-
-
GitLab Bot authored
-
- Jan 29, 2020
-
-
GitLab Bot authored
-
- Jan 15, 2020
-
-
GitLab Bot authored
-
- Dec 19, 2019
-
-
GitLab Bot authored
-
- Dec 04, 2019
-
-
GitLab Bot authored
-
- Dec 01, 2019
-
-
GitLab Bot authored
-
- Nov 28, 2019
-
-
GitLab Bot authored
-
- Nov 07, 2019
-
-
GitLab Bot authored
-
- Oct 16, 2019
-
-
GitLab Bot authored
-
- Sep 13, 2019
-
-
GitLab Bot authored
-
GitLab Bot authored
-
- Sep 10, 2019
-
-
Alessio Caiazza authored
This cop prevents you from using file in API, it points you to the development documentation about workhorse file acceleration.
-
- Aug 28, 2019
-
-
Vitali Tatarintev authored
Prevent using `be_success` call in controller specs to avoid getting following deprecation warning: ``` DEPRECATION WARNING: The success? predicate is deprecated and will be removed in Rails 6.0. Please use successful? as provided by Rack::Response::Helpers. ```
-
- Aug 23, 2019
-
-
Mayra Cabrera authored
This cop will analyze migrations that add columns with string, and report an offense if the string has no limit enforced Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/64505
-
- Aug 01, 2019
-
-
Sean McGivern authored
The RSpec/FilePath cop checks that a spec file's path is correct, but only if the file describes a constant. We want to check, for any file with a top-level `describe`, whether the file path ends in `_spec.rb`. We don't care what comes before that; just that it will be executed by RSpec at all.
-
- Jul 10, 2019
-
-
Mayra Cabrera authored
Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
-
- Jun 21, 2019
-
-
Bob Van Landuyt authored
-
- May 05, 2019
-
-
Stan Hu authored
-
- Apr 29, 2019
-
-
Stan Hu authored
-
- Apr 15, 2019
-
-
Kamil Trzcińśki authored
The `#reload` makes to load all objects into memory, and the main purpose of `#reload` is to drop the association cache. The `#reset` seems to solve exactly that case.
-
- Dec 13, 2018
-
-
Yorick Peterse authored
This Cop enforces the rule that injecting EE modules (using prepend, include, or extend) is done by placing the injection on the last line of a file, instead of somewhere in the middle. By placing these lines at the very end, merge conflicts will not happen.
-
- Nov 22, 2018
-
-
Jarka Kadlecova authored
-
- Oct 15, 2018
-
-
Rémy Coutable authored
This cop forbids the use of `element :foo, 'pattern'` and `element :bar, /pattern/` in QA files. Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Sep 24, 2018
-
-
Tiago Botelho authored
-
- Sep 21, 2018
-
-
- Sep 17, 2018
-
-
Yorick Peterse authored
This commit adds the module `FromUnion`, which provides the class method `from_union`. This simplifies the process of selecting data from the result of a UNION, and reduces the likelihood of making mistakes. As a result, instead of this: union = Gitlab::SQL::Union.new([foo, bar]) Foo.from("(#{union.to_sql}) #{Foo.table_name}") We can now write this instead: Foo.from_union([foo, bar]) This commit also includes some changes to make this new setup work properly. For example, a bug in Rails 4 (https://github.com/rails/rails/issues/24193) would break the use of `from("sub-query-here").includes(:relation)` in certain cases. There was also a CI query which appeared to repeat a lot of conditions from an outer query on an inner query, which isn't necessary. Finally, we include a RuboCop cop to ensure developers use this new module, instead of using Gitlab::SQL::Union directly. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
-
- Sep 11, 2018
-
-
Yorick Peterse authored
These Cops enforces the code reuse rules as defined in merge request https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21254.
-
- Aug 29, 2018
-
-
Jacopo authored
-
- Aug 25, 2018
-
-
Bob Van Landuyt authored
When using ruby interpolation in externalized strings, they can't be detected. Which means they will never be presented to be translated. To mix variables into translations we need to use `sprintf` instead. Instead of: _("Hello #{subject}") Use: _("Hello %{subject}) % { subject: 'world' }
-
- Aug 16, 2018
-
-
Yorick Peterse authored
This method usually has really bad performance implications, as it loads rows into memory and deletes them one by one.
-
- Aug 08, 2018
-
-
Andreas Brandl authored
-
- Jun 20, 2018
-
-
Bob Van Landuyt authored
This notifies developers when calling `find(_by!)` chained on `execute`. And suggests using the methods from `FinderMethods`. These will perform the correct authorization checks on the resource when it is found.
-
- Apr 18, 2018
-
-
Yorick Peterse authored
This reverts the addition of the "goldiloader" Gem and all use of it. While this Gem is very promising it's causing a variety of problems on GitLab.com due to it eager-loading too much data in places where we don't expect/can handle this. At least for the time being this means we have to go back to manually fixing N+1 query problems, but at least those should not cause a negative impact on availability.
-
🙈 jacopo beschi 🙉 authored
-
- Apr 09, 2018
-
-
Sean McGivern authored
Goldiloader is great, but has several issues with has_many :through relations: * https://github.com/salsify/goldiloader/issues/12 * https://github.com/salsify/goldiloader/issues/14 * https://github.com/salsify/goldiloader/issues/18 Rather than try to figure out which applies in each case, we should just do the drudge work of manually disabling autoloading for all relations of this type. We can always use regular preloading for specific cases, but this way we avoid generating invalid queries through Goldiloader's magic.
-
- Apr 06, 2018
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Mar 21, 2018
-
-
Server Side Request Forgery in Services and Web Hooks See merge request gitlab/gitlabhq!2337
-