Skip to content

[chore]春のlint修正祭り〜API編〜 #1794

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

Draft
wants to merge 8 commits into
base: gm3/develop
Choose a base branch
from

Conversation

nose221834
Copy link
Collaborator

@nose221834 nose221834 commented Apr 6, 2025

対応Issue

resolve #0

概要

  • RailsのAPIにlintをかけてみました。

実装詳細

  • Rubocopのinstall
  • Rubocupを使ってformat

画面スクリーンショット等

テスト項目

  • 動作確認
  • [ ]
  • [ ]

備考

コードを眺めた感じ、ぱっと見破壊的変更はなさそうだった
動かして確認してないから、大丈夫か確認して欲しい

@nose221834 nose221834 changed the title Feat/nose/rails lint [chore]春のlint修正祭り〜API編〜 Apr 8, 2025
@YosukeIida YosukeIida requested a review from Copilot April 12, 2025 08:42
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 407 out of 407 changed files in this pull request and generated 2 comments.

if group.nil?
next
def output_sub_reps_csv
if params[:fes_year_id].to_id.zero?
Copy link
Preview

Copilot AI Apr 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'to_id' for converting params to integer is likely a mistake if no such method exists. Consider replacing 'to_id' with 'to_i' to ensure proper integer conversion.

Suggested change
if params[:fes_year_id].to_id.zero?
if params[:fes_year_id].to_i.zero?

Copilot uses AI. Check for mistakes.

end
end
if @employees.count.zero?
render json: fmt(not_found, [], 'Not found empolees')
Copy link
Preview

Copilot AI Apr 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message contains a typo ('empolees' should be 'employees').

Suggested change
render json: fmt(not_found, [], 'Not found empolees')
render json: fmt(not_found, [], 'Not found employees')

Copilot uses AI. Check for mistakes.

@nose221834 nose221834 marked this pull request as draft May 6, 2025 15:03
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

Successfully merging this pull request may close these issues.

1 participant