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

Add end of line style guidelines to contributing docs #282

Merged
merged 2 commits into from
May 3, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Please raise pull requests against master; the `gh-pages` branch is used only fo

Pull requests are most welcome, but please try to test them with the existing tests first.

#### Conventions

##### End of line style
DbFit is using Unix style end of line (`LF`) in source files.

Be careful with that on Windows where the default end of line style is `CR+LF`. If your editor or other tools are not supporting well the end of line conventions: you may consider using the help of Git's [autocrlf option](http://git-scm.com/book/en/Customizing-Git-Git-Configuration). If you do so, be aware that DbFit tests and VM setup scripts rely on having some files unchanged. So it's advised that you use `autocrlf = input` instead of `autocrlf = auto`.
Copy link
Member

Choose a reason for hiding this comment

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

If your editor or other tools are not supporting well the end of line conventions

I'd change that to If your editor or other tools don't have good support for the Unix end-of-line conventions

If you do so, be aware that DbFit tests and VM setup scripts rely on having some files unchanged

I'm not sure what you mean here... maybe you could expand on it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you do so, be aware that DbFit tests and VM setup scripts rely on having some files unchanged

I'm not sure what you mean here... maybe you could expand on it?

I had in mind that in particular autocrlf=auto converts install_oracle.sh to CR+LF style which fails to execute inside the VM.

And for the tests - I meant some unit tests compares results with files under src/test/resources/dbfit/util/oracle and that will fail too if files are modified (even if it's just because of CR+LF vs LF difference). For these we have a hack in .gitattributes actually to prevent such accidents.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not completely sure actually what else may get broken if converted to CR+LF. If we're too specific - there is a risk to omit something while leaving the impression that this is an exhaustive list of all special cases.


If you or your tools have good support for Unix end of line format - it's perfectly OK to run with autocrlf unconfigured (or `autocrlf = false`).

#### Fast build

The quickest way to get feedback on your code changes is to run the fast build:
Expand Down