Skip to content

Latest commit

 

History

History
169 lines (124 loc) · 3.86 KB

CONTRIBUTING.org

File metadata and controls

169 lines (124 loc) · 3.86 KB

Contributing to Org-supertag

Thank you for your interest in contributing to Org-supertag! This guide will help you understand how to participate in project development.

Development Process

  1. Fork the project to your GitHub account
  2. Clone your fork locally
    git clone https://github.com/your-username/org-supertag.git
        
  3. Create a new feature branch
    git checkout -b feature/your-feature-name
        
  4. Commit your changes
  5. Push to your fork
  6. Create a Pull Request

Code Style

Elisp Coding Standards

  1. Naming Conventions
    • Use meaningful English names
    • Avoid abbreviations (except widely accepted ones)
    • Function names use org-supertag- prefix
    • Variable names use org-supertag- prefix
  2. Comment Standards
    • Each function needs detailed docstrings
    • Complex code blocks need explanatory comments
    • Write comments in English
  3. Formatting Standards
    • Use 2 spaces for indentation
    • Pay attention to bracket alignment
    • Maintain clear code block separation

Example

(defun org-supertag-example-function (arg1 arg2)
  "A clear description of what this function does.

ARG1 is the first argument, it should be a string.
ARG2 is the second argument, it should be a number.

Return a cons cell (ARG1 . ARG2)."
  ;; Input validation
  (unless (stringp arg1)
    (error "ARG1 must be a string"))
  (unless (numberp arg2)
    (error "ARG2 must be a number"))
  
  ;; Main logic
  (cons arg1 arg2))

Commit Guidelines

Commit Message Format

<type>(<scope>): <subject>

<body>

<footer>

Type Types

feat
New features
fix
Bug fixes
docs
Documentation updates
style
Code style adjustments
refactor
Code refactoring
test
Test-related changes
chore
Build process or auxiliary tool changes

Example

feat(behavior): Add new behavior trigger

- Add :on-schedule trigger type
- Support scheduled trigger based on org-agenda
- Add related documentation and tests

Closes #123

Test Guidelines

Unit Test

  • Write test cases for new features
  • Use ert framework
  • Test files are placed in the tests directory

Test Coverage

  • Ensure main features are covered by tests
  • Include tests for normal and abnormal cases
  • Add boundary condition tests

Example

(ert-deftest org-supertag-test-example ()
  "Test `org-supertag-example-function'."
  (should (equal (org-supertag-example-function "test" 1)
                 '("test" . 1)))
  (should-error (org-supertag-example-function 1 "test")))

Documentation Guidelines

Code Documentation

  • All public APIs need detailed docstrings
  • Include parameter descriptions and return value descriptions
  • Provide usage examples

User Documentation

  • Update README.org and README_CN.org
  • Add new feature demos in DEMO.org
  • Keep the English and Chinese documentation synchronized

Release Process

Version Number Specification

  • Follow Semantic Versioning
  • Format: Major Version.Minor Version.Patch Version

Update Steps

  • Update version number
  • Update CHANGELOG
  • Create release tag
  • Update documentation

Issue Feedback

Submit Issue

  • Use provided issue template
  • Provide detailed description of the problem or suggestion
  • Provide reproduction steps (if applicable)

Issue Discussion

  • Keep polite and professional
  • Provide constructive feedback
  • Respond to comments and questions in a timely manner

Code of Conduct

  1. Respect all contributors
  2. Keep professional and friendly communication
  3. Welcome different perspectives and suggestions
  4. Focus on technical discussions, avoid unrelated topics

License

Org-supertag is licensed under the MIT license.

Contact

For any questions, please contact:

Thank you for your contribution!