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

Codacy should not forbid the use of head or last on scala collections in Unit Tests #26

Open
rodoherty1 opened this issue Oct 16, 2017 · 0 comments

Comments

@rodoherty1
Copy link
Contributor

Expected behaviour:

The use of .head or .last may yield an exception if the collection is empty.
In unit tests, however, head and last should perhaps be permitted.
Codacy flags the use of head and last in Unit Tests as a slide in code quality.

Actual behaviour:

Codacy should perhaps allow *.spec to use .head and .last without flagging these as a slide in code quality.

Steps to reproduce behaviour:

It should be possible to obtain a codacy report from the sbt shell:

$ sbt
> clean
> coverage
> test
> coverageReport
> coverageAggregate
> codacyCoverage

This github issue depends on completion of Issue 25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant