[PATCH] D112926: run-clang-tidy.py analyze unique files only

2021-11-01 Thread Serikzhan via Phabricator via cfe-commits
serkazi updated this revision to Diff 383959.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112926/new/

https://reviews.llvm.org/D112926

Files:
  clang-tools-extra/clang-tidy/tool/run-clang-tidy.py


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -273,8 +273,8 @@
 
   # Load the database and extract all files.
   database = json.load(open(os.path.join(build_path, db_path)))
-  files = [make_absolute(entry['file'], entry['directory'])
-   for entry in database]
+  files = set([make_absolute(entry['file'], entry['directory'])
+   for entry in database])
 
   max_task = args.j
   if max_task == 0:


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -273,8 +273,8 @@
 
   # Load the database and extract all files.
   database = json.load(open(os.path.join(build_path, db_path)))
-  files = [make_absolute(entry['file'], entry['directory'])
-   for entry in database]
+  files = set([make_absolute(entry['file'], entry['directory'])
+   for entry in database])
 
   max_task = args.j
   if max_task == 0:
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112926: run-clang-tidy.py analyze unique files only

2021-11-02 Thread Serikzhan via Phabricator via cfe-commits
serkazi added a comment.

In D112926#3102417 , @salman-javed-nz 
wrote:

> Why does the compile-commands.json have duplicate entries in the first place? 
> Would someone do that on purpose?

Think of a large project where people -- for various reasons -- don't make full 
use of CMake targets... This way, the compile-commands would have multiple 
entries with "-c".


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112926/new/

https://reviews.llvm.org/D112926

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112926: run-clang-tidy.py analyze unique files only

2021-11-04 Thread Serikzhan via Phabricator via cfe-commits
serkazi added a comment.

In D112926#3108140 , @salman-javed-nz 
wrote:

> It looks good to me. I don't have any more comments to add - it is a very 
> small code change after all.
> I have commit access and am happy to commit it on your behalf.
>
> However, this would be my first time as a reviewer, and I don't want to be 
> presumptuous and approve this before someone with more experience in the area 
> has had a chance to look at it.
>
> The rule of thumb is to wait a week before sending a ping. Then we'll see 
> what we can do to get this through.

Thank you. I leave it with you, then. And if in a week there is no response, 
I'll ping, as you've kindly suggested.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112926/new/

https://reviews.llvm.org/D112926

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112926: run-clang-tidy.py analyze unique files only

2021-11-05 Thread Serikzhan via Phabricator via cfe-commits
serkazi added a comment.

In D112926#3108140 , @salman-javed-nz 
wrote:

> It looks good to me. I don't have any more comments to add - it is a very 
> small code change after all.
> I have commit access and am happy to commit it on your behalf.
>
> However, this would be my first time as a reviewer, and I don't want to be 
> presumptuous and approve this before someone with more experience in the area 
> has had a chance to look at it.
>
> The rule of thumb is to wait a week before sending a ping. Then we'll see 
> what we can do to get this through.

This is now accepted, please feel free to merge on my behalf. Thanks.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112926/new/

https://reviews.llvm.org/D112926

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112926: run-clang-tidy.py analyze unique files only

2021-11-05 Thread Serikzhan via Phabricator via cfe-commits
serkazi added a comment.

In D112926#3113220 , @salman-javed-nz 
wrote:

> In D112926#3113206 , @serkazi wrote:
>
>> This is now accepted, please feel free to merge on my behalf. Thanks.
>
> What's the full name and email you want associated with your commit?

Let it be "Serikzhan Kazi se7k...@gmail.com"?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112926/new/

https://reviews.llvm.org/D112926

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits