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

Test cases in Common Tests is not ignored by default #113

Closed
vkatsuba opened this issue Apr 28, 2021 · 4 comments
Closed

Test cases in Common Tests is not ignored by default #113

vkatsuba opened this issue Apr 28, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request started
Milestone

Comments

@vkatsuba
Copy link
Contributor

Hi All,

Not sure if this correct but by default exported test cases what included into all() function is not ignored. Eg test case hallo(_Config) -> ok. looks like should be ignored if this function is exported and added into group tests etc.

Regards,
--V

@elbrujohalcon
Copy link
Collaborator

Yeah. We tend to add an ignore rule for this to our rebar.config in every project. Maybe it's time to just ignore these things by default already.

@elbrujohalcon elbrujohalcon added this to the 0.4.0 milestone Apr 29, 2021
@elbrujohalcon elbrujohalcon added the enhancement New feature or request label Apr 29, 2021
@elbrujohalcon
Copy link
Collaborator

On the other hand, if you're using a modern-enough version of OTP (one that includes
@paulo-ferraz-oliveira's erlang/otp#2794) you can simply add -behavior(ct_suite). to all your suites and be done with it :)

@elbrujohalcon
Copy link
Collaborator

a modern-enough version of OTP

It's included in OTP 23.2+

@elbrujohalcon
Copy link
Collaborator

@pbrudnick @diegomanuel:
Before OTP 23.2 (where there is no need to ignore anything), the only way I can think to figure out if a module is a common test suite and therefore its functions shouldn't be checked by the unnecessary_function_arguments rule is to check if it's called *_SUITE.

Do you think that's an acceptable ignore rule to add? It will be similar to the one in unused_configuration_options to ignore elvis.config, rebar.config, etc.

What's your take on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request started
Projects
None yet
Development

No branches or pull requests

2 participants