Search for unused files in a project

We are moving our work repository, so I want to roll back all the files without links that exist in the source tree before moving it to a nice fresh (empty) repository.

So far I have walked through my hand and found all the files without links that I know of, but I want to find out if I caught them all. One way would be to manually move the project file by file to a new folder and see which sticks when compiling. It will take all week, so I need an automatic tool.

What do people offer?

Explanations:
1) This is C ++.
2) Files are mixed. I am looking for files that have been replaced by others, but remain rotten in the repository - for example, file_iter.h does not refer to any other file in the program, but remains in the repository just in case someone wants to compile a version from 1996! Now we move to the new repository, we can safely delete all files that are no longer in use.
3) Lint only finds unused includes - not unused files (I have a 7.5 manual in front of me).

+3
source share
5 answers

++, , . , , , . (, , ..), , , .

+2

, , (, ). , , , , , . (, -n make bjam .) .

-MM of g++ . make, .

, ; , .

+1

Lint, " " ( , ).

, , /enum/function unreferenced, , , , .

+1

, lint, . , .

0

Source-Navigator? IDE, , . , , .

I do not know if it is writable, but this may be a good starting point for you.

0
source

Source: https://habr.com/ru/post/1696748/


All Articles