https://pantsbuild.org/ logo
h

hundreds-salesmen-11510

12/20/2021, 5:41 PM
Hi. To learn more about Pants, I was considering trying to implement a plugin that adds importlinter(https://import-linter.readthedocs.io/en/stable/index.html) as a new linter. But I’ve realized that importlinter is different from existing pants linters, in that it expects to be invoked in the root of the project with all code visible, so that it can detect whether any import contracts have been violated. Other Pants linters can be freely invoked on only a subset of files in a project. Does this mean that it maps poorly onto the Pants concept of a linter? Would it be better represented as its own goal?
m

melodic-thailand-99227

12/20/2021, 5:58 PM
I think it’s similar to mypy which does a whole program analysis. This is something that pants want to include inside the tool - https://github.com/pantsbuild/pants/issues/13393 Add 👍 to the issue
1
h

hundreds-father-404

12/20/2021, 7:49 PM
Hi! Agreed that #13393 is likely a better avenue for this Any other ideas for plugins you're interested in?
h

hundreds-salesmen-11510

12/20/2021, 8:33 PM
thanks. Makes sense that pants would want to consider this at the tool level, so it can check for contract violations by other kinds of dependencies besides python imports. I'll think about other plugins
2 Views