Skip to content

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

@rodoherty1

Description

@rodoherty1

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions