Message ID | 20221214161656.436083-1-xavier.roumegue@oss.nxp.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Quoting Xavier Roumegue via libcamera-devel (2022-12-14 16:16:56) > Declaration of new header file to the build system are only checked against > modified meson.build file. Therefore, this raises a false positive warning in > case the meson.build is added or renamed. > > Add the new and renamed meson.build files to the list of files to check header > file inclusion. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com> > --- > utils/checkstyle.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils/checkstyle.py b/utils/checkstyle.py > index f0248d65..64dcf5ed 100755 > --- a/utils/checkstyle.py > +++ b/utils/checkstyle.py > @@ -313,7 +313,7 @@ class HeaderAddChecker(CommitChecker): > def check(cls, commit, top_level): > issues = [] > > - meson_files = [f for f in commit.files('M') > + meson_files = [f for f in commit.files('AMR') > if os.path.basename(f) == 'meson.build'] > > for filename in commit.files('AR'): > -- > 2.38.1 >
Hi Xavier, Thank you for the patch. On Wed, Dec 14, 2022 at 05:16:56PM +0100, Xavier Roumegue via libcamera-devel wrote: > Declaration of new header file to the build system are only checked against > modified meson.build file. Therefore, this raises a false positive warning in > case the meson.build is added or renamed. > > Add the new and renamed meson.build files to the list of files to check header > file inclusion. > > Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com> > --- > utils/checkstyle.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils/checkstyle.py b/utils/checkstyle.py > index f0248d65..64dcf5ed 100755 > --- a/utils/checkstyle.py > +++ b/utils/checkstyle.py > @@ -313,7 +313,7 @@ class HeaderAddChecker(CommitChecker): > def check(cls, commit, top_level): > issues = [] > > - meson_files = [f for f in commit.files('M') > + meson_files = [f for f in commit.files('AMR') 'AMR' is the default filter, so you can use meson_files = [f for f in commit.files() if os.path.basename(f) == 'meson.build'] I'll change this when applying. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > if os.path.basename(f) == 'meson.build'] > > for filename in commit.files('AR'):
diff --git a/utils/checkstyle.py b/utils/checkstyle.py index f0248d65..64dcf5ed 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -313,7 +313,7 @@ class HeaderAddChecker(CommitChecker): def check(cls, commit, top_level): issues = [] - meson_files = [f for f in commit.files('M') + meson_files = [f for f in commit.files('AMR') if os.path.basename(f) == 'meson.build'] for filename in commit.files('AR'):
Declaration of new header file to the build system are only checked against modified meson.build file. Therefore, this raises a false positive warning in case the meson.build is added or renamed. Add the new and renamed meson.build files to the list of files to check header file inclusion. Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com> --- utils/checkstyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)