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

Integration of Flow for Static Type Checking #42

Open
wants to merge 1 commit into
base: f24
Choose a base branch
from

Conversation

khalifat3
Copy link
Collaborator

@khalifat3 khalifat3 commented Oct 23, 2024

This pull request integrates Flow static type checker into the test/topics.js module of the NodeBB project. The integration aims to enhance code quality and reliability by catching type mismatches and other common errors at compile time.

Key Changes:

  • Installed flow-bin as a dev dependency to enable static type checking.
  • Created a .flowconfig file to configure the Flow tool according to our project's requirements.
  • Updated test/topics.js to include Flow annotations and conducted an initial run to identify potential type errors.

Results: Running Flow has revealed multiple issues in test/topics.js, indicating areas where our type usage could be corrected to prevent runtime errors.

Screenshots:

  • Command line output showing Flow installation and execution results.
  • Git status indicating the addition of the .flowconfig file.
  • Errors displayed in the IDE with Flow annotations in test/topics.js.
Screen Shot 2024-10-23 at 12 02 05 PM Screen Shot 2024-10-23 at 9 52 41 AM Screen Shot 2024-10-23 at 9 54 20 AM

@khalifat3 khalifat3 self-assigned this Oct 23, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11475563503

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.006%) to 82.686%

Files with Coverage Reduction New Missed Lines %
src/meta/errors.js 1 76.74%
Totals Coverage Status
Change from base Build 11442726769: -0.006%
Covered Lines: 22351
Relevant Lines: 25612

💛 - Coveralls

@Abdallah-Abdaljalil Abdallah-Abdaljalil added the Tools Installation installing tools needed to enhance development label Oct 23, 2024
@khalifat3 khalifat3 requested review from Abdallah-Abdaljalil and kwarraich and removed request for Abdallah-Abdaljalil October 24, 2024 10:20
Copy link
Collaborator

@kwarraich kwarraich left a comment

Choose a reason for hiding this comment

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

installation of the flow tool looks good, and it seems to be working as expected since it passes the tests

@Abdallah-Abdaljalil Abdallah-Abdaljalil added this to the Project 3A milestone Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools Installation installing tools needed to enhance development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants