2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2014-09-04 12:44:01 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2016-03-11 05:01:55 +03:00
|
|
|
# dummy library name to avoid skipping building the sources here.
|
Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 23:40:42 +03:00
|
|
|
Library("clang-plugin-tests")
|
2016-03-11 05:01:55 +03:00
|
|
|
|
2014-09-04 12:44:01 +04:00
|
|
|
SOURCES += [
|
Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 23:40:42 +03:00
|
|
|
"TestAssertWithAssignment.cpp",
|
|
|
|
"TestBadImplicitConversionCtor.cpp",
|
|
|
|
"TestCanRunScript.cpp",
|
|
|
|
"TestCustomHeap.cpp",
|
|
|
|
"TestDanglingOnTemporary.cpp",
|
|
|
|
"TestExplicitOperatorBool.cpp",
|
|
|
|
"TestGlobalClass.cpp",
|
|
|
|
"TestHeapClass.cpp",
|
|
|
|
"TestInheritTypeAnnotationsFromTemplateArgs.cpp",
|
|
|
|
"TestKungFuDeathGrip.cpp",
|
|
|
|
"TestMultipleAnnotations.cpp",
|
|
|
|
"TestMustOverride.cpp",
|
|
|
|
"TestMustReturnFromCaller.cpp",
|
|
|
|
"TestMustUse.cpp",
|
|
|
|
"TestNANTestingExpr.cpp",
|
|
|
|
"TestNANTestingExprC.c",
|
|
|
|
"TestNeedsNoVTableType.cpp",
|
|
|
|
"TestNoAddRefReleaseOnReturn.cpp",
|
|
|
|
"TestNoArithmeticExprInArgument.cpp",
|
|
|
|
"TestNoAutoType.cpp",
|
|
|
|
"TestNoDuplicateRefCntMember.cpp",
|
|
|
|
"TestNoExplicitMoveConstructor.cpp",
|
|
|
|
"TestNoNewThreadsChecker.cpp",
|
|
|
|
"TestNonHeapClass.cpp",
|
|
|
|
"TestNonMemMovable.cpp",
|
|
|
|
"TestNonMemMovableStd.cpp",
|
|
|
|
"TestNonMemMovableStdAtomic.cpp",
|
|
|
|
"TestNonParameterChecker.cpp",
|
|
|
|
"TestNonTemporaryClass.cpp",
|
|
|
|
"TestNonTrivialTypeInFfi.cpp",
|
|
|
|
"TestNoPrincipalGetUri.cpp",
|
|
|
|
"TestNoRefcountedInsideLambdas.cpp",
|
|
|
|
"TestNoUsingNamespaceMozillaJava.cpp",
|
|
|
|
"TestOverrideBaseCall.cpp",
|
|
|
|
"TestOverrideBaseCallAnnotation.cpp",
|
|
|
|
"TestParamTraitsEnum.cpp",
|
|
|
|
"TestRefCountedCopyConstructor.cpp",
|
|
|
|
"TestSprintfLiteral.cpp",
|
|
|
|
"TestStackClass.cpp",
|
|
|
|
"TestStaticLocalClass.cpp",
|
|
|
|
"TestTemporaryClass.cpp",
|
|
|
|
"TestTemporaryLifetimeBound.cpp",
|
|
|
|
"TestTrivialCtorDtor.cpp",
|
|
|
|
"TestTrivialDtor.cpp",
|
2014-09-04 12:44:01 +04:00
|
|
|
]
|
|
|
|
|
Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 23:40:42 +03:00
|
|
|
if CONFIG["OS_ARCH"] == "WINNT":
|
2018-03-07 15:36:44 +03:00
|
|
|
SOURCES += [
|
Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 23:40:42 +03:00
|
|
|
"TestFopenUsage.cpp",
|
|
|
|
"TestLoadLibraryUsage.cpp",
|
2018-03-07 15:36:44 +03:00
|
|
|
]
|
|
|
|
|
Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 23:40:42 +03:00
|
|
|
include("../external/tests/sources.mozbuild")
|
2020-03-05 19:29:13 +03:00
|
|
|
|
Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 23:40:42 +03:00
|
|
|
if CONFIG["ENABLE_CLANG_PLUGIN_ALPHA"]:
|
2020-03-17 10:01:09 +03:00
|
|
|
DEFINES["MOZ_CLANG_PLUGIN_ALPHA"] = "1"
|
Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 23:40:42 +03:00
|
|
|
include("../alpha/tests/sources.mozbuild")
|
2020-03-17 10:01:09 +03:00
|
|
|
|
2017-09-11 21:33:26 +03:00
|
|
|
DisableStlWrapping()
|
2017-05-02 04:12:35 +03:00
|
|
|
NoVisibilityFlags()
|
2017-10-26 01:12:10 +03:00
|
|
|
|
|
|
|
# Build without any warning flags, and with clang verify flag for a
|
|
|
|
# syntax-only build (no codegen), without a limit on the number of errors.
|
Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 23:40:42 +03:00
|
|
|
COMPILE_FLAGS["OS_CXXFLAGS"] = [
|
|
|
|
f for f in COMPILE_FLAGS.get("OS_CXXFLAGS", []) if not f.startswith("-W")
|
|
|
|
] + ["-fsyntax-only", "-Xclang", "-verify", "-ferror-limit=0", "-Wno-invalid-noreturn"]
|
|
|
|
COMPILE_FLAGS["OS_CFLAGS"] = [
|
|
|
|
f for f in COMPILE_FLAGS.get("OS_CFLAGS", []) if not f.startswith("-W")
|
|
|
|
] + [
|
|
|
|
"-fsyntax-only",
|
|
|
|
"-Xclang",
|
|
|
|
"-verify",
|
|
|
|
"-ferror-limit=0",
|
|
|
|
"-Xclang",
|
|
|
|
"-std=c11",
|
|
|
|
"-Wno-invalid-noreturn",
|
|
|
|
]
|
2018-07-31 16:10:07 +03:00
|
|
|
|
2018-08-30 20:29:54 +03:00
|
|
|
# Don't reflect WARNINGS_CFLAGS into CFLAGS, as the warnings flags should be
|
|
|
|
# as specified in OS_CFLAGS above.
|
|
|
|
DisableCompilerWarnings()
|