Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 1.72 KB

File metadata and controls

68 lines (51 loc) · 1.72 KB

Contributing to netcheck

Thank you for your interest in contributing to netcheck! This document provides guidelines and instructions for contributing.

Development Setup

  1. Clone the repository:

    git clone https://github.com/jonathancaruso/netcheck.git
    cd netcheck
  2. Create a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # Linux/macOS
    # or .venv\Scripts\activate on Windows
  3. Install in development mode:

    make dev

Running Tests

make test

Linting and Type Checking

make lint       # flake8
make typecheck  # mypy
make all        # lint + typecheck + test

Pull Request Process

  1. Fork the repository and create a feature branch from main.
  2. Write tests for any new functionality.
  3. Ensure all tests pass and linting is clean.
  4. Update documentation if you're adding or changing features.
  5. Submit a pull request with a clear description of your changes.

Code Style

  • Follow PEP 8 with a max line length of 120 characters.
  • Use type hints on all function signatures.
  • Write docstrings for all public functions and classes.
  • Keep functions focused and small.

Security

  • Never use shell=True in subprocess calls.
  • Always validate user input before processing.
  • Never log or expose sensitive information.
  • See SECURITY.md for the security policy.

Adding a New Check

  1. Create a new module in src/netcheck/checks/.
  2. Implement a run_<check_name>() function that returns a dictionary.
  3. Register the check in src/netcheck/runner.py.
  4. Add output formatting in src/netcheck/output.py.
  5. Write tests in tests/test_<check_name>.py.
  6. Update the README with documentation.