[PATCH] D141508: [utils][filecheck-lint] Add filecheck-lint, a linter for FileCheck directives.

Sam McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 09:12:30 PST 2023


sammccall added a comment.

This seems to be spread over more files/directories than is typical for small tools like this.
Would you consider:

- folding main into filecheck_lint.py, under `if __name__=='__main__'` so it still works as a library
- dropping the `filecheck_lint` directory
- moving the contents of `README.md` into comments/docstring of the script itself

I think the test is OK sitting loose under utils next to the main file (but only if something actually runs it)



================
Comment at: llvm/utils/filecheck_lint/README.md:3
+
+## About
+
----------------
replace with a normal space?


================
Comment at: llvm/utils/filecheck_lint/README.md:16
+filecheck_lint path/to/test/file/1 ... path/to/test/file/n
+# With a custom edit distance reporting threshold (default: 3)
+filecheck_lint --threshold 4 path/to/test/file/1 ... path/to/test/file/n
----------------
I don't see any reason users should care about customizing this - we should set a sensible default, and the set of directives doesn't vary wildly between tests.

Fine if you want to have it for testing or some external use, but I wouldn't document it - it's distracting.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141508/new/

https://reviews.llvm.org/D141508



More information about the llvm-commits mailing list