Skip to content

Check code format before running elixir test suite#1767

Merged
wohali merged 5 commits intoapache:masterfrom
van-mronov:mix-format
Nov 28, 2018
Merged

Check code format before running elixir test suite#1767
wohali merged 5 commits intoapache:masterfrom
van-mronov:mix-format

Conversation

@van-mronov
Copy link
Copy Markdown
Contributor

Overview

  • Format elixir tests with mix format;
  • Add make task checking code format before running elixir tests.

Testing recommendations

make elixir

Related Issues or Pull Requests

Issue #1756
PR #1745
PR #1760

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

@wohali
Copy link
Copy Markdown
Member

wohali commented Nov 27, 2018

@van-mronov Since we don't run this in the CI test suite yet, can you paste for me the output of running make elixir-check-formatted on this branch please? Thanks!

@van-mronov
Copy link
Copy Markdown
Contributor Author

@wohali for formatted code it just outputs nothing and returns 0

$ cd test/elixir/ && mix format --check-formatted
$ echo $?
0

For current master branch (not formatted code):

$ cd test/elixir/ && mix format --check-formatted
** (Mix) mix format failed due to --check-formatted.
The following files were not formatted:

  * test/replication_test.exs
  * test/reduce_test.exs
  * test/view_collation_test.exs
  * test/test_helper.exs
  * test/security_validation_test.exs
  * test/uuids_test.exs
  * test/rewrite_test.exs
  * test/basics_test.exs
  * test/lots_of_docs_test.exs
  * test/bulk_docs_test.exs
  * test/all_docs_test.exs
  * test/config_test.exs
  * test/conflicts_test.exs
  * lib/couch.ex
  * test/helper_test.exs
  * test/compact_test.exs
  * test/batch_save_test.exs
  * mix.exs

$ echo $?
1

Copy link
Copy Markdown
Member

@wohali wohali left a comment

Choose a reason for hiding this comment

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

Nice job, +1!

Comment thread Makefile.win

.PHONY: elixir
elixir:
elixir: elixir-check-formatted
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for updating Makefile.win as well!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No problem, but I have no chance to try it.

@wohali wohali merged commit 45eba6e into apache:master Nov 28, 2018
@van-mronov van-mronov deleted the mix-format branch November 28, 2018 14:21
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