emacs-eldev / eldev

Elisp development tool
https://emacs-eldev.github.io/eldev/
GNU General Public License v3.0
227 stars 17 forks source link

Hide test directory from #13

Closed tarsius closed 4 years ago

tarsius commented 4 years ago

Please add the file test/.nosearch to inform normal-top-level-add-subdirs-to-load-path that test/ doesn't contain libraries intended for end-users. Other tools, such as those I use to maintain the Emacsmirror, also take note of this file.

Please do the same for flycheck-eldev.

Thanks!

doublep commented 4 years ago

Is it needed because the directories contain fake subprojects meant only for testing? I just want to understand why not e.g. bin/.nosearch or not test/.nosearch in a few other projects I have.

tarsius commented 4 years ago

Is it needed because the directories contain fake subprojects meant only for testing?

That is what caused my tools to report an issue and me to take a closer look.

I just want to understand why not e.g. bin/.nosearch or not test/.nosearch in a few

I wouldn't go as far as to request that you add a .nosearch files in all those cases. I only recommend it for directories that contain elisp files that could otherwise be mistaken for actual libraries by tools. My tools are a bit more intelligent than normal-top-level-add-subdirs-to-load-path but they still look into every subdirectory (lacking .nosearch) and every time they find an elisp file that provides the matching features, they conclude that this is a library that is part of the package.

So I suggest that people don't provide features in non-library elisp files such as test.el (unless of course the package is named test). If testing involves dealing with fake packages, then those fake libraries of course have to provide fake features and then .nosearch is the only option I know of.

tarsius commented 4 years ago

By the way, it would be great if eldev could check if the projects exhibits this issue!

I would be happy to further clarify and help you figure out how to do that.

doublep commented 4 years ago

By the way, it would be great if eldev could check if the projects exhibits this issue!

Eldev itself is not a linter, though it provides easy access to some with lint command.

I would be happy to further clarify and help you figure out how to do that.

If you have an existing external linter package in mind, maybe. But not if you mean adding special code for this to Eldev.

tarsius commented 4 years ago

Eldev itself is not a linter

Understood.

tarsius commented 4 years ago

Thanks for addressing this so quickly!