Skip to content

Conversation

@kolyshkin
Copy link
Contributor

Recently released codespell 2.3.0 finds some new issues:

./features.go:30: tru ==> through, true
...
./utils_linux.go:147: infront ==> in front

Fix those.

./features.go:30: tru ==> through, true
...
./utils_linux.go:147: infront ==> in front

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
// it creates a temp file with the paths filename + '.' infront of it
// then renames the file
// createPidFile creates a file containing the PID,
// doing so atomically (via create and rename).
Copy link
Member

Choose a reason for hiding this comment

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

Why remove the description about the file name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Two reasons:

  1. This is a minor internal implementation detail. For a user, it doesn't matter how exactly the temporary file name is constructed.
  2. It is very clear from the code how it's done. In general, it makes sense to comment the code which is not obvious. This code is quite obvious and thus does not need a comment.

@AkihiroSuda AkihiroSuda merged commit 1aeefd9 into opencontainers:main May 24, 2024
@lifubang lifubang added the backport/1.1-todo A PR in main branch which needs to be backported to release-1.1 label Jun 1, 2024
@kolyshkin kolyshkin added backport/1.1-done A PR in main branch which has been backported to release-1.1 and removed backport/1.1-todo A PR in main branch which needs to be backported to release-1.1 labels Jun 2, 2024
@lifubang lifubang mentioned this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci backport/1.1-done A PR in main branch which has been backported to release-1.1 easy-to-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants