Line endings

Verze:

02. 07. 2025

Zodpovědná osoba:

Dominik Šlechta

Poslední aktualizace:

03. 07. 2025, kocandajan488@gmail.com

Here’s where we say: always use Unix-style line endings (\n). It keeps things clean across different systems and avoids weird version control issues. Your IDE or Git should handle it for you anyway, so it’s mostly a “set it and forget it” kind of rule.

Introduction

This coding standard document is designed to ensure consistency, readability, and maintainability in our codebase. By adhering to these standards, developers will contribute code that aligns with our collective expectations and industry best practices.

Line Endings

Rule

Every line in our codebase MUST use the Unix LF (\n) line ending. This rule applies across all programming languages we use, unless a language's standard or a specific project's requirements dictate otherwise.

Description

Line endings signify the end of a line of text in a file. Different operating systems have historically used different characters to represent line endings. Unix and Unix-like systems (including Linux and macOS) use a single Line Feed (LF) character (\n), whereas Windows systems traditionally use a Carriage Return followed by a Line Feed (CRLF) (\r\n).

For the purpose of consistency and to avoid issues with version control systems, our standard is to use the Unix LF character.

Formatting

Code should be automatically corrected by git or IDE program