Skip to content

Commit

Permalink
Fix NOLINT(*) regression
Browse files Browse the repository at this point in the history
After recent commit was tested over wider existing code
base, it was reported cpplint_mod.py would crash on
source code that contained "// NOLINT(*)".

This regression was fixed and tested against this fuller
(fullest) set of cases.  First two are "mask all lint reports"
wildcards.

    #include <thread>
    #include <thread>  // NOLINT
    #include <thread>  // NOLINT(*)
    #include <thread>  // NOLINT(build/c++11)
    #include <thread>  // NOLINT(build/c++11-2)
  • Loading branch information
cbagwell committed Oct 21, 2015
1 parent f9f5b88 commit a2df56e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonar-cxx-plugin/src/tools/cpplint_createrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def WriteUpdateFile(filename):
filetowrite.write(' category = value\n')
if linei.startswith(' return (linenum in _error_suppressions.get(category, set()) or'):
filetowrite.write(' for key in _error_suppressions.keys():\n')
filetowrite.write(' if category.startswith(key):\n')
filetowrite.write(' if key and category.startswith(key):\n')
filetowrite.write(' category = key\n')
filetowrite.write(linei)

Expand Down

0 comments on commit a2df56e

Please sign in to comment.