Thank you for considering contributing to the filesql project! This document explains how to contribute to the project. We welcome all forms of contributions, including code contributions, documentation improvements, bug reports, and feature suggestions.
filesql development requires Go 1.24 or later.
macOS (using Homebrew)
brew install goLinux (for Ubuntu)
# Using snap
sudo snap install go --classic
# Or download from official site
wget https://go.dev/dl/go1.24.0.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.24.0.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
source ~/.profileWindows Download and run the installer from the official Go website.
Verify installation:
go versiongit clone https://github.com/nao1215/filesql.git
cd filesql# Install necessary development tools
make toolsTo verify that your development environment is set up correctly, run the following commands:
# Run tests
make test
# Run linter
make lintmainbranch is the latest stable version- Create new branches from
mainfor new features or bug fixes - Branch naming examples:
feature/add-json-support- New featurefix/issue-123- Bug fixdocs/update-readme- Documentation update
This project follows these standards:
- Conform to Effective Go
- Avoid using global variables (except for config package)
- Always add comments to public functions, variables, and structs
- Keep functions as small as possible
- Writing tests is encouraged
Tests are important. Please follow these guidelines:
- Unit tests: Aim for 80% or higher coverage
- Test readability: Write clear test cases
- Parallel execution: Use
t.Parallel()whenever possible
Test example:
func TestFile_Parse(t *testing.T) {
t.Parallel()
t.Run("should parse CSV file correctly", func(t *testing.T) {
// Clear input and expected values for test case
input := "name,age\nAlice,30"
expected := &Table{...}
result, err := ParseCSV(input)
assert.NoError(t, err)
assert.Equal(t, expected, result)
})
}We actively encourage the use of AI coding assistants to improve productivity and code quality. Tools like Claude Code, GitHub Copilot, and Cursor are welcome for:
- Writing boilerplate code
- Generating comprehensive test cases
- Improving documentation
- Refactoring existing code
- Finding potential bugs
- Suggesting performance optimizations
- Translating documentation
- Review all generated code: Always review and understand AI-generated code before committing
- Maintain consistency: Ensure AI-generated code follows our coding standards in CLAUDE.md
- Test thoroughly: AI-generated code must pass all tests and linting (
make testandmake lint) - Use project configuration: We provide
CLAUDE.md,.cursorrulesand.github/copilot-instructions.mdto help AI assistants understand our project standards
-
Check or Create Issues
- Check if there are existing issues
- For major changes, we recommend discussing the approach in an issue first
-
Write Tests
- Always add tests for new features
- For bug fixes, create tests that reproduce the bug
- AI tools can help generate comprehensive test cases
-
Quality Check
# Ensure all tests pass make test # Linter check make lint # Check coverage (80% or higher) go test -cover ./...
- Create a Pull Request from your forked repository to the main repository
- PR title should briefly describe the changes
- Include the following in PR description:
- Purpose and content of changes
- Related issue number (if any)
- Test method
- Reproduction steps for bug fixes
GitHub Actions automatically checks the following items:
- Cross-platform testing: Test execution on Linux, macOS, and Windows
- Linter check: Static analysis with golangci-lint
- Test coverage: Maintain 80% or higher coverage
- Build verification: Successful builds on each platform
Merging is not possible unless all checks pass.
When you find a bug, please create an issue with the following information:
-
Environment Information
- OS (Linux/macOS/Windows) and version
- Go version
- filesql version
-
Reproduction Steps
- Minimal code example to reproduce the bug
- Data files used (if possible)
-
Expected and Actual Behavior
-
Error Messages or Stack Traces (if any)
The following activities are also greatly welcomed:
- Give a GitHub Star: Show your interest in the project
- Promote the Project: Introduce it in blogs, social media, study groups, etc.
- Become a GitHub Sponsor: Support available at https://github.com/sponsors/nao1215
- Documentation Improvements: Fix typos, improve clarity of explanations
- Translations: Translate documentation to new languages
- Add Examples: Provide practical sample code
- Feature Suggestions: Share new feature ideas in issues
Please refer to CODE_OF_CONDUCT.md. We expect all contributors to treat each other with respect.
- GitHub Issues: Bug reports and feature suggestions
Contributions to this project are considered to be released under the project's license (MIT License).
Thank you again for considering contributing! We sincerely look forward to your participation.