- 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
-
-
Yorick Peterse authored
This ensures the InjectEnterpriseEditionModule cop is able to detect the prepend patterns used in the qa/ directory. Previously it would not detect them as all EE QA modules reside in QA::EE, and not the top-level EE namespace.
-
Vitali Tatarintev authored
-
Vitali Tatarintev authored
-
Vitali Tatarintev authored
Use Rubocop's Include instead of manually checking the matcher in controllers specs.
-
Vitali Tatarintev authored
BeSuccessMatcher now supports following examples: ``` expect(response).to be_success expect(response).to_not be_success expect(response).not_to be_success is_expected.to be_success is_expected.to_not be_success is_expected.not_to be_success ```
-
Vitali Tatarintev authored
-
Vitali Tatarintev authored
-
Vitali Tatarintev authored
-
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 26, 2019
-
-
Peter Leitzen authored
Stop checking the file location programmatically.
-
- 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 30, 2019
-
-
Yorick Peterse authored
This extends the InjectEnterpriseEditionModule RuboCop cop so that it verifies the following: 1. The line number the injection occurs on (as before). 2. The method used (e.g. prepend instead of prepend_if_ee). 3. The argument type passed when using the new module injection methods.
-
- Jul 10, 2019
-
-
Daniel Davison authored
Using quotes within string validations can be messy. Let's use a typical CSS selector for an unquoted attribute Update the cop spec to validate appropriate new message
-
Daniel Davison authored
In order to break away from using CSS classes as our primary method of element identification, we need to provide the ability to search for data attributes. Make Test::Sanity::Selectors now work Utilize regex to match on literal strings of the element name Suggest the data-qa-selector pattern vs the qa- Add data-qa-selector to login page to start We need a page that is heavily used in order to be confident that this functionality works. Let's start with the Login page Use appropriate HAML data tag practices
-
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 21, 2019
-
-
Luke Duncalfe authored
This provides the user with some context as to why certain ActiveRecord methods are blacklisted.
-
- May 20, 2019
-
-
Daniel Davison authored
Elements now have the ability to be required on pages or not Currently using the default wait mechanism Altered the ElementWithPattern Cop to fit new splat for init
-
- May 05, 2019
- May 03, 2019
-
-
Stan Hu authored
This saves thousands of getcwd() system calls and improves the performance of running Rubocop, which is also used by HAML linting. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/61383
-
- 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.
-
- Mar 27, 2019
-
-
Heinrich Lee Yu authored
-
- Jan 16, 2019
-
-
Yorick Peterse authored
The InjectEnterpriseEditionModule cop would not detect certain nested EE constants such as `EE::Foo::Bar::Baz`. This could result in it not enforcing `prepend` being placed on the last line. This commit fixes this by just performing a string match on the line, instead of relying on AST matching.
-
Bob Van Landuyt authored
The Background migration specs also run against a certain version of the database. So we should avoid using factories.
-
- 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 27, 2018
-
-
Toon Claes authored
It might happen you want to make the reference column have a unique value, or you want to create partial indexes. So instead of only accepting a `true` value, also accept a hash of options.
-
- Nov 22, 2018
-
-
Jarka Kadlecova authored
-
- Oct 31, 2018
-
-
Douglas Barbosa Alexandre 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 19, 2018
-
-
Bob Van Landuyt authored
This removes an unused constant from the `RubyInterpolationInTranslation`. The constant was used in a first implementation of this class.
-
- 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.
-
- Sep 05, 2018
-
-
Robert Speicher authored
Previously this would violate on the `if`: def a_method do_something rescue if condition do_something end end
-
- Aug 29, 2018
-
-
Jacopo authored
-