-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fix #268: New Rule: No Specs #271
Conversation
Avoid `-spec` attributes. | ||
|
||
This rule is meant to be used on header files only. | ||
Defining specs in public header files (especially those intended for inclusion via `-include_lib(...)`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the term "typespec" instead of just "spec" but I'm not sure there's a set "rule"/"recommendation" for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me, typespec refers to the -type
spec ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specification for functions seems to be the official term ™️
https://www.erlang.org/doc/reference_manual/typespec.html#specifications-for-functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But… we already used the word "spec" here: https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_style/no_spec_with_records.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're on a roll, baby!
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
No description provided.