-
Notifications
You must be signed in to change notification settings - Fork 24
/
varScoperDisplay.cfm
67 lines (58 loc) · 2.14 KB
/
varScoperDisplay.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<cftry>
<cfif NOT fileExists(scoperFileName)>
<cfthrow type="noFile">
</cfif>
<cffile action="read" file="#scoperFileName#" variable="fileParseText">
<cfif isDefined("URL.showDuplicates") and URL.showDuplicates>
<cfset showDuplicates = TRUE >
<cfelse>
<cfset showDuplicates = FALSE >
</cfif>
<cfif isDefined("URL.hideLineNumbers") and URL.hideLineNumbers>
<cfset showLineNumbers = FALSE >
<cfelse>
<cfset showLineNumbers = TRUE >
</cfif>
<cfif NOT isDefined("URL.parseCfscript") OR findNoCase('true',URL.parseCfscript) >
<cfset parseCfscript = TRUE >
<cfelse>
<cfset parseCfscript = FALSE >
</cfif>
<cfset varscoper = createObject("component","varScoper").init(fileParseText:fileParseText,showDuplicates:showDuplicates,showLineNumbers:showLineNumbers,parseCfscript:parseCfscript) />
<!--- <cftimer label="Scope Checking Execution" type="comment"> --->
<cfset varscoper.runVarscoper() />
<!--- </cftimer> --->
<cfparam name="variables.totalMethods" default="0">
<cfset variables.totalMethods = variables.totalMethods + structCount(varscoper.getResultsStruct()) />
<cfif isDefined("URL.displayFormat")>
<cfset displayFormat = URL.displayFormat />
<cfelse>
<cfset displayFormat = "screen" />
</cfif>
<cfswitch expression="#displayFormat#">
<cfcase value="screen">
<cfinclude template="displayScreen.cfm">
</cfcase>
<cfcase value="dump">
<cfinclude template="displayDump.cfm">
</cfcase>
<cfcase value="csv">
<cfinclude template="displayCSV.cfm">
</cfcase>
<cfcase value="XML">
<cfinclude template="displayXML.cfm">
</cfcase>
<cfcase value="unit">
<cfinclude template="displayUnit.cfm">
</cfcase>
</cfswitch>
<cfcatch type="noFile">
<cfoutput>No file or directory exists for the path specified (#htmlEditFormat(scoperFileName)#)</cfoutput>
</cfcatch>
<cfcatch type="functionWithoutName">
There was a parsing error with one of the functions - the function did not have a name, exiting processing
</cfcatch>
<cfcatch type="any">
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>