Add unit test for cros_lint.ts * Return Diagnostic[] to make code more testable. * Fix how Diagnostic is constructed. * Work around a bug in cpplint.py, where line numbers are 1-based, except the copyright warning. BUG=b:214322467 TEST=ran test in the IDE and manually verified that linter still works. Change-Id: I1deed3095eff4b03b1aeeb051b87eedafb5af98c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/ide_tooling/+/3424171 Reviewed-by: Keigo Oka <[email protected]> Commit-Queue: Tomasz Tylenda <[email protected]> Tested-by: Tomasz Tylenda <[email protected]>