MCPcopy Create free account
hub / github.com/BVLC/caffe / IsBlankLine

Function IsBlankLine

scripts/cpp_lint.py:2373–2385  ·  view source on GitHub ↗

Returns true if the given line is blank. We consider a line to be blank if the line is empty or consists of only white spaces. Args: line: A line of a string. Returns: True, if the given line is blank.

(line)

Source from the content-addressed store, hash-verified

2371
2372
2373def IsBlankLine(line):
2374 """Returns true if the given line is blank.
2375
2376 We consider a line to be blank if the line is empty or consists of
2377 only white spaces.
2378
2379 Args:
2380 line: A line of a string.
2381
2382 Returns:
2383 True, if the given line is blank.
2384 """
2385 return not line or line.isspace()
2386
2387
2388def CheckForFunctionLengths(filename, clean_lines, linenum,

Callers 3

CheckSpacingFunction · 0.85
CheckSectionSpacingFunction · 0.85
GetPreviousNonBlankLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected