Skip to content

docs: add CONTRIBUTING.md with coding conventions and review guide#84

Open
erhankur wants to merge 1 commit intomasterfrom
add_contribution_guide
Open

docs: add CONTRIBUTING.md with coding conventions and review guide#84
erhankur wants to merge 1 commit intomasterfrom
add_contribution_guide

Conversation

@erhankur
Copy link
Collaborator

The guide is based on patterns already followed across the codebase. It covers naming, weak/strong overrides,
error handling, ROM functions, memory rules, logging, SOC headers, CMake integration, testing, and code style.

This is the first version. It covers the essentials but is open to discussion and suggestions.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a first-version contributing guide and links it from the main README to standardize coding conventions and review expectations for esp-stub-lib.

Changes:

  • Add CONTRIBUTING.md documenting naming, weak/strong overrides, error handling, ROM usage, memory/logging rules, SOC headers, CMake patterns, and review checklist.
  • Link the new contributing guide from the README “Contributing” section.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
README.md Adds a pointer to the new contributing guide.
CONTRIBUTING.md Introduces a comprehensive contribution/conventions document and reviewer checklist.


- No `malloc`, `free`, `calloc`, `realloc`.
- Use stack variables for temporaries.
- Avoid large `static` variables. The library serves both OpenOCD and esptool.They
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix missing space after the period: esptool.They should be esptool. They.

Suggested change
- Avoid large `static` variables. The library serves both OpenOCD and esptool.They
- Avoid large `static` variables. The library serves both OpenOCD and esptool. They

Copilot uses AI. Check for mistakes.
Comment on lines +411 to +413
### Statistics

Use the `s_` prefix when you need a `static`:
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is describing static variables (statics), not statistics. Renaming the heading and the last sentence (e.g., “### Statics” and “prefer parameters over statics”) would avoid confusion for contributors.

Copilot uses AI. Check for mistakes.

## Logging

Compile time conditional (`STUB_LOG_ENABLED`). Use the macros:
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hyphenate the compound modifier: Compile timeCompile-time.

Suggested change
Compile time conditional (`STUB_LOG_ENABLED`). Use the macros:
Compile-time conditional (`STUB_LOG_ENABLED`). Use the macros:

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello erhankur, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 42d9d71

Copy link
Collaborator

@dobairoland dobairoland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erhankur Thank you very much for taking the time and making this. Awesome. I don't have any specific requirement for the rules - I'm happy that they are defined and will help all future contributors.

Please consider linking the document from the copilot config file so it would use it for reviews.

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.

5 participants