Commit Graph

506 Commits

Author SHA1 Message Date
Daniel Cheng
901474aa08 Update C++ style guide for C++20.
- Encourage single line nested namespace declarations.
- Reference and allow `constinit` in the relevant sections
- Update operator overloading guidance for comparison operators: prefer
  only to overload `==` and optionally `<=>` when there is an obvious
  ordering, and allow the compiler to derive the other comparison
  operators.
- Discourage prefixing `uint32_t`, et cetera with `std::`.
- Document when and how to use concepts:
  - Use `requires` expressions rather than the alternatives, e.g. a
    template parameter.
  - Do not reimplement existing concepts/traits.
  - Do not expose concepts across API boundaries.
  - Do not use concepts unnecessarily.
  - Do not implement concepts that are not compile-time checkable.
2023-10-12 09:48:56 -07:00
Google Python team
105acb7bca Project import generated by Copybara.
PiperOrigin-RevId: 563811147
2023-10-04 12:35:48 -07:00
Gregory P. Smith
cf722264e7
Merge pull request #792 from dseomn/gh-pages
Project import generated by Copybara.  (pushing edits we made internally to this outwards)
2023-09-27 13:34:31 -07:00
Google Python team
28d10d19df Project import generated by Copybara.
PiperOrigin-RevId: 568328430
2023-09-25 17:52:06 -04:00
Titus Winters
718ea5d9f8
Merge pull request #787 from zetafunction/update-styleguide-2
Update C++ style guide.
2023-08-23 09:21:34 -04:00
Daniel Cheng
d8cee7085b Update C++ style guide.
- Update caveats for `thread_local` usage, particularly around the risk
  of destruction order issues.
- Provide explicit guidance for situations where `bit_cast` may be a
  better fit than `reinterpret_cast`.
- Emphasize that kConstant-style naming can still be used for `const`
  automatic variables that are initialized at runtime, but only if the
  resulting variable has the same value with each evaluation (i.e. it
  does not depend on runtime inputs).
- Clarify what sorts of details belong in file-level comments vs
  comments for individual abstractions.
- Update TODO examples to reflect the preferred styling, from most
  preferred to least preferred.
2023-08-22 14:03:40 -07:00
Google Python team
7751268440 Project import generated by Copybara.
PiperOrigin-RevId: 543420495
2023-06-26 14:36:03 -07:00
Tony Ruscoe
2173b8d68c
Update the HTML Document Type guidance
This removes the guidance around not closing void elements since this is incompatible with the Prettier formatter.
2023-04-26 12:22:36 +01:00
Tony Ruscoe
453aca8c43
Update the HTML Line-Wrapping guidance
This relaxes the guidance around indenting by 4 additional spaces and provides the Prettier format as one of the examples to ensure the style guide is compatible with the Prettier formatter.
2023-04-24 14:42:52 +01:00
Google Python team
d2cc2a7ec3 Project import generated by Copybara.
PiperOrigin-RevId: 522150370
2023-04-05 14:13:19 -07:00
Titus Winters
80422388e0
Merge pull request #766 from zetafunction/update-styleguide
Update C++ style guide.
2023-03-27 15:53:07 -04:00
Daniel Cheng
f1dbcc3382 Update C++ style guide.
- Encourage use of the `internal` namespace to document parts of an API
  that are not public.
- Create a separate section for `switch` statements.
- Require a project-specific prefix for macros.
- Reorganize guidance for formatting conditional statements.
- Other miscellaneous wording and formatting fixes.
2023-03-22 14:39:28 -07:00
Google Python team
e065b55718 Project import generated by Copybara.
PiperOrigin-RevId: 510217476
2023-02-16 13:03:04 -08:00
Gregory P. Smith
f924e89a56
Add explicit module names to pylintrc to support pylint >= 3.0
contributed by @algonell.
2023-02-02 15:20:26 -08:00
algonell
b34b3b30b4
fix: add explicit module names
pylint triggered:

pylint: Command line or configuration file:1: UserWarning: Specifying exception names in the overgeneral-exceptions option without module name is deprecated and support for it will be removed in pylint 3.0. Use fully qualified name (maybe 'builtins.StandardError' ?) instead.
pylint: Command line or configuration file:1: UserWarning: Specifying exception names in the overgeneral-exceptions option without module name is deprecated and support for it will be removed in pylint 3.0. Use fully qualified name (maybe 'builtins.Exception' ?) instead.
pylint: Command line or configuration file:1: UserWarning: Specifying exception names in the overgeneral-exceptions option without module name is deprecated and support for it will be removed in pylint 3.0. Use fully qualified name (maybe 'builtins.BaseException' ?) instead.

Suggestion works out.
2023-02-02 11:31:26 +02:00
Matt T. Proud
74605a6617
Merge pull request #747 from Carrotman42/export_tmp
Internal Change.
2023-01-03 12:45:08 +01:00
Gregory P. Smith
b5c20ce8da
Vimscript -> Vim script : Merge pull request #734 from ujihisa/patch-1
Trivial typofix
2022-12-28 16:29:51 -08:00
Kevin Chowski
9ae38d43e3 Internal Change.
PiperOrigin-RevId: 497970050
2022-12-27 18:56:41 +00:00
Google Python team
ec302b363e Project import generated by Copybara.
PiperOrigin-RevId: 493761232
2022-12-07 18:18:44 -08:00
ujihisa
54aad34238
Merge branch 'gh-pages' into patch-1 2022-11-24 16:08:55 -08:00
Gaal Yahas
307bda3459
Merge pull request #731 from gaal/go
Add link to the Go guide from README.md.
2022-11-22 20:11:14 +02:00
Gaal Yahas
228e403052 Internal Change.
PiperOrigin-RevId: 489956630
2022-11-21 16:18:13 +02:00
Gaal Yahas
9d680062ca Internal Change.
PiperOrigin-RevId: 489430034
2022-11-20 11:37:17 +00:00
Gaal Yahas
8828cd1a63 Link to the Go style guide from README.md. 2022-11-19 09:42:03 +00:00
ujihisa
78699827e1
Trivial typofix
s/Vimscript/Vim script/
2022-11-18 10:01:02 -08:00
Gaal Yahas
317af043a9 Add Go CODEOWNERS. 2022-11-17 20:10:43 +00:00
Gaal Yahas
2d5b76e3f6
Merge pull request #730 from gaal/go
Go: Fix a logic error in an example.
2022-11-17 21:57:32 +02:00
Gaal Yahas
15c7fa0198 Fix a logic error in an example.
PiperOrigin-RevId: 489255983
2022-11-17 19:31:21 +00:00
Titus Winters
d976b652ae
Merge pull request #729 from gaal/go
Go Style Guide
2022-11-17 13:56:41 -05:00
Gaal Yahas
e8424d77fc Add Google Go Style Guide.
PiperOrigin-RevId: 489165518
2022-11-17 15:47:38 +00:00
Samuel Freilich
f3c2c7fe7a
Merge pull request #727 from Cabbageboy/gh-pages
Update ts styleguide with latest google version
2022-11-14 11:33:34 -05:00
vincent
fd8c54856d update ts styleguide with latest google version 2022-11-09 14:35:00 -05:00
Samuel Freilich
0b003a9ae1
Merge pull request #719 from phoe-trash/gh-pages
Fix PRINT-UNPRINTABLE-OBJECT
2022-10-27 06:54:04 -04:00
Michał "phoe" Herda
fbce7fd10f
Fix PRINT-UNPRINTABLE-OBJECT
There is no Common Lisp operator named PRINT-UNPRINTABLE-OBJECT. Given the context, it is certain that PRINT-UNREADABLE-OBJECT (www.lispworks.com/documentation/lw51/CLHS/Body/m_pr_unr.htm) was meant instead.
2022-10-27 09:16:17 +02:00
Google Python team
8638b2665f Project import generated by Copybara.
PiperOrigin-RevId: 480954960
2022-10-13 12:20:13 -07:00
Gregory P. Smith
099770e27c
Merge pull request #580 from FaresSalem/gh-pages
Update style guideline URL
2022-08-06 17:37:10 -07:00
Titus Winters
e8808406ea
Merge pull request #699 from zetafunction/moo
Update C++ style guide.
2022-07-06 17:16:24 -04:00
Daniel Cheng
78c5bdd851 Update C++ style guide.
- Include friend types in class declaration order guidance.
- Include previously omitted text (due to mismatched tags) about
  preferring int16_t over short, et cetera.
- Function declarations:
  - Updated guidance for what comments should cover.
  - Add a C++ attribute example.
2022-07-05 22:28:56 +00:00
Google Python team
25bd3525fa Project import generated by Copybara.
PiperOrigin-RevId: 453566611
2022-06-07 17:56:13 -07:00
Gregory P. Smith
965d902e13
Merge pull request #697 from google/python_styleguide
Project import generated by Copybara.
2022-06-07 17:09:21 -07:00
Google Python team
c2b992c6f5 Project import generated by Copybara.
PiperOrigin-RevId: 453553841
2022-06-07 17:08:25 -07:00
Gregory P. Smith
a5197abff2
Merge pull request #692 from google/python_styleguide
Project import generated by Copybara.
2022-05-25 14:05:50 -07:00
Google Python team
4a6e97d092 Project import generated by Copybara.
PiperOrigin-RevId: 450985691
2022-05-25 14:03:28 -07:00
Tony Ruscoe
1faa779a12
Make the Declaration Order recommendation optional
This recommendation was relaxed in the internal style guide a few months ago. The suggestion is still to continue using alphabetical order unless teams have access to the appropriate tooling which can support consistently automating and enforcing different sorting rules which may be more logical to read.
2022-05-06 11:48:31 +01:00
Titus Winters
cada798ffe
Merge pull request #688 from zetafunction/update-styleguide
Update C++ style guide.
2022-05-05 13:26:55 -04:00
Tony Ruscoe
992ad03d50
Update HTML Line-Wrapping examples
Replaces the examples in the HTML Line-Wrapping recommendation to include child elements.
2022-05-05 10:04:58 +01:00
Daniel Cheng
93c7bd88c6 Update C++ style guide.
- Reword guidance for definitions of inline functions and templates.
- Capitalize the first letter of various comments.
- Update command-line flag reference to use absl flags.
- Improve braced-initialization example for 64-bit constants.
- Delete C++03 guidance for NULL.
- Clarify wording around wrapping of string literals.
- Use C++17 [[fallthrough]] instead of ABSL_FALLTHROUGH.
2022-05-03 23:57:01 +00:00
Google Python team
2eb7e16647 Project import generated by Copybara.
PiperOrigin-RevId: 442743475
2022-04-25 20:17:14 +00:00
Gregory P. Smith
629edc1ca9
Merge pull request #683 from google/python_styleguide
Project import generated by Copybara.  Mostly modernizing to a 3.9+ Pythonisms. Some clarification on TypeVars.
2022-04-12 20:47:33 -07:00
Google Python team
d2ca0a820a Project import generated by Copybara.
PiperOrigin-RevId: 440926376
2022-04-13 03:44:05 +00:00