View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006975 | SymmetricDS | Improvement | public | 2025-06-24 14:01 | 2025-06-30 14:48 |
Reporter | pbelov | Assigned To | awebb | ||
Priority | normal | ||||
Status | assigned | Resolution | open | ||
Product Version | 3.15.0 | ||||
Summary | 0006975: Set up gitattributes for Git consistently update line endings for Windows and other file systems | ||||
Description | Currently a text file created in Windows has CR LF characters at the end of the line, while Linux and MAC OS uses just one. Set up the .gitattributes file for all Git repositories to consistently update line endings for Windows and other file systems. Goal: avoid false-positive reports of code differences, when the line endings are the only change. Also review the GitAttributesGenerator class? Several files have this issue currently. They can be seen by running "./gradlew clean build" in the PRO project. The line endings cause the build to fail with the error: "Task :symmetric-pro:spotlessJavaCheck FAILED". Gradle reports the code violations, where you can see the line endings present, for example: "-package com.jumpmind.symmetric.console.ui.wizard.load;\r\n". Files include: com/jumpmind/symmetric/console/ui/wizard/load/TableSetupInProgressScreen.java, com/jumpmind/symmetric/console/ui/wizard/load/TableSetupIncompleteScreen.java, though there are others. The code violations can be fixed by running, for example: "./gradlew :symmetric-pro:spotlessApply". Though the intent here is to use gitattributes to address these violations automatically. | ||||
Steps To Reproduce | End a text file on Windows Check-in Pull code to MAC or Linux Observe build error: See also: https://docs.github.com/en/get-started/git-basics/configuring-git-to-handle-line-endings https://stackoverflow.com/questions/73086622/is-a-gitattributes-file-really-necessary-for-git | ||||
Additional Information | Draft proposal of the .gitattributes file: # The gitattributes instructs GIT how to handle line endings automatically for various file types * text=auto # # The above will handle all files NOT found below # # These files are text and should be normalized (Convert crlf => lf) *.gitattributes text .gitignore text *.md text diff=markdown # Java sources *.java text diff=java *.kt text diff=kotlin *.groovy text diff=java *.scala text diff=java *.gradle text diff=java *.gradle.kts text diff=kotlin # These files are text and should be normalized (Convert crlf => lf) *.css text diff=css *.scss text diff=css *.sass text *.df text *.htm text diff=html *.html text diff=html *.js text *.mjs text *.cjs text *.jsp text *.jspf text *.jspx text *.properties text *.tld text *.tag text *.tagx text *.xml text # These files are binary and should be left untouched # (binary is a macro for -text -diff) *.class binary *.dll binary *.ear binary *.jar binary *.so binary *.war binary *.jks binary # Common build-tool wrapper scripts ('.cmd' versions are handled by 'Common.gitattributes') mvnw text eol=lf gradlew text eol=lf # These are explicitly windows files and should use crlf *.bat text eol=crlf | ||||
Tags | quality engineering | ||||
|
Top 30 extensions in the SymmetricDS repository: find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort | uniq -c | sort -n > repo_extensions.txt 8 csv 10 dll 10 gif 11 jar 11 php 12 md 13 md5 13 sha1 14 txt 15 css 16 html 22 bat 30 launch 31 gradle 36 sql 39 jpg 48 properties 56 sample 62 gitignore 71 xml 124 c 130 h 138 ad 326 js 550 png 2146 java |
|
PR: https://github.com/JumpMind/symmetric-ds/pull/311 |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-06-24 14:01 | pbelov | New Issue | |
2025-06-24 14:01 | pbelov | Status | new => assigned |
2025-06-24 14:01 | pbelov | Assigned To | => awebb |
2025-06-24 14:01 | pbelov | Tag Attached: quality engineering | |
2025-06-24 14:29 | pbelov | Description Updated | View Revisions |
2025-06-24 14:29 | pbelov | Steps to Reproduce Updated | View Revisions |
2025-06-24 14:29 | pbelov | Additional Information Updated | View Revisions |
2025-06-24 14:29 | pbelov | Note Added: 0003134 | |
2025-06-24 15:05 | awebb | Description Updated | View Revisions |
2025-06-30 14:48 | awebb | Note Added: 0003144 |