How can I check the filename of a file being linted by ktlint?

212 views Asked by At

I am trying to prevent certain imports in files with "ViewModel" in their filename but have so far only found a way to use ktlint to check for classes with ViewModel in their name. Does anyone know how to leverage ktlint to write a lint rule that would forbid imports in a file based on the file's name?

0

There are 0 answers