You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
“scope of the CL in question”
"it is appropriate for the author to clean up the existing codebase in the same CL"
“perform a refactor in advance of the current CL”
If the local style disagrees with the style guide but the readability impact is limited to one file, it will generally be surfaced in a code review for which a consistent fix would be outside the scope of the CL in question. At that point, it is appropriate to file a bug to track the fix.
If a change would worsen an existing style deviation, expose it in more API surfaces, expand the number of files in which the deviation is present, or introduce an actual bug, then local consistency is no longer a valid justification for violating the style guide for new code. In these cases, it is appropriate for the author to clean up the existing codebase in the same CL, perform a refactor in advance of the current CL, or find an alternative that at least does not make the local problem worse.
The text was updated successfully, but these errors were encountered:
In this context, CL stands for "change list" or "change request." It refers to a set of changes or modifications to the codebase that are submitted for review and, if approved, will be merged into the codebase. A CL may contain code changes, documentation changes, or both.
In the context of code style, the passage is saying that if a CL introduces changes that violate the style guide, but the impact is limited to one file, it may be acceptable as long as it does not worsen an existing style deviation, expose the deviation in more API surfaces, expand the number of files affected by the deviation, or introduce an actual bug. If any of these conditions are present, the CL should either clean up the existing codebase, perform a refactor in advance, or find an alternative that does not make the problem worse.
stevenlee87
changed the title
这个CL是什么意思哈?
What does CL mean in this context?
Jan 5, 2023
In this context, CL stands for "change list" or "change request." It refers to a set of changes or modifications to the codebase that are submitted for review and, if approved, will be merged into the codebase. A CL may contain code changes, documentation changes, or both.
https://github.com/gocn/styleguide/blob/532543056d5e604178e250e96c739b6646d1f116/content/zh/docs/02-guide.md
“scope of the CL in question”
"it is appropriate for the author to clean up the existing codebase in the same CL"
“perform a refactor in advance of the current CL”
If the local style disagrees with the style guide but the readability impact is limited to one file, it will generally be surfaced in a code review for which a consistent fix would be outside the scope of the CL in question. At that point, it is appropriate to file a bug to track the fix.
If a change would worsen an existing style deviation, expose it in more API surfaces, expand the number of files in which the deviation is present, or introduce an actual bug, then local consistency is no longer a valid justification for violating the style guide for new code. In these cases, it is appropriate for the author to clean up the existing codebase in the same CL, perform a refactor in advance of the current CL, or find an alternative that at least does not make the local problem worse.
The text was updated successfully, but these errors were encountered: