ColdFusion Coding Standards
ColdFusion cfm files and application patterns
At a glance
- Kind
- Instruction · Ananke
prompt - Reference
awesome-copilot/coldfusion-cfm·ananke://prompt/awesome-copilot/coldfusion-cfm@1.0.0- Applies to
**/*.cfm- Files
- 1 · 1.2 KB
- How it's used
- Instructions apply automatically to files matching their applyTo glob in GitHub Copilot. For Claude Code, reference the file from CLAUDE.md.
Where it fits
- Lifecycle phase
- Implementation
- Role
- Developer
- Platform
- Ananke PlexusGitHub Copilot
- Needs
- Nothing (text only)
Facets suggested from the item's own text and tags, not yet reviewed. Facets say where an item is relevant, not that it will run in your setup. How facets work
Checked by Dex
Verified, not self-reported: dex-trove 0.3.16 installed this item into each layout and checked that the tool can load it. Dex collects no download or usage data.
- GitHub Copilot ✓ loads
Upstream metadata
Self-reported by the item's author; Dex shows it as written.
applyTo | **/*.cfm |
|---|
Documentation
View upstream ↗- Use CFScript where possible for cleaner syntax.
- Avoid using deprecated tags and functions.
- Follow consistent naming conventions for variables and components.
- Use
cfqueryparamto prevent SQL injection. - Escape CSS hash symbols inside blocks using ##
- When using HTMX inside blocks, escape hash symbols (#) by using double hashes (##) to prevent unintended variable interpolation.
- If you are in a HTMX target file then make sure the top line is:
Additional Best Practices
-
Use
Application.cfcfor application settings and request handling. -
Organize code into reusable CFCs (components) for maintainability.
-
Validate and sanitize all user input.
-
Use
cftry/cfcatchfor error handling and logging. -
Avoid hardcoding credentials or sensitive data in source files.
-
Use consistent indentation (2 spaces, as per global standards).
-
Comment complex logic and document functions with purpose and parameters.
-
Prefer
cfincludefor shared templates, but avoid circular includes. -
Use ternary operators where possible
-
Ensure consistent tab alignment.