Skip to content

[FIX] Fix line endings#18

Merged
martian56 merged 1 commit into
mainfrom
17-convert-line-endings-crlf-to-lf
Dec 9, 2025
Merged

[FIX] Fix line endings#18
martian56 merged 1 commit into
mainfrom
17-convert-line-endings-crlf-to-lf

Conversation

@martian56

Copy link
Copy Markdown
Owner

This pull request focuses on standardizing line endings across the project and ensuring proper handling of shell scripts in the Docker build process. The most important changes include the addition of a .gitattributes file to enforce LF line endings for relevant files and an update to the Dockerfile to convert line endings for the entrypoint script.

Line ending standardization:

  • Added .gitattributes to enforce LF line endings for shell scripts, Python files, configuration files, Docker files, and other text files, while marking common binary files as binary to prevent line ending conversion.

Dockerfile improvements:

  • Updated api/Dockerfile to convert CRLF to LF in docker-entrypoint.sh using sed, ensuring compatibility in Unix environments before setting ownership and permissions.

Closes #17

@martian56 martian56 self-assigned this Dec 9, 2025
@martian56 martian56 added bug Something isn't working enhancement New feature or request CI/CD labels Dec 9, 2025
@martian56 martian56 added this to ChatOps Dec 9, 2025
@github-project-automation github-project-automation Bot moved this to Todo in ChatOps Dec 9, 2025
@martian56 martian56 requested a review from nadir2609 December 9, 2025 17:41

@valiyyaddin valiyyaddin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job,continue working like this.

@martian56 martian56 merged commit 35bf983 into main Dec 9, 2025
7 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in ChatOps Dec 9, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request standardizes line endings across the project to prevent issues with shell scripts and other text files when working across different operating systems. The changes add a .gitattributes file to enforce LF line endings at the repository level and update the Dockerfile to handle any existing files with incorrect line endings.

  • Added .gitattributes file to enforce LF line endings for shell scripts, Python files, configuration files, Docker files, and other text files
  • Updated api/Dockerfile to convert CRLF to LF in the entrypoint script during build process
  • Marked common binary file types to prevent automatic line ending conversion

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.gitattributes Defines line ending rules for various file types to ensure consistent LF endings across the repository
api/Dockerfile Adds sed command to convert any CRLF line endings to LF in the entrypoint script before setting permissions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .gitattributes
@@ -0,0 +1,31 @@
# Ensure shell scripts always use LF line endings
*.sh text eol=lf
docker-entrypoint.sh text eol=lf

Copilot AI Dec 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is redundant as docker-entrypoint.sh is already covered by the *.sh pattern on line 2. Consider removing this duplicate entry.

Suggested change
docker-entrypoint.sh text eol=lf

Copilot uses AI. Check for mistakes.
Comment thread .gitattributes
Comment on lines +20 to +22
# Other text files
*.md text eol=lf
*.txt text eol=lf

Copilot AI Dec 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .gitattributes file is missing patterns for JavaScript/TypeScript files (*.js, *.jsx, *.ts, .tsx) and CSS files (.css) which are present in the web directory. Consider adding these patterns with text eol=lf to ensure consistent line endings across the entire project.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CI/CD enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Convert line endings (CRLF to LF)

3 participants