Skip to content

docs: improve Code Style section with actionable guidance#4458

Open
findmail wants to merge 1 commit into
rysweet:mainfrom
findmail:main
Open

docs: improve Code Style section with actionable guidance#4458
findmail wants to merge 1 commit into
rysweet:mainfrom
findmail:main

Conversation

@findmail

Copy link
Copy Markdown

Summary

Fixes #4421

Problem

The Code Style section told contributors to "follow existing code conventions" without explaining:

  • What those conventions are
  • What formatter to use
  • How to run formatting checks
  • How to troubleshoot issues

This circular guidance was unhelpful for new contributors.

Solution

Added Explicit Tool Information

  • ✅ Specified Ruff as the Python formatter
  • ✅ Listed line length (100 chars) and Python version (3.11+)
  • ✅ Clarified markdownlint configuration

Provided Actionable Commands

# Format all Python files
ruff format .

# Check for linting issues
ruff check .

# Auto-fix linting issues
ruff check --fix .

Added Pre-commit Guidance

  • Installation instructions
  • What gets checked
  • How to run manually
  • How to troubleshoot failures

Added Troubleshooting

  • Common pre-commit failure scenarios
  • Step-by-step fixes
  • "Getting Help" section

Impact

New contributors now have:

  • Clear, actionable commands instead of vague directives
  • Specific tool names and configurations
  • Troubleshooting guidance
  • A path to get help

Testing

  • ✅ Checked that Ruff configuration matches pyproject.toml
  • ✅ Verified markdownlint rules reference exists
  • ✅ Commands tested locally

Fixes #4421

Issue: rysweet#4421

Problem:
- 'Follow existing code conventions' was circular guidance
- No mention of the formatter (ruff)
- No specific commands for contributors
- Unclear for new contributors

Solution:
- Added explicit Ruff formatter instructions
- Provided specific commands for formatting and linting
- Added pre-commit setup and troubleshooting
- Included markdownlint guidance
- Added 'Getting Help' section

This gives new contributors clear, actionable steps instead of vague directives.

Co-authored-by: OpenClaw AI <noreply@openclaw.ai>
This was referenced Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: CONTRIBUTING.md "Code Style" section gives no actionable guidance for new contributors

1 participant