Bug 1513950 - Run cpp-virtual-final lint on .cc files. r=ahal
authorChris Peterson <cpeterson@mozilla.com>
Mon, 31 Dec 2018 21:27:22 +0000
changeset 509327 605aa74c29e369941cbf83c23492322c1256915c
parent 509326 2f42b03f9e8fc93439c11c6d65a066325b1c3796
child 509328 da77d34af70103094ca2fad7d7d9bf60b314cd73
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1513950
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1513950 - Run cpp-virtual-final lint on .cc files. r=ahal At this time, there are no cpp-virtual-final warnings in any .cc files. :) Also: 1. Remove unnecessary exclusion of node_modules because the directory contains no C++ code that would be checked by this lint. 2. Update number of virtual-override instances that prevent us from checking for `virtual void Bad() override`. Differential Revision: https://phabricator.services.mozilla.com/D14529
tools/lint/cpp-virtual-final.yml
--- a/tools/lint/cpp-virtual-final.yml
+++ b/tools/lint/cpp-virtual-final.yml
@@ -1,28 +1,25 @@
 ---
 cpp-virtual-final:
     description: "Virtual function declarations should specify only one of
                   `virtual`, `final`, or `override`"
     level: error
     include: ['.']
-    exclude:
-        # Third-party code with cpp-virtual-final warnings:
-        - '**/node_modules'
-    extensions: ['cpp', 'h', 'mm']
+    extensions: ['cc', 'cpp', 'h', 'mm']
     type: regex
     #
     # This lint warns about:
     #
     #   virtual void Bad1() final
     #   void Bad2() final override
     #   void Bad3() override final
     #
     # Caveats: This lint ...
     #
     #   * Doesn't warn about `virtual void NotBad() override` at this time
-    #     because there are 8000+ instances.
+    #     because there are currently 6963 instances of this pattern.
     #
     #   * Doesn't warn about function declarations that span multiple lines
     #     because the regex can't match across line breaks.
     #
     #           virtual    )    final  |  final  override  |  override  final
     payload: ^ *virtual .+\).+\bfinal\b|\bfinal +override\b|\boverride +final\b