Skip to content

Latest commit

 

History

History
142 lines (111 loc) · 4.7 KB

File metadata and controls

142 lines (111 loc) · 4.7 KB

Contributor's Guide for WaterMarkIt

Thank you for your interest in contributing to WaterMarkIt! This guide will walk you through the process of setting up the project, making contributions, and ensuring your code adheres to the project's formatting and style guidelines.

Table of Contents


Getting Started

Forking the Repository

  1. Go to the WaterMarkIt GitHub repository.
  2. Click the "Fork" button in the top-right corner of the page. This will create a copy of the repository under your GitHub account.

Cloning the Repository

  1. Navigate to your forked repository on GitHub.
  2. Click the "Code" button and copy the repository URL.
  3. Open your terminal and run the following command to clone the repository:
    git clone https://github.com/YOUR_USERNAME/WaterMarkIt.git
  4. Navigate to the cloned repository:
    cd WaterMarkIt
    

Setting Up the Development Environment

  1. Ensure you have Java 11 or higher installed. You can check your Java version by running:
    java -version   
  2. Install Maven if you don't already have it.
  3. Build the project using Maven:
    mvn clean install
  4. Set up your IDE (e.g., IntelliJ IDEA, Eclipse) to use the project's Maven configuration.

Making Contributions

Creating a Branch

Before making changes, create a new branch for your work:

   git checkout -b feature/your-feature-name

Use a descriptive branch name that reflects the purpose of your changes.

Making Changes

Make your changes to the codebase. Ensure you follow the Code Formatting and Style Guidelines.

Add new tests if you are introducing new functionality or modifying existing behavior.

Committing Changes

Stage your changes:

  git add .

Commit your changes with a descriptive commit message:

  git commit -m "Your descriptive commit message"

Pushing Changes

Push your changes to your forked repository:

  git push origin feature/your-feature-name

Creating a Pull Request

  1. Go to your forked repository on GitHub
  2. Click the "Compare & pull request" button next to your branch
  3. Fill out the pull request template with a clear description of your changes
  4. Submit the pull request and wait for feedback from the maintainers

Code Formatting and Style Guidelines

General Formatting Rules

  • Use 4 spaces for indentation (no tabs).
  • Ensure all files end with a newline.

Java Code Style

  • Follow the Google Java Style Guide for Java code.
  • Use camelCase for variable and method names.
  • Use PascalCase for class names.
  • Use UPPER_SNAKE_CASE for constants.
  • Always include Javadoc comments for public classes, methods, and fields.
  • Use @Override annotations for overridden methods.
  • Don't use Java POJO, use Kotlin data classes instead.

Kotlin Code Style

  • Follow the Kotlin Coding Conventions.
  • Use data class for simple data structures.

Testing

  • Write unit tests for all new functionality using JUnit 5
  • Ensure all tests pass before submitting a pull request:
      mvn test
  • Use descriptive test method names that explain the purpose of the test

Code Review Process

  • After submitting a pull request, the maintainers will review your changes
  • Address any feedback or requested changes promptly
  • Once approved, your changes will be merged into the main branch

Additional Resources


Thank you for contributing to WaterMarkIt! Your efforts help make this project better for everyone.

Happy coding! 🚀