MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / excludes_from_file

Function excludes_from_file

tools/release/run-clang-format.py:45–61  ·  view source on GitHub ↗
(ignore_file)

Source from the content-addressed store, hash-verified

43
44
45def excludes_from_file(ignore_file):
46 excludes = []
47 try:
48 with io.open(ignore_file, "r", encoding="utf-8") as f:
49 for line in f:
50 if line.startswith("#"):
51 # ignore comments
52 continue
53 pattern = line.rstrip()
54 if not pattern:
55 # allow empty lines
56 continue
57 excludes.append(pattern)
58 except EnvironmentError as e:
59 if e.errno != errno.ENOENT:
60 raise
61 return excludes
62
63
64def list_files(files, recursive=False, extensions=None, exclude=None):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected