Contributions of any kind are welcome! This guide will help you get started.
-
Install asdf if you haven't already.
-
Clone the repo and set up the plugin locally:
git clone https://github.com/cpp-linter/asdf-clang-tools.git cd asdf-clang-tools -
Install the development dependencies:
# Install shellcheck (for linting shell scripts) # macOS: brew install shellcheck shfmt jq # Linux (Debian/Ubuntu): sudo apt-get install shellcheck jq # Install shfmt: go install mvdan.cc/sh/v3/cmd/shfmt@latest
-
Set up pre-commit hooks:
# Install pre-commit if not already installed pip install pre-commit # or: brew install pre-commit pre-commit install
Use the asdf plugin test command to verify your changes:
# Basic test
asdf plugin test clang-tools https://github.com/cpp-linter/asdf-clang-tools.git "clang-format --version"
# Test a specific version
asdf plugin test clang-tools https://github.com/cpp-linter/asdf-clang-tools.git --asdf-tool-version 18 "clang-tidy --version"
# Test with all supported tools
asdf plugin test clang-tools https://github.com/cpp-linter/asdf-clang-tools.git "clang-format --version && clang-tidy --version && clang-query --version"For local development, you can also test by adding the plugin from your local path:
asdf plugin add clang-format .
asdf install clang-format latest
asdf set clang-format latest
clang-format --versionThis project follows these conventions:
-
Shell scripts: All scripts in
bin/andlib/are written in Bash. -
Formatting: Use shfmt for consistent formatting:
./scripts/shfmt.bash
-
Linting: Use shellcheck to catch issues:
./scripts/shellcheck.bash
-
EditorConfig: The project includes an
.editorconfig— make sure your editor supports it. Key settings:- 2-space indentation
- UTF-8 encoding
- Trim trailing whitespace
- Insert final newline
-
Pre-commit hooks automatically check for trailing whitespace, missing EOF newlines, large files, and valid YAML.
.
├── bin/ # asdf plugin scripts (download, install, list-all, etc.)
├── lib/ # Shared Bash utilities
├── scripts/ # Development helper scripts (linting, formatting)
├── .github/ # GitHub Actions workflows and templates
├── .pre-commit-config.yaml
├── .editorconfig
└── .tool-versions # asdf tool versions for this project
- Create a branch: Use a descriptive branch name (e.g.,
feature/add-version-23,fix/macos-arm64-error). - Make your changes: Follow the code style guidelines above.
- Test your changes: Run tests locally to make sure everything works.
- Run linting: Ensure
shellcheckandshfmtpass. - Submit a PR: Push your branch and open a pull request. Fill out the PR template with:
- A description of your changes
- Motivation and context
- Types of changes (bug fix, feature, breaking change)
- How you tested the changes
- CI checks: Your PR will trigger automated builds and lint checks via GitHub Actions.
- Review: A maintainer will review your PR. Please be responsive to feedback.
Releases are managed by release-please. The workflow:
- On each push to
main, release-please opens/updates a release PR. - When that PR is merged, a new release is created.
Feel free to open an issue if you have questions or run into problems.