Commit Graph

90 Commits

Author SHA1 Message Date
mark@chromium.org
7cf216c976 Initial public release of Shell Style Guide (1.25). 2013-02-15 20:56:05 +00:00
erg@google.com
d350fe561e Updated cpplint.py to #224:
- Better emacs-flymake integration
- Fix false  positives in macros and template parameters
- Improve the wording on the make_pair warning
- Remove virtual keyword checks (now a warning in clang)
- Add checks for namespaces
- Check that DISALLOW_* macros are always in the "private:" section
- Fix false positives for gMock
- Check for alternative boolean operator tokens
- Fix false positives for space on parens
- Fix false positives about placement of "{" near preprocessor macros
- Don't lint inside inlined assembler
- Don't warn on "auto"; it is now a type shortcut, not a storage class
- Don't warn on c++11 for loops
- Warn on empty loop bodies
- Don't warn on unnamed args for the postincrement operator
- Fixes for "<" placement now allowed in c++11
Review URL: https://codereview.appspot.com/7039047
2013-01-14 17:51:48 +00:00
tunes@google.com
ed8e4680ce Google Common Lisp Style Guide, revision 1.17 2012-11-29 00:14:33 +00:00
mark@chromium.org
c8c76a2389 Update C++ style guide to 3.231:
- Clarify that sentence-like non-sentence comments are permitted.
 - Note that older code with incorrect #include ordering should be fixed.
 - Revamp the section on default function arguments.
 - Avoid explicitly recommending Init() methods.
 - C++11: permit "auto".
 - C++11: permit ">>" in place of "> >".
 - C++11: permit range-based "for".
 - C++11: permit variadic macros (already permitted as a C++03 extension).
 - C++11: permit "LL" and "ULL" literal suffixes (already permitted as a C++03
   extension).
 - Reflect the revised copyright and author line policy: copyright notices are
   not required, but license boilerplate may still be used (and generally
   contains a copyright notice). Author lines are not required.
 - C++11: permit new features in <algorithm> and the portion of <numeric> that
   does not require initializer lists.
 - Revise rules on forward declarations: explicitly forbid forward-declared
   functions, do not mandate forward declarations, discourage forward-declared
   templates.
 - Remove the rule requiring "const" qualifiers for member functions to be
   on the same line as the closing parenthesis of the parameter list.
 - Fix typo: "unnamed namespaces."
 - C++11: permit local types as template parameters.
 - Fix typo: "unfamiliar."
 - Relax RTTI rules to permit its use, but warn about its abuse.
 - C++11: permit nullptr and nullptr_t. Revise text referring to NULL to refer
   more generically to null pointers.
 - Remove the "don't go crazy with const" rule.
 - Fix typo: "dir/foo2" should bee "dir2/foo2."
 - Remove reference to a specific GCC version.

Update Objective-C style guide to 2.48:
 - Revise method declaration and invocation formatting rules for long names.
 - Reflect the revised copyright and author line policy: copyright notices are
   not required, but license boilerplate may still be used (and generally
   contains a copyright notice). Author lines are not required. Top-of-file
   comments are not required.
 - Fix dead link in the "nil Checks" section.
 - Cover ARC.
 - Specify that @private is only required for instance variables in header
   files.
 - Permit NSNumber literals.
 - Change the naming convention for instance variables from trailing underscore
   to leading underscore, allowing a wide exception for existing code and
   projects.
 - Fix description of BOOL with respect to its signedness.

Update Python style guide to 2.45:
 - Recommend "pylint: disable" over "pylint: disable-msg."
 - Fix case-sensitive anchor.
 - Provide a better explanation of the problems with catch-all "except:."
 - Permit "map" and "filter" in absence of inlined lambdas.

Update JavaScript style guide to 2.64:
 - Clarify rules for requiring and providing inner dependencies on classes.
 - Clarify semicolons for functions.
 - Note proper namespace and filename casing.
 - Fix typos: "@extends."
 - Permit parentheses to be omitted on unions.
 - Don't require method descriptions when obvious.
 - "in" is a keyword, put it in <code>.
 - New "Aliasing with goog.scope" section.
 - Rewrite the "Constants" section.
 - Remove the recommendation to use join() to build strings.
 - Add the "@expose" annotation.
 - Fix the "@suppress" example.
 - Remove reference alternate cast syntax.
 - Reflect the revised copyright and author line policy: copyright notices are
   not required, but license boilerplate may still be used (and generally
   contains a copyright notice). Author lines are not required.
 - Say that "use strict" is not required.
 - Fix links to "optional" section.
 - Rewrite "JavaScript Types" section.
 - Fix typos: "parameterizes," "converted."
 - Prefer in-constructor field initialization.
 - Add a section on "delete" and null-assignment.
 - Add a note about optional JSDoc comments on enum values.
 - State explicitly that dot operators belong at the ends of lines.
 - Add "@dict" and "@struct" annotations.
 - Add links to the JavaScript Types section.
 - Require (rather than encourage) compiling.

Update HTML/CSS style guide to 2.19:
 - Rephrased quotation guidelines.
 - Updated W3C I18N article reference.
 - Fixed revision number.

Update styleguide.xsl to 1.34:
 - Fix error in RefreshVisibilityFromHashParam when a URL fragment points to a
   named anchor within a section, as used by the JavaScript style guide.
2012-11-28 20:26:27 +00:00
tunes@google.com
1407ba71db Google Common Lisp Style Guide, revision 1.16 2012-11-08 04:31:59 +00:00
tunes@google.com
c55433cd2e Google Common Lisp Style Guide, revision 1.15 2012-10-17 22:13:51 +00:00
tunes@google.com
13bb6e417a Google Common Lisp Style Guide updated to 1.13. 2012-10-15 20:57:01 +00:00
tunes@google.com
f981c5c266 Google Common Lisp Style Guide, revision 1.12 2012-10-14 13:47:38 +00:00
tunes@google.com
8c4c5ce85d Google Common Lisp Style Guide updated to 1.11. 2012-10-12 23:16:43 +00:00
tunes@google.com
0c584cb624 Google Common Lisp Style Guide updated to 1.10,
integrating more feedback from inside and outside Google.
2012-10-11 17:06:57 +00:00
tunes@google.com
8dba399b33 Manually add stylesheet information (for now) to lispguide.xml. 2012-10-10 19:10:55 +00:00
tunes@google.com
b1e92038c5 Publish the Google Common Lisp Style Guide, revision 1.8, for public review. 2012-10-10 18:50:04 +00:00
apicard@google.com
424ad34281 Updating python style guide 2012-09-18 23:16:02 +00:00
jensmeiert@google.com
864b0dc238 Adding back style sheet link (dropped after file re-generation). 2012-07-17 20:17:21 +00:00
jensmeiert@google.com
1e1b50bf73 Sync. 2012-07-17 20:12:10 +00:00
mark@chromium.org
ded2b0a246 Add Google C++ Eclipse style config.
Patch by Alexei Svitkine <asvitkine@chromium.org>

Review URL: https://codereview.appspot.com/6353053/
2012-06-29 19:26:15 +00:00
erg@google.com
720121a67f Changed the hashband on cpplint.py 2012-05-11 16:31:47 +00:00
jensmeiert@google.com
a1cc738256 Updated validator reference. 2012-04-26 16:30:28 +00:00
jensmeiert@google.com
dc19d7e225 Initial release 2012-04-24 22:21:00 +00:00
erg@google.com
90ecb62a9f Convert windows path seperators to unix like while doing IncludeWhatYouUse.
Review URL: https://codereview.appspot.com/5601049
2012-01-30 19:34:23 +00:00
erg@google.com
dc28970e18 Improve the error message for when #ifndef guards don't match the #define.
Patch from <csharp@google.com>
2012-01-26 20:30:03 +00:00
erg@google.com
3dc7426aed Support svn 1.7 directory structure.
Committing on behalf of Reid Kleckner <rnk@google.com>.
BUG=chromium:102890
2011-11-30 01:12:00 +00:00
mark@chromium.org
7f8919375d Update JavaScript style guide to 2.28:
- Fix typo.

Update Python style guide to 2.29:
 - Fix indirect setter.
2011-11-04 21:13:33 +00:00
mark@chromium.org
e33361fcd3 Update C++ style guide to 3.199:
- Update an example to omit the blank line between C and C++ #includes.
 - Rewrite the paragraph about #include ordering.
 - Clarify namespace closing comments.
 - Discourage const references for input arguments which are aliased beyond
   the scope of the function call.
 - Replace all '&' with '&amp;'.
 - Clarify that interfaces must have virtual destructors.
 - Add an explicit example for |else if|.
 - C++11 updates.

Update Objective-C style guide to 2.36:
 - Remove requirement to list @dynamic implementations.
 - Remove requirement to never synthesize CFType properties, since they may
   be retained on 10.6.
 - Use __weak and __strong type declaration modifiers rather than comments.
 - Make the copyright/license information consistent.
 - An example initializer comment revealed too much about the implementation.
 - Correct spelling mistakes.
 - Fix names that didn't follow Cocoa conventions.
 - Fix examples to conform to style.
 - Add a section about no braces for empty interfaces.
 - Add a section about automatically synthesized instance variables.
 - Codify avoidance of accessors in -init and -dealloc methods.
 - Changes for the 80-column rule.
 - Weaken the language around object ownership type qualifiers.
 - Document the rules for formatting blocks.

Update JavaScript style guide to 2.27:
 - Introduce EcmaScript 5 Strict verbiage.
 - Add a note about private constructors.
 - Simplify explanations about JSDoc comments.
 - Sort the JSDoc tags.
 - Remove the sections about type-checking now that the JSDoc tags and JS
   types are no longer one table.
 - Convert <tt> to <code>, because the XSL processor eats <tt>.
 - Add @suppress.
 - Mark @inheritDoc deprecated in favor of @override.
 - Add a section about inner classes and enums being defined in the same file
   as the top-level class they are defined on.

Update Python style guide to 2.28:
 - Change "Naming" summary to match body.
 - Make the prohibition against backslash line continuation explicit.
 - Update the TODO section to match the C++ style guide.
 - Declare Python code without a shebang line to be stylish.
 - Clarify rules on function docstrings.
 - Fix spelling errors.
 - Update with styleguide.xsl 1.33.

Update styleguide.xsl to 1.33:
 - Clean up style guide JS.
 - Links to anchor tags auto-expand.
2011-11-04 16:55:22 +00:00
erg@google.com
8a95ecca27 Update to #179:
- Suggest "const_cast" when encountering "(char*)".
- Warn on template arguments to make_pair().
- Require <utility> if pair<> is seen now that <map> doesn't include it.
- Warn on lack of "explicit" keyword on single argument inline constructors.
- Better check for hanging ')' when closing function calls.
- Don't warn on: 'int v[1][3] = {{1, 2, 3}};'
- Allow function calls as the first argument to printf().
Review URL: http://codereview.appspot.com/4974066
2011-09-08 00:45:54 +00:00
erg@google.com
efeacdf0fa Add extension mechanisms for custom checks to cpplint.py.
This allows users of cpplint.py to specify additional check functions.

Will be used by: http://codereview.chromium.org/7834045/

Review URL: http://codereview.appspot.com/4950069
Patch from Alexei Svitkine <asvitkine@chromium.org>.
2011-09-07 21:12:16 +00:00
erg@google.com
d7d2747c6c Update cpplint.py to #161:
- ostream should be treated as a system header
- Expand the MockCallback whitelist entry for gMock.
- Virtual destructor check shouldn't get confused with
  "class EXPORT ClassName {" constructs.
- Don't warn about the length of "$ Id: ... $" lines.
- Better semicolon checks in for() loops.
- Better whitespace comment checks.
Review URL: http://codereview.appspot.com/4964064
2011-09-07 17:36:35 +00:00
erg@google.com
8f91ab2835 Reverted r70, at asvitkine's request 2011-09-06 21:04:45 +00:00
erg@google.com
5210aec6df Upstream useful lint check from WebKit's fork of cpplint.py.
Checks against "Foo *bar" and "Foo &bar" declarations.

WebKit patch was: http://trac.webkit.org/changeset/46856

Credit Torch Mobile, Inc. who have contributed the WebKit patch in question.

Patch committed for asvitkine@chromium.org.
2011-09-06 20:19:05 +00:00
simonstewart@google.com
0249a38579 Adding config files for formatting for IntelliJ and Eclipse 2011-08-30 11:23:49 +00:00
mmentovai
cd4ce0fff0 Update C++ style guide to 3.188:
- Revise "Smart Pointers" section.
 - Clarify that it's OK to have spaces after '#' in a preprocessor directive,
   even though '#' itself must not be indented.
 - Revise "TODO Comments" section.
 - Fix wording.
 - Explicitly recommend foo.h be the first file #included by foo_test.cc.

Update Objective-C style guide to 2.24:
 - Clarify the spacing of @property declarations.
 - Add "Overridden NSObject Method Placement" section.
 - Explicitly permit blank lines around @interface, @implementation, and @end.

Update JavaScript style guide to 2.20:
 - Provide additional guidance with respect to the compiler.
 - Add {function(new:Type)} as a type syntax for constructors of Type.
 - Revise "Method and Function Comments" section.
 - Harmonize text and example in the "Passing Anonymous Functions" section.
 - Explicitly state that @param and @return types must be enclosed in braces.
 - Add documentation on the UNKNOWN type.
 - Replace a CODE_SNIPPET with BAD_CODE_SNIPPET in the "Internet Explorer's
   Conditional Comments" section.
 - Remove a redundant "Expand for more information" in the "Naming" section
   and fully spell out "information" in the "Code Formatting" section.
 - Provide a positive example in the "Multiline string literals" section.
 - Provide guidance for indentation within nested functions.

Update Python style guide to 2.20:
 - Clarify shebang rule.
2011-03-29 20:30:47 +00:00
mshields@google.com
222e6da82a New file google_python_style.vim. 2010-11-29 20:32:06 +00:00
mmentovai
7f003d3547 Update JavaScript style guide to 2.11:
- Fix r62, which was applied incorrectly.
2010-11-23 21:09:55 +00:00
mmentovai
db989ec08f Update C++ style guide to 3.180:
- Remove comment about naming macros like enums.
 - Move a bad code snippet from a CODE_SNIPPET to a BAD_CODE_SNIPPET element.

Update Python style guide to 2.18:
 - Clarify the syntax for import statements.

Update styleguide.xsl to 1.31:
 - Substitute underscore for apostrophe in anchor names.
2010-11-23 18:02:36 +00:00
erg@google.com
a51c16b542 Allow blank Doxygen-style comments. Patch by mball@google.com. 2010-11-17 18:09:31 +00:00
erg@google.com
f550116b81 Fix wrong number of braces.
Thanks to wdscxsj@gmail.com for pointing this out.
2010-10-21 17:20:05 +00:00
mmentovai
ce4da30bb9 Update C++ style guide to 3.178:
- Fix grammatical and spelling errors, and revise awkward phrasing.
2010-10-14 15:54:08 +00:00
mmentovai
7d78fd4e6a Update C++ style guide to 3.175:
- Fix typo.
2010-10-08 18:35:59 +00:00
erg@google.com
42e59b0ce7 Project prefix directory should work with Hg.
Patch based on one by tomic80.
2010-10-04 22:18:07 +00:00
mmentovai
7ead64485b Update C++ style guide to 3.174:
- Add leading blank line exception.
 - Improve guidance for function definition comments.
 - Tweak class comment example to not violate type naming guidelines.

Update Objective-C style guide to 2.21:
 - Prohibit +new.

Update JavaScript style guide to 2.9:
 - Add new "Function Declarations Within Blocks" section.
 - Add new "Internet Explorer's Conditional Comments" section.
 - Add new "Alias long type names to improve readability" section.
 - Add @lends.
2010-10-04 16:26:53 +00:00
mmentovai
b729e3cfe3 Update C++ style guide to 3.171:
- Add a section to specify deprecation comments.
2010-08-10 18:40:41 +00:00
mmentovai
b6870cb5db Update C++ style guide to 3.170:
- Allow overloading a function judiciously.
 - _unittest and _regtest are deprecated.
 - Document C++0x policy.
 - Allow namespace aliases in .h files when inside namespaces.
 - Give examples for and against parentheses with return.
 - Update set of allowed Boost headers.
 - Add a caveat to the forward-declaration section, mentioning impicit
   constructors.
2010-08-05 00:39:32 +00:00
mmentovai
8411f0c651 Update Python style guide with styleguide.xsl r51. 2010-08-04 17:46:16 +00:00
mmentovai
b2ad010f74 Update JavaScript style guide to 2.3:
- Clarify the semantics of @private and @protected, in particular how they
   differ from the expectations of users of C++ and Java.
2010-08-04 17:43:38 +00:00
mmentovai
4d50302d0e Update Objective-C style guide to 2.20:
- Allow dot notation for simple property access.
 - Clarify spacing around category definitions and parameters that take
   protocols.
2010-08-04 17:39:00 +00:00
robbyw@google.com
bb32401998 Added JavaScript style guide 2010-07-12 22:02:20 +00:00
robbyw@google.com
52f62a450b Update look and feel of the style guides 2010-07-12 21:58:39 +00:00
mmentovai
e5aeb8fb72 Update C++ style guide to 3.161:
- Forbid the use of operator synonyms such as "and."
 - Specify the naming convention (OrDie) to use when a function has
   crash-on-failure semantics.
 - Allow static const data members to be non-private.
 - Specify placement of friend declarations.
 - Require each file to include headers that they use.

Update Objective-C style guide to 2.18:
 - Prefer @optional to informal protocols when possible.
 - Specify formatting for invoking methods.
 - Require that -dealloc be easy to review.
2010-05-12 16:52:16 +00:00
erg+personal@google.com
0518964d22 Update cpplint.py to #150:
- Be explicit about "class Foo :\n public Bar" being wrong.
- Allow snprintf(NULL, 0, ...) pattern.
- Extend NOLINT syntax.
- Remove NOLINT hint.
- <new> is an STL header.
- Use original filename for header guard when invoked by flymake.
- Avoid false-positive build/include_what_you_use errors for use
  of classes called "string" other than STL ones.

Review URL: http://codereview.chromium.org/1697023
2010-04-30 20:43:03 +00:00
monsur
2d29e83ea3 Adding licensing footer 2010-03-08 18:32:48 +00:00