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

ci: Add type check lint to CI #7100

Merged
merged 1 commit into from
Sep 1, 2023
Merged

ci: Add type check lint to CI #7100

merged 1 commit into from
Sep 1, 2023

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Sep 1, 2023

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add the appropiate QA label when dev review is completed
    • needs-qa: PR requires manual QA.
    • No QA/E2E only: PR does not require any manual QA effort. Prior to merging, ensure that you have successful end-to-end test runs in Bitrise.
    • Spot check on release build: PR does not require feature QA but needs non-automated verification. In the description section, provide test scenarios. Add screenshots, and or recordings of what was tested.
  5. Add QA Passed label when QA has signed off (Only required if the PR was labeled with needs-qa)
  6. Add your team's label, i.e. label starting with team- (or external-contributor label if your not a MetaMask employee)

Description

A new lint:tsc command has been added to validate TypeScript types in the project. This lint command uses a separate configuration, tsconfig.lint.ts, which covers just the files that have no type errors. We can expand the type check coverage over time as we fix more type errors.

One additional change was made to fix a TypeScript error that hade an impact on many files. The problem was caused by a TypeScript bug that causes the compiler to fail when it encounters certain unicode characters. Those characters were in a JSON file in the unicode-confusables package. They have been temporarily removed until this TypeScript error can be fixed.

For more details, see microsoft/TypeScript#53519

Issue

No related issue

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@Gudahtt Gudahtt added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-platform labels Sep 1, 2023
@Gudahtt
Copy link
Member Author

Gudahtt commented Sep 1, 2023

@Gudahtt Gudahtt marked this pull request as ready for review September 1, 2023 04:15
@Gudahtt Gudahtt requested a review from a team as a code owner September 1, 2023 04:15
@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (77cb73a) 32.86% compared to head (fae7e29) 32.86%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7100   +/-   ##
=======================================
  Coverage   32.86%   32.86%           
=======================================
  Files        1001     1001           
  Lines       26743    26743           
  Branches     2101     2101           
=======================================
  Hits         8788     8788           
  Misses      17535    17535           
  Partials      420      420           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@tommasini tommasini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!!!!!! LGTM!

@Gudahtt Gudahtt added the No QA Needed Apply this label when your PR does not need any QA effort. label Sep 1, 2023
A new `lint:tsc` command has been added to validate TypeScript types in
the project. This lint command uses a separate configuration,
`tsconfig.lint.ts`, which covers just the files that have no type
errors. We can expand the type check coverage over time as we fix more
type errors.

One additional change was made to fix a TypeScript error that hade an
impact on many files. The problem was caused by a TypeScript bug that
causes the compiler to fail when it encounters certain unicode
characters. Those characters were in a JSON file in the
`unicode-confusables` package. They have been temporarily removed until
this TypeScript error can be fixed.

For more details, see microsoft/TypeScript#53519
@Gudahtt Gudahtt force-pushed the add-type-check-lint-script branch from f4a7696 to fae7e29 Compare September 1, 2023 11:39
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@Gudahtt Gudahtt merged commit 9611c10 into main Sep 1, 2023
@Gudahtt Gudahtt deleted the add-type-check-lint-script branch September 1, 2023 12:04
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2023
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Sep 1, 2023
@metamaskbot metamaskbot added the release-7.8.0 Issue or pull request that will be included in release 7.8.0 label Sep 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed Apply this label when your PR does not need any QA effort. release-7.8.0 Issue or pull request that will be included in release 7.8.0 team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants