Skip to content

Does the rule on comments block '##'? #258

@MichaelChirico

Description

@MichaelChirico

style/functions.qmd

Lines 189 to 190 in 2aed77e

In code, use comments to explain the "why" not the "what" or "how". Each line
of a comment should begin with the comment symbol and a single space: `# `.

This is slightly ambiguous by calling out "one single space" but not "one single comment symbol".

Using ## is pretty rare in tidyverse and r-lib besides ## usethis markup

https://github.com/search?q=org%3Atidyverse+lang%3AR+%2F%5Cn%5B%5E%23%5D*%23%7B2%2C%7D%5B%5E+%23%5D%5B%5Eu%5D%2F&type=code
https://github.com/search?q=org%3Ar-lib+lang%3AR+%2F%5Cn%5B%5E%23%5D*%23%7B2%2C%7D%5B%5E+%23%5D%5B%5Eu%5D%2F&type=code

Clarifying this is useful for distinguishing Tidyverse style from, e.g. Bioconductor and Emacs ESS styles:

r-lib/styler#1288

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions