---
avoid-blacklist-and-whitelist:
    description: "Use words like 'skip', 'select', 'allow' or 'deny' instead"
    level: error
    include: ['.']
    type: external
    payload: mozcheck:lint
    check: rejected-words
    check-config:
        regex-pattern: (black|white)[-_]?list
        ignore-case: true
    support-files:
        - 'tools/lint/mozcheck/**'
    # Based on codespell with idl and webidl added.
    extensions:
        - js
        - mjs
        - jsx
        - idl
        - webidl
        - xml
        - html
        - xhtml
        - cpp
        - c
        - h
        - configure
        - py
        - properties
        - rst
        - md
        - ftl
        - yml
        - java
        - kt
        - rs
    exclude:
        - eslint-rollouts.config.mjs
        - eslint-file-globals.config.mjs
        - browser/app/profile/firefox.js
        - browser/app/winlauncher/LauncherProcessWin.cpp
        - browser/base/content/browser.js
        - browser/base/content/contentTheme.js
        - browser/base/content/test/performance/browser_preferences_usage.js
        - browser/base/content/test/protectionsUI/browser_protectionsUI_cryptominers.js
        - browser/base/content/test/protectionsUI/browser_protectionsUI_fingerprinters.js
        - browser/base/content/test/protectionsUI/browser_protectionsUI_pbmode_exceptions.js
        - browser/base/content/test/protectionsUI/browser_protectionsUI_socialtracking.js
        - browser/base/content/test/protectionsUI/browser_protectionsUI_state.js
        - browser/base/content/test/protectionsUI/browser_protectionsUI_subview_shim.js
        - browser/base/content/test/siteIdentity/browser_no_mcb_for_loopback.js
        - browser/components/enterprisepolicies/Policies.sys.mjs
        - browser/components/migration/ChromeMigrationUtils.sys.mjs
        - browser/components/migration/ChromeProfileMigrator.sys.mjs
        - browser/components/preferences/config/privacy.mjs
        - browser/components/preferences/config/permissions-data.mjs
        - browser/components/preferences/privacy.inc.xhtml
        - browser/components/preferences/privacy.js
        - browser/components/resistfingerprinting/test/mochitest/test_bug1354633_media_error.html
        - browser/components/safebrowsing/content/test/browser_whitelisted.js
        - browser/components/sessionstore/test/browser_crashedTabs.js
        - browser/components/tabbrowser/test/browser/tabMediaIndicator/browser_mute_webAudio.js
        - browser/components/tabbrowser/test/browser/tabs/browser_new_file_whitelisted_http_tab.js
        - browser/components/tabbrowser/test/browser/tabs/browser_tab_drag_drop_perwindow.js
        - browser/components/urlbar/tests/browser/browser_searchSingleWordNotification.js
        - browser/components/urlbar/tests/browser/browser_trust_panel.js
        - browser/components/urlbar/tests/browser-UrlbarInput/browser_trimURLs.js
        - browser/components/urlbar/tests/unit/test_providerHeuristicFallback.js
        - browser/components/urlbar/tests/unit/test_search_suggestions.js
        - browser/components/urlbar/tests/unit/test_tokenizer.js
        - browser/extensions/newtab/data/content/activity-stream.bundle.js
        - browser/extensions/webcompat/shims/nielsen.js
        - browser/modules/SitePermissions.sys.mjs
        - browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.sys.mjs
        - build/clang-plugin/CustomMatchers.h
        - build/clang-plugin/FopenUsageChecker.cpp
        - build/clang-plugin/NaNExprChecker.cpp
        - build/clang-plugin/NoPrincipalGetURI.cpp
        - build/clang-plugin/tests/TestNANTestingExpr.cpp
        - build/moz.configure/bindgen.configure
        - build/moz.configure/toolchain.configure
        - config/check_vanilla_allocations.py
        - devtools/client/debugger/dist/parser-worker.js
        - devtools/client/debugger/test/mochitest/examples/big-sourcemap_files/bundle.js
        - devtools/client/debugger/test/mochitest/examples/ember/quickstart/dist/assets/vendor.js
        - devtools/client/debugger/test/mochitest/examples/react/build/main.js
        - devtools/client/debugger/test/mochitest/examples/react/build/service-worker.js
        - devtools/client/inspector/markup/test/events/lib_babel_6.21.0_min.js
        - devtools/client/inspector/markup/test/events/lib_react_dom_15.4.1.js
        - docshell/base/nsDocShell.cpp
        - docshell/base/URIFixup.sys.mjs
        - docshell/test/unit/test_URIFixup_info.js
        - dom/base/Document.cpp
        - dom/base/MaybeCrossOriginObject.cpp
        - dom/base/nsContentUtils.h
        - dom/base/nsDataDocumentContentPolicy.cpp
        - dom/base/nsGlobalWindowOuter.cpp
        - dom/base/nsTreeSanitizer.cpp
        - dom/base/nsTreeSanitizer.h
        - dom/base/test/browser_multiple_popups.js
        - dom/base/test/browser_timeout_throttling_with_audio_playback.js
        - dom/base/test/chrome/test_permission_hasValidTransientUserActivation.xhtml
        - dom/bindings/Codegen.py
        - dom/bindings/parser/WebIDL.py
        - dom/bindings/RemoteObjectProxy.cpp
        - dom/events/EventStateManager.cpp
        - dom/events/KeyboardEvent.cpp
        - dom/indexedDB/ActorsParent.cpp
        - dom/ipc/ContentParent.cpp
        - dom/ipc/URLClassifierParent.cpp
        - dom/media/autoplay/AutoplayPolicy.cpp
        - dom/media/gmp/GMPChild.cpp
        - dom/media/MediaManager.cpp
        - dom/media/mp4/MP4Decoder.cpp
        - dom/media/platforms/apple/AppleVTDecoder.cpp
        - dom/media/platforms/wmf/DXVA2Manager.cpp
        - dom/media/platforms/wmf/WMFVideoMFTManager.cpp
        - dom/media/autoplay/test/mochitest/file_autoplay_policy_key_blacklist.html
        - dom/media/autoplay/test/mochitest/test_autoplay_policy_key_blacklist.html
        - dom/media/autoplay/test/mochitest/test_autoplay_policy_permission.html
        - dom/media/mediaelement/MediaError.cpp
        - dom/media/webm/WebMDecoder.cpp
        - dom/media/webrtc/transport/stun_socket_filter.cpp
        - dom/media/webrtc/transport/test/ice_unittest.cpp
        - dom/tests/mochitest/dom-level0/idn_child.html
        - dom/tests/mochitest/dom-level0/test_setting_document.domain_idn.html
        - dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml
        - gfx/gl/GLContextProviderWGL.cpp
        - gfx/gl/GLUploadHelpers.cpp
        - gfx/tests/mochitest/test_font_whitelist.html
        - gfx/thebes/gfxFT2FontList.cpp
        - gfx/thebes/gfxPlatformFontList.cpp
        - gfx/thebes/gfxPlatformFontList.h
        - gfx/thebes/gfxUserFontSet.cpp
        - gfx/thebes/gfxWindowsPlatform.cpp
        - gfx/thebes/SharedFontList.cpp
        - intl/strres/nsStringBundle.cpp
        - ipc/glue/GeckoChildProcessHost.cpp
        - js/src/debugger/DebugAPI.h
        - js/src/devtools/rootAnalysis/analyzeHeapWrites.js
        - js/src/jit/CodeGenerator.cpp
        - js/src/jit-test/tests/auto-regress/bug687399.js
        - js/src/jit-test/tests/basic/missingArgTest2.js
        - js/src/tests/non262/regress/regress-450369.js
        - js/xpconnect/src/Sandbox.cpp
        - js/xpconnect/src/XPCJSRuntime.cpp
        - js/xpconnect/src/xpcpublic.h
        - js/xpconnect/src/XPCWrappedNativeScope.cpp
        - js/xpconnect/tests/unit/head_watchdog.js
        - js/xpconnect/wrappers/FilteringWrapper.cpp
        - js/xpconnect/wrappers/XrayWrapper.cpp
        - layout/base/PositionedEventTargeting.cpp
        - layout/base/PresShell.cpp
        - layout/base/PresShell.h
        - layout/reftests/css-placeholder/css-restrictions.html
        - layout/style/test/test_computed_style_difference.html
        - layout/tools/reftest/mach_commands.py
        - layout/tools/reftest/mach_test_package_commands.py
        - layout/tools/reftest/reftestcommandline.py
        - layout/tools/reftest/runreftest.py
        - layout/tools/reftest/selftest/conftest.py
        - mobile/android/android-components/docs/changelog.md
        - mobile/android/app/geckoview-prefs.js
        - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/StrictModeManager.kt
        - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/translations/preferences/downloadlanguages/DownloadLanguagesFeature.kt
        - mobile/android/fenix/app/src/test/java/org/mozilla/fenix/translations/preferences/downloadlanguages/DownloadLanguagesFeatureTest.kt
        - mobile/android/focus-android/app/src/main/res/values-ar/strings.xml
        - mobile/android/focus-android/app/src/main/res/values-et/strings.xml
        - mobile/android/focus-android/app/src/main/res/values-lt/strings.xml
        - mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java
        - mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ContentBlocking.java
        - mobile/android/geckoview/src/main/java/org/mozilla/geckoview/CrashReporter.java
        - mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebAuthnTokenManager.java
        - modules/libpref/Preferences.cpp
        - modules/libpref/init/all.js
        - netwerk/base/nsIPermissionManager.idl
        - netwerk/base/nsIProtocolHandler.idl
        - netwerk/base/nsIOService.cpp
        - netwerk/base/nsURLHelper.cpp
        - netwerk/cookie/CookieCommons.h
        - netwerk/dns/nsHostRecord.cpp
        - netwerk/dns/nsIDNService.cpp
        - netwerk/dns/nsIIDNService.idl
        - netwerk/dns/TRR.cpp
        - netwerk/ipc/DocumentLoadListener.cpp
        - netwerk/protocol/http/HttpBaseChannel.cpp
        - netwerk/protocol/http/nsHttpChannel.cpp
        - netwerk/protocol/http/nsHttpConnectionMgr.cpp
        - netwerk/protocol/viewsource/nsViewSourceChannel.cpp
        - netwerk/protocol/websocket/BaseWebSocketChannel.cpp
        - netwerk/socket/nsSOCKSSocketProvider.cpp
        - netwerk/test/unit/test_bug464591.js
        - netwerk/test/unit/test_cookie_blacklist.js
        - netwerk/test/unit/test_idn_blacklist.js
        - netwerk/url-classifier/UrlClassifierCommon.cpp
        - netwerk/url-classifier/UrlClassifierFeatureCryptominingAnnotation.cpp
        - netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp
        - netwerk/url-classifier/UrlClassifierFeatureFingerprintingAnnotation.cpp
        - netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
        - netwerk/url-classifier/UrlClassifierFeatureSocialTrackingAnnotation.cpp
        - netwerk/url-classifier/UrlClassifierFeatureSocialTrackingProtection.cpp
        - netwerk/url-classifier/UrlClassifierFeatureTrackingAnnotation.cpp
        - netwerk/url-classifier/UrlClassifierFeatureTrackingProtection.cpp
        - python/mozbuild/mozbuild/backend/recursivemake.py
        - python/mozbuild/mozbuild/configure/options.py
        - python/mozbuild/mozbuild/vendor/vendor_rust.py
        - security/manager/ssl/tests/unit/test_intermediate_preloads.js
        - security/sandbox/linux/broker/SandboxBroker.cpp
        - security/sandbox/linux/broker/SandboxBroker.h
        - security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
        - security/sandbox/linux/glue/SandboxPrefBridge.cpp
        - security/sandbox/linux/gtest/TestBroker.cpp
        - security/sandbox/linux/Sandbox.cpp
        - security/sandbox/linux/SandboxFilter.cpp
        - security/sandbox/linux/SandboxFilterUtil.h
        - security/sandbox/linux/Sandbox.h
        - taskcluster/kinds/docker-image/kind.yml
        - taskcluster/gecko_taskgraph/actions/create_interactive.py
        - taskcluster/gecko_taskgraph/transforms/test/other.py
        - testing/condprofile/condprof/client.py
        - testing/condprofile/condprof/tests/profile/prefs.js
        - testing/condprofile/condprof/tests/test_client.py
        - testing/firefox-ui/tests/functional/safebrowsing/test_initial_download.py
        - testing/marionette/client/marionette_driver/wait.py
        - testing/mochitest/browser-test.js
        - testing/mochitest/mach_test_package_commands.py
        - testing/mochitest/mochitest_options.py
        - testing/mochitest/runtests.py
        - testing/mozbase/mozprofile/mozprofile/profile.py
        - testing/mozharness/configs/unittests/linux_unittest.py
        - testing/mozharness/configs/unittests/mac_unittest.py
        - testing/mozharness/configs/unittests/win_unittest.py
        - testing/profiles/unittest-required/user.js
        - testing/raptor/browsertime/browsertime_scenario.js
        - testing/web-platform/tests/tools/manifest/tests/test_manifest.py
        - toolkit/actors/RemotePageChild.sys.mjs
        - toolkit/components/antitracking/docs/tracking-lists/index.md
        - toolkit/components/antitracking/test/browser/browser_socialtracking_save_image.js
        - toolkit/components/reputationservice/ApplicationReputation.cpp
        - toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.h
        - toolkit/components/reputationservice/test/unit/head_download_manager.js
        - toolkit/components/reputationservice/test/unit/test_app_rep.js
        - toolkit/components/reputationservice/test/unit/test_app_rep_maclinux.js
        - toolkit/components/reputationservice/test/unit/test_app_rep_windows.js
        - toolkit/components/satchel/test/test_form_autocomplete.html
        - toolkit/components/telemetry/docs/data/environment.md
        - toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
        - toolkit/components/url-classifier/SafeBrowsing.sys.mjs
        - toolkit/components/url-classifier/tests/mochitest/features.js
        - toolkit/components/url-classifier/tests/mochitest/good.js
        - toolkit/components/url-classifier/tests/mochitest/test_annotation_vs_TP.html
        - toolkit/components/url-classifier/tests/mochitest/test_classified_annotations.html
        - toolkit/components/url-classifier/tests/mochitest/test_classify_by_default.html
        - toolkit/components/url-classifier/tests/mochitest/test_classify_ping.html
        - toolkit/components/url-classifier/tests/mochitest/test_cryptomining_annotate.html
        - toolkit/components/url-classifier/tests/mochitest/test_cryptomining.html
        - toolkit/components/url-classifier/tests/mochitest/test_fingerprinting_annotate.html
        - toolkit/components/url-classifier/tests/mochitest/test_fingerprinting.html
        - toolkit/components/url-classifier/tests/mochitest/test_safebrowsing_bug1272239.html
        - toolkit/components/url-classifier/tests/mochitest/test_socialtracking_annotate.html
        - toolkit/components/url-classifier/tests/mochitest/test_socialtracking.html
        - toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_bug1580416.html
        - toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_whitelist.html
        - toolkit/components/url-classifier/tests/unit/head_urlclassifier.js
        - toolkit/components/url-classifier/tests/unit/test_digest256.js
        - toolkit/components/url-classifier/tests/unit/test_platform_specific_threats.js
        - toolkit/components/url-classifier/tests/UrlClassifierTestUtils.sys.mjs
        - toolkit/content/aboutTelemetry.js
        - toolkit/content/tests/browser/browser_delay_autoplay_webAudio.js
        - toolkit/modules/PermissionsUtils.sys.mjs
        - toolkit/modules/tests/browser/browser_AsyncPrefs.js
        - toolkit/modules/tests/xpcshell/test_PermissionsUtils.js
        - toolkit/modules/third_party/jsesc/jsesc.mjs
        - toolkit/modules/Troubleshoot.sys.mjs
        - toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs
        - toolkit/mozapps/extensions/test/browser/browser_html_discover_view.js
        - toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_gfxBlocklist_prefs.js
        - toolkit/mozapps/extensions/test/xpcshell/test_permissions.js
        - toolkit/mozapps/extensions/test/xpcshell/test_permissions_prefs.js
        - toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js
        - toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js
        - toolkit/mozapps/extensions/test/xpinstall/browser_localfile4_postDownload.js
        - toolkit/mozapps/extensions/test/xpinstall/head.js
        - tools/fuzzing/messagemanager/MessageManagerFuzzer.cpp
        - tools/fuzzing/messagemanager/MessageManagerFuzzer.h
        - tools/lint/mozcheck/src/batch.rs
        - tools/lint/mozcheck/src/rejected_words.rs
        - tools/lint/rejected-words.yml
        - widget/android/GfxInfo.cpp
        - widget/GfxInfoBase.cpp
        - widget/gtk/IMContextWrapper.cpp
        - widget/gtk/nsAppShell.cpp
        - widget/windows/GfxInfo.cpp
        - widget/windows/WinUtils.cpp
        - widget/windows/WinUtils.h
        - xpcom/io/FilePreferences.cpp
        - xpcom/tests/gtest/TestFilePreferencesUnix.cpp
        - gfx/webrender_bindings/src/moz2d_renderer.rs
        - gfx/webrender_bindings/src/program_cache.rs
        - servo/components/style/values/computed/font.rs

# ---
# Disable for now. Needs some dev to handle this
# avoid-master-and-slave:
#    description: "Use words like 'controller', 'worker' instead"
---
avoid-gobbledygook:
    description: "American English colloquialism. Use 'nonsense' instead."
    level: error
    include: ['.']
    type: external
    payload: mozcheck:lint
    check: rejected-words
    check-config:
        regex-pattern: \b(gobbledy)?-?gook
        ignore-case: true
    support-files:
        - 'tools/lint/mozcheck/**'
    exclude:
        - extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US-custom.dic
        - extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/utf8/en-US-utf8.dic
        - extensions/spellcheck/locales/en-US/hunspell/en-US.dic
        - taskcluster/test/params
        - tools/lint/rejected-words.yml
