Installed and ran flow (static analysis tool) #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For this PR, I successfully installed and ran the static analysis tool, Flow, which is a static type checker for javascript.
Below is my concrete evidence that I successfully installed the tool through trackable file changes demonstrating that extra files/NPM packages were installed:
See the txt file included in this commit titled "flow_terminal_output.txt" which serves as my artifact that demonstrates that I successfully ran the tool on the repository. Additionally, see below for a screenshot of the output of the tool:
Answers to questions from writeup:
This static analysis tool required some substantial time-investment a priori, as it required me to download and install several dependencies and packages, modify certain files (shown above), and ensure that the proper files were being checked over. The main strength of this tool is that it can alert the programmer to type errors in their JS code while the weakness is that it is not dynamically checking code as the programmer is producing it, therefore, it's possible for errors to go uncatched until the programmer explicitly calls this static tool. Quantitativelty, this tool can help help programmers catch a greater number of bugs/type issues and can reduce the amount of time needed to debug/refactor code. Qualitatively, this tool can help programmers avoid building up technical debt ny repeatedly employing this static analysis tool throughout the development process and can help make the debugging/refactoring process less stressful.
What types of problems are you hoping your tooling will catch? What types of problems does this particular tool catch?'
I am hoping that this tool will catch type errors in my repo. This particular tool catches type errors in JS code.
What types of customization are possible or necessary?
The documentation says the programmer can dictate which files are checked by flow with the
// @flow
snippet. Additionally, flow can be integrated with other static type checkers/linters such as ESLint.How can/should this tool be integrated into a development process?
This tool should be integrated into a development process at all stages ranging from initial development to debugging and refactoring. During initial development, this tool should be used to minimize the build up of technical debt and bugs. During the debugging/refactoring process, this tool should be used to debug/refactor with efficiency and confidence.
Are there many false positives? False negatives? True positive reports about things you don’t care about?
Thus far, it is unclear at the exact rates for these metrics; however, it is important that static type checkers minimize their false positives to ensure that programmers will still pay them attention (rather than tuning them out). The Flow documentation does cite that it does fall prey to some false positives due to " [refinement invalidation]"(https://flow.org/en/docs/lang/refinements/#toc-refinement-invalidations).