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

Function CheckInlineHeader

tools/cpplint.py:2807–2819  ·  view source on GitHub ↗

Logs an error if both a header and its inline variant are included.

(filename, include_state, error)

Source from the content-addressed store, hash-verified

2805
2806
2807def CheckInlineHeader(filename, include_state, error):
2808 """Logs an error if both a header and its inline variant are included."""
2809
2810 all_headers = dict(item for sublist in include_state.include_list
2811 for item in sublist)
2812 bad_headers = set('%s.h' % name[:-6] for name in all_headers.keys()
2813 if name.endswith('-inl.h'))
2814 bad_headers &= set(all_headers.keys())
2815
2816 for name in bad_headers:
2817 err = '%s includes both %s and %s-inl.h' % (filename, name, name)
2818 linenum = all_headers[name]
2819 error(filename, linenum, 'build/include_inline', 5, err)
2820
2821
2822def CheckForNewlineAtEOF(filename, lines, error):

Callers 1

ProcessFileDataFunction · 0.85

Calls 3

keysMethod · 0.65
setFunction · 0.50
errorFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…