MCPcopy
hub / github.com/htmlhint/HTMLHint / hintStdin

Function hintStdin

src/cli/htmlhint.ts:507–524  ·  view source on GitHub ↗
(
  ruleset: Ruleset | undefined,
  callback: (messages: Hint[]) => void
)

Source from the content-addressed store, hash-verified

505
506// hint stdin
507function hintStdin(
508 ruleset: Ruleset | undefined,
509 callback: (messages: Hint[]) => void
510) {
511 process.stdin.setEncoding('utf8')
512
513 const buffers: string[] = []
514
515 process.stdin.on('data', (text) => {
516 buffers.push(text)
517 })
518
519 process.stdin.on('end', () => {
520 const content = buffers.join('')
521 const messages = HTMLHint.verify(content, ruleset)
522 callback(messages)
523 })
524}
525
526// hint url
527function hintUrl(

Callers 1

hintAllFilesFunction · 0.85

Calls 2

onMethod · 0.80
verifyMethod · 0.80

Tested by

no test coverage detected