Identify Unlinked Pages - ColdFusion Builder

116 views Asked by At

We have a large number of legacy pages in our application's code repository which are not linked to other pages. Is there a way in ColdFusion Builder to see which pages are not linked so they can be deleted? (Builder is derivative of Eclipse, so the question may be answered by an Eclipse guru).

2

There are 2 answers

7
James A Mohler On

I am going to paraphrase Tomalak's answer from 9 years ago. He originally wrote

A regex is not advisable. Since ColdFusion is quite flexible in the way files can be included or referenced, there will be no way to determine the definitive list of dependencies from the source code alone.

You could insert a <cflog> into each file and build a log from the running application. Examine the log after the application was active for a while and all functionality had been accessed at least once.

Source: How do I determine which files a ColdFusion application uses?

I would change that slightly...

You could insert a <cflog> into application.cfc or application.cfm to determinte which pages are being accessed.

After that list is compiled, then see if any of those files use <cfinclude> or createobject(), or <cfmodule>. Eventually all files will be accounted for.

I also find it useful to look at change dates. If no one has touched a file in 15 years, it probably isn't important.

7
Cory Fail On

I would just search using "File Search" if the file name exists within the project.

Cfbuilder 3 search for a file with specific text inside a folder

If you use a framework such as FW/1 or ColdBox, you'll have to search for the model/view/controller name and not the exact filename.