Message ID | 20211118124910.31123-1-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Commit | f2a1817275db8fb77acb5f2771b7577be8642194 |
Headers | show |
Series |
|
Related | show |
Hi Laurent, Thank you for the patch. On 11/18/21 6:19 PM, Laurent Pinchart wrote: > checkstyle.py is ignored too often. Document how to automate its usage > through git commit hooks. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> > --- > Documentation/coding-style.rst | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst > index 4e8d6988fef8..053fdd998351 100644 > --- a/Documentation/coding-style.rst > +++ b/Documentation/coding-style.rst > @@ -418,4 +418,12 @@ diff that fixes the issues, on top of the corresponding commit. As the script is > in early development false positive are expected. The flagged issues should be > reviewed, but the diff doesn't need to be applied blindly. > > +Execution of checkstyle.py can be automated through git commit hooks. Example > +of pre-commit and post-commit hooks are available in `utils/hooks/pre-commit` > +and `utils/hooks/post-commit`. You can install either hook by copying it to > +`.git/hooks/`. The post-commit hook is easier to start with as it will only flag > +potential issues after committing, while the pre-commit hook will abort the > +commit if issues are detected and requires usage of `git commit --no-verify` to > +ignore false positives. > + > Happy hacking, libcamera awaits your patches! > > base-commit: d9a2a1f703273a28b001dee40fddd378bba7a1b6
Quoting Laurent Pinchart (2021-11-18 12:49:10) > checkstyle.py is ignored too often. Document how to automate its usage > through git commit hooks. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Definitely a useful addition, and gives us somewhere to point to. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > Documentation/coding-style.rst | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst > index 4e8d6988fef8..053fdd998351 100644 > --- a/Documentation/coding-style.rst > +++ b/Documentation/coding-style.rst > @@ -418,4 +418,12 @@ diff that fixes the issues, on top of the corresponding commit. As the script is > in early development false positive are expected. The flagged issues should be > reviewed, but the diff doesn't need to be applied blindly. > > +Execution of checkstyle.py can be automated through git commit hooks. Example > +of pre-commit and post-commit hooks are available in `utils/hooks/pre-commit` > +and `utils/hooks/post-commit`. You can install either hook by copying it to > +`.git/hooks/`. The post-commit hook is easier to start with as it will only flag > +potential issues after committing, while the pre-commit hook will abort the > +commit if issues are detected and requires usage of `git commit --no-verify` to > +ignore false positives. > + > Happy hacking, libcamera awaits your patches! > > base-commit: d9a2a1f703273a28b001dee40fddd378bba7a1b6 > -- > Regards, > > Laurent Pinchart >
diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst index 4e8d6988fef8..053fdd998351 100644 --- a/Documentation/coding-style.rst +++ b/Documentation/coding-style.rst @@ -418,4 +418,12 @@ diff that fixes the issues, on top of the corresponding commit. As the script is in early development false positive are expected. The flagged issues should be reviewed, but the diff doesn't need to be applied blindly. +Execution of checkstyle.py can be automated through git commit hooks. Example +of pre-commit and post-commit hooks are available in `utils/hooks/pre-commit` +and `utils/hooks/post-commit`. You can install either hook by copying it to +`.git/hooks/`. The post-commit hook is easier to start with as it will only flag +potential issues after committing, while the pre-commit hook will abort the +commit if issues are detected and requires usage of `git commit --no-verify` to +ignore false positives. + Happy hacking, libcamera awaits your patches!
checkstyle.py is ignored too often. Document how to automate its usage through git commit hooks. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- Documentation/coding-style.rst | 8 ++++++++ 1 file changed, 8 insertions(+) base-commit: d9a2a1f703273a28b001dee40fddd378bba7a1b6