Since Chrome is dropping support for this completely this year,
generate HTML from all remaining XML guides. These have largely
been migrated to other formats internally already too.
In addition to marking good/bad examples as green/red, add a background
text to highlight them for red/green blind users.
This is a bit crude, and the non-markdown version is on its way out anyway,
but it should help to stop the bleeding for the time being.
We have a lot of stub pages in here simply to redirect people to the
new location. We can automate this with a bit of client-side JS.
Unfortunately, while GH pages supports this when using markdown files,
a lot of the documents we want to redirect are old XML files.
Since the shell guide migrated to markdown/html, the stylesheet for
the XML file isn't really used other than to render the redirect.
We can switch to the standard styleguide.xsl for that.
- Ban forward declaration of entities not owned by the project.
- Recommend `absl::down_cast` for downcasting instead of `static_cast`.
- Expanded and reworked guidance on `auto` for variables and function
parameters: in particular, encourage structured bindings for map-like
containers.
- Remove Boost section and add a section for third-party libraries with
general guidance.
- Other minor updates and improvements to wording, et cetera.
- 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.