Skip to content

[fix] Rename cmd modules to avoid conflict with built-in cmd #4464

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

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

gamesh411
Copy link
Collaborator

Rename the module defined in 'codechecker_common/cmd' to 'codechecker_common/cli_commands' (as there is already a cli.py file in the same folder) in order to avoid ambiguity with Python's built-in cmd module when using pdb.set_trace(). The new name better reflects its purpose and eliminates potential naming conflicts.

Rename all 'cmd' directories to 'cli' for consistency with 'codechecker_common/cli_commands'.

@gamesh411
Copy link
Collaborator Author

BTW I'm up for discussing what a good module name would be:
I started with 'commandline', then considered 'command_line' (because of grammar :D ), and arrived at 'cli'. But cli.py was already in the codechecker_common directory, so I opted for 'codechecker_cli' for just that folder.

Copy link
Contributor

@bruntib bruntib left a comment

Choose a reason for hiding this comment

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

This is a nice improvement for sake of debugging, thanks!
Could you, please, fix the merge conflicts? Otherwise looks good.

@gamesh411 gamesh411 force-pushed the fix-rename-root-cmd-module branch 2 times, most recently from 27da1a7 to 1e966ec Compare April 2, 2025 20:19
Rename the module defined in 'codechecker_common/cmd' to
'codechecker_common/cli_commands' (as there is already a cli.py file
in the same folder) in order to avoid ambiguity with Python's
built-in cmd module when using `pdb.set_trace()`. The new name
better reflects its purpose and eliminates potential naming
conflicts.

Rename all 'cmd' directories to 'cli' for consistency with
'codechecker_common/cli_commands'.
@gamesh411 gamesh411 force-pushed the fix-rename-root-cmd-module branch from 1e966ec to fc8501c Compare April 2, 2025 20:23
@gamesh411 gamesh411 merged commit 4467991 into Ericsson:master Apr 2, 2025
7 of 8 checks passed
@gamesh411 gamesh411 deleted the fix-rename-root-cmd-module branch April 2, 2025 20:49
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.

2 participants