Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch - enforce line endings for platform-specific gradle scripts. #138

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

anenviousguest
Copy link
Contributor

@anenviousguest anenviousguest commented Jan 27, 2025

This tiny change improves the ergonomics - it enforces line endings for the Gradle build scripts which are platform dependent.

gradlew is a shell script and must have LF line ending.
gradlew.bat is a windows CMD file and must have CRLF line ending.

@markbrockhoff
Copy link
Member

markbrockhoff commented Jan 27, 2025

Thanks for taking care of the Windows dev experience of this plugin, really appreciated.
Just one question: Don't you want to re-add gradlew.bat with windows line endings? It seems to me like right now you only added the gitattributes file without updating the git cache for the file :)

@anenviousguest
Copy link
Contributor Author

Fair enough @markbrockhoff !

I've updated the line endings, here is the output from my WSL (linux) console:

➜  spectral-intellij-plugin git:(main) git ls-files --eol gradlew*
i/lf    w/lf    attr/                   gradlew
i/lf    w/lf    attr/                   gradlew.bat
➜  spectral-intellij-plugin git:(main) git checkout fix/win-settings
Switched to branch 'fix/win-settings'
Your branch is up to date with 'origin/fix/win-settings'.
➜  spectral-intellij-plugin git:(fix/win-settings) ✗ git ls-files --eol gradlew*
i/lf    w/lf    attr/text eol=lf        gradlew
i/crlf  w/crlf  attr/text eol=crlf      gradlew.bat

@markbrockhoff markbrockhoff merged commit 5f4f703 into SchwarzIT:main Jan 27, 2025
4 checks passed
@anenviousguest anenviousguest deleted the fix/win-settings branch January 27, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants