Last active
December 13, 2016 10:25
-
-
Save cybersonic/8f44a857197220762aa037f955bcc240 to your computer and use it in GitHub Desktop.
Used to compile files and track obvious syntax errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| pathtoSourceCode = expandPath("/code"); | |
| files= DirectoryList(pathtoSourceCode, true); | |
| passedFiles = []; | |
| failedFiles = []; | |
| failedErrors = {}; | |
| for(f in files){ | |
| if(ListLast(f, ".").startsWith("cf")){ | |
| if(fileExists(f)){ | |
| try{ | |
| getPageContext().compile(contractPath(f)); | |
| passedFiles.append(f); | |
| } | |
| catch(Any e){ | |
| failedErrors[f] = e; | |
| failedFiles.append(f); | |
| } | |
| } | |
| } | |
| } | |
| dump(var:passedFiles,label:"Compiled Files"); | |
| dump(var:failedFiles,label:"Failed Files"); | |
| dump(failedErrors); | |
| </cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment