Commit Graph
371 Commits
Author SHA1 Message Date
Daniel Cheng 7a7a2f510e Update C++ styleguide
Major changes:
- discourage const references when the input parameter must outlive the
  call
- drop ban on mutable references
- allow rvalue-qualified methods in certain situations
- allow C-style cast when casting to void
- disallow postfix increment/decrement operators unless postfix
  semantics are required
- allow designated initializers in C++20-compliant form
- disallow macro-style naming for enumerator constant for new code
- disallow spaces inside parentheses for conditionals

The change itself is largely automated, with a few manual adjustments:
- manually restore the TOC placeholder
- removed trailing whitespace
2020-05-20 17:14:04 +00:00
Google Shell Style teamandMichael Diamond 35fd3f0167 Project import generated by Copybara.
PiperOrigin-RevId: 312117514
2020-05-18 13:58:13 -07:00
Isaac GoodandGitHub 7a59e424c8 Merge pull request #549 from google/change_HEAD
Project import generated by Copybara.
2020-05-12 23:36:27 -07:00
Isaac Good d2227f2ef3 Project import generated by Copybara.
PiperOrigin-RevId: 311271037
2020-05-12 23:35:59 -07:00
Isaac GoodandGitHub 95d408ee11 Merge pull request #546 from google/shell_canonical
Add a canonical link to update the URL for the Shell guide
2020-04-29 22:53:04 -07:00
Isaac Good 415bb8d713 Add a canonical link to update the URL for the Shell guide 2020-04-29 22:30:48 -07:00
Isaac GoodandGitHub 43f20c3611 Merge pull request #544 from google/change_HEAD
Project import generated by Copybara.
2020-04-24 20:05:42 -07:00
Mike FrysingerandMike Frysinger f76ff3e96a Project import generated by Copybara.
PiperOrigin-RevId: 306352475
2020-04-24 22:05:30 -04:00
Mark MentovaiandGitHub 305ac8725a Hide “This site is open source. Improve this page.” footer
This hides the message shown at the bottom of pages served from
https://google.github.io/styleguide.
2020-02-28 11:03:30 -05:00
Mike FrysingerandGitHub 250bd6a4b0 Merge pull request #534 from google/change_HEAD
Project import generated by Copybara.
2020-02-27 18:21:26 -05:00
Mike FrysingerandMike Frysinger 7c26f834f9 Project import generated by Copybara.
PiperOrigin-RevId: 297665437
2020-02-27 18:18:58 -05:00
Gregory P. SmithandGitHub 056962e73a Working out the useless else disables (#526 from dseomn copybara)
Project import generated by Copybara.
2020-02-20 16:13:54 -08:00
Google Python teamandDavid Mandelberg 8cf92f8fb8 Project import generated by Copybara.
PiperOrigin-RevId: 296280631
2020-02-20 17:50:37 -05:00
Isaac GoodandGitHub bb1169c19f Merge pull request #525 from google/change_HEAD
Project import generated by Copybara.
2020-02-19 15:28:47 -08:00
Isaac Good 546ea3979d Project import generated by Copybara.
PiperOrigin-RevId: 296049105
2020-02-19 15:26:16 -08:00
Isaac GoodandGitHub 2497bbd092 Merge pull request #523 from google/shell_redirect
Add shell style sheet with redirect
2020-02-18 16:30:32 -08:00
Isaac Good c6a4f62edd Add shell style sheet with redirect 2020-02-18 16:29:47 -08:00
Isaac GoodandGitHub 246573051e Merge pull request #522 from google/shell_redirect
Add an HTML META tag to redirect to the new shell guide.
2020-02-18 16:25:56 -08:00
Isaac Good 7ec72be27f Add an HTML>HEADER>META tag to redirect from the old to the new shell guide 2020-02-17 12:30:45 -08:00
Isaac GoodandGitHub e25d7f648c Merge pull request #521 from google/shell_xml_typo
Fix another typo in shell.xml
2020-02-16 10:59:47 -08:00
Isaac Good d0d3f702e7 Fix another typo 2020-02-16 10:59:17 -08:00
Isaac GoodandGitHub f77197ad80 Merge pull request #520 from google/shell_xml_type
Fix a typo in shell.xml
2020-02-16 10:57:02 -08:00
Isaac Good bf3f09ecac Fix a typo 2020-02-16 10:56:35 -08:00
Isaac GoodandGitHub 4ab4d1a9b8 Merge pull request #519 from google/fix_xml
Put GUIDE tags back into shell.xml
2020-02-16 10:53:41 -08:00
Isaac Good 42720eba37 Put GUIDE tags back in 2020-02-16 10:52:48 -08:00
Isaac GoodandGitHub 7ffcd1507a Merge pull request #518 from google/drop_shell_xml
Redirect shell.xml to shellguide.html
2020-02-16 10:49:35 -08:00
Isaac Good a0977d2214 Redirect shell.xml to shellguide.html 2020-02-16 10:47:56 -08:00
Gregory P. SmithandGitHub 64bd672b61 Merge PR #517 from dseomn/copybara/push-794069ec-7832-47ca-b639-2e42a9314697-dryrun
Updates our example pylintrc.
2020-02-15 13:47:19 -08:00
Google Python teamandDavid Mandelberg 6fc736fc7c Project import generated by Copybara.
PiperOrigin-RevId: 295255546
2020-02-14 21:10:18 -05:00
Isaac GoodandGitHub 29be9f76a1 Merge pull request #516 from google/change_HEAD
Project import generated by Copybara. Fix a broken function definition.
2020-02-13 11:36:17 -08:00
Isaac Good 71c0c58c52 Project import generated by Copybara.
PiperOrigin-RevId: 294961751
2020-02-13 11:35:35 -08:00
Isaac Good 3db177a2d0 Link to the new HTML version of the shell guide 2020-02-13 11:08:47 -08:00
Isaac GoodandGitHub 6f6aebad0a Merge pull request #515 from google/change_HEAD
Update the TOC. Project import generated by Copybara.
2020-02-13 11:05:16 -08:00
Isaac Good 245445c9f6 Project import generated by Copybara.
PiperOrigin-RevId: 294952612
2020-02-13 11:03:14 -08:00
Isaac GoodandGitHub d9e72e63a9 Merge pull request #514 from google/change_HEAD
Project import generated by Copybara.
2020-02-11 11:25:26 -08:00
Isaac Good 44efb0f2bc Project import generated by Copybara.
PiperOrigin-RevId: 294481094
2020-02-11 11:25:02 -08:00
Isaac GoodandGitHub f13659ba4f Merge pull request #513 from google/change_HEAD
Update the TOC. Imported by Copybara.
2020-02-11 11:15:24 -08:00
Isaac Good af7f6aa63f Project import generated by Copybara.
PiperOrigin-RevId: 294477904
2020-02-11 11:12:33 -08:00
Isaac GoodandGitHub 123a0b935d Merge pull request #512 from google/change_HEAD
Import the reformatted Shell Style Guide.
Project import generated by Copybara.
2020-02-11 10:23:16 -08:00
Isaac Good 7198b5632f Project import generated by Copybara.
PiperOrigin-RevId: 294295956
2020-02-11 10:21:36 -08:00
Gregory P. SmithandGitHub a954ea03be Update the example pylint configuration. [GH-510]
Updates the example pylint configuration file for the Python style guide to be derived from an internally maintained config.

Project import generated by Copybara.
2020-02-10 14:14:09 -08:00
Google Python teamandGregory P. Smith [Google LLC] bc5a7f0eb0 Project import generated by Copybara.
PiperOrigin-RevId: 294287632
2020-02-10 14:09:36 -08:00
Gregory P. SmithandGitHub 4a06fcb1c7 Link to the Swift style guide.
Update README.md

Merges pull request #423 from darhonbek/patch-1
2020-01-15 09:26:19 -08:00
Gregory P. SmithandGitHub 7a07bd47d6 Merge pull request #502 from QuantumDecaydev/pylintrc
A pylint configuration for our OSS Python Style.
2020-01-12 19:13:28 -08:00
Gregory P. SmithandGitHub 42c441f411 Merge pull request #501 from oQuantumDecayo/change_HEAD
Project import generated by Copybara.
  modernization -> xrange becomes range
  adds a `= {}` negative example to default arguments.
2020-01-12 19:12:47 -08:00
David MandelbergandStephen Hicks f704c352f4 Add an Apache 2.0 license file. 2020-01-02 15:34:31 -08:00
Google Python teamandGregory P. Smith [Google LLC] b88c6a1b42 Project import generated by Copybara.
PiperOrigin-RevId: 287589810
2019-12-30 13:53:39 -08:00
Google Python teamandGregory P. Smith [Google LLC] 232b61ac26 Project import generated by Copybara.
PiperOrigin-RevId: 281409161
2019-11-25 10:44:28 -08:00
Alex LightandMark Mentovai 26470f9ccb Add support for c++17 tuple destructuring (#487)
C++17 adds support for tuple destructuring. This allow one to write
code such as:

```
std::pair<int, int> span = getSpan();
auto [start, end] = span;

// Use start as span.first and end as span.second
```

This makes cpplint recognize and allow a space before the '[' in this
situation.

This is a purposeful divergence from the internal version where the
entire whitespace/braces category was removed. It was decided to leave
the checks in since this is sometimes used without other formatting
tools.

Test: manual
2019-11-19 12:52:07 -05:00
Google Python teamandGregory P. Smith [Google LLC] 83a9e8d7ca Project import generated by Copybara.
PiperOrigin-RevId: 273904189
2019-10-11 09:25:02 -07:00