It would be nice to have robots.txt validation in Site Audit.
For example, there was
User agent: MTRobot
Disallow: /
("User agent" instead of "User-agent").
in my robots.txt file and Lighthouse in Chrome DevTools https://web.dev/robots-txt/ helped to fix this error.