Skip to content

feat: Add comprehensive Copilot coding guidelines and code review#44

Open
rusty1968 wants to merge 5 commits intoOpenPRoT:mainfrom
rusty1968:copilot-instructions
Open

feat: Add comprehensive Copilot coding guidelines and code review#44
rusty1968 wants to merge 5 commits intoOpenPRoT:mainfrom
rusty1968:copilot-instructions

Conversation

@rusty1968
Copy link
Copy Markdown
Contributor

  • Add detailed Copilot instructions with safety-first coding patterns
  • Define test code exceptions for ergonomic development while maintaining safety
  • Establish type-safe hardware register access requirements
  • Add comprehensive code review checklist and forbidden patterns reference
  • Create initial code review identifying 50+ violations in existing codebase

Key guidelines:

  • Panic-free production code (no unwrap/expect/indexing)
  • Type-safe PAC-based hardware register access only
  • Named constants instead of magic numbers
  • Test code may use unwrap/indexing for ergonomics but not bypass hardware safety
  • Security-focused patterns for cryptographic operations

The code review identifies critical violations in ECDSA/RSA modules using direct register access and systematic unsafe patterns throughout the codebase requiring immediate refactoring.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants