Skip to content

Conversation

@yurekami
Copy link
Contributor

Summary

  • Add .pre-commit-config.yaml with hooks for automated code quality checks
  • Add ruff.toml with Python linting and formatting configuration

Pre-commit Hooks Included:

  • General: YAML/TOML validation, trailing whitespace fixes, line ending normalization, large file prevention, merge conflict detection
  • Python: Ruff for linting and formatting (replaces black, isort, flake8)
  • C++/CUDA: clang-format for consistent code style
  • Shell: shellcheck for script quality

Usage

pip install pre-commit
pre-commit install
# Run manually on all files
pre-commit run --all-files

Test plan

  • Validate YAML syntax
  • Test pre-commit run --all-files on a fresh clone
  • Verify hooks work on new commits

🤖 Generated with Claude Code

- Add .pre-commit-config.yaml with hooks for:
  - YAML/TOML validation
  - Trailing whitespace and line ending fixes
  - Large file prevention
  - Ruff for Python linting and formatting
  - clang-format for C++/CUDA code
  - shellcheck for shell scripts
- Add ruff.toml with Python linting configuration

To use: pip install pre-commit && pre-commit install

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
yurekami added a commit to yurekami/DeepGEMM that referenced this pull request Dec 25, 2025
Add clang-format configuration that matches the existing code style:

- 4-space indentation
- 120 character line limit
- Attached braces (same line)
- Google style base with project-specific adjustments
- C++17 standard
- Preserve include order (no auto-sorting)
- Support for CUTLASS macros

Also update .gitignore to be more specific about clangd files,
allowing .clang-format to be tracked.

This works with the pre-commit hooks (PR deepseek-ai#252) to automatically
format C++/CUDA code on commit.

Usage:
  clang-format -i csrc/**/*.{hpp,cpp,cu,cuh}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

1 participant