-
Notifications
You must be signed in to change notification settings - Fork 16
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
remove unnecessary comments #88
Conversation
These comments add clutter in my opinion. If someone is editing this file, they can search google to learn more information about pre-commit. We don't, for example, link to the CMake homepage from our CMakeLists.txt. Additionally, the other comments here are pieces of reference documentation elsewhere.
Why are these comments considered unnecessary? |
Please see updated PR text. |
@@ -8,25 +6,16 @@ repos: | |||
- id: end-of-file-fixer | |||
- id: check-yaml | |||
- id: check-added-large-files | |||
|
|||
# Clang-format for C++ | |||
# This brings in a portable version of clang-format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is not useful... This makes clear that pre-commit does not dependent on system's clang-format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean they can certainly search for it. But I don't think this is non-dependency is intuitive.
- repo: https://github.com/BlankSpruce/gersemi | ||
rev: 0.15.1 | ||
hooks: | ||
- id: gersemi | ||
name: CMake linting | ||
|
||
# Markdown linting | ||
# Config file: .markdownlint.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are multiple CMake linters using different file names for their linting file. This is useful for alleviate confusion when someone brings in another CMake lint config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see an instance of this happening here:
https://github.com/bemanproject/inplace_vector/pull/14/files#r1842893309
See review comment. Edit: I also think exemplar should be as descriptive as it can be. We create exemplar so people don't have to search stuff up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the comments are useful documentation, as finding the right cross references for these is extra work.
Alright, I'm withdrawing this PR for now since there lacks consensus for it. I maintain that the file is perfectly understandable without the comments since a) one can follow the link right below the comment to understand the semantics of what is being brought in, and b) googling for .pre-commit-config.yaml provides all the links necessary for understanding the utility of this file.
Exemplar's purpose is to exemplify best practices applied to a C++ repository, not to be a descriptive tutorial. Just as it is an anti-pattern to redundantly document the semantics of functions at their call sites, we should not document our tools where they are being used. |
These comments add clutter in my opinion. If someone is editing this file,
they can search google to learn more information about pre-commit. We
don't, for example, link to the CMake homepage from our CMakeLists.txt.
Additionally, the other comments here are pieces of reference documentation
elsewhere.