[PATCH] D61849: Do not list enabled checks when -quiet is given to run-clang-tidy.

2019-05-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment.

Yes someone has to do it on behalf of you.
I did so for you. After a view good patches you can get commit rights from 
chris lattner, until then the reviewer can commit for you.

Thank you for the patch!


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61849



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


[PATCH] D61849: Do not list enabled checks when -quiet is given to run-clang-tidy.

2019-05-16 Thread Jonas Toth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL360869: [clang-tidy] Do not list enabled checks when -quiet 
is given to run-clang-tidy. (authored by JonasToth, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D61849?vs=199229=199769#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D61849

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


Index: clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py
===
--- clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py
@@ -245,7 +245,12 @@
 if args.checks:
   invocation.append('-checks=' + args.checks)
 invocation.append('-')
-subprocess.check_call(invocation)
+if args.quiet:
+  # Even with -quiet we still want to check if we can call clang-tidy.
+  with open(os.devnull, 'w') as dev_null:
+subprocess.check_call(invocation, stdout=dev_null)
+else:
+  subprocess.check_call(invocation)
   except:
 print("Unable to run clang-tidy.", file=sys.stderr)
 sys.exit(1)


Index: clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py
===
--- clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py
@@ -245,7 +245,12 @@
 if args.checks:
   invocation.append('-checks=' + args.checks)
 invocation.append('-')
-subprocess.check_call(invocation)
+if args.quiet:
+  # Even with -quiet we still want to check if we can call clang-tidy.
+  with open(os.devnull, 'w') as dev_null:
+subprocess.check_call(invocation, stdout=dev_null)
+else:
+  subprocess.check_call(invocation)
   except:
 print("Unable to run clang-tidy.", file=sys.stderr)
 sys.exit(1)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D61849: Do not list enabled checks when -quiet is given to run-clang-tidy.

2019-05-16 Thread Sven Panne via Phabricator via cfe-commits
svenpanne added a comment.

Thanks for the review. How will the patch be merged? According to 
https://llvm.org/docs/Phabricator.html#committing-a-change, someone else has to 
do it for me, because AFAICT, I have no commit rights. As I said: I'm still in 
the process of learning the workflow here... :-)


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D61849



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


[PATCH] D61849: Do not list enabled checks when -quiet is given to run-clang-tidy.

2019-05-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision.
JonasToth added a comment.
This revision is now accepted and ready to land.

LGTM


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D61849



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