Amire80 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/194482
Change subject: Fix Rubocop offense NilComparison
......................................................................
Fix Rubocop offense NilComparison
Change-Id: I6e3fd90b3222302b0e355a3dfdc3d4ae50852f6e
---
M .rubocop_todo.yml
M tests/browser/features/step_definitions/special_content_translation_steps.rb
M tests/browser/features/support/pages/red_link_page.rb
3 files changed, 2 insertions(+), 7 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/82/194482/1
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 6f7b871..daabe6a 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -13,8 +13,3 @@
# Offense count: 6
Style/Documentation:
Enabled: false
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Style/NilComparison:
- Enabled: false
diff --git
a/tests/browser/features/step_definitions/special_content_translation_steps.rb
b/tests/browser/features/step_definitions/special_content_translation_steps.rb
index 5cc78cd..ea28616 100644
---
a/tests/browser/features/step_definitions/special_content_translation_steps.rb
+++
b/tests/browser/features/step_definitions/special_content_translation_steps.rb
@@ -122,7 +122,7 @@
end
Then(/^the source column text is not editable$/) do
-
on(ContentTranslationPage).content('source').attribute_value('contenteditable').should
== nil
+
on(ContentTranslationPage).content('source').attribute_value('contenteditable').should.nil?
end
Then(/^the text near the translation progress bar says "(.*?)"$/) do |text|
diff --git a/tests/browser/features/support/pages/red_link_page.rb
b/tests/browser/features/support/pages/red_link_page.rb
index f7f1c8f..2b3f23b 100644
--- a/tests/browser/features/support/pages/red_link_page.rb
+++ b/tests/browser/features/support/pages/red_link_page.rb
@@ -22,7 +22,7 @@
text_field(:language_filter, id: 'languagefilter')
def create_page(text)
- if (ENV['MEDIAWIKI_API_URL'] == nil)
+ if ENV['MEDIAWIKI_API_URL'].nil?
abort 'Environment variable MEDIAWIKI_API_URL must be set in order to
create a target page for this test'
end
--
To view, visit https://gerrit.wikimedia.org/r/194482
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e3fd90b3222302b0e355a3dfdc3d4ae50852f6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits