Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Change %q in logs and errors to %#q [Part3]#5029

Open
mie313 wants to merge 1 commit into
lima-vm:masterfrom
mie313:use_hashq_part3
Open

Change %q in logs and errors to %#q [Part3]#5029
mie313 wants to merge 1 commit into
lima-vm:masterfrom
mie313:use_hashq_part3

Conversation

@mie313

@mie313 mie313 commented May 23, 2026

Copy link
Copy Markdown
Contributor

Change %q in logs and errors to %#q and update the codes so that backticks are used everywhere in logs and errors. (all files in the following directories) .

  • pkg/guestagent
  • pkg/guestpatch
  • pkg/hostagent
  • pkg/httpclientutil
  • pkg/identifiers
  • pkg/imgutil
  • pkg/instance
  • pkg/iso9660util
  • pkg/limactlutil
  • pkg/limainfo
  • pkg/limatmpl
  • pkg/limatype

Related issue: #4898
This PR is a continuation of the work from #4909 and #5017 .

@mie313 mie313 force-pushed the use_hashq_part3 branch 3 times, most recently from 99fdc19 to 98548d5 Compare May 25, 2026 09:07
@mie313 mie313 marked this pull request as ready for review May 25, 2026 09:25
homedir := u.Homedir
if homedir == "" {
return fmt.Errorf("homedir is required for user %q", u.Name)
return fmt.Errorf("homedir is required for user %#qq", u.Name)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You have again included a couple of %#qq instances in the PR. How do they happen? Did you create this with AI without checking the output?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Apologies for the inconvenience, but I have never used AI at all for contributing lima.
Since I modified all codes at once and then divided them into a few PRs, typos the same as before might remain.
I will make sure to double-check not to contain any typos before turning a PR ready for review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed all typos and squashed 🙏

@mie313 mie313 force-pushed the use_hashq_part3 branch from 98548d5 to dd5b460 Compare May 25, 2026 21:45
@jandubois jandubois closed this May 29, 2026
@jandubois jandubois reopened this May 29, 2026

@jandubois jandubois left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, LGTM

I think I would like to see the "fuse to allow_other as user" string changed; I don't care about the other comment. Both are trivial.

Comment thread pkg/limatmpl/embed.go
for i, r := range script {
if !(unicode.IsPrint(r) || r == '\n') {
return fmt.Sprintf("unprintable character %q at offset %d", r, i)
return fmt.Sprintf("unprintable character %#q at offset %d", r, i)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Doesn't really matter, but the # makes no difference when printing runes, not strings. It will always use single quotes, not backticks.

Comment thread pkg/hostagent/requirements.go Outdated
})
req = append(req, requirement{
description: "fuse to \"allow_other\" as user",
description: "fuse to `allow_other` as user",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Using backticks here will put the whole strings in double-quotes, which will look odd because all other progress messages will show backticks. Either leave this with double-quotes for the inner string, or remove the quotes completely.

Suggested change
description: "fuse to `allow_other` as user",
description: "fuse to allow_other as user",

Signed-off-by: mie313 <mie313.tanaka@gmail.com>
@mie313 mie313 force-pushed the use_hashq_part3 branch from dd5b460 to 4cd3fee Compare June 6, 2026 17:43
@AkihiroSuda AkihiroSuda requested a review from jandubois June 11, 2026 15:43
@AkihiroSuda AkihiroSuda added this to the v2.2.0 milestone Jun 11, 2026
@AkihiroSuda AkihiroSuda added the kind/refactoring Refactoring label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactoring Refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants