mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
2d61b7becb
Soon, warnings will be suppressed by default and won't causes a failure. Therefore to prevent loss of coverage, we need to make sure that any lint warning that causes a failure today, needs to be converted to an error so it keeps failing tomorrow. Depends on D3819 Differential Revision: https://phabricator.services.mozilla.com/D3820 --HG-- extra : moz-landing-system : lando
33 lines
1.0 KiB
YAML
33 lines
1.0 KiB
YAML
---
|
|
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'
|
|
- gfx/angle
|
|
- gfx/skia
|
|
- media/webrtc/trunk
|
|
- security/sandbox/chromium
|
|
extensions: ['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.
|
|
#
|
|
# * 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
|