google / google/yapf

spaces_before_comment = list examples on README are confusing

Open
#1,025 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14k
Forks
904
PR merge metrics
No merged PRs in 30d

Description

Hello,

when spaces_before_comment = 15, 20,

***Actual run:*** **In the first block, they are aligned to col 15 with 14 columns before comments, and in the second block they are aligned to col 20 with 19 columns before comments.**

1 + 1 # Adding values <-- end of line comments in block aligned to col 15
two + two # More adding

longer_statement # This is a longer statement <-- end of line comments in block aligned to col 20
short # This is a shorter statement

***README example:*** **In the first block, it says aligned to col 15, but actually to col 16 with 15 columns before comments.**
**Same description and example mismatch with col 20 example.**

1 + 1 # Adding values <-- end of line comments in block aligned to col 15
two + two # More adding

longer_statement # This is a longer statement <-- end of line comments in block aligned to col 20
short # This is a shorter statement

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.