Skip to content

Contributing

LoSkroefie edited this page Jan 19, 2025 · 1 revision

Contributing to FLEXON CLI

Getting Started

Prerequisites

  • .NET 6.0 SDK or later
  • Git
  • Visual Studio 2022 or VS Code

Setup Development Environment

  1. Fork the repository
  2. Clone your fork:
    git clone https://github.com/YOUR-USERNAME/flexon-cli.git
  3. Add upstream remote:
    git remote add upstream https://github.com/LoSkroefie/flexon-cli.git
  4. Create a branch:
    git checkout -b feature/your-feature-name

Development Workflow

Building

dotnet build

Running Tests

dotnet test

Code Style

  • Follow C# coding conventions
  • Use meaningful names
  • Write clear comments
  • Keep methods focused
  • Add XML documentation

Commit Messages

Format:

type(scope): description

[optional body]

[optional footer]

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • style: Formatting
  • refactor: Code restructuring
  • test: Tests
  • chore: Maintenance

Example:

feat(encoder): add support for custom type extensions

- Added IFlexonType interface
- Implemented custom type registration
- Added unit tests

Closes #123

Testing

Unit Tests

[Fact]
public void TestFeature()
{
    // Arrange
    var data = new TestData();
    
    // Act
    var result = Process(data);
    
    // Assert
    Assert.Equal(expected, result);
}

Performance Tests

[Benchmark]
public void BenchmarkFeature()
{
    var data = GenerateTestData();
    Process(data);
}

Documentation

Code Documentation

/// <summary>
/// Processes the specified data using FLEXON format.
/// </summary>
/// <param name="data">The data to process.</param>
/// <returns>The processed result.</returns>
/// <exception cref="FlexonException">
/// Thrown when processing fails.
/// </exception>
public T Process<T>(T data)
{
    // Implementation
}

Wiki Documentation

  • Keep it clear and concise
  • Include code examples
  • Add diagrams when helpful
  • Update for new features

Pull Requests

Checklist

  1. Code follows style guide
  2. Tests added/updated
  3. Documentation updated
  4. Changelog updated
  5. All checks passing

Review Process

  1. Submit PR
  2. Address review comments
  3. Update if needed
  4. Merge when approved

Release Process

Version Numbers

  • Major: Breaking changes
  • Minor: New features
  • Patch: Bug fixes

Release Steps

  1. Update version
  2. Update changelog
  3. Create release branch
  4. Run tests
  5. Create release
  6. Update docs

Community

Communication

  • GitHub Issues
  • Discussions
  • Stack Overflow
  • Discord

Code of Conduct

  • Be respectful
  • Be constructive
  • Help others
  • Follow guidelines

Project Structure

flexon-cli/
├── src/
│   ├── FlexonCLI/
│   │   ├── Commands/
│   │   ├── Core/
│   │   └── Utils/
│   └── FlexonCLI.Tests/
├── docs/
│   ├── api/
│   └── guides/
├── examples/
└── tools/

Best Practices

Code Quality

  • Write clean code
  • Add comments
  • Use constants
  • Handle errors
  • Log properly

Performance

  • Profile code
  • Optimize hot paths
  • Use benchmarks
  • Monitor memory

Security

  • Validate input
  • Handle secrets
  • Check permissions
  • Update dependencies

Templates

Issue Template

## Description
[Describe the issue]

## Steps to Reproduce
1. [First Step]
2. [Second Step]
3. [And so on...]

## Expected Behavior
[What should happen]

## Current Behavior
[What happens instead]

PR Template

## Changes
- [Change 1]
- [Change 2]

## Testing
- [ ] Unit Tests
- [ ] Integration Tests

## Documentation
- [ ] Updated Docs
- [ ] Added Examples

FAQ

Common Issues

Q: How do I debug FLEXON CLI? A: Use Visual Studio debugger or logging

Q: How do I profile performance? A: Use built-in benchmarks or dotTrace

Getting Help

  • Check documentation
  • Search issues
  • Ask in discussions
  • Join Discord

Resources

Tools

  • Visual Studio
  • ReSharper
  • dotTrace
  • BenchmarkDotNet

Documentation

  • Microsoft Docs
  • C# Guidelines
  • Git Documentation
  • Markdown Guide

Clone this wiki locally