Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuboCopのバージョンについて #44

Closed
gemmaro opened this issue Oct 3, 2021 · 5 comments
Closed

RuboCopのバージョンについて #44

gemmaro opened this issue Oct 3, 2021 · 5 comments

Comments

@gemmaro
Copy link
Contributor

gemmaro commented Oct 3, 2021

このリポジトリには既に .rubocop.yml がありますが、RuboCop v1.22.0 では警告及びエラーが出ます(実行結果は末尾)。
aozora2html.gemspec ファイルに rubocopmeowcop が追記されていると、 $ bundle install から $ bundle exec rubocop として検査できるようになります。
つきまして適切なRuboCopとMeowCopのバージョンがわかりましたら、追記いただけますと幸いです。

想定される変更は以下:

  • aozora2html.gemspec へのRuboCop, MeowCopの追加
  • .rubocop.yml の更新
    • $ bundle exec rubocop --auto-gen-config が利用できる場合、 .rubocop-todo.yml の追加も考えられます
  • GitHub ActionsでのRuboCopにしたがった検査の追加
    • .github/workflows/ruby.yml への追記、または別のワークフローを追加

実行結果:

aozora2html on  master via 💎 v2.7.4 
❯ rubocop            
.rubocop.yml:59: `Style/Encoding` is concealed by line 129
.rubocop.yml:28: `Layout/SpaceBeforeBlockBraces` is concealed by line 220
.rubocop.yml:46: `Style/ClassAndModuleChildren` is concealed by line 226
.rubocop.yml: Style/MethodName has the wrong namespace - should be Naming
.rubocop.yml: Style/VariableName has the wrong namespace - should be Naming
.rubocop.yml: Style/VariableNumber has the wrong namespace - should be Naming
.rubocop.yml: Metrics/LineLength has the wrong namespace - should be Layout
Error: The `Layout/AlignParameters` cop has been renamed to `Layout/ParameterAlignment`.
(obsolete configuration found in .rubocop.yml, please update it)
The `Layout/TrailingBlankLines` cop has been renamed to `Layout/TrailingEmptyLines`.
(obsolete configuration found in .rubocop.yml, please update it)
The `Lint/StringConversionInInterpolation` cop has been renamed to `Lint/RedundantStringCoercion`.
(obsolete configuration found in .rubocop.yml, please update it)
The `Style/UnneededPercentQ` cop has been renamed to `Style/RedundantPercentQ`.
(obsolete configuration found in .rubocop.yml, please update it)
`Performance` cops have been extracted to the `rubocop-performance` gem.
(obsolete configuration found in .rubocop.yml, please update it)

aozora2html on  master via 💎 v2.7.4 
❯ rubocop -v  
1.22.0
@takahashim
Copy link
Contributor

確かにこれは古いので修正しないといけないですね…。
とはいえ動作環境的にrubocopを動かすためのGemfileは別途用意した方がいいかもしれません。

@takahashim
Copy link
Contributor

こちらですが、いったん現状のRuby 2.x用のバージョンをaozora2html-2.0としてリリースして、Ruby 2.7以降に対応したバージョンをaozora2html-3.xシリーズとする方向で考えています。

This was referenced Dec 5, 2021
@takahashim
Copy link
Contributor

もろもろ修正して、GitHub Actionsの方も追加しておきました。
.rubocop_todo.ymlにある課題に対応していくのは随時やっていきます。

@takahashim
Copy link
Contributor

@gemmaro rubocop周りはあらかた整理して対応できたつもりです。このissueは閉じてしまって問題ないでしょうか?

@gemmaro
Copy link
Contributor Author

gemmaro commented Dec 12, 2021

はい、問題ありません。ご対応いただきありがとうございました。

@gemmaro gemmaro closed this as completed Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants