Skip to content

Latest commit

 

History

History
117 lines (74 loc) · 3.49 KB

commit-style.md

File metadata and controls

117 lines (74 loc) · 3.49 KB

Commit style

English | Русский

Commit style accepted in IX-Ray project

Overview

The project accepts commit standard for transparency and comprehension of the changes being made. The acceptable commit style is described below

General rules

  • Commit messages must be written in English.
  • Each commit message should be structured to answer the question: "If this commit is applied, it will..."
  • The message must start with a verb in the infinitive form without the to particle
  • No flags like [Fix], [UPDATE], or other tags should be included. The verb should directly describe the action performed
  • Commit messages should be brief but descriptive, with additional details added in a long description if needed
  • Capitalize the first letter of the commit message
  • If you are unsure how to write in English, clearly describe what you did in your native language (no gibberish, we will translate and refine it later)

Commit message structure

Initial commits

Initial commit messages should follow this structure:

Initial commit

Regular commits

Regular commit messages consist of one part, optionally followed by a long description:

<Commit message body>

<Long description if necessary>

Length guidelines

  • The maximum length for the commit message header is 72 characters
  • Each line in the long description should also not exceed 72 characters

Writing commit messages

Header format

The commit message header must begin with a verb in the infinitive form that describes the action taken in the commit. Examples:

  • Fix window manager implementation
  • Implement audio output support
  • Remove obsolete configurations
  • Add documentation for API endpoints
  • Optimize rendering pipeline

Specific rules for nouns

If the message includes a noun, make sure to structure it naturally for clarity:

  • Implement new devices support (preferred)
  • Add new gizmo support (preferred)
  • Add support for AMD FSR (less desirable, use the structure above)
  • Implement support for new devices (less desirable, rephrase as shown in the examples above)

It is recommended to place the main noun after any qualifiers when possible for better readability

Examples of correct messages

Single-line messages

  • Fix memory leak in database connector
  • Refactor logging system for clarity
  • Update README with installation instructions
  • Remove deprecated API calls

Messages with long descriptions

Fix rendering issue in graphics pipeline

The rendering pipeline had a bug causing frame drops on low-end GPUs. This fix optimizes shader execution and resolves the issue.
Add unit tests for input validation

Unit tests cover edge cases for user input to ensure stability and prevent crashes during unexpected inputs.

Common mistakes to avoid

  • Using tags or brackets:

    • Incorrect: [Fix] Resolve bug in module
    • Correct: Fix bug in module
  • Starting with a non-verb:

    • Incorrect: Bugfix for network error
    • Correct: Fix network error
  • Improper verb placement:

    • Incorrect: Implementing new feature
    • Correct: Implement new feature
  • Using incomplete sentences:

    • Incorrect: Fixed bug
    • Correct: Fix UI layout bug
  • Improper noun placement:

    • Incorrect: Add support new layout
    • Correct: Add new layout support