Skip to content

Conversation

@ikura-hamu
Copy link
Member

@ikura-hamu ikura-hamu commented Jul 11, 2025

User description

  • 🔧 lint用のタスクを追加
  • 🐛 コマンドのbase branchをmainに変更

PR Type

Enhancement


Description

  • golangci-lint用のlintタスクを追加

  • 自動修正対応のlint:fixタスクを追加

  • OS別Taskfileに同一タスクを反映

  • mainブランチ差分に対してlintを実行


Changes walkthrough 📝

Relevant files
Configuration changes
Taskfile.yml
ルートTaskfileにlintタスク追加                                                                       

Taskfile.yml

  • lintタスクを追加
  • lint:fixタスクを追加
  • 各タスクに説明文を設定
+10/-0   
Taskfile_darwin.yml
Darwin向けlintタスク追加                                                                               

task/Taskfile_darwin.yml

  • lintタスクを追加
  • lint:fixタスクを追加
+8/-0     
Taskfile_linux.yml
Linux向けlintタスク追加                                                                                 

task/Taskfile_linux.yml

  • lintタスクを追加
  • lint:fixタスクを追加
+8/-0     
Taskfile_unix.yml
Unix向けgolangci-lintタスク追加                                                                 

task/Taskfile_unix.yml

  • lintタスクを追加(golangci-lint run --new-from-merge-base main
  • lint:fixタスクを追加(--fixオプション付き)
  • +8/-0     
    Taskfile_windows.yml
    Windows向けgolangci-lintタスク追加                                                           

    task/Taskfile_windows.yml

    • lintタスクを追加(Windowsパス)
    • lint:fixタスクを追加(--fixオプション付き)
    +8/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link

    Migrate lint

    Lint output
    
    

    @github-actions
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Missing descriptions

    The newly added lint and lint:fix tasks in the root Taskfile.yml include desc fields, but the OS-specific Taskfiles omit descriptions. Consider adding desc entries for consistent documentation across all Taskfiles.

    lint:
      cmds:
        - task: os:lint
      desc: golangci-lint を実行し、mainブランチとの差分の中に良くないコードが無いかをチェックする
    
    lint:fix:
      cmds:
        - task: os:lint:fix
      desc: golangci-lint を実行し、mainブランチとの差分の中に良くないコードが無いかをチェックし、可能な限り自動修正する
    Inconsistent command key

    In Taskfile_unix.yml the lint and lint:fix tasks use the singular cmd key, whereas other Taskfiles use the plural cmds key. Aligning the key names will help maintain schema consistency.

    lint:
      dir: ../
      cmd: golangci-lint run --new-from-merge-base main
    
    lint:fix:
      dir: ../
      cmd: golangci-lint run --new-from-merge-base main --fix
    

    @github-actions
    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    コマンドを配列化

    cmdcmdsの配列形式に変更し、一貫性を保つためにリストとして定義してください。これによりタスク実行時の設定エラーを防げます。

    task/Taskfile_unix.yml [54-61]

     lint:
       dir: ../
    -  cmd: golangci-lint run --new-from-merge-base main
    +  cmds:
    +    - golangci-lint run --new-from-merge-base main
     
     lint:fix:
       dir: ../
    -  cmd: golangci-lint run --new-from-merge-base main --fix
    +  cmds:
    +    - golangci-lint run --new-from-merge-base main --fix
    Suggestion importance[1-10]: 7

    __

    Why: The Taskfile consistently uses cmds lists; changing cmd to cmds prevents task execution errors and aligns with the existing format.

    Medium
    Windowsパスとcmds修正

    Windows用ではdirパスを..\に修正し、cmdcmdsのリスト形式にすることで正しく解釈されるようにしてください。

    task/Taskfile_windows.yml [54-61]

     lint:
    -  dir: ../
    -  cmd: golangci-lint run --new-from-merge-base main
    +  dir: ..\
    +  cmds:
    +    - golangci-lint run --new-from-merge-base main
     
     lint:fix:
    -  dir: ../
    -  cmd: golangci-lint run --new-from-merge-base main --fix
    +  dir: ..\
    +  cmds:
    +    - golangci-lint run --new-from-merge-base main --fix
    Suggestion importance[1-10]: 7

    __

    Why: Aligning the Windows Taskfile's dir with other tasks (..\\) and switching to cmds ensures consistency and correct execution on Windows.

    Medium

    @codecov
    Copy link

    codecov bot commented Jul 11, 2025

    Codecov Report

    All modified and coverable lines are covered by tests ✅

    Project coverage is 50.34%. Comparing base (4fad9ae) to head (198e704).
    Report is 3 commits behind head on main.

    Additional details and impacted files
    @@           Coverage Diff           @@
    ##             main    #1285   +/-   ##
    =======================================
      Coverage   50.34%   50.34%           
    =======================================
      Files         129      129           
      Lines       11407    11407           
    =======================================
      Hits         5743     5743           
      Misses       5363     5363           
      Partials      301      301           

    ☔ View full report in Codecov by Sentry.
    📢 Have feedback on the report? Share it here.

    🚀 New features to boost your workflow:
    • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

    @ikura-hamu ikura-hamu merged commit c667944 into main Jul 11, 2025
    12 checks passed
    @ikura-hamu ikura-hamu deleted the conf/task_lint branch July 11, 2025 13:14
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants