error_one_per_line - Linux


error_one_per_line is a command-line utility that outputs a list of files with one error or warning per line. This helps in quickly identifying and addressing errors in large codebases.


error_one_per_line [options] <command>


  • --limit <num>: Maximum number of errors or warnings to display per file (default: 10).
  • --ignore-unused-variables: Ignore warnings about unused variables.
  • --ignore-empty-blocks: Ignore warnings about empty blocks.
  • --show-filenames: Display the file names in the output.
  • --show-lines: Display the line numbers in the output.


Simple usage:

error_one_per_line make

Finding specific error messages:

error_one_per_line grep 'Error: syntax error' make

Limiting output to 5 errors per file:

error_one_per_line --limit 5 make

Common Issues

No errors or warnings found:

  • Check if the command is correct.
  • Ensure that the command is run in the correct directory.

Too many errors or warnings:

  • Use the --limit option to reduce the number of errors displayed.
  • Consider narrowing the search using grep or other filtering mechanisms.


With grep:

error_one_per_line | grep 'syntax error'

With xargs:

error_one_per_line | xargs -n 1 -r vim

Related Commands

  • grep: Search for specific patterns in files.
  • sed: Perform text editing operations.
  • awk: Extract and format data from files.