Skip to content

Comments

refactor(wsl): support auto fix localhostforwarding#107

Merged
BlackHole1 merged 1 commit intooomol-lab:mainfrom
BlackHole1:support-localhostforwarding
Apr 25, 2025
Merged

refactor(wsl): support auto fix localhostforwarding#107
BlackHole1 merged 1 commit intooomol-lab:mainfrom
BlackHole1:support-localhostforwarding

Conversation

@BlackHole1
Copy link
Member

No description provided.

Signed-off-by: Kevin Cui <bh@bugs.cc>
@BlackHole1 BlackHole1 requested review from Copilot and ihexon April 25, 2025 04:04
Copy link

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.

Pull Request Overview

This PR refactors the WSL configuration compatibility checking to support auto-fixing issues for both kernel and localhost forwarding.

  • The ExistIncompatible function is updated to return a list of incompatible configuration keys.
  • The Fix function now applies corrections for both kernel and localhost forwarding issues with proper error handling.
  • The checkWSLConfig function is modified to use the list of incompatible keys to provide more informative notifications.

Reviewed Changes

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

File Description
pkg/wsl/config.go Refactors configuration compatibility functions and updates Fix to process multiple keys.
pkg/wsl/check.go Updates configuration checking to handle a list of incompatible keys and pass them to the notification system.
Comments suppressed due to low confidence (1)

pkg/wsl/config.go:44

  • There is an inconsistency in key casing: in ExistIncompatible the key is appended as "localhostForwarding", while in Fix it is referenced as "localhostforwarding". Consider using a consistent casing for the key across the functions.
if err := c.commentKey("localhostforwarding"); err != nil {

@BlackHole1 BlackHole1 merged commit e5f0eaa into oomol-lab:main Apr 25, 2025
1 check passed
@BlackHole1 BlackHole1 deleted the support-localhostforwarding branch April 25, 2025 05:33
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.

2 participants