diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c077b581b64..e8eacc98d7d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -15,6 +15,7 @@ #### Pull request checklist - [ ] Addresses an existing issue: #0000 +- [ ] Ran `yarn null:autoadd` - [ ] Ran `yarn fastpass` - [ ] Added/updated relevant unit test(s) (and ran `yarn test`) - [ ] Verified code coverage for the changes made. Check coverage report at: `/test-results/unit/coverage` diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1401a753ac7..a46e437ac37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,6 +185,10 @@ jobs: - run: yarn null:check timeout-minutes: 5 + - name: verify null:autoadd finds no changes + run: yarn null:autoadd && node .github/workflows/verify-unchanged-strict-null-checks.js + timeout-minutes: 6 + codeql: runs-on: ubuntu-20.04 steps: diff --git a/.github/workflows/verify-unchanged-strict-null-checks.js b/.github/workflows/verify-unchanged-strict-null-checks.js new file mode 100644 index 00000000000..1c79092bbd4 --- /dev/null +++ b/.github/workflows/verify-unchanged-strict-null-checks.js @@ -0,0 +1,41 @@ +// // Copyright (c) Microsoft Corporation. All rights reserved. +// // Licensed under the MIT License. +// +// USAGE: +// +// node verify-unchanged-strict-null-checks.js +// +// Verifies that "git status" does not report any pending changes to tsconfig.strictNullChecks.json +// +// This serves as a reminder for humans to update strict null checks when they add files. + +const path = require('path'); +const process = require('process'); +const child_process = require('child_process'); + +const lockfilePath = path.join(__dirname, '..', '..', 'tsconfig.strictNullChecks.json'); + +const gitStatusResult = child_process.execFileSync('git', ['status', '--porcelain=1', '--', lockfilePath]); +const isLockfileChanged = gitStatusResult.toString() !== ''; + +if (isLockfileChanged) { + const gitDiffResult = child_process.execFileSync('git', ['diff', '--', lockfilePath]); + console.error(` +Error: Running "yarn null:autoadd" identified new files to be included in null checks. + +To ensure these files are included: + 1) Pull this branch + 2) Run "yarn null:autoadd" + 3) Commit and push the resulting change to tsconfig.strictNullChecks.json + +Diff of the necessary change: + +${gitDiffResult.toString()} + `); + process.exit(1); +} else { + console.log('Success! git status reports no outstanding tsconfig.strictNullChecks.json changes.'); + process.exit(0); +} + + diff --git a/tsconfig.strictNullChecks.json b/tsconfig.strictNullChecks.json index ae5353fbb25..c0d627d9354 100644 --- a/tsconfig.strictNullChecks.json +++ b/tsconfig.strictNullChecks.json @@ -11,6 +11,7 @@ "./src/DetailsView/components/auto-detected-failures-dialog.tsx", "./src/DetailsView/components/base-left-nav.tsx", "./src/DetailsView/components/change-assessment-dialog.tsx", + "./src/DetailsView/components/choice-group-pass-fail.tsx", "./src/DetailsView/components/details-view-overlay/scoping-panel/scoping-container.tsx", "./src/DetailsView/components/details-view-overlay/scoping-panel/scoping-panel.tsx", "./src/DetailsView/components/failure-instance-panel-details.tsx", @@ -57,6 +58,7 @@ "./src/DetailsView/components/target-page-hidden-bar.tsx", "./src/DetailsView/components/test-status-choice-group.tsx", "./src/DetailsView/components/warning-configuration.tsx", + "./src/DetailsView/details-view-init-with-react-devtools.ts", "./src/DetailsView/handlers/allurls-permission-handler.ts", "./src/DetailsView/handlers/details-view-toggle-click-handler-factory.ts", "./src/DetailsView/handlers/master-checkbox-config-provider.ts", @@ -70,12 +72,6 @@ "./src/assessments/audio-video-only/test-steps/test-steps.ts", "./src/assessments/auto-pass-if-no-results.ts", "./src/assessments/color/test-steps/test-steps.tsx", - "./src/assessments/common/assisted-test-record-your-results.tsx", - "./src/assessments/common/element-column-renderers.tsx", - "./src/assessments/common/instructions-and-labels-note.tsx", - "./src/assessments/common/manual-test-record-your-results.tsx", - "./src/assessments/common/property-bag-column-renderer-factory.tsx", - "./src/assessments/common/property-bag-column-renderer.tsx", "./src/assessments/contrast/test-steps/test-steps.ts", "./src/assessments/custom-widgets/custom-widgets-column-renderer-factory.tsx", "./src/assessments/custom-widgets/custom-widgets-column-renderer.tsx", @@ -85,6 +81,7 @@ "./src/assessments/headings/test-steps/test-steps.ts", "./src/assessments/images/test-steps/test-steps.ts", "./src/assessments/keyboard-interaction/test-steps/test-steps.ts", + "./src/assessments/landmarks/does-result-have-main-role.ts", "./src/assessments/landmarks/test-steps/test-steps.ts", "./src/assessments/language/test-steps/test-steps.ts", "./src/assessments/links/test-steps/test-steps.ts", @@ -104,7 +101,9 @@ "./src/assessments/types/report-instance-field.ts", "./src/assessments/visible-focus-order/test-steps/test-steps.ts", "./src/background/IndexedDBDataKeys.ts", + "./src/background/actions/action-hub.ts", "./src/background/actions/action-payloads.ts", + "./src/background/actions/assessment-actions.ts", "./src/background/actions/card-selection-action-creator.ts", "./src/background/actions/card-selection-actions.ts", "./src/background/actions/command-actions.ts", @@ -115,6 +114,7 @@ "./src/background/actions/dev-tools-action-creator.ts", "./src/background/actions/dev-tools-actions.ts", "./src/background/actions/feature-flag-actions.ts", + "./src/background/actions/global-action-hub.ts", "./src/background/actions/injection-action-creator.ts", "./src/background/actions/injection-actions.ts", "./src/background/actions/inspect-action-creator.ts", @@ -137,15 +137,18 @@ "./src/background/actions/unified-scan-result-actions.ts", "./src/background/actions/user-configuration-actions.ts", "./src/background/actions/visualization-actions.ts", + "./src/background/actions/visualization-scan-result-actions.ts", "./src/background/application-build-generator.ts", "./src/background/assessment-data-remover.ts", "./src/background/browser-message-broadcaster-factory.ts", "./src/background/browser-permissions-tracker.ts", "./src/background/details-view-controller.ts", + "./src/background/dev-tools-monitor.ts", "./src/background/extension-details-view-controller.ts", "./src/background/feature-flag-checker.ts", "./src/background/get-persisted-data.ts", "./src/background/global-action-creators/feature-flags-action-creator.ts", + "./src/background/global-action-creators/global-action-creator.ts", "./src/background/global-action-creators/permissions-state-action-creator.ts", "./src/background/global-action-creators/scoping-action-creator.ts", "./src/background/global-action-creators/user-configuration-action-creator.ts", @@ -181,6 +184,7 @@ "./src/background/telemetry/application-telemetry-data-factory.ts", "./src/background/telemetry/debug-tools-telemetry-client.ts", "./src/background/telemetry/multiplexing-telemetry-client.ts", + "./src/background/telemetry/sending-exception-telemetry-listener.ts", "./src/background/telemetry/telemetry-base-data.ts", "./src/background/telemetry/telemetry-client-provider.ts", "./src/background/telemetry/telemetry-client.ts", @@ -249,12 +253,14 @@ "./src/common/fabric-icons.ts", "./src/common/file-url-provider.ts", "./src/common/filename-builder.ts", + "./src/common/get-card-selection-view-data.ts", "./src/common/get-guidance-tags-from-guidance-links.ts", "./src/common/get-inner-text-from-jsx-element.ts", "./src/common/globalization.ts", "./src/common/html-element-utils.ts", "./src/common/is-result-highlight-unavailable.ts", "./src/common/is-supported-browser.ts", + "./src/common/merge-promise-responses.ts", "./src/common/message.ts", "./src/common/messages.ts", "./src/common/narrow-mode-thresholds.ts", @@ -264,6 +270,7 @@ "./src/common/store-proxy.ts", "./src/common/store-update-message-hub.ts", "./src/common/tabbable-elements-helper.ts", + "./src/common/target-helper.ts", "./src/common/telemetry-data-factory.ts", "./src/common/types/store-data/adhoc-test-keys.ts", "./src/common/types/store-data/details-view-right-content-panel-type.ts", @@ -377,9 +384,12 @@ "./src/injected/adapters/resolution-creator.ts", "./src/injected/adapters/scan-results-to-unified-results.ts", "./src/injected/all-frame-runner.ts", + "./src/injected/analyzers/analyzer.ts", "./src/injected/analyzers/filter-results.ts", + "./src/injected/analyzers/focus-traps-handler.ts", "./src/injected/analyzers/notification-text-creator.ts", "./src/injected/analyzers/tab-stops-done-analyzing-tracker.ts", + "./src/injected/analyzers/tab-stops-handler.ts", "./src/injected/analyzers/tab-stops-orchestrator.ts", "./src/injected/analyzers/tab-stops-requirement-result-processor.ts", "./src/injected/bounding-rect.ts", @@ -392,20 +402,14 @@ "./src/injected/focus-change-handler.ts", "./src/injected/frame-url-controller.ts", "./src/injected/frame-url-finder.ts", - "./src/injected/frameCommunicators/axe-frame-messenger.ts", - "./src/injected/frameCommunicators/backchannel-window-message-translator.ts", - "./src/injected/frameCommunicators/browser-backchannel-window-message-poster.ts", - "./src/injected/frameCommunicators/error-message-content.ts", - "./src/injected/frameCommunicators/frame-messenger.ts", - "./src/injected/frameCommunicators/respondable-command-message-communicator.ts", - "./src/injected/frameCommunicators/scrolling-controller.ts", - "./src/injected/frameCommunicators/window-message.ts", "./src/injected/iframe-detector.ts", "./src/injected/inspect-controller.ts", "./src/injected/path-snippet-controller.ts", "./src/injected/scan-incomplete-warning-detector.ts", + "./src/injected/scanner-utils.ts", "./src/injected/scanner.d.ts", "./src/injected/scoping-listener.ts", + "./src/injected/selector-to-visualization-map.ts", "./src/injected/shadow-initializer.ts", "./src/injected/shadow-utils.ts", "./src/injected/single-frame-tab-stop-listener.ts", @@ -413,6 +417,8 @@ "./src/injected/tab-stops-requirement-evaluator.ts", "./src/injected/tabbable-element-getter.ts", "./src/injected/target-page-action-message-creator.ts", + "./src/injected/visualization-instance-processor.ts", + "./src/injected/visualization-needs-update.ts", "./src/injected/visualization/center-position-calculator.ts", "./src/injected/visualization/drawer-utils.ts", "./src/injected/visualization/drawer.ts", @@ -440,6 +446,7 @@ "./src/popup/components/launch-pad-item-row.tsx", "./src/popup/components/launch-pad.tsx", "./src/popup/incompatible-browser-renderer.tsx", + "./src/popup/popup-init-with-react-devtools.ts", "./src/popup/target-tab-finder.ts", "./src/reports/assessment-report.styles.ts", "./src/reports/automated-checks-report.styles.ts", @@ -543,12 +550,9 @@ "./src/tests/unit/common/visualization-toggle-props-builder.ts", "./src/tests/unit/common/webextension-polyfill-setup.ts", "./src/tests/unit/jest-setup.ts", - "./src/tests/unit/mock-helpers/chrome-event-mock.ts", - "./src/tests/unit/mock-helpers/port-on-disconnect-mock.ts", - "./src/tests/unit/mock-helpers/port-on-message-mock.ts", - "./src/tests/unit/mock-helpers/store-mock.ts", "./src/tests/unit/tests/assessments/common/renderer-wrapper.tsx", "./src/tests/unit/tests/background/global-action-creators/action-creator-test-helpers.ts", + "./src/tests/unit/tests/background/global-action-creators/mock-interpreter.ts", "./src/tests/unit/tests/common/components/cards/sample-view-model-data.ts", "./src/tests/unit/tests/electron/platform/android/scan-results-helpers.ts", "./src/tests/unit/tests/electron/platform/android/setup/steps/actions-tester.ts", @@ -572,6 +576,7 @@ "src/DetailsView/actions/**/*", "src/Devtools/**/*", "src/ad-hoc-visualizations/calculated-tab-stops/**/*", + "src/assessments/common/**/*", "src/assessments/language/common/**/*", "src/background/global-action-creators/registrar/**/*", "src/background/injector/**/*", @@ -588,6 +593,7 @@ "src/common/react/**/*", "src/common/stores/**/*", "src/common/styles/**/*", + "src/common/telemetry/**/*", "src/common/types/**/*", "src/content/**/*", "src/debug-tools/controllers/**/*", @@ -603,6 +609,7 @@ "src/electron/window-management/**/*", "src/fast-pass/**/*", "src/icons/**/*", + "src/injected/frameCommunicators/**/*", "src/issue-filing/common/markup/**/*", "src/popup/actions/**/*", "src/report-export/**/*", @@ -613,6 +620,7 @@ "src/tests/end-to-end/setup/**/*", "src/tests/end-to-end/test-resources/**/*", "src/tests/miscellaneous/**/*", + "src/tests/unit/mock-helpers/**/*", "src/tests/unit/stubs/**/*", "src/tests/unit/tests/reports/package/scans/**/*", "src/tests/unit/tests/test-resources/**/*",