- Clarify that TODO styles are listed in order of preference
- No space between type and `*` or `&`
- Minor wording updates for structs and move semantics
- Allow naming exceptions for Rust interop
The updates revise the import ordering and grouping guidance, adds
information to errors and wrapping and more clearly suggests to think
versus reflexively wrapping, makes clear that `%w` verb placement does
not encourage reflexively wrapping, more clearly differentiates the
`must` prefix, revises package naming, and applies other small instances
of copy editing.
- Allow coroutine use via libraries approved by project leads
- Disallow using a space before `*` and `&` for pointer and reference
types
- Simplify guidance for using vertical whitespace
- Other minor formatting / typography / wording fixes, e.g. adding
goodcode/badcode annotations to examples
This change primarily affects the C++ style guide: while a number of
other style guides also use <pre> directly for code examples, the other
style guides all use JS to prettyprint the code blocks, and the
prettyprinter overrides the styles specified in the shared stylesheet.
The exception is the AngularJS style guide, but it is already
inconsistently formatted and this change does not make it any worse.
There are also several other style guides other than C++ where
good/neutral are rendered identically; this commit does not attempt to
address those either.
The run_prettify.js link hasn't worked for years, so updae it to the
current cdn we use in other pages.
The styleguide.js link has always been broken. Fixing that requires
tweaking how the TOC works. We drop the static one in favor of the
dynamic (like other styleguides), and drop the custom <base> setting
so all links open in the current tab (like other styleguides).
Pull in changes:
* Update the Style Guide to talk about text blocks.
* Added External TODO style section in Java style guide.
* Update camel-case to explain how to separate adjacent numeric words.
* Adjust indentation of `// fall through` comments
* Remove forward looking promises about the formatter
* Updates to account for inline @return Javadoc tag.
* Integrate JAKE Java 21 Documentation branch into mainline.
* Remove exception from '6.2 Caught exceptions: not ignored' for tests
* Add style guidance for `package-info.java` and `module-info.java` files.
* Correct possibly confusing indentation of an ellipsis.
PiperOrigin-RevId: 751565114
The updates enhance the existing guidance around package naming, utility
packages, import renaming, function call arguments that span many lines,
and the prohibition of assertion frameworks.
- Expand guidance around usage of functions (and variables) with inline
definitions.
- Change guidance around internal namespaces to reduce the likelihood of
collisions.
- Expand naming guidance, with specific additional rules around:
- nested namespaces not reusing well-known top-level names
- template parameters
- name aliases
- Clarify that constant-style naming also applies to static class
constants.
- Other miscellaneous formatting and documentation improvements, e.g.
additional Abseil TotW links.
The current Go Readability Approvers administration group has grown
over the last few years, so we should refresh the code owners to
make maintenance of the external style guide easier. This also
lightens the geographic load for reviews, too.
And remove Kevin since his departure from the team.
We've always said the style guides are licensed under CC-By 3.0 in
our README file. We use other licenses for code snippets, and list
those in the respective file headers, but the guides are the dominant
source in this repo, so list that in the LICENSE file.
Fixes#637.
Since many Google projects refer to this site for writing git commit
messages already, or have guidance that is well aligned with it, link
to them rather than write our own document.
Fixes: #336
This is the GH avatar and is slightly different from the icon used on
other Google properties. This makes it easier to distinguish in a big
tab strip.
Fixes: #489
We have not pushed updates to the public cpplint code from our internal
version in years. No one seems interested in picking it up either.
Since an open source community has formed & forked & updated it, let's
delete our ancient version and just send people to that project now.
This update explicitly declares quirks mode to be against the style guide and strengthens the recommendation from “preferred” to “mandatory”. It also updates examples to use lowercase for consistency and clarifies that the style guide applies to Sass.
- Explicitly ban `long double`
- Use absl formatting libraries or `std::ostream` over printf-style
functions.
- Portability: use serialization libraries instead of copying the
in-memory representation.
- Update guidance to use `uintptr_t` (previously `intptr_t`) when
working with pointers as integers.
- Ban C++20 modules.
- Ban coroutines (though this is expected to be temporary).
- Minor wording updates.
The updates chiefly include copy editing, simplifications of code
bodies, explanation of error handling in package initialization,
discussion of zero value declarations, enhancement of initialisms, and
further hardening of goroutine lifetimes and resource leak avoidance.