0

Cloc has a way to exclude files that contain text using --exclude-content=<regex>. I’m looking for a way to do the opposite. How can I check files that only include certain phrases? I've tried cloc . --exclude-content='/^((?!import).)*$/s' but it doesn't give the desired results. I have also tried writing an ignored file using --ignored but that only gives the ignored reason, and not the line count.

How would I be able go about only including files that contain text?

Richard Witherspoon
  • 4,082
  • 3
  • 17
  • 33

0 Answers0