derrickoswald / derrickoswald/CIMSpark

codebase improvements

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
19
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The wart remover (http://www.wartremover.org/) and scalastyle (http://www.scalastyle.org/) show a number of places where the codebase could be improved.

Some of the wart remover rules are stupid, like not allowing default method parameters - which is one of the best features of Scala, but it is what it is.

This issue tracks the changes that are needed to bring the codebase into compliance with a subset of the wart remover and scalastyle checks.

To work on this issue, in the CIMSpark pom.xml, add the wartremover compiler plugin to the net.alchim31.maven:scala-maven-plugin within the configuration, add wartremover options to the scala compiler args and comment out the fatal warnings flag:
```

net.alchim31.maven
scala-maven-plugin
${version.dependency.scala-maven-plugin}

${version.dependency.scala}
${version.dependency.scalalibrary}

false



org.wartremover
wartremover_${version.dependency.scalalibrary}
${version.dependency.wartremover}


true

-deprecation
-feature
-unchecked
-Ywarn-dead-code
-Ywarn-unused

-Xlint:_
-target:jvm-1.8


-P:wartremover:only-warn-traverser:org.wartremover.warts.AsInstanceOf

-P:wartremover:only-warn-traverser:org.wartremover.warts.EitherProjectionPartial
-P:wartremover:only-warn-traverser:org.wartremover.warts.IsInstanceOf
-P:wartremover:only-warn-traverser:org.wartremover.warts.NonUnitStatements
-P:wartremover:only-warn-traverser:org.wartremover.warts.Null
-P:wartremover:only-warn-traverser:org.wartremover.warts.OptionPartial
-P:wartremover:only-warn-traverser:org.wartremover.warts.Product
-P:wartremover:only-warn-traverser:org.wartremover.warts.Return
-P:wartremover:only-warn-traverser:org.wartremover.warts.Serializable
-P:wartremover:only-warn-traverser:org.wartremover.warts.StringPlusAny
-P:wartremover:only-warn-traverser:org.wartremover.warts.Throw
-P:wartremover:only-warn-traverser:org.wartremover.warts.TraversableOps
-P:wartremover:only-warn-traverser:org.wartremover.warts.TryPartial


...
```
Recompile some module and then work on resolving the WARNINGs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the CIMSpark pom.xml by reviewing the scala-maven-plugin configuration and the listed Wart Remover compiler arguments. Recompile a module to surface warnings, then inspect the affected Scala code and work through the warnings from the enabled checks. Done means the selected Wart Remover and Scalastyle checks are enabled and the resulting warnings have been resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala, spark
Domain
build-system, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.