Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
畅游知识海洋
json
提交
fcc36f99
J
json
项目概览
畅游知识海洋
/
json
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
json
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
fcc36f99
编写于
4月 24, 2022
作者:
N
Niels Lohmann
提交者:
GitHub
4月 24, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
⬆
cpplint 1.6.0 (#3454)
上级
1a90c946
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
10 deletion
+15
-10
third_party/cpplint/README.rst
third_party/cpplint/README.rst
+1
-4
third_party/cpplint/cpplint.py
third_party/cpplint/cpplint.py
+14
-6
未找到文件。
third_party/cpplint/README.rst
浏览文件 @
fcc36f99
cpplint - static code checker for C++
=====================================
.. image:: https://travis-ci.org/cpplint/cpplint.svg?branch=master
:target: https://travis-ci.org/cpplint/cpplint
.. image:: https://img.shields.io/pypi/v/cpplint.svg
:target: https://pypi.python.org/pypi/cpplint
...
...
@@ -62,7 +59,7 @@ The modifications in this fork are minor fixes and cosmetic changes, such as:
* python 3 compatibility
* more default file extensions
* customizable file extensions with the --extensions argument
* continuous integration on
travis
* continuous integration on
github
* support for recursive file discovery via the --recursive argument
* support for excluding files via --exclude
* JUnit XML output format
...
...
third_party/cpplint/cpplint.py
浏览文件 @
fcc36f99
...
...
@@ -41,6 +41,11 @@ We do a small hack, which is to ignore //'s with "'s after them on the
same line, but it is far from perfect (in either direction).
"""
# cpplint predates fstrings
# pylint: disable=consider-using-f-string
# pylint: disable=invalid-name
import
codecs
import
copy
import
getopt
...
...
@@ -59,7 +64,7 @@ import xml.etree.ElementTree
# if empty, use defaults
_valid_extensions
=
set
([])
__VERSION__
=
'1.
5.5
'
__VERSION__
=
'1.
6.0
'
try
:
xrange
# Python 2
...
...
@@ -1915,6 +1920,7 @@ class CleansedLines(object):
self
.
raw_lines
=
lines
self
.
num_lines
=
len
(
lines
)
self
.
lines_without_raw_strings
=
CleanseRawStrings
(
lines
)
# # pylint: disable=consider-using-enumerate
for
linenum
in
range
(
len
(
self
.
lines_without_raw_strings
)):
self
.
lines
.
append
(
CleanseComments
(
self
.
lines_without_raw_strings
[
linenum
]))
...
...
@@ -5068,10 +5074,12 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
#
# We also make an exception for Lua headers, which follow google
# naming convention but not the include convention.
match
=
Match
(
r
'#include\s*"([^/]+\.h)"'
,
line
)
if
match
and
not
_THIRD_PARTY_HEADERS_PATTERN
.
match
(
match
.
group
(
1
)):
error
(
filename
,
linenum
,
'build/include_subdir'
,
4
,
'Include the directory when naming .h files'
)
match
=
Match
(
r
'#include\s*"([^/]+\.(.*))"'
,
line
)
if
match
:
if
(
IsHeaderExtension
(
match
.
group
(
2
))
and
not
_THIRD_PARTY_HEADERS_PATTERN
.
match
(
match
.
group
(
1
))):
error
(
filename
,
linenum
,
'build/include_subdir'
,
4
,
'Include the directory when naming header files'
)
# we shouldn't include a file more than once. actually, there are a
# handful of instances where doing so is okay, but in general it's
...
...
@@ -6523,7 +6531,7 @@ def ProcessConfigOverrides(filename):
continue
try
:
with
open
(
cfg_file
)
as
file_handle
:
with
open
(
cfg_file
,
encoding
=
'utf-8'
)
as
file_handle
:
for
line
in
file_handle
:
line
,
_
,
_
=
line
.
partition
(
'#'
)
# Remove comments.
if
not
line
.
strip
():
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录