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

HtmlOutputFormatTest tests assume Unix-style line endings #602

Closed
3flex opened this issue Dec 11, 2017 · 5 comments
Closed

HtmlOutputFormatTest tests assume Unix-style line endings #602

3flex opened this issue Dec 11, 2017 · 5 comments

Comments

@3flex
Copy link
Member

3flex commented Dec 11, 2017

An example: assertThat(result).startsWith("<!DOCTYPE html>\n<html lang=\"en\">")

default-html-report-template.html is checked out on Windows with Windows-style line endings (per my system default), so the test fails.

Recommend adding either a .gitattributes file explicitly specifying Unix-style line endings for these templates so they're checked out with Unix-style line endings on Windows, or changing the tests to remove the Unix-style line endings (I think the first option is best).

@arturbosch
Copy link
Member

Do you might opening a PR for this :) ?

@3flex
Copy link
Member Author

3flex commented Dec 11, 2017

Adding .gitattributes or changing the test?

@arturbosch
Copy link
Member

.gitattributes please

@arturbosch
Copy link
Member

Thanks for the fix !

@arturbosch arturbosch added this to the RC6 milestone Dec 20, 2017
3flex added a commit to 3flex/detekt that referenced this issue Jan 3, 2018
Appveyor uses `git config --global core.autocrlf input` by default. However this is not
the default on Windows machines, meaning some tests that pass on Appveyor may not pass when
checked out on a Windows machine if the tests are affected by a file's line endings.
This causes issues like detekt#602 which could be picked
up earlier.
arturbosch pushed a commit that referenced this issue Jan 8, 2018
Appveyor uses `git config --global core.autocrlf input` by default. However this is not
the default on Windows machines, meaning some tests that pass on Appveyor may not pass when
checked out on a Windows machine if the tests are affected by a file's line endings.
This causes issues like #602 which could be picked
up earlier.
@lock
Copy link

lock bot commented Jun 20, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants