Commit Graph

254 Commits

Author SHA1 Message Date
roooooooot
a33bdd6e3a Fix a typo
requre -> require
2016-12-31 13:10:07 +08:00
Dan Beam
159b4c81bb Restore ES5 styleguide
Leave links in README.md and other style guides pointing to ES6.

This is a partial revert of 8f254427d9
2016-12-22 12:06:27 -08:00
Michael Plump
75c289f1d3 Update the IntelliJ style to the latest version from Google.
Internally, we use the google-java-format plugin to format our Java
files. It's much more rigorous and ignores the contents of this XML
file. Using that plugin should be the preferred way to make sure your
code conforms to Google's style.
2016-12-22 12:05:18 -08:00
Stephen Hicks
db0a26320f Update Java and C++ style guides with various changes since the last update. 2016-11-17 18:02:44 -08:00
Stephen Hicks
8f254427d9 Update and replace JavaScript style guide.
The new guide is completely rewritten in light of ES2015.  The old guide
has been replaced with a link to the new guide.
2016-11-17 18:02:23 -08:00
Elliot Glaysher
71ec7f1e52 Merge pull request #187 from google/revert-169-gh-pages
Revert "Fix the `cpplint.py` `build/endif_comment` check."
2016-09-30 15:35:21 -07:00
Elliot Glaysher
ae11811f81 Revert "Fix the cpplint.py build/endif_comment check." 2016-09-30 15:34:26 -07:00
Elliot Glaysher
aa8ccb418c Merge pull request #184 from LukeCz/stdout
Cpplint is unnecessarily polluting stderr
2016-09-29 11:03:52 -07:00
LukeCz
e09f478aa8 Cpplint is unnecessarily polluting stderr 2016-09-28 19:13:37 -05:00
Elliot Glaysher
389efa293d Merge pull request #183 from LukeCz/hpp-headers
Configurable header extensions
2016-09-27 10:06:56 -07:00
LukeCz
8920b13221 Changes after review 2016-09-26 19:40:47 -05:00
LukeCz
7197a244ea Configurable header extensions
Fix for #50, #79 and  #113
2016-09-24 13:27:35 -05:00
Elliot Glaysher
1342002613 Merge pull request #169 from arames/gh-pages
Fix the `cpplint.py` `build/endif_comment` check.
2016-09-21 10:03:30 -07:00
Alexandre Rames
f558944179 Fix the build/endif_comment check.
- The check needs to be run before we remove comments, otherwise valid
  lines will be found as invalid.
- A single character different from `/` after the spaces is enough to
  indicate an error.
- Also catch errors when only one `/` is present.
  (For example `#endif / MY_FILE_H`.)
2016-09-21 11:03:34 +01:00
Christopher Tubbs
1fc370987b Enabling formatter on/off tags
Allows overriding Eclipse formatter in order to comply with the
guidelines, when Eclipse formatter doesn't work.
2016-07-21 15:24:01 -04:00
Elliot Glaysher
6d3a7d8a22 Merge pull request #159 from lhchavez/cpp11
Support C++11 types in build/include_what_you_use
2016-07-13 10:20:40 -07:00
Elliot Glaysher
c628808c81 Merge pull request #160 from cushon/update
Update to current.
2016-07-13 10:19:51 -07:00
Elliot Glaysher
8b263179f2 Merge pull request #158 from lhchavez/iwyu
Make build/include_what_you_use more consistent
2016-07-13 10:15:49 -07:00
Liam Miller-Cushon
b075cb7cad Update to current.
This includes changes for Java 8, and simplified import order rules.
2016-07-12 12:08:12 -07:00
lhchavez
2890dffc1f Support C++11 types in build/include_what_you_use
This change adds support for forward, make_pair, make_shared,,
make_unique, move, shared_ptr, unique_ptr, unordered_map,
unordered_multimap, unordered_multiset, unordered_set, weak_ptr.
Closes #133.
2016-07-11 19:37:29 -07:00
lhchavez
3ae81f1911 Make build/include_what_you_use more consistent
`std::string` has some logic to omit the suggestion if it is used in
non-STL namespaces, so the same check should be OK to use for other
types. Closes #157.
2016-07-11 19:00:34 -07:00
Alan Yee
557974758d Revert HTTPS changes 2016-07-08 13:25:17 -07:00
Titus Winters
f15e633de5 Update to current.
This notably includes changes for namespace naming and use of auto, as
well as clarification on when comments are necessary and attribute
placement.
2016-07-06 12:12:21 -04:00
Alan Yee
82c74c641a Update broken link
-Updated 404 link to an updated link
-Made a few implicit HTTP calls explicit
2016-07-05 09:40:10 -07:00
Elliot Glaysher
01f0f704f7 Merge pull request #129 from gueraf/gh-pages
CppLint: Make "root" flag configurable via CPPLINT.cfg
2016-06-30 13:32:23 -07:00
Elliot Glaysher
6e4b0aaa64 Merge pull request #135 from xyproto/gh-pages
Fix broken link
2016-06-30 13:21:42 -07:00
Elliot Glaysher
450aa460ec Merge pull request #139 from Nazg-Gul/root_windows_fix
Fix regex escape issue when using --root on Windows
2016-06-30 13:20:33 -07:00
Elliot Glaysher
bb4780e382 Merge pull request #148 from Angular-cz/gh-pages
fix links to Javascript guide
2016-06-30 13:15:21 -07:00
Elliot Glaysher
c50d146697 Merge pull request #149 from alanyee/gh-pages
Update shebang line
2016-06-30 13:15:01 -07:00
Elliot Glaysher
a968311752 Merge pull request #151 from dimo414/gh-pages
Updated Java Style Guide to reflect current internal version.
2016-06-30 13:13:33 -07:00
Elliot Glaysher
fac897f9a9 Merge pull request #137 from piotr-semenov/semenovp_fixes
Bug-fix: NOLINT, NOLINTNEXTLINE has no effect for lines like "};".
2016-06-30 10:09:00 -07:00
Piotr Semenov
af8c84341d Merge branch 'semenovp_fixes' of https://github.com/piotr-semenov/styleguide into semenovp_fixes 2016-06-30 11:47:22 +03:00
Piotr Semenov
a3c36d93d2 [FEATURE] Adds the unit-test for case "NOLINT, NOLINTNEXTLINE works for };". 2016-06-30 11:45:37 +03:00
Piotr Semenov
b7e2ef6de2 [FIX] Bug: NOLINT, NOLINTNEXTLINE has no effect for "};". 2016-06-30 11:44:21 +03:00
Michael Diamond
c938dbaa4d Updated Java Style Guide to reflect current internal version. 2016-06-29 19:36:05 -04:00
Alan Yee
b4e1659acd Update shebang line
This shebang line is more portable, as the user may not have python installed in /usr/local/bin/python. Also, according to PEP 486, the line makes the Python Launcher aware of virtual environments.
2016-06-24 15:53:24 -07:00
Milan Lempera
0cb4617e4c fix links to Javascript guide 2016-06-22 12:45:58 +02:00
Sergey Sharybin
3b0ea894c1 Fix regex escape issue when using --root on Windows
The code was using directory separator in the regex itself,
which means on Windows it was leaving unescaped backslash.

Added explicit escape for such cases.
2016-05-31 00:21:14 +02:00
Piotr Semenov
f2ced939eb [FIX] Bug: NOLINT, NOLINTNEXTLINE has no effect if used for the closing-brace line "};" in the lambda declaration. 2016-05-20 18:39:34 +03:00
Alexander F Rødseth
7ebdcc4f94 Fix broken link
The link the bottom of https://google.github.io/styleguide/shell.xml is
broken. When changing from cppguide.xml to cppguide.html, it works.

Also cleaned up trailing whitespace.
2016-05-19 23:04:17 +02:00
Andrew Bonventre
70d6b7d4b8 Merge pull request #116 from Dominator008/javascript
Remove trailing whitespaces and a false claim in the JavaScript Style Guide
2016-05-17 14:51:17 -07:00
Elliot Glaysher
66718b1d33 Merge pull request #130 from alexv1n/uprev-cpplint
Update cpplint.py to r456
2016-05-06 15:56:52 -07:00
Alex Vakulenko
01e47236c8 Update cpplint.py to r456
456 - Tweak lint to sometimes allow { on line following array initialization.
455 - Recognize more types.
454 - Try a bit harder to detect templated types.
453 - Changed error message wording on build/storage_class to be less ambiguous.
452 - Recognize more types to silence false positives for brace warnings.
451 - <skipped>
450 - <skipped>
449 - Ignore whitespace/tab for Linux Kernel files.
448 - Remove some more false positive lint warnings for int64{n}.
447 - Just one warning message for line length is enough, don't need two.
446 - Allow braced conversions to int16, uint64, etc. per the style guide.
445 - Fixed handling of backslash escapes for checking whether a "//" is quoted.
444 - Reduced dependency on hardcoded .cc extension.
443 - Disable single-arg constructor checks by default, since ClangTidy has the
      same check. We could just delete the check entirely, but it's slightly
      useful in places that can't run ClangTidy.
442 - Fix matching of macro names in CheckTrailingSemicolon to include digits.
441 - Deleted checks:
      - All checks for RValue references.
      - Spacing check around boolean &&, because those look like RValue
        references.
      A huge amount of code and effort were dedicated to tell RValue
      references apart from boolean expressions, and to differentiate
      allowed versus banned RValue references. But we still get regular
      false positives from this one check. Rather than making the check
      more complex than what it already is, it seemed safer to just delete
      it altogether for now, and have a different process for catching
      RValue references.
440 - Add rule to cpplint to throw error on empty if statement bodies without
      else clauses. If statement bodies with comments are not considered empty.
439 - Allow spaces before closing brace of namespace block so that namespaces
      inside of macro definitions (where the entire macro definition is
      indented) are not treated as errors.
438 - cpplint: fix a false positive on `new const int(x)`.
437 - Only check for function length when current line is inside a function.
436 - cpplint: Catch static `std::string` instances as well as those written as
      `string`. Previously users would sometimes work around the lint warning by
      changing their code to even worse code by adding the "std::" prefix.
435 - cpplint: Be a little smarter about warning on indentation.
434 - cpplint: Remove false positives on some functions returning string const&.
433 - cpplint: improve diagnostics of global/static string objects.
432 - Allow non-const reference parameters for iostream based types.
431 - Better handling of raw strings inside comments.
430 - <noop>
429 - <skipped>
428 - <skipped>
427 - Add support to CHECK_NOTNULL when checking if a member variable is
      initialized with itself.
426 - Allow suppressing specific warnings in C headers.
425 - Allow spaces before parens for inline assembly.
424 - Remove lint checks for {EXPECT,ASSERT}_.*_M.
423 - Allow comment lines of more than 80 characters if they contain a single
      "word" (without any spaces).
422 - cpplint: Warn on inclusion of C++14 headers.
421 - cpplint: recognize <shared_mutex> as a standard library header.
420 - Add <scoped_allocator> to cpplint's list of C++ standard headers.
419 - Add cpplint check for tr1/ headers. We removed the nanny guards for these
418 - <skipped>
417 - Update the styleguide and cpplint to allow unnamed parameters
416 - Remove the rule explicitly banning non-default move operations.
415 - Remove the check for explicit multi arg constructors
414 - Include clarity of lambda default captures in "pros" section, mention
      of capturing `this` and lambdas which escape the current scope in "cons".
      Soften the ban on default captures to a preference, with admonition against
      using them for capturing `this` or when they will escape the current scope.
      This is a fairly straightforward change with a brief inclusion
      of 2 problematic cases for implicit capture. As this is the style
      guide, I'm not sure how much more detail is appropriate.
413 - Fixed a bug by making regex in CleanseRawStrings match multiple raw strings
      on a single line in left-to-right order.
412 - Fixed false positive for classes derived using decltype()
411 - <skipped>
410 - Recognize '1LL<<20' as numeric and don't flag it for spacing.
2016-05-06 14:10:17 -07:00
Fabian Guera
2322e4ffaa
Make "root" flag configurable via CPPLINT.CFG 2016-05-01 17:36:30 +02:00
Geoff Romer
175866f6c4 Merge pull request #128 from wieczorek1990/gh-pages
Reverted XML namespace name changes
2016-04-28 12:50:28 -07:00
Łukasz Wieczorek
6f37bdf200 Reverted XML namespace name changes 2016-04-28 19:25:32 +02:00
Geoff Romer
8a3b573abb Merge pull request #118 from herrniemand/gh-pages
Replaced HTTP where HTTPS was available
2016-04-27 10:34:29 -07:00
Ackermann Yuriy
b545d7f67f Reverted to non-markdown and applyed HTTPS fix. 2016-04-27 14:06:21 +12:00
Ackermann Yuriy
7969290bac Replaced HTTP where HTTPS been awailable. 2016-04-01 21:41:34 +13:00
Ackermann Yuriy
acb4f9016f Removed link shortening. 2016-04-01 21:36:44 +13:00