xref: /aosp_15_r20/external/google-styleguide/cpplint/README (revision 8c35d5ee8e2913d4bd6623e2b93232b1da0ab719)
1*8c35d5eeSXin LiThis is automated checker to make sure a C++ file follows Google's C++ style
2*8c35d5eeSXin Liguide (https://google.github.io/styleguide/cppguide.html). As it
3*8c35d5eeSXin Liheavily relies on regular expressions, cpplint.py won't catch all violations of
4*8c35d5eeSXin Lithe style guide and will very occasionally report a false positive. There is a
5*8c35d5eeSXin Lilist of things we currently don't handle very well at the top of cpplint.py,
6*8c35d5eeSXin Liand we welcome patches to improve it.
7*8c35d5eeSXin Li
8*8c35d5eeSXin LiThe linting tool takes a list of files as input. For full usage instructions,
9*8c35d5eeSXin Liplease see the output of:
10*8c35d5eeSXin Li
11*8c35d5eeSXin Li  ./cpplint.py --help
12*8c35d5eeSXin Li
13*8c35d5eeSXin LiUnit tests are provided in cpplint_unittest.py. This file can safely be ignored
14*8c35d5eeSXin Liby end users who have downloaded this package and only want to run the lint
15*8c35d5eeSXin Litool.
16*8c35d5eeSXin Li
17*8c35d5eeSXin Li---
18*8c35d5eeSXin Li
19*8c35d5eeSXin Licpplint.py and its corresponding unit tests are Copyright (C) 2009 Google Inc.
20*8c35d5eeSXin Li
21*8c35d5eeSXin LiRedistribution and use in source and binary forms, with or without
22*8c35d5eeSXin Limodification, are permitted provided that the following conditions are
23*8c35d5eeSXin Limet:
24*8c35d5eeSXin Li
25*8c35d5eeSXin Li   * Redistributions of source code must retain the above copyright
26*8c35d5eeSXin Linotice, this list of conditions and the following disclaimer.
27*8c35d5eeSXin Li   * Redistributions in binary form must reproduce the above
28*8c35d5eeSXin Licopyright notice, this list of conditions and the following disclaimer
29*8c35d5eeSXin Liin the documentation and/or other materials provided with the
30*8c35d5eeSXin Lidistribution.
31*8c35d5eeSXin Li   * Neither the name of Google Inc. nor the names of its
32*8c35d5eeSXin Licontributors may be used to endorse or promote products derived from
33*8c35d5eeSXin Lithis software without specific prior written permission.
34*8c35d5eeSXin Li
35*8c35d5eeSXin LiTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
36*8c35d5eeSXin Li"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
37*8c35d5eeSXin LiLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
38*8c35d5eeSXin LiA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
39*8c35d5eeSXin LiOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40*8c35d5eeSXin LiSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41*8c35d5eeSXin LiLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
42*8c35d5eeSXin LiDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
43*8c35d5eeSXin LiTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
44*8c35d5eeSXin Li(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
45*8c35d5eeSXin LiOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46