- 
                Notifications
    You must be signed in to change notification settings 
- Fork 160
provide possibility to set up data dir(Rebased to newest version) #366
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
          
     Merged
      
      
    
  
     Merged
                    Changes from 2 commits
      Commits
    
    
            Show all changes
          
          
            4 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      332744a
              
                Merge pull request #5 from scoverage/main
              
              
                pzhong-livongo 1839027
              
                Allow for overriding location for coverage data and report
              
              
                pzhong-livongo 4324103
              
                Update src/main/scala/scoverage/ScoverageKeys.scala
              
              
                pzhong-livongo 58ae1b3
              
                Update ScoverageSbtPlugin.scala
              
              
                pzhong-livongo File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| version := "0.1" | ||
|  | ||
| scalaVersion := "2.13.6" | ||
|  | ||
| libraryDependencies += "org.specs2" %% "specs2-core" % "4.12.10" % "test" | ||
|  | ||
| coverageDataDir := target.value / "custom-test" | ||
|  | ||
| coverageMinimum := 80 | ||
|  | ||
| coverageFailOnMinimum := true | ||
|  | ||
| resolvers ++= { | ||
| if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) | ||
| Seq(Resolver.sonatypeRepo("snapshots")) | ||
| else Seq.empty | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1 @@ | ||
| sbt.version=1.5.3 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| val pluginVersion = sys.props.getOrElse( | ||
| "plugin.version", | ||
| throw new RuntimeException( | ||
| """|The system property 'plugin.version' is not defined. | ||
| |Specify this property using the scriptedLaunchOpts -D.""".stripMargin | ||
| ) | ||
| ) | ||
|  | ||
| addSbtPlugin("org.scoverage" % "sbt-scoverage" % pluginVersion) | ||
|  | ||
| resolvers ++= { | ||
| if (pluginVersion.endsWith("-SNAPSHOT")) | ||
| Seq(Resolver.sonatypeRepo("snapshots")) | ||
| else | ||
| Seq.empty | ||
| } | 
        
          
          
            6 changes: 6 additions & 0 deletions
          
          6 
        
  src/sbt-test/scoverage/data-dir/src/main/scala/GoodCoverage.scala
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| object GoodCoverage { | ||
|  | ||
| def sum(num1: Int, num2: Int) = { | ||
| num1 + num2 | ||
| } | ||
| } | 
        
          
          
            13 changes: 13 additions & 0 deletions
          
          13 
        
  src/sbt-test/scoverage/data-dir/src/test/scala/GoodCoverageSpec.scala
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import org.specs2.mutable._ | ||
|  | ||
| /** | ||
| * Created by tbarke001c on 7/8/14. | ||
| */ | ||
| class GoodCoverageSpec extends Specification { | ||
|  | ||
| "GoodCoverage" should { | ||
| "sum two numbers" in { | ||
| GoodCoverage.sum(1, 2) mustEqual 3 | ||
| } | ||
| } | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # run scoverage | ||
| > clean | ||
| > coverage | ||
| > test | ||
| > coverageReport | ||
| $ exists target/custom-test/scoverage-data | ||
| $ exists target/custom-test/scoverage-report | 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.