summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/add_new_check.py
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Enable Python 3 support for add_new_check.pyJonathan Coe2018-03-241-16/+18
| | | | | | | | | | | | | | Summary: In Python 3, filters are lazily evaluated and strings are not bytes. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D44217 llvm-svn: 328418
* [clang-tidy] Use :doc: for check links in Release Notes.Eugene Zelenko2018-03-211-2/+2
| | | | | | Differential revision: https://reviews.llvm.org/D44694 llvm-svn: 328115
* [clang-tidy] Fix 'add_new_check.py --udpate-docs'Alexander Kornienko2018-02-281-0/+7
| | | | llvm-svn: 326321
* [clang-tidy] New argument --language to add_new_check.pyBen Hamilton2018-01-311-16/+33
| | | | | | | | | | | | | | | | | | | | | | Summary: Currently, add_new_check.py assumes all checks are for C++ code. This adds a new argument --language=[LANG] to add_new_check.py so authors of new checks can specify that the test file should be in a different language. For example, authors can pass --language=objc for Objective-C clang-tidy checks. Reviewers: hokein, alexfh Reviewed By: alexfh Subscribers: Wizard, xazax.hun Differential Revision: https://reviews.llvm.org/D39141 llvm-svn: 323919
* [clang-tidy] Actually fix header guard handling in scriptsAlexander Kornienko2017-11-251-1/+1
| | | | llvm-svn: 318971
* [clang-tidy] add_new_check.py updates ReleaseNotes.rst nowAlexander Kornienko2017-07-121-0/+32
| | | | llvm-svn: 307787
* [clang-tidy] Rename modernize-use-default to modernize-use-equals-defaultMalcolm Parsons2016-12-011-1/+6
| | | | | | | | | | Reviewers: angelgarcia, aaron.ballman, alexfh Subscribers: JDevlieghere, Prazek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D26511 llvm-svn: 288375
* [clang-tidy] Remove redundant quote in add_new_check scriptEtienne Bergeron2016-05-301-1/+1
| | | | | | | | | | | | | | Summary: Remove redundant quote. These quotes were added here: http://reviews.llvm.org/D20766 Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20792 llvm-svn: 271210
* [clang-tidy] Fix script adding new clang-tidy checkEtienne Bergeron2016-05-301-1/+1
| | | | | | | | | | | | | | Summary: The `getName()` call is useless. It's better to show a better example as tutorial. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20766 llvm-svn: 271207
* [clang-tidy] add_new_check.py should fail if check name starts with the ↵Alexander Kornienko2016-04-131-21/+30
| | | | | | | | module name + updated formatting llvm-svn: 266181
* [clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of ↵Alexander Kornienko2016-01-291-5/+13
| | | | | | | | | | loop variables. Patch by Felix Berger! Differential revision: http://reviews.llvm.org/D13849 llvm-svn: 259199
* Add documentation redirects for clang-tidy checkers that are exposed under ↵Aaron Ballman2016-01-111-7/+17
| | | | | | multiple checker names. Updates the Python script for adding checks to properly handle these aliases. llvm-svn: 257347
* [clang-tidy] Don't generate duplicated blank line in add_new_check.py script.Alexander Kornienko2015-12-291-2/+0
| | | | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Patch by Haojian Wu! Differential Revision: http://reviews.llvm.org/D15803 llvm-svn: 256554
* [clang-tidy] Updates to documentation: formatting, titles, etc.Alexander Kornienko2015-12-221-1/+3
| | | | llvm-svn: 256259
* [clang-tidy] Add namespace support to add_new_check.pyAlexander Kornienko2015-12-161-4/+10
| | | | | | | | | | | | | | Summary: Without namespace you can not create checks with same name in different modules Reviewers: alexfh Subscribers: cfe-commits Patch by Cong Liu! Differential Revision: http://reviews.llvm.org/D15571 llvm-svn: 255770
* clang-tidy/add_new_check.py: Adapt to use %check_clang_tidy in testsMatthias Gehre2015-10-261-1/+1
| | | | | | | | | | | | Summary: Adapt clang-tidy/add_new_check.py according to commit r251010 "Add %check_clang_tidy and %clang_tidy_diff" Reviewers: alexfh, sbenza, bkramer, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14049 llvm-svn: 251355
* Change the write modes to "binary" so that line endings do not get munged on ↵Aaron Ballman2015-10-061-7/+7
| | | | | | Windows. Otherwise, when this script is run, all files created on Windows have CRLF instead of LF line endings. llvm-svn: 249444
* Add a new module for the C++ Core Guidelines, and the first checker for ↵Aaron Ballman2015-10-061-1/+2
| | | | | | | | those guidelines: cppcoreguidelines-pro-type-reinterpret-cast. Patch by Matthias Gehre! llvm-svn: 249399
* [clang-tidy] fix add_new_check.pyAlexander Kornienko2015-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this check, I would get the following error: Updating ./misc/CMakeLists.txt... Creating ./misc/NoReinterpret_castCheck.h... Creating ./misc/NoReinterpret_castCheck.cpp... Updating ./misc/MiscTidyModule.cpp... Creating ../test/clang-tidy/misc-no-reinterpret_cast.cpp... Creating ../docs/clang-tidy/checks/misc-no-reinterpret_cast.rst... Traceback (most recent call last): File "./add_new_check.py", line 271, in <module> main() File "./add_new_check.py", line 267, in main update_checks_list(module_path) File "./add_new_check.py", line 220, in update_checks_list os.listdir('docs/clang-tidy/checks'))) OSError: [Errno 2] No such file or directory: 'docs/clang-tidy/checks' Patch by Matthias Gehre! Differential revision: http://reviews.llvm.org/D13272 llvm-svn: 248997
* [clang-tidy] add_new_check.py improvements: add doc file, refer it from .hAlexander Kornienko2015-09-101-13/+59
| | | | | | + some console logging and minor cleanups. llvm-svn: 247282
* [clang-tidy] Fix add_new_check.py.Alexander Kornienko2015-09-041-2/+3
| | | | | | | | | | | | This fixes the case where the check should be added at the end of the list of checks in CMakeLists.txt of the corresponding module. Before it was added after LINK_LIBS line. http://reviews.llvm.org/D12629 Patch by Marek Kurdej! llvm-svn: 246854
* Tests no longer need the 'REQUIRES: SHELL' line.Angel Garcia Gomez2015-08-251-1/+0
| | | | | | | | | | | | Summary: Update python script, so that it doesn't print that line in new tests. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D12281 llvm-svn: 245926
* [clang-tidy] Use check_clang_tidy.py instead of check_clang_tidy.sh by default.Alexander Kornienko2015-08-201-1/+1
| | | | llvm-svn: 245586
* [clang-tidy] Extended the example check, added a fix-it, etc.Alexander Kornienko2014-12-091-12/+23
| | | | llvm-svn: 223771
* clang-tidy: Add a basic python script to generate checks.Daniel Jasper2014-12-091-0/+214
There are still a vast range of improvements that can be done to this, but it seems like an ok initial version. Suggestions or patches are highly welcome. llvm-svn: 223766
OpenPOWER on IntegriCloud