Skip to content

builder/dockerfile: assorted linting fixes, and remove LCOW leftover#47993

Merged
thaJeztah merged 4 commits intomoby:masterfrom
thaJeztah:builder_dockerfile_cleanups
Jun 17, 2024
Merged

builder/dockerfile: assorted linting fixes, and remove LCOW leftover#47993
thaJeztah merged 4 commits intomoby:masterfrom
thaJeztah:builder_dockerfile_cleanups

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Jun 15, 2024

builder/dockerfile: remove endsInSlash utility

It was only used in a single location, and other locations were shadowing
the function through local variables. As it's a one-liner, inlining the
code may be just as transparent.

builder/dockerfile: rename vars that shadowed types and builtins

  • imageMount was shadowing the imageMount type
  • copy was shadowing the copy builtin
  • container was shadowing the container import

builder/dockerfile: fix some minor linting issues

  • explicitly suppress some errors
  • use fmt.Fprintln instead of manually appending a newline
  • remove an outdated TODO; looking at the suggestion, it's not a
    realistic option

builder/dockerfile: createDestInfo: remove platform arg (LCOW left-over)

This was added in 7a7357d as part of the
LCOW implementation. LCOW has been removed, and this option was no longer
in use because of that.

- A picture of a cute animal (not mandatory but encouraged)

It was only used in a single location, and other locations were shadowing
the function through local variables. As it's a one-liner, inlining the
code may be just as transparent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- imageMount was shadowing the imageMount type
- copy was shadowing the copy builtin
- container was shadowing the container import

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- explicitly suppress some errors
- use fmt.Fprintln instead of manually appending a newline
- remove an outdated TODO; looking at the suggestion, it's not a
  realistic option

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This was added in 7a7357d as part of the
LCOW implementation. LCOW has been removed, and this option was no longer
in use because of that.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 27.0.0 milestone Jun 15, 2024
@thaJeztah thaJeztah requested a review from tonistiigi as a code owner June 15, 2024 12:05
@thaJeztah thaJeztah mentioned this pull request Jun 15, 2024
15 tasks
@thaJeztah thaJeztah self-assigned this Jun 15, 2024
@thaJeztah thaJeztah added the area/lcow Issues and PR's related to the experimental LCOW feature label Jun 15, 2024
@thaJeztah thaJeztah merged commit 53c521b into moby:master Jun 17, 2024
@thaJeztah thaJeztah deleted the builder_dockerfile_cleanups branch June 17, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/builder/classic-builder Build area/builder Build area/lcow Issues and PR's related to the experimental LCOW feature kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants