Skip to content
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

New rule: file name and class name match #75

Open
prajapati93 opened this issue Nov 1, 2023 · 0 comments
Open

New rule: file name and class name match #75

prajapati93 opened this issue Nov 1, 2023 · 0 comments

Comments

@prajapati93
Copy link
Contributor

prajapati93 commented Nov 1, 2023

Guideline: File name and class name should be same.

Why it is recommended to keep the file name same as class name?

  • Having the same name for the file and the class simplifies the process of locating the code for a specific class. This convenience arises from the fact that you can directly search for the file bearing the identical name as the class.
  • When the file name and class name differ, there is a potential risk of opening an incorrect file when an individual is attempting to edit the code for a specific class. Such a situation may result in errors.

Solution: Always keep the file name same as class name.
For example: file name: trans_c.sv

 class trans_c;

 endclass : trans_c

Expected output:

Capture

@prajapati93 prajapati93 changed the title fl_name_cl_name New rule: file name and class name match Nov 6, 2023
prajapati93 added a commit to prajapati93/Mehul_pyslint that referenced this issue Dec 4, 2023
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

No branches or pull requests

1 participant