crystal-ameba / ameba

A static code analysis tool for Crystal
https://crystal-ameba.github.io
MIT License
514 stars 35 forks source link

Ameba trips on folder named `*.cr` #459

Closed straight-shoota closed 4 months ago

straight-shoota commented 4 months ago

When ameba discovers source files, it considers every path ending in .cr as a source file, even if it's not a file but a directory:

$ mkdir -p test/foo.cr
$ ameba test
Error: Error reading file (test/foo.cr): Is a directory

This needs a fix similar to https://github.com/crystal-lang/crystal/pull/13760

You'll see this error when running ameba in the Crystal repo which contains a folder ending in .cr since fixing that bug.