Skip to content

Conversation

@douglasdcm
Copy link

@douglasdcm douglasdcm commented Sep 14, 2025

UPDATE: I pushed other changes today that allowed me to run the tool.

Hi, congratulations for the good job! The tool is promising

This MR

  • Adds a naive implementation to allow the user to ignore undesired folders. Node I did it just to solve my problem, but I suggest to add a new parameter in the CLI to allow it
  • Updates the .gitignore to ignore Python garbage properly
  • Removes __pycache__ folder
  • Adds tqdm to setup.pyand use it in src/code_quality_analyzer/architectural_smell_detector.py to report the execution progress
  • Updates the installation process
  • Adds UNUSED_PARAMETERS_THRESHOLD to config.yaml to fix a KeyError

Notes: After ignoring the undesired folders I ran the tool in your own code. It was found 9 Python files, so I supposed the execution would be vary fast, but it froze in this step. I'm very interested in this tool, but basically, I couldn't use it yet.

analyze_code_quality . --config code_quality_config.yaml

(...)
Code Smell Analysis Summary:
--------------------------
Files analyzed: 9
Files with errors: 0
Success rate: 100.0%
    
Analyzing Architectural Smells...

Starting architectural smell analysis for directory: .
2025-09-14 02:41:04,251 - code_quality_analyzer.architectural_smell_detector - INFO - Analyzing directory structure: .
  0%|                                                                                                                                   | 0/8 [00:00<?, ?it/s]

Other suggestions

  • Add a test-requirements.txt file to host test libraries like pytest
  • Remove pytest from setup.py
  • Publish the tool in pip repository. I would be easier/faster to install it. References here
  • Run a linter and a formatter to find and fix issues in the code. Check to logs of flake8 bellow.
  • Move the argparse.ArgumentParser to a single place to make it easier to add new parameters to the tool
  • Run the tool on its own code to assess it and find issues in the code

flake8 log

flake8 --exclude="*venv"
./docs/source/conf.py:67:26: W292 no newline at end of file
./setup.py:22:80: E501 line too long (111 > 79 characters)
./setup.py:38:2: W292 no newline at end of file
./src/code_quality_analyzer/__init__.py:1:1: F401 '.structural_smell_detector.StructuralSmellDetector' imported but unused
./src/code_quality_analyzer/__init__.py:2:1: F401 '.architectural_smell_detector.ArchitecturalSmellDetector' imported but unused
./src/code_quality_analyzer/__init__.py:3:1: F401 '.code_smell_detector.CodeSmellDetector' imported but unused
./src/code_quality_analyzer/__init__.py:4:1: F401 '.main.analyze_project' imported but unused
./src/code_quality_analyzer/__init__.py:4:34: W292 no newline at end of file
./src/code_quality_analyzer/architectural_smell_detector.py:16:1: E302 expected 2 blank lines, found 1
./src/code_quality_analyzer/architectural_smell_detector.py:25:1: E302 expected 2 blank lines, found 1
./src/code_quality_analyzer/architectural_smell_detector.py:33:80: E501 line too long (83 > 79 characters)
./src/code_quality_analyzer/architectural_smell_detector.py:34:80: E501 line too long (92 > 79 characters)
./src/code_quality_analyzer/architectural_smell_detector.py:35:80: E501 line too long (88 > 79 characters)
./src/code_quality_analyzer/architectural_smell_detector.py:36:80: E501 line too long (81 > 79 characters)
./src/code_quality_analyzer/architectural_smell_detector.py:37:80: E501 line too long (89 > 79 characters)
./src/code_quality_analyzer/architectural_smell_detector.py:39:80: E501 line too long (98 > 79 characters)
(...)

Remove useless things like __pycache__ folder and .pyc files
Update the installation process
Add a naive implementation to exclude directories like venv, tox...
Add tqdm to inform the progress of each stage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant