MCPcopy Index your code
hub / github.com/nodejs/node / _ParseFilterSelector

Function _ParseFilterSelector

tools/cpplint.py:7920–7946  ·  view source on GitHub ↗

Parses the given command line parameter for file- and line-specific exclusions. readability/casting:file.cpp readability/casting:file.cpp:43 Args: parameter: The parameter value of --filter Returns: [category, filename, line]. Category is always given. F

(parameter)

Source from the content-addressed store, hash-verified

7918
7919
7920def _ParseFilterSelector(parameter):
7921 """Parses the given command line parameter for file- and line-specific
7922 exclusions.
7923 readability/casting:file.cpp
7924 readability/casting:file.cpp:43
7925
7926 Args:
7927 parameter: The parameter value of --filter
7928
7929 Returns:
7930 [category, filename, line].
7931 Category is always given.
7932 Filename is either a filename or empty if all files are meant.
7933 Line is either a line in filename or -1 if all lines are meant.
7934 """
7935 colon_pos = parameter.find(":")
7936 if colon_pos == -1:
7937 return parameter, "", -1
7938 category = parameter[:colon_pos]
7939 second_colon_pos = parameter.find(":", colon_pos + 1)
7940 if second_colon_pos == -1:
7941 return category, parameter[colon_pos + 1 :], -1
7942 return (
7943 category,
7944 parameter[colon_pos + 1 : second_colon_pos],
7945 int(parameter[second_colon_pos + 1 :]),
7946 )
7947
7948
7949def _ExpandDirectories(filenames):

Callers 1

_ShouldPrintErrorFunction · 0.85

Calls 2

intFunction · 0.85
findMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…