Commit Graph
579 Commits
Author SHA1 Message Date
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
Naif 5ffd378601 Update cppguide.html
NOTE: This site is deprecated. The site will be turned down after January 31, 2023, and traffic will redirect to the new site at https://protobuf.dev. In the meantime, updates will be made only to protobuf.dev.
https://developers.google.com/protocol-buffers/docs/reference/cpp-generated#package
2025-04-25 10:14:08 -04:00
Nicholas Rebhun 895579e2f7 markdown: Fix nerdy reference (#275) 2025-04-24 14:48:09 -04:00
SohanRaidev f58fbeff23 jsguide: Replaced unfamiliar words with simpler alternatives. (#849)
Fixes #596.
2025-04-24 14:22:31 -04:00
Matt T. Proud 7802b6521b go: Export the latest version of internal guide. (#915)
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.
2025-04-17 16:33:10 +03:00
Daniel Cheng 445123e4af Update C++ style guide (#914)
- 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.
2025-04-10 09:39:55 -07:00
Matt T. Proud 1052896258 go: Export the latest version of internal guide. (#912)
The updates encompass renaming testing-associated package's section
heading, guidance on when to panic, and naming of subtests.
2025-04-04 11:27:25 +02:00
Samuel Freilich 8e44515b72 Update CODEOWNERS (#894)
Remove self from OWNERS

Haven't been on the team that owns this style guide for several years.
2025-03-07 10:54:21 -05:00
Matt T. Proud b30e180a54 go: Export the latest version of internal guide. (#888)
* go: Export the latest version of internal guide.

The updates encompass copy editing, enchanced guidance on package
sizing, fixing broken hyperlinks, simplifying Protocol Buffer message
guidance, clarifying context root behavior after (testing.TB).Context,
and disjoint table test.
2025-03-04 14:40:01 +01:00
Mike Frysinger c94562358b CODEOWNERS: drop ex-Googlers 2025-03-03 11:40:30 -05:00
Matt T. Proud 3068dce041 GitHub: Refresh Code Owners for Current Go Admins (#890)
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.
2025-03-03 10:00:29 -05:00
Mike Frysinger ff7ea9c951 Project import generated by Copybara.
PiperOrigin-RevId: 730435889
2025-02-24 10:46:28 -05:00
Mike Frysinger 5b8bc6b947 pylintrc: Project import generated by Copybara.
PiperOrigin-RevId: 729623959
2025-02-21 15:58:30 -05:00
Snehasish Basu dc83e08a5f Updated pylintrc with intended changes (#880)
Fixes #871.
2025-02-21 15:54:42 -05:00
Mike Frysinger 9002f6212a LICENSE: switch to CC-BY-3.0 #637
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.
2025-02-18 13:32:54 -05:00
Mike Frysinger 88963887c5 pylintrc: add explicit Apache license for export #637
Most content in the external styleguide repo is Creative Commons based,
so add an explicit license to files that aren't to avoid confusion.
2025-02-18 13:32:09 -05:00
Tony Ruscoe 0a0cfa22e2 htmlcssguide: Update TODO format (#884)
This update changes the TODO formatting and examples to more closely align with Google’s internal TODO style.
2025-02-13 15:32:11 +00:00
Mike Frysinger b5908c3253 pylintrc: disable score reports
We disable reports in general already, but newer pylint versions include
per-file score reports by default.

PiperOrigin-RevId: 725563567
2025-02-11 11:02:01 -05:00
Mike Frysinger a47f7e5207 add commit message guidance #336
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
2025-02-11 10:44:15 -05:00
Mike Frysinger a638d1de37 set favicon #489
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
2025-01-17 20:02:17 -05:00
Mike Frysinger 3e1320597f cpplint: declare bankruptcy
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.
2025-01-17 11:27:25 -05:00
Mike Frysinger 0a326efbe0 objc: export latest version
PiperOrigin-RevId: 716659780
2025-01-17 10:38:26 -05:00
Andrew Kreimer 488bedc7b2 objcguide: Fix a typo 2025-01-16 22:36:52 -05:00
Andrew Kreimer 9b15a1d71f docguide: Fix a typo 2025-01-16 22:36:52 -05:00
Mike Frysinger 8e2dc76c1b shell: Project import generated by Copybara.
PiperOrigin-RevId: 716401731
2025-01-16 22:18:20 -05:00
Mike Frysinger 8f97e24da0 json: add missing closing string quote (#867) 2024-12-06 17:19:26 -05:00
Tony Ruscoe 9504dac66c Update the HTML Document Type guidance (#862)
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.
2024-11-06 10:53:39 +00:00
Daniel Cheng 8c4da230fc Update C++ style guide (#835)
- 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.
2024-09-05 13:32:14 -07:00
Matt T. Proud 57ea449d44 go: Export the latest version of internal guide. (#840)
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.
2024-07-16 18:19:54 +03:00
Kung, Li-Chieh 75e85d088e csharp: update GH link after branch rename
The dotnet project switched from master to main.
2024-07-11 08:28:53 -04:00
nickcheng 19e30ce044 objcguide: restore code style to g prefix 2024-07-08 23:31:37 -04:00
Mike Frysinger 38500228ac style.scss: clarify purpose of leading comment block 2024-07-08 23:02:13 -04:00
Sidney San Martín e80daa0650 Add favicons to guides that lacked them 2024-07-08 17:05:56 -04:00
Mike Frysinger dc0c0923f1 docguide: pull in updates from internal docs 2024-07-08 15:16:10 -04:00
Lu.dev 36c0e3a531 README: link in JSON style guide 2024-07-08 15:05:12 -04:00
Mike Frysinger 54fe3035be README: point Kotlin users to external guide #470 2024-07-08 15:01:37 -04:00
David Barnett 9fae97deb1 [vimscript] Update name in credits 2024-07-08 14:19:58 -04:00
Marcoen Hirschberg f0846f605e Change cppguide.xml to proper XML serialized HTML 2024-07-08 14:14:14 -04:00
Kendall Pinto ff7605a255 move codeowners file to github directory 2024-07-08 13:24:27 -04:00
Katie Noake 7b9a1c1330 docguide: Fixed broken link syntax 2024-07-08 13:18:07 -04:00