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 lint + precommit make targets. #805

Merged
merged 3 commits into from
Oct 31, 2019
Merged

Add lint + precommit make targets. #805

merged 3 commits into from
Oct 31, 2019

Conversation

drawlerr
Copy link
Contributor

@drawlerr drawlerr commented Oct 29, 2019

Adds a lint and precommit target to help enforce code guidelines and reduce manual effort during PR reviews similar to elastic/elasticsearch-benchmarks/pull/51

Closes #794

@drawlerr drawlerr added this to the 1.4.0 milestone Oct 29, 2019
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

Thanks! Left some comments that are currently prohibiting this from working as expected.

.pylintrc Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@drawlerr drawlerr requested a review from dliappis October 29, 2019 15:50
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM thanks.

@danielmitterdorfer danielmitterdorfer added :misc Changes that don't affect users directly: linter fixes, test improvements, etc. enhancement Improves the status quo labels Oct 30, 2019
Copy link
Member

@danielmitterdorfer danielmitterdorfer left a comment

Choose a reason for hiding this comment

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

This is now configured to apply the linter only for tests and we need to expand the scope.

Makefile Outdated Show resolved Hide resolved
@danielmitterdorfer
Copy link
Member

danielmitterdorfer commented Oct 30, 2019

Also, one more little detail w.r.t. your commit message: You wrote:

Relates #794

but it should rather be:

Closes #794

This will ensure that the corresponding Github issue is automatically closed when you merge your PR. Can you please edit the description accordingly?

Also, keep in mind that you need to do change this once more in the final commit when you merge the PR as Github will use your original message as the default commit message for the final commit.

The commit message should also be worded so it reveals the intention instead of the implementation. The corresponding issue #794 is titled as: "Enforce coding conventions" and this is exactly what we want to do. That we enforce this with a linter is an implementation detail. Can you please take that also into account in your commit message? Finally, please remove any punctuation in the title of your commit message. I liked https://chris.beams.io/posts/git-commit/ a lot which provides great tips for writing a good commit message.

Copy link
Member

@danielmitterdorfer danielmitterdorfer left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@drawlerr drawlerr merged commit 200a830 into elastic:master Oct 31, 2019
@drawlerr drawlerr deleted the lint branch October 31, 2019 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo :misc Changes that don't affect users directly: linter fixes, test improvements, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enforce coding conventions
3 participants