Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Update travis code format check #1593

Merged
merged 1 commit into from
Sep 26, 2018
Merged

Conversation

StefanOberhumer
Copy link
Collaborator

@StefanOberhumer StefanOberhumer commented Sep 24, 2018

Code format check like ethereum/evmc@b290ef3 but we're not exiting if format does not match clang-format style.

Copy link
Contributor

@chfast chfast left a comment

Choose a reason for hiding this comment

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

Is it useful in this form?

@StefanOberhumer
Copy link
Collaborator Author

Is it useful in this form?

I think so - we still do not generate an error if format differs.
Previous check did only warn the lines with trailing whitespaces and leading tabs.
As there is a .clang-format in the ethminer repo I think we should use it !

I came across when I was searching differences between my local clang-formatted version and the repo as I thought @jean-m-cyr clang formatted the whole (*.h, *.cpp) source. So I tried clang format in travis and found that I got the same diff as on my local version. I think all users should have the possibility to view the clang formatted output (even they have clang-format not installed)

Btw:

  • clang-format is already installed in the travis image (so no extra installation is required).
  • I'm thinking to test the git/hooks/pre-commit to automatically format my commits.

Copy link
Contributor

@chfast chfast left a comment

Choose a reason for hiding this comment

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

I'm ok with this change because it removes a script. But I'm rather sure contributors will not open Travis build page to check the formatting report.

This is good candidate for new circle CI job. I will work on this soon.

@StefanOberhumer
Copy link
Collaborator Author

... But I'm rather sure contributors will not open Travis build page to check the formatting report. ...

I know, but we can suggest to the travis result if we reformat the source.

@StefanOberhumer StefanOberhumer merged commit 72a7586 into master Sep 26, 2018
@StefanOberhumer StefanOberhumer deleted the UpdateCodeFormatCheck branch September 26, 2018 09:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants