Skip to content

Commit 19d9a3f

Browse files
nastanfordCopilot
andauthored
Add instructions for ColdFusion cfc and ColdFusion cfm files (#233)
* Add instructions for ColdFusion cfc and cfm files * Add ColdFusion coding standards for CFC and CFM files * Update instructions/coldfusion-cfc-instructions.md Co-authored-by: Copilot <[email protected]> * Address Copilot AI review comments * Fix description formatting in ColdFusion CFC and CFM instructions * Add ColdFusion coding standards for CFC and CFM files * Add ColdFusion coding standards for CFC and CFM files to README instructions --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: = <=>
1 parent b469c89 commit 19d9a3f

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

README.instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Team and project-specific instructions to enhance GitHub Copilot's behavior for
2626
| [Blazor](instructions/blazor.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fblazor.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fblazor.instructions.md) | Blazor component and application patterns |
2727
| [Clojure Memory](instructions/clojure-memory.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fclojure-memory.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fclojure-memory.instructions.md) | Things agents tend to forget or get wrong when they are working with Clojure projects. |
2828
| [Cmake Vcpkg](instructions/cmake-vcpkg.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcmake-vcpkg.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcmake-vcpkg.instructions.md) | C++ project configuration and package management |
29+
| [ColdFusion Coding Standards for CFC Files](instructions/coldfusion-cfc.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcoldfusion-cfc.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcoldfusion-cfc.instructions.md) | ColdFusion Coding Standards for CFC component and application patterns |
30+
| [ColdFusion Coding Standards](instructions/coldfusion-cfm.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcoldfusion-cfm.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcoldfusion-cfm.instructions.md) | ColdFusion cfm files and application patterns |
2931
| [Containerization & Docker Best Practices](instructions/containerization-docker-best-practices.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcontainerization-docker-best-practices.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcontainerization-docker-best-practices.instructions.md) | Comprehensive best practices for creating optimized, secure, and efficient Docker images and managing containers. Covers multi-stage builds, image layer optimization, security scanning, and runtime best practices. |
3032
| [Conventional Commit](instructions/conventional-commit.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconventional-commit.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconventional-commit.prompt.md) | Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation. |
3133
| [Convert Spring JPA project to Spring Data Cosmos](instructions/convert-jpa-to-spring-data-cosmos.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconvert-jpa-to-spring-data-cosmos.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconvert-jpa-to-spring-data-cosmos.instructions.md) | Step-by-step guide for converting Spring Boot JPA applications to use Azure Cosmos DB with Spring Data Cosmos |
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
description: 'ColdFusion Coding Standards for CFC component and application patterns'
3+
applyTo: "**/*.cfc"
4+
---
5+
6+
# ColdFusion Coding Standards for CFC Files
7+
8+
- Use CFScript where possible for cleaner syntax.
9+
- Avoid using deprecated tags and functions.
10+
- Follow consistent naming conventions for variables and components.
11+
- Use `cfqueryparam` to prevent SQL injection.
12+
- Escape CSS hash symbols inside <cfoutput> blocks using ##
13+
14+
# Additional Best Practices
15+
16+
- Use `this` scope for component properties and methods when appropriate.
17+
- Document all functions with purpose, parameters, and return values (use Javadoc or similar style).
18+
- Use access modifiers (`public`, `private`, `package`, `remote`) for functions and variables.
19+
- Prefer dependency injection for component collaboration.
20+
- Avoid business logic in setters/getters; keep them simple.
21+
- Validate and sanitize all input parameters in public/remote methods.
22+
- Use `cftry`/`cfcatch` for error handling within methods as needed.
23+
- Avoid hardcoding configuration or credentials in CFCs.
24+
- Use consistent indentation (2 spaces, as per global standards).
25+
- Group related methods logically within the component.
26+
- Use meaningful, descriptive names for methods and properties.
27+
- Avoid using `cfcomponent` attributes that are deprecated or unnecessary.
28+
29+
- Use ternary operators where possible
30+
- Ensure consistent tab alignment.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
description: 'ColdFusion cfm files and application patterns'
3+
applyTo: "**/*.cfm"
4+
---
5+
6+
# ColdFusion Coding Standards
7+
8+
- Use CFScript where possible for cleaner syntax.
9+
- Avoid using deprecated tags and functions.
10+
- Follow consistent naming conventions for variables and components.
11+
- Use `cfqueryparam` to prevent SQL injection.
12+
- Escape CSS hash symbols inside <cfoutput> blocks using ##
13+
- When using HTMX inside <cfoutput> blocks, escape hash symbols (#) by using double hashes (##) to prevent unintended variable interpolation.
14+
- If you are in a HTMX target file then make sure the top line is: <cfsetting showDebugOutput = "false">
15+
16+
# Additional Best Practices
17+
18+
- Use `Application.cfc` for application settings and request handling.
19+
- Organize code into reusable CFCs (components) for maintainability.
20+
- Validate and sanitize all user input.
21+
- Use `cftry`/`cfcatch` for error handling and logging.
22+
- Avoid hardcoding credentials or sensitive data in source files.
23+
- Use consistent indentation (2 spaces, as per global standards).
24+
- Comment complex logic and document functions with purpose and parameters.
25+
- Prefer `cfinclude` for shared templates, but avoid circular includes.
26+
27+
- Use ternary operators where possible
28+
- Ensure consistent tab alignment.

0 commit comments

Comments
 (0)