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

variable to skip package name checks #941

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

gburanov
Copy link
Contributor

It is a pity that two functionalities are merged together in the rule rule.var-naming - checking variable and package naming.

In our company we find variable naming check very useful, but we do not want to check for packages naming.

Therefore I propose to add option to skip package name checks

Category: "naming",
})
if !r.skipPackageNameChecks {
// Package names need slightly different handling than other names.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could factor-out package checks into a method to get a simpler to read Apply method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@chavacava
Copy link
Collaborator

HI @gburanov, thanks for the PR, I've left some comments in the code

@chavacava
Copy link
Collaborator

@gburanov Please also:

  1. update README.md and RULES_DESCRIPTIONS.md to document the new parameter.
  2. Add testcases to check the parameter is working as expected

@gburanov
Copy link
Contributor Author

@chavacava I made the changes you suggested

@chavacava chavacava merged commit 782f0f1 into mgechev:master Nov 30, 2023
4 checks passed
@chavacava
Copy link
Collaborator

Thanks @gburanov !

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