[QUESTION]: How does this project relate to your bazel-linting-system project?
Closed this issue · 5 comments
Will the bazel-mypy-integration
be superseded by the bazel-linting-system
?
Thanks, again, for your efforts on both fronts.
bazel-linting-system
I made before bazel-mypy-integration
and was concerned with applying lint changes to source code, whereas bazel-mypy-integration
won’t change your source code and will just spit out errors.
So while they are related, the former is an attempt answer to the question "can I replace all our bash scripts and config that run our linters in CI with a Bazel integrated system that will be cleaner and faster?" The latter was created just to get MyPy running in our Bazel build so we stopped checking in incorrect types.
Linter tools that will take in source code files (only) and spit out linted source code files include Ruby's rubocop
and Python's black
, but MyPy isn't in this class of tool as it requires a view of source code dependencies and can accept typing stub files.
I hadn't thought of using the former in the latter until a coworker asked the same question as you. I’d say that MyPy is too complex for the current capabilities of bazel-linting-system
, but with further work on bazel-linting-system
maybe its responsibilities will grow beyond linters that format code to more complex static code analysis/typing tools like MyPy for Python and eslint
for Typescript.
As it stands now, are the two actually orthogonal? In contributing to bazel-mypy-integration I'm tripping over
ERROR: /home/alexeagle/Projects/bazel-mypy-integration/examples/third_party/BUILD:3:10: MirrorAndLint third_party/__linting_system/main/third_party/main.py failed: (Exit 127): main_linter_exe failed: error executing command bazel-out/k8-fastbuild/bin/third_party/main_linter_exe third_party/__linting_system/main 'third_party/main.py;bazel-out/k8-fastbuild/bin/third_party/__linting_system/main/third_party/main.py'
Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/k8-fastbuild/bin/third_party/main_linter_exe: line 30: /usr/local/bin/black: No such file or directory
and rather than debug/repair/workaround that, I wonder if we should just remove the linting_system hooks from the mypy repo for now?
EDIT: I think it was just the extra .bazelrc: #59
@alexeagle I think remove bazel-linting-system. It was an experimental system I dropped into the mypy-integration in the early days, but it remained experimental and I don't think bazel-mypy-integration should carry it around.
It looks like the original question has been answered here, so I'll close this ticket.
Yeah. We do need to remove the references to Bazel-linting-system in the code.