mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-09 14:28:25 +00:00
413532fbba
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 --HG-- extra : moz-landing-system : lando
26 lines
881 B
YAML
26 lines
881 B
YAML
---
|
|
cpp-virtual-final:
|
|
description: "Virtual function declarations should specify only one of
|
|
`virtual`, `final`, or `override`"
|
|
level: error
|
|
include: ['.']
|
|
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 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
|