Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure we're type checking non-svelte files in CI (TSC checks) #3679

Open
bcolloran opened this issue Dec 11, 2023 · 2 comments
Open

Make sure we're type checking non-svelte files in CI (TSC checks) #3679

bcolloran opened this issue Dec 11, 2023 · 2 comments
Assignees
Labels
Type:Bug Something isn't working

Comments

@bcolloran
Copy link
Contributor

bcolloran commented Dec 11, 2023

I just realized that the --no-tsconfig option to svelte-check means we're not type checking any of our plain .ts files :'( Need to rectify that.

UPDATES

LATEST STATUS (2024-01-09)

running npx tsc --noEmit | grep "error TS" | sed -n 's/.*\(error TS[0-9]*:\).*/\1/p' | sort | uniq -c | sort -nr

shows that we have the following number of each TS error code:

    194 error TS18048:
    167 error TS2345:
     98 error TS2322:
     41 error TS18047:
     23 error TS2532:
     17 error TS2339:
     13 error TS2538:
     11 error TS2769:
     11 error TS18046:
      1 error TS2614:

and npx tsc --noEmit shows that we have the following number of errors per file:

Found 576 errors in 90 files.

Errors  Files
    37  web-admin/src/features/dashboards/listing/selectors.ts:44
     5  web-admin/src/features/errors/error-utils.ts:107
     1  web-admin/src/features/projects/selectors.ts:27
     9  web-admin/src/features/scheduled-reports/selectors.ts:32
    13  web-admin/src/features/view-as-user/clearViewedAsUser.ts:25
    14  web-common/src/components/button-group/ButtonGroup.spec.ts:73
     8  web-common/src/components/data-graphic/actions/outline.ts:20
     1  web-common/src/components/data-graphic/marks/segment.ts:65
    25  web-common/src/components/date-picker/datetime.ts:26
     1  web-common/src/components/date-picker/util.ts:4
     2  web-common/src/components/editor/indent-guide/index.ts:59
     3  web-common/src/components/editor/line-status/line-number-gutter.ts:58
     3  web-common/src/components/editor/line-status/line-status-gutter.ts:52
     1  web-common/src/components/editor/line-status/state.ts:35
     2  web-common/src/components/notifications/notificationStore.ts:86
    14  web-common/src/features/dashboards/actions/index.ts:16
     4  web-common/src/features/dashboards/dashboard-utils.ts:13
     1  web-common/src/features/dashboards/dimension-table/dimension-table-export-utils.ts:23
     5  web-common/src/features/dashboards/dimension-table/dimension-table-utils.ts:218
     1  web-common/src/features/dashboards/dimension-table/export-toplist.ts:59
     4  web-common/src/features/dashboards/granular-access-policies/resetSelectedMockUserAfterNavigate.ts:19
     2  web-common/src/features/dashboards/granular-access-policies/updateDevJWT.ts:17
     1  web-common/src/features/dashboards/granular-access-policies/useDashboardPolicyCheck.ts:16
     1  web-common/src/features/dashboards/granular-access-policies/useMockUsers.ts:15
    14  web-common/src/features/dashboards/pivot/util.ts:15
     8  web-common/src/features/dashboards/proto-state/dashboard-url-state.spec.ts:89
     2  web-common/src/features/dashboards/proto-state/dashboard-url-state.ts:99
     5  web-common/src/features/dashboards/selectors.ts:43
     3  web-common/src/features/dashboards/selectors/index.ts:34
    18  web-common/src/features/dashboards/show-hide-selectors.spec.ts:50
     5  web-common/src/features/dashboards/show-hide-selectors.ts:60
     1  web-common/src/features/dashboards/state-managers/actions/dimension-filters.ts:5
     1  web-common/src/features/dashboards/state-managers/state-managers.ts:83
    14  web-common/src/features/dashboards/stores/dashboard-store-defaults.ts:32
     9  web-common/src/features/dashboards/stores/dashboard-stores-test-data.ts:202
    14  web-common/src/features/dashboards/stores/dashboard-stores.spec.ts:66
    35  web-common/src/features/dashboards/stores/dashboard-stores.ts:57
    15  web-common/src/features/dashboards/time-controls/time-control-store.spec.ts:59
    21  web-common/src/features/dashboards/time-controls/time-control-store.ts:82
     2  web-common/src/features/dashboards/time-controls/time-range-store.ts:102
     4  web-common/src/features/dashboards/time-controls/time-range-utils.ts:62
    20  web-common/src/features/dashboards/time-dimension-details/time-dimension-data-store.ts:52
     2  web-common/src/features/dashboards/time-dimension-details/util.ts:7
     9  web-common/src/features/dashboards/time-series/multiple-dimension-queries.ts:78
     4  web-common/src/features/entity-management/file-artifacts-store.ts:56
    44  web-common/src/features/entity-management/resource-invalidations.ts:43
     5  web-common/src/features/entity-management/resource-selectors.ts:43
     1  web-common/src/features/entity-management/resource-status-utils.ts:179
    27  web-common/src/features/entity-management/resources-store.ts:45
     7  web-common/src/features/entity-management/watch-files-client.ts:25
     6  web-common/src/features/feature-flags.ts:9
     1  web-common/src/features/metrics-views/column-selectors.ts:10
     3  web-common/src/features/metrics-views/errors.ts:62
     6  web-common/src/features/metrics-views/metrics-internal-store.ts:91
     1  web-common/src/features/metrics-views/utils.ts:10
     1  web-common/src/features/metrics-views/workspace/editor/create-placeholder.ts:83
     3  web-common/src/features/models/createDashboardFromModel.ts:129
     4  web-common/src/features/models/selectors.ts:52
     1  web-common/src/features/models/utils/Debounce.ts:25
     2  web-common/src/features/models/utils/embedded.ts:35
     3  web-common/src/features/models/utils/get-table-references/index.ts:21
     7  web-common/src/features/models/workspace/inspector/utils.ts:6
     1  web-common/src/features/project/selectors.ts:8
     1  web-common/src/features/project/shorthand-title/index.spec.ts:16
    11  web-common/src/features/sources/createDashboard.ts:66
     1  web-common/src/features/sources/createModel.ts:39
     7  web-common/src/features/sources/group-uris.ts:42
     5  web-common/src/features/sources/modal/file-upload.ts:78
     5  web-common/src/features/sources/selectors.ts:82
     3  web-common/src/features/welcome/is-project-initialized.ts:19
     1  web-common/src/layout/navigation/navigation-utils.ts:20
     1  web-common/src/lib/actions/shift-click-action.ts:37
     5  web-common/src/lib/actions/truncate-middle-text.ts:18
     4  web-common/src/lib/formatters.ts:172
     1  web-common/src/lib/number-formatting/utils/format-with-order-of-magnitude.spec.ts:155
     1  web-common/src/lib/store-utils/local-storage.ts:10
     1  web-common/src/lib/time/grains/index.spec.ts:212
     5  web-common/src/lib/time/ranges/index.ts:66
     1  web-common/src/lib/url-utils.ts:11
     3  web-common/src/metrics/service/ServiceBase.ts:30
     1  web-common/src/runtime-client/fetchWrapper.ts:36
     6  web-common/src/runtime-client/http-request-queue/Heap.ts:19
     9  web-common/src/runtime-client/http-request-queue/HttpRequestQueue.ts:104
     3  web-common/src/runtime-client/http-request-queue/HttpRequestQueueTypes.ts:42
     3  web-common/src/runtime-client/invalidation.ts:35
     2  web-common/src/runtime-client/watch-request-client.ts:48
     1  web-common/vite.config.ts:5
     1  web-local/src/lib/temp/errors/ErrorMessages.ts:7
     1  web-local/src/lib/util/command-click-action.ts:21
     6  web-local/test/ui/utils/dashboardHelpers.ts:135
@bcolloran bcolloran added the Type:Bug Something isn't working label Dec 11, 2023
@bcolloran bcolloran self-assigned this Dec 11, 2023
@bcolloran bcolloran changed the title Make sure we're type checking non-svelte files in CI Make sure we're type checking non-svelte files in CI (TSC checks) Feb 20, 2024
@bcolloran
Copy link
Contributor Author

updated script for TS checks in #4172

@bcolloran bcolloran assigned ericpgreen2 and unassigned bcolloran Feb 28, 2024
@bcolloran
Copy link
Contributor Author

reassigning to @ericpgreen2 -- Eric, it's up to you now. Good luck!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants