gem5-dev@gem5.org

The gem5 Developer List

View all threads

[S] Change in gem5/gem5[develop]: misc: Reword CONTRIBUTING.md pre-commit documentation

BB
Bobby Bruce (Gerrit)
Fri, Sep 23, 2022 4:18 PM

Bobby Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/63791?usp=email )

Change subject: misc: Reword CONTRIBUTING.md pre-commit documentation
......................................................................

misc: Reword CONTRIBUTING.md pre-commit documentation

This is a slight-rewording to make the usage of the pre-commit checks
clearer.

Change-Id: I73f9bfe7143a527c9e495cdf4d51e2aa857b43d5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63791
Reviewed-by: Jason Lowe-Power power.jg@gmail.com
Maintainer: Jason Lowe-Power power.jg@gmail.com
Tested-by: kokoro noreply+kokoro@google.com

M CONTRIBUTING.md
1 file changed, 23 insertions(+), 5 deletions(-)

Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d81cd9c..ae771d3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -143,14 +143,17 @@
To help ensure the gem5 style guide is maintained, we use pre-commit to run checks on changes to be contributed.

-To setup pre-commit, run the following in your gem5 directory.
+To setup pre-commit, run the following in your gem5 directory to install
the
+pre-commit and commit message hooks.

pip install pre-commit
pre-commit install -t pre-commit -t commit-msg

-When you run a git commit command the pre-commit will run checks on your
+The hooks are also automatically installed when gem5 is compiled.
+
+When you run a git commit command the pre-commit hook will run checks on
your
committed code. The commit will be blocked if a check fails.

The same checks are run as part of Gerrit's CI tests (those required to
obtain
@@ -158,11 +161,10 @@
Therefore setting up pre-commit in your local gem5 development environment
is
recommended.

-You can automatically format your changed code to pass the pre-commit
tests by
-running:
+You can automatically format files to pass the pre-commit tests by running:

-pre-commit run
+pre-commit run --files <files to format>

Requirements for change descriptions

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/63791?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I73f9bfe7143a527c9e495cdf4d51e2aa857b43d5
Gerrit-Change-Number: 63791
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby Bruce bbruce@ucdavis.edu
Gerrit-Reviewer: Bobby Bruce bbruce@ucdavis.edu
Gerrit-Reviewer: Jason Lowe-Power jason@lowepower.com
Gerrit-Reviewer: Jason Lowe-Power power.jg@gmail.com
Gerrit-Reviewer: kokoro noreply+kokoro@google.com
Gerrit-MessageType: merged

Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/63791?usp=email ) Change subject: misc: Reword CONTRIBUTING.md pre-commit documentation ...................................................................... misc: Reword CONTRIBUTING.md pre-commit documentation This is a slight-rewording to make the usage of the pre-commit checks clearer. Change-Id: I73f9bfe7143a527c9e495cdf4d51e2aa857b43d5 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63791 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> --- M CONTRIBUTING.md 1 file changed, 23 insertions(+), 5 deletions(-) Approvals: Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d81cd9c..ae771d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -143,14 +143,17 @@ To help ensure the gem5 style guide is maintained, we use [pre-commit]( https://pre-commit.com) to run checks on changes to be contributed. -To setup pre-commit, run the following in your gem5 directory. +To setup pre-commit, run the following in your gem5 directory to install the +pre-commit and commit message hooks. ```sh pip install pre-commit pre-commit install -t pre-commit -t commit-msg ``` -When you run a `git commit` command the pre-commit will run checks on your +The hooks are also automatically installed when gem5 is compiled. + +When you run a `git commit` command the pre-commit hook will run checks on your committed code. The commit will be blocked if a check fails. The same checks are run as part of Gerrit's CI tests (those required to obtain @@ -158,11 +161,10 @@ Therefore setting up pre-commit in your local gem5 development environment is recommended. -You can automatically format your changed code to pass the pre-commit tests by -running: +You can automatically format files to pass the pre-commit tests by running: ```sh -pre-commit run +pre-commit run --files <files to format> ``` Requirements for change descriptions -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/63791?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I73f9bfe7143a527c9e495cdf4d51e2aa857b43d5 Gerrit-Change-Number: 63791 Gerrit-PatchSet: 2 Gerrit-Owner: Bobby Bruce <bbruce@ucdavis.edu> Gerrit-Reviewer: Bobby Bruce <bbruce@ucdavis.edu> Gerrit-Reviewer: Jason Lowe-Power <jason@lowepower.com> Gerrit-Reviewer: Jason Lowe-Power <power.jg@gmail.com> Gerrit-Reviewer: kokoro <noreply+kokoro@google.com> Gerrit-MessageType: merged