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

Add several rules regarding type restrictions #518

Conversation

nobodywasishere
Copy link
Contributor

Related to #502.

  • Adds Typing/MacroCallVarTypeRestriction
  • Adds Typing/MethodParamTypeRestriction
  • Adds Typing/MethodReturnTypeRestriction
  • Adds Typing/ProcReturnTypeRestriction

Proc return type is enabled by default as it can lead to issues with passing procs to C, and proc params otherwise need to be typed. The other rules are off by default, and have several configuration options for those who want to use them in different ways (for instance, I can see the stdlib / library shards using the method param / return type rules for public / documented methods, to ensure there isn't breakage when changes are made).

I can add the since_version configs once a review is done.

Copy link
Contributor Author

@nobodywasishere nobodywasishere left a comment

Choose a reason for hiding this comment

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

Should probably also have a config for splat / double splat params

Copy link
Member

@Sija Sija left a comment

Choose a reason for hiding this comment

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

Please open a separate PRs for each rule. It will make the review process easier and be more visible in the changelog.

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