-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
the why developers run tests is that all test files are usually included in final top lvl file. compiling and running this file will runs all tests in project.
now what often happens is that developers forget to include test file in top lvl file. it can happen when developers are adding new features (vacp2p/nim-libp2p#1825), or even refactoring (reorganizing) test files.
it would be possible to create some utility that would be run in top lvl file, some function checkDanglingTest that would if there are dangling files. this would prevent this from happening.
checkDanglingTest pseudocode:
- list all test files in current dir and sub dirs (test files have match some regexp, eg test file has name
test**.nim- user can provide path to root dir, and regexp that matches files
- list all test files that are included in this file
- function should collect all files listed in
import ..., also fetching all imports of those imports
- function should collect all files listed in
- finally if there is difference between these two lists, show output
- user may configure with argument
--fail-on-danglingif check should abort text execution (or just do it by default always)
- user may configure with argument
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers