From 1aefbe56a0d79299ba0a10f2107751ed41914c2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 02:55:32 +0000 Subject: [PATCH 1/2] Update rubocop requirement from ~> 1.60.2 to ~> 1.75.8 Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.60.2...v1.75.8) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.75.8 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index f2e154a..ffbd52c 100644 --- a/Gemfile +++ b/Gemfile @@ -9,5 +9,5 @@ gem "codeclimate-test-reporter", "0.4.4" gem "pry" gem "rake" gem "rspec", "~> 3.1" -gem "rubocop", "~> 1.60.2" +gem "rubocop", "~> 1.76.0" gem "simplecov", "!= 0.18.0", "!= 0.18.1", "!= 0.18.2", "!= 0.18.3", "!= 0.18.4", "!= 0.18.5", "!= 0.19.0", "!= 0.19.1" From e12645ad7451082d8c8fc12e03f94d527308aa2c Mon Sep 17 00:00:00 2001 From: Ayato Suzuki <54477535+P-SiZK@users.noreply.github.com> Date: Thu, 5 Jun 2025 12:41:47 +0900 Subject: [PATCH 2/2] Update RuboCop configuration and improve code block filter logic --- .rubocop.yml | 14 +++++++------- lib/qiita/markdown/filters/code_block.rb | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index d1a33ff..5f68966 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,9 +3,16 @@ inherit_from: .rubocop_todo.yml AllCops: NewCops: enable +Layout/LineLength: + Enabled: false + Metrics/ClassLength: Enabled: false +Naming/PredicatePrefix: + ForbiddenPrefixes: + - is_ + Style/Documentation: Enabled: false @@ -15,10 +22,6 @@ Style/EmptyCaseCondition: Style/GuardClause: Enabled: false -Style/PredicateName: - ForbiddenPrefixes: - - is_ - Style/StringLiterals: EnforcedStyle: double_quotes @@ -34,9 +37,6 @@ Style/TrailingCommaInArrayLiteral: Style/RedundantPercentQ: Enabled: false -Metrics/LineLength: - Enabled: false - Metrics/BlockLength: Exclude: - qiita-markdown.gemspec diff --git a/lib/qiita/markdown/filters/code_block.rb b/lib/qiita/markdown/filters/code_block.rb index d10eed3..55da625 100644 --- a/lib/qiita/markdown/filters/code_block.rb +++ b/lib/qiita/markdown/filters/code_block.rb @@ -82,7 +82,7 @@ def empty? end def has_only_filename? - sections[1].nil? && sections[0] && sections[0].include?(".") + sections[1].nil? && sections[0]&.include?(".") end def linguist_language