-
Notifications
You must be signed in to change notification settings - Fork 24
/
displayCSV.cfm
35 lines (28 loc) · 1.39 KB
/
displayCSV.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
<cfset csvData="">
<cfset csvRow="">
<cfset currentFileName = scoperFileName />
<cfset scoperResults = varscoper.getResultsArray() />
<cfloop from="1" to="#arrayLen(scoperResults)#" index="scoperIdx">
<cfset tempUnscopedArray = scoperResults[scoperIdx].unscopedArray />
<cfif NOT ArrayIsEmpty(tempUnscopedArray)>
<cfloop from="1" to="#arrayLen(tempUnscopedArray)#" index="unscopedIdx">
<cfset csvRow = "" />
<cfset csvRow = listAppend(csvRow,CSVFormat(currentFileName))>
<cfset csvRow = listAppend(csvRow,CSVFormat(scoperResults[scoperIdx].functionName))>
<cfif structKeyExists(scoperResults[scoperIdx],"LineNumber")>
<cfset csvRow = listAppend(csvRow,CSVFormat(scoperResults[scoperIdx].LineNumber))>
<cfelse>
<cfset csvRow = listAppend(csvRow,CSVFormat(0))>
</cfif>
<cfset csvRow = listAppend(csvRow,CSVFormat(tempUnscopedArray[unscopedIdx].VariableName))>
<cfif structKeyExists(tempUnscopedArray[unscopedIdx],"LineNumber")>
<cfset csvRow = listAppend(csvRow,CSVFormat(tempUnscopedArray[unscopedIdx].LineNumber))>
<cfelse>
<cfset csvRow = listAppend(csvRow,CSVFormat(0))>
</cfif>
<cfset csvRow = listAppend(csvRow,CSVFormat(tempUnscopedArray[unscopedIdx].VariableContext))>
<cfset csvData="#csvData##csvRow##newLine#">
</cfloop>
</cfif>
</cfloop>
<cfset request.allCSVData = request.allCSVData & csvData >