Skip to content

arthdetroja01/Lab-5_202001274

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Lab-5_202001274

Name: Arth Detroja

Student ID: 202001274

IT314: Software Engineering

Lab: 05 Static Analysis

Theory

Static Analysis: Static analysis is a method of examining the source code of a software program without executing it. Static analysis can help detect errors, bugs, vulnerabilities, and other quality issues in the code. Static analysis tools can perform various tasks such as checking syntax, style, logic, data flow, control flow, and security. Static analysis can improve the reliability, performance, and maintainability of software by identifying and correcting defects early in the development process.

Static Analysis Tools: Static analysis tools are software tools that analyze the source code of a program without executing it. They can help developers find and fix errors, bugs, vulnerabilities, code smells, and other quality issues in their code. Static analysis tools can also measure various metrics of the code, such as complexity, readability, maintainability, test coverage, and documentation. Static analysis tools can be integrated into the development process as part of the code editor, the version control system, or the continuous integration pipeline. Some examples of static analysis tools are SonarQube, PMD, ESLint, and Pylint.

Link of github repository taken: https://github.com/jazzband/website.git

Tool used for Static Analysis: Pylint

Task 1: Analyzing error in the file db.py in: https://github.com/jazzband/website/tree/main/jazzband

image

Error Analysis:

  • C0114: Missing module docstring (missing-module-docstring)
  • E0401: Unable to import 'flask_redis' (import-error)
  • E0401: Unable to import 'walrus' (import-error)
  • E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
  • C0115: Missing class docstring (missing-class-docstring)
  • C0116: Missing function or method docstring (missing-function-docstring)
  • R1705: Unnecessary "else" after "return" (no-else-return)
  • C0116: Missing function or method docstring (missing-function-docstring)
  • C0116: Missing function or method docstring (missing-function-docstring)
  • C0115: Missing class docstring (missing-class-docstring)
  • W0611: Unused deque imported from collections (unused-import)
  • W0611: Unused contextmanager imported from contextlib (unused-import)
  • W0611: Unused Rollback imported from exceptions (unused-import)

Task 2: Analyzing errors in the file config.py in: https://github.com/jazzband/website/tree/main/jazzband

image

Error Analysis

  • C0114: Missing module docstring (missing-module-docstring)
  • E0401: Unable to import 'decouple' (import-error)
  • E0401: Unable to import 'markdown.extensions.toc' (import-error)
  • E0401: Unable to import 'markdown.extensions.wikilinks' (import-error)
  • E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)

Task 3: Analyzing error in the file mixins.py in: https://github.com/jazzband/website/tree/main/jazzband

image

Error Analysis:

  • C0114: Missing module docstring (missing-module-docstring)
  • E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
  • E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
  • C0115: Missing class docstring (missing-class-docstring)
  • C0116: Missing function or method docstring (missing-function-docstring)
  • E1101: Class 'Syncable' has no 'table' member (no-member)
  • E1101: Class 'Syncable' has no 'update_or_create' member (no-member)
  • R0903: Too few public methods (1/2) (too-few-public-methods)
  • C0116: Missing function or method docstring (missing-function-docstring)
  • W0613: Unused argument 'mapper' (unused-argument)
  • W0613: Unused argument 'connection' (unused-argument)

Task 4: Analyzing error in the file test_login.py in: https://github.com/jazzband/tests

image

Error Analysis:

  • C0114: Missing module docstring (missing-module-docstring)
  • C0116: Missing function or method docstring (missing-function-docstring)

Task 5: Analyzing error in the file env.py in: https://github.com/jazzband/migrations

image

  • C0114: Missing module docstring (missing-module-docstring)
  • E0401: Unable to import 'alembic' (import-error)
  • W0621: Redefining name 'context' from outer scope (line 6) (redefined-outer-name)
  • W0613: Unused argument 'context' (unused-argument)
  • W0613: Unused argument 'revision' (unused-argument)

About

Lab 5: Static Analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published