DOC: exclude autogenerated c/cpp/html files from 'trailing whitespace' checks
- [x] closes #24526 
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
