Recent Commits to styleguide:gh-pages

  • 13/11/2025 14:00

    Update C++ style guide (#949)

    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
  • 20/10/2025 7:39

    go: Export the latest version of the internal guide. (#947)

    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.
  • 03/09/2025 13:29

    Update Java Style Guide following discussions.

    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.
    Tags:
  • 31/07/2025 19:16

    Update C++ style guide (#937)

    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
  • 08/07/2025 22:57

    Add styling rules for good code examples in shared stylesheet

    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.
  • 30/04/2025 0:48

    angularjs: fix init logic

    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).
  • 25/04/2025 18:47

    java: update to latest

    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
    Tags:
  • 25/04/2025 13:55

    update google/code-prettify load URL

    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
  • 25/04/2025 12:51

    jsoncstyleguide: sync from latest internal version

    jsoncstyleguide: sync from latest internal version
    
    PiperOrigin-RevId: 751434392
  • 25/04/2025 11:40

    Wrap the block comment asterisk in a code element

    Wrap the block comment asterisk in a code element
  • 25/04/2025 11:14

    Update cppguide.html

    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
  • 24/04/2025 15:48

    markdown: Fix nerdy reference (#275)

    markdown: Fix nerdy reference (#275)
  • 24/04/2025 15:22

    jsguide: Replaced unfamiliar words with simpler alternatives. (#849)

    jsguide: Replaced unfamiliar words with simpler alternatives. (#849)
    
    Fixes #596.
  • 17/04/2025 10:33

    go: Export the latest version of internal guide. (#915)

    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.
  • 10/04/2025 13:39

    Update C++ style guide (#914)

    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.
  • 04/04/2025 6:27

    go: Export the latest version of internal guide. (#912)

    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.
  • 07/03/2025 12:54

    Update CODEOWNERS (#894)

    Update CODEOWNERS (#894)
    
    Remove self from OWNERS
    
    Haven't been on the team that owns this style guide for several years.
  • 04/03/2025 10:40

    go: Export the latest version of internal guide. (#888)

    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.
  • 03/03/2025 13:40

    CODEOWNERS: drop ex-Googlers

    CODEOWNERS: drop ex-Googlers
  • 03/03/2025 12:00

    GitHub: Refresh Code Owners for Current Go Admins (#890)

    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.
  • 24/02/2025 12:46

    Project import generated by Copybara.

    Project import generated by Copybara.
    
    PiperOrigin-RevId: 730435889
  • 21/02/2025 17:58

    pylintrc: Project import generated by Copybara.

    pylintrc: Project import generated by Copybara.
    
    PiperOrigin-RevId: 729623959
  • 21/02/2025 17:54

    Updated pylintrc with intended changes (#880)

    Updated pylintrc with intended changes (#880)
    
    Fixes #871.
  • 18/02/2025 15:32

    LICENSE: switch to CC-BY-3.0 #637

    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.
  • 18/02/2025 15:32

    pylintrc: add explicit Apache license for export #637

    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.
  • 13/02/2025 12:32

    htmlcssguide: Update TODO format (#884)

    htmlcssguide: Update TODO format (#884)
    
    This update changes the TODO formatting and examples to more closely align with Google’s internal TODO style.
  • 11/02/2025 13:02

    pylintrc: disable score reports

    pylintrc: disable score reports
    
    We disable reports in general already, but newer pylint versions include
    per-file score reports by default.
    
    PiperOrigin-RevId: 725563567
  • 11/02/2025 12:44

    add commit message guidance #336

    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
  • 17/01/2025 22:02

    set favicon #489

    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
  • 17/01/2025 13:27

    cpplint: declare bankruptcy

    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.
  • 17/01/2025 12:38

    objc: export latest version

    objc: export latest version
    
    PiperOrigin-RevId: 716659780
  • 17/01/2025 0:36

    docguide: Fix a typo

    docguide: Fix a typo
  • 17/01/2025 0:36

    objcguide: Fix a typo

    objcguide: Fix a typo
  • 17/01/2025 0:18

    shell: Project import generated by Copybara.

    shell: Project import generated by Copybara.
    
    PiperOrigin-RevId: 716401731
  • 06/12/2024 19:19

    json: add missing closing string quote (#867)

    json: add missing closing string quote (#867)
  • 06/11/2024 7:53

    Update the HTML Document Type guidance (#862)

    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.
    Tags:
  • 05/09/2024 17:32

    Update C++ style guide (#835)

    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.
    Tags:
  • 11/11/2020 3:26

    Update Google C++ styleguide

    Update Google C++ styleguide
    
    - Guidance for return values (prefer return by value, return by
      reference, then return by pointer in that order)
    - Mandate curly braces around the body of a control statement,
      providing one exception for historical reasons (`if` with no `else`,
      and `if` + body fits completely in a single line or the `if` fits in
      one line and the body fits in another separate line).
    Tags:
  • 16/09/2020 6:20

    Add owners for the Java and Shell guides, and alphabetize the list.

    Add owners for the Java and Shell guides, and alphabetize the list.
    Tags:
  • 28/07/2020 22:21

    Update language to comply with Android's inclusive language guidance

    Update language to comply with Android's inclusive language guidance
    
    See https://source.android.com/setup/contribute/respectful-code for
    reference
    
    cpplint.py is copied into AOSP from this github version so update it
    here first.
    
    Bug: 161896447
    Test: None (comments only)
    Tags:

Log in