Commit Graph
618 Commits
Author SHA1 Message Date
tiennm99 e8232be25c [IntelliJ] (Add) line comment not start at first column & add space 2026-09-30 20:37:08 +07:00
Mike Frysinger 403f0581bd lisp: export latest after fixing external replacement 2026-09-29 13:27:24 -04:00
Mike Frysinger e77b44673d vim: refresh from latest internal 2026-09-29 13:27:24 -04:00
Mike Frysinger 70d1e9a510 xml: migrate html to markdown 2026-09-29 13:27:24 -04:00
Mike Frysinger 543fe20ab9 Update objc style guide
PiperOrigin-RevId: 988536167
2026-09-26 04:14:07 -04:00
Mike Frysinger 82555e4a7b Update r style guide
PiperOrigin-RevId: 988536167
2026-09-26 04:05:08 -04:00
Mike Frysinger f43f7a72b5 javascriptguide: turn down old ES5 guide
We kept this around for posterity, but all things die eventually.
ES6 was released over a decade ago and there's really no reason to
write new code targeting ES5 or older.  If you actually need to
target such a system, transpilers like Babel are the way to go.
Removing this guide allows us to remove the styleguide.css file as
no other guide relies on it.
2026-09-25 16:41:13 -04:00
Mike Frysinger 570df3bb39 angularjs: turn down old guide
AngularJS (a.k.a. Angular 1.x) has been turned down and replaced with
Angular (2.x).  Since AngularJS is basically a dead stack now, drop the
guide since it likely provides no value anymore.  People can always pull
it out of the git history if they super want to.

The Angular style guide is maintained by that project and Google uses
that internally as well, so simply link to it rather than duplicate.
2026-09-25 12:52:41 -04:00
Mike Frysinger f85b9d1277 lisp: export latest internal version 2026-09-25 12:43:43 -04:00
Mike Frysinger 65900b1dfd haskell: initial export 2026-09-25 11:14:14 -04:00
Mike Frysinger 42020bc0ca json: rename example images to match new doc name 2026-09-24 23:14:43 -04:00
Mike Frysinger b3cc1ed6cc vim: switch to markdown 2026-09-24 23:14:43 -04:00
Mike Frysinger e277feb66e jsoncguide: switch to markdown 2026-09-24 15:18:38 -04:00
Mike Frysinger 84759c6071 shell: export latest version 2026-09-24 12:40:56 -04:00
Mike Frysinger 2b21895cd5 generate html for remaining XML guides
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.
2026-09-20 22:47:51 -04:00
Mike Frysinger fc855b4a94 json: rename filename to match other guides
We strip off the "style" from the filename everywhere else,
so do that here too.
2026-09-17 21:52:40 -04:00
Mike Frysinger 1db9f1406b json: resync with internal guide 2026-09-17 21:52:40 -04:00
Mike Frysinger d6f1cb2751 sync internal styleguide.css
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.
2026-09-17 21:37:20 -04:00
Mike Frysinger 93bd851b3c drop old guides now handled by auto 404 redirect
The custom 404.html page handles auto redirecting for old pages,
so we don't need these stubs anymore.
2026-09-17 12:06:59 -04:00
Mike Frysinger 1d18594f01 add custom 404 page to auto-redirect
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.
2026-09-17 12:06:59 -04:00
Mike Frysinger 0df7e7df91 json: use xsltproc to convert the guide
The tooling I used previously mostly passed inputs through leaving a
lot of XML tags behind.  Try again using xsltproc like the browsers
used to do.
2026-09-17 10:57:31 -04:00
Mike Frysinger 60d2ac7d89 json: crush png images using pngout 2026-09-16 13:24:52 -04:00
Mike Frysinger a554c90166 json: fix redirect link
"jsoncguide" will be the new name, but for now, the page is stored at
"jsoncstyleguide.html".
2026-09-16 13:18:01 -04:00
Mike Frysinger 1c236ded86 link: crush a little w/pngout 2026-09-16 10:03:56 -04:00
Mike Frysinger a61372e967 shell.xsl: drop obsolete stylesheet
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.
2026-09-15 21:50:30 -04:00
Mike Frysinger 852d1e08a5 javaguidelink: drop unused image
This was used long ago and is really a dupe of the existing
include/link.png.  Since nothing has referred to it in years,
drop it.
2026-09-15 21:47:13 -04:00
Mike Frysinger a78efc6c5d reduce side margins on smaller screens 2026-09-14 21:59:37 -04:00
Mike Frysinger 70669198a3 json: transform xml to html
Since browsers don't do this for us anymore, run it through the same
publish logic as our other guides to generate the html output.
2026-09-14 21:29:54 -04:00
Mike Frysinger e4d272eb15 set viewport to help mobile rendering in some html guides
It isn't perfect, but it's mostly there, and is a lot more readable
than the desktop compatibility render.
2026-09-14 20:39:26 -04:00
Mike Frysinger c1cea3a584 markdown: switch <pre> to ````
This fixes code highlighting since the <pre> block doesn't include
language details.
2026-09-14 16:16:38 -04:00
Mike Frysinger 3dd7005e6f import primer-dark stylesheet for automatic dark mode support 2026-09-14 11:01:43 -04:00
Mike Frysinger 81db7ef52d set site title in rendered docs 2026-09-14 10:28:43 -04:00
Mike Frysinger def053a034 use relative links for markdown files
This makes the paths work in forked projects.
2026-09-12 23:20:25 -04:00
Mike Frysinger 3b8822983d Update Python style guide
PiperOrigin-RevId: 979157127
2026-09-10 21:17:33 -04:00
Mike Frysinger 8b48d07842 java: export latest internal guide 2026-09-09 23:42:24 -04:00
Mike Frysinger 3d517e2966 html: export latest internal guide 2026-09-09 23:40:04 -04:00
Daniel Cheng 1809c769de Update C++ style guide
One small update to clarify that omitting braces on control blocks is
permitted but discouraged.
2026-06-03 11:51:22 -04:00
Daniel Cheng 3c5c895c68 Update C++ style guide (#971)
- 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.
2026-05-01 15:51:23 -07:00
Kurt Alfred Kluever b5c8ecae34 2026 updates to the Java Style Guide. (#968) 2026-04-09 09:35:19 -07:00
Matt T. Proud c098353acb go: Export the latest version of the internal guide. (#965)
The update revises guidance around line length, import renaming, context
usage, sentinel placement, and interface usage.
2026-03-18 15:56:05 +01:00
Daniel Cheng c885dc260b Update C++ style guide (#949)
- 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
2025-11-13 09:00:05 -08:00
Matt T. Proud cc72fb0f41 go: Export the latest version of the internal guide. (#947)
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.
2025-10-20 12:39:58 +02:00
Éamonn McManus 1387bff19c Update Java Style Guide following discussions.
The edits here are the result of discussions with Kevin Bourrillion, the
original author of much of this guide.
2025-09-03 12:29:35 -04:00
Daniel Cheng c6f57a913e Update C++ style guide (#937)
- 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
2025-07-31 15:16:20 -07:00
Daniel Cheng 124b0b8683 Add styling rules for good code examples in shared stylesheet
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.
2025-07-08 19:57:26 -06:00
Mike Frysinger 1ab9120f85 angularjs: fix init logic
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).
2025-04-29 23:48:05 -04:00
Mike Frysinger 48401665ae java: update to latest
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
2025-04-25 17:47:31 -04:00
Mike Frysinger 07714b62df update google/code-prettify load URL
The rawgit service was shutdown in 2019, and people are supposed to
migrate to cdn.jsdelivr.net.
https://groups.google.com/g/js-code-prettifier/c/IFHev_kLm30
2025-04-25 12:55:35 -04:00
Mike Frysinger 254e0ebcb3 jsoncstyleguide: sync from latest internal version
PiperOrigin-RevId: 751434392
2025-04-25 11:51:26 -04:00
harbichidian 4a107ba27e Wrap the block comment asterisk in a code element 2025-04-25 10:40:21 -04:00