Thanks to visit codestin.com
Credit goes to github.com

Skip to content

joan38/mill-tpolecat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mill-tpolecat

Build Status License Latest Version

scalac options for the enlightened

mill-tpolecat is an extension for the Mill build tool which configures your scalac options according to @tpolecat's recommendations where possible, according to the Scala version you are using.

This should help to ensure that you are getting the greatest possible benefit from the Scala compiler's many linting options.

It has been tested with version 0.3.6 of mill.

Usage

Import the module in build.sc using mill's $ivy import syntax, and extend TpolecatModule in your build definition:

// build.sc

import $ivy.`io.github.davidgregory084::mill-tpolecat:0.1.2`

import io.github.davidgregory084.TpolecatModule

object core extends TpolecatModule {
  def scalaVersion = "2.12.8"
}

If necessary you can filter out scalac options that are not appropriate for your project:

// build.sc

import $ivy.`io.github.davidgregory084::mill-tpolecat:0.1.2`

import io.github.davidgregory084.TpolecatModule

object core extends TpolecatModule {
  def scalaVersion = "2.12.8"
  def scalacOptions = T { super.scalacOptions().filterNot(Set("-Yno-imports")) }
}

Caveat

I can't promise this plugin will work for old minor releases of Scala. It has been tested with:

  • 2.13.0
  • 2.12.8
  • 2.11.12
  • 2.10.7

License

All code in this repository is licensed under the Apache License, Version 2.0. See LICENSE.

About

scalac options for the enlightened

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%