New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix comments longer than 80 characters #4639
Comments
To find long comments lines, I'm using this Python script I wrote (I was bored one night): https://gist.github.com/BWPanda/163bbab64814f774881e7b770d51c8e0 |
Hmm, what to do about
That line is 81 characters long. But putting the |
My personal opinion: As code itself can be longer, it should also be allowed to be longer inside |
Here's a PR that fixes comments in I purposefully didn't properly link it to this issue as I'd like this issue to stay open if/when the PR is merged, so we can work on other files too (e.g. |
I agree 👍 ...URL links to documentation etc. included within comments should also be an exception, but only if they start at the beginning of the line (IOW a single URL that is more than 80 characters long itself). Another issue with our comments is that some are much less than 80 characters long, but the first word on the next line fits in the current line. The most notable offenders are the Views and Views UI modules (see https://github.com/backdrop/backdrop/blob/1.x/core/modules/views/handlers/views_handler_area.inc#L11 for example). Not sure if you want to tackle that too next time you're bored @BWPanda (it will be tricky, but I know that you love puzzles/math 😅 ). |
I agree that code shoudn't be wrapped, but that means we need to update the standards. I'll create a separate issue for that. |
As per our documentation standards, comments should wrap at or before 80 characters. However there are quite a few places in core where comments run over the 80-character limit. This issue aims to fix that.
The text was updated successfully, but these errors were encountered: