0% found this document useful (0 votes)
34 views3 pages

Arshad Sofware Reengineering

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 3

Assignment no 1

ID 12234
Name Arshad Khan
Subject Software Reengineering
Submitted to Mam Zartashia Najaf

Title: Source Code Analysis Tool in Flutter Development

Introduction:

The process of examining the source code of a software application or program without actually
executing it. The goal of source code analysis is to identify potential issues, vulnerabilities, and
defects in the codebase, as well as to ensure that the code adheres to coding standards and best
practices. This analysis is typically performed by automated tools or manual review by software
developers.

Choosing Project:

For this analysis, we chose the open-source Flutter project calculator from GitHub.

Link:https://github.com/Mukhiddin3888/sqlliteflutterapp/tree/main

Source Code Analysis Tool Selection:

1. flutter analyze:
 Purpose: This tool performs static analysis on the Flutter project, identifying potential
issues such as type errors, unused imports, and other code quality concerns.
 Integration:
 Included as part of the Flutter SDK.
 Run using the command flutter analyze in the project directory.
 Results:
 Identified and documented issues related to type safety and unused variables.

Integration and Setup:

1. flutter analyze:
 Run the flutter analyze command in the terminal.
 Reviewed the generated report for potential issues.
 Documented identified issues and their impact on code quality.
Run Analysis: Executed the source code analysis tools and documented the following:

flutter analyze:
○ Output of static analysis, including warnings and potential errors.

Screen shots:

Errors Detected:
○ Local variable:

The variable named 'database' is declared but not used in the code.

○ Use 'const' with the Constructor:

The constructor call is not using the const keyword.

Result:

● If the variable is not intended for use, you may consider removing it. If it's meant to be used
later in your code, make sure to utilize it to avoid unnecessary declarations.
● Consider using const with the constructor call if applicable. This can improve performance
by using compile-time constants.
Conclusion:

This solution document outlines the process of integrating and utilizing source code analysis tools
in Flutter development. The selected tools, flutter analyze proved effective in identifying and
addressing issues related to code quality and consistency. The experience gained through this
analysis underscores the importance of incorporating source code analysis tools into the
development workflow for better code maintainability and overall project success.

You might also like