Contributing to Tweak¶
Thank you for your interest!
Development Setup¶
git clone https://github.com/OpenSyntaxHQ/tweak.git
cd tweak
go mod tidy
go generate ./...
go build ./...
go test ./tests/...
Adding a New Processor¶
- Create a file in
processors/implementing theProcessorinterface:
type MyProcessor struct{}
func (p MyProcessor) Name() string { return "my-proc" }
func (p MyProcessor) Alias() []string { return nil }
func (p MyProcessor) Title() string { return fmt.Sprintf("My Processor (%s)", p.Name()) }
func (p MyProcessor) Description() string { return "Short description" }
func (p MyProcessor) FilterValue() string { return p.Title() }
func (p MyProcessor) Flags() []Flag { return nil }
func (p MyProcessor) Transform(data []byte, f ...Flag) (string, error) {
// implementation
}
-
Register it in
processors/all.go. -
Add a test in
tests/— see existing files for patterns.
Commit Guidelines¶
- Use Conventional Commits
- Sign off every commit:
git commit -s - Keep commits small and focused
Running Tests¶
License¶
By contributing, you agree your contributions will be licensed under the Apache 2.0 License.