'How to populate the quickfix list or location list of Vim/Neovim with arbitrary linter output?

Say I just ran a linter in the terminal and I have a bunch of linter output in the standard format:

path/to/some/file.foo:45:23: This is an error message
path/to/some/file.foo:46:12: This is another error message
...

I am currently opening each file manually in Neovim, navigating to the correct line and fixing the issue.

Instead, I want to populate the quickfix or location list in Vim or Neovim with this information so I can quickly jump to each spot and fix the error.

What would be the simplest/quickest way to achieve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source