packages feed

hpc-lcov 1.1.0 → 1.1.1

raw patch · 6 files changed

+49/−47 lines, 6 filesdep ~aesondep ~optparse-applicativedep ~pathnew-uploaderPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson, optparse-applicative, path, path-io, process, text, unordered-containers, yaml

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+# v1.1.1++* Add support for GHC 9.4 + 9.6+* Drop support for GHC < 8.10+ # v1.1.0  * Drop support for GHC < 8.6
− LICENSE
@@ -1,11 +0,0 @@-Copyright 2020 LeapYear--Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:--1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.--2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.--3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ LICENSE.md view
@@ -0,0 +1,11 @@+Copyright © 2023-present Brandon Chinn++Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:++1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.++2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.++3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
README.md view
@@ -1,7 +1,7 @@ # hpc-lcov -[![GitHub Actions](https://img.shields.io/github/workflow/status/LeapYear/hpc-lcov/CI/main)](https://github.com/LeapYear/hpc-lcov/actions?query=branch%3Amain)-[![codecov](https://codecov.io/gh/LeapYear/hpc-lcov/branch/main/graph/badge.svg?token=8TErU2ntw9)](https://codecov.io/gh/LeapYear/hpc-lcov)+[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/brandonchinn178/hpc-lcov/ci.yml?branch=main)](https://github.com/brandonchinn178/hpc-lcov/actions?query=branch%3Amain)+[![codecov](https://codecov.io/gh/brandonchinn178/hpc-lcov/branch/main/graph/badge.svg?token=8TErU2ntw9)](https://codecov.io/gh/brandonchinn178/hpc-lcov) [![Hackage](https://img.shields.io/hackage/v/hpc-lcov)](https://hackage.haskell.org/package/hpc-lcov)  Convert HPC output into `lcov.info` files that can be uploaded to coverage@@ -9,16 +9,12 @@  ## Quickstart -### Stack--1. Run `stack install hpc-lcov`-1. Run your test(s) with coverage, e.g. `stack test --coverage`+1. Download `hpc-lcov` from the releases page or install it from Hackage with your favorite package manager+1. Run your tests with coverage enabled+    * `stack test --coverage`+    * Cabal is not yet supported (https://github.com/brandonchinn178/hpc-lcov/issues/3) 1. Run `hpc-lcov` 1. Upload the generated `lcov.info` file to your coverage service--### Cabal--Coming soon! (https://github.com/LeapYear/hpc-lcov/issues/3)  ## FAQs 
hpc-lcov.cabal view
@@ -1,20 +1,20 @@ cabal-version: >= 1.10 --- This file has been generated from package.yaml by hpack version 0.35.0.+-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack  name:           hpc-lcov-version:        1.1.0+version:        1.1.1 synopsis:       Convert HPC output into LCOV format description:    Convert HPC output into LCOV format. category:       Control-homepage:       https://github.com/LeapYear/hpc-lcov#readme-bug-reports:    https://github.com/LeapYear/hpc-lcov/issues-author:         Brandon Chinn <brandon@leapyear.io>-maintainer:     Brandon Chinn <brandon@leapyear.io>+homepage:       https://github.com/brandonchinn178/hpc-lcov#readme+bug-reports:    https://github.com/brandonchinn178/hpc-lcov/issues+author:         Brandon Chinn <brandonchinn178@gmail.com>+maintainer:     Brandon Chinn <brandonchinn178@gmail.com> license:        BSD3-license-file:   LICENSE+license-file:   LICENSE.md build-type:     Simple extra-source-files:     README.md@@ -23,7 +23,7 @@  source-repository head   type: git-  location: https://github.com/LeapYear/hpc-lcov+  location: https://github.com/brandonchinn178/hpc-lcov  library   exposed-modules:@@ -52,18 +52,18 @@       exe   ghc-options: -Wall   build-depends:-      aeson >=1.1.2.0 && <3+      aeson >=1.5.5.1 && <3     , base >=4.9 && <5     , containers >=0.5.7.1 && <0.7     , hpc >=0.6.0.3 && <0.7     , hpc-lcov-    , optparse-applicative >=0.13.2.0 && <0.18-    , path >=0.6.0 && <0.10-    , path-io >=1.2.2 && <1.8-    , process >=1.4.3.0 && <1.7-    , text >=1.2.2.2 && <1.4-    , unordered-containers >=0.2.8.0 && <0.3-    , yaml >=0.8.24 && <0.12+    , optparse-applicative >=0.15.1.0 && <0.18+    , path >=0.7.0 && <0.10+    , path-io >=1.6.2 && <2+    , process >=1.6.9.0 && <1.7+    , text >=1.2.4.1 && <2.1+    , unordered-containers >=0.2.13.0 && <0.3+    , yaml >=0.11.5.0 && <0.12   default-language: Haskell2010   if impl(ghc >= 8.0)     ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances@@ -80,6 +80,8 @@   hs-source-dirs:       test   ghc-options: -Wall+  build-tool-depends:+      tasty-discover:tasty-discover   build-depends:       base >=4.9 && <5     , containers >=0.5.7.1 && <0.7
src/Trace/Hpc/Lcov.hs view
@@ -20,10 +20,10 @@  -- | Generate LCOV format from HPC coverage data. generateLcovFromTix ::-  -- | Mapping from module name to file info-  [(String, FileInfo)] ->-  [TixModule] ->-  LcovReport+  [(String, FileInfo)]+  -- ^ Mapping from module name to file info+  -> [TixModule]+  -> LcovReport generateLcovFromTix moduleToMix = LcovReport . map mkFileReport . mergeTixModules   where     mkFileReport tixModule =@@ -41,11 +41,10 @@             , fileReportLines = mergeLineReports $ overTixMix parseLineReport             } -{- | Merge all tix modules representing the same module.-- If tix modules are duplicated, we are treating them as being hit in different test suites, so all- tick counts should be added together.--}+-- | Merge all tix modules representing the same module.+--+--  If tix modules are duplicated, we are treating them as being hit in different test suites, so all+--  tick counts should be added together. mergeTixModules :: [TixModule] -> [TixModule] mergeTixModules = Map.elems . Map.fromListWith mergeTixs . map (tixModuleName &&& id)   where@@ -105,5 +104,5 @@ hpcPosLine :: HpcPos -> Int hpcPosLine = (\(startLine, _, _, _) -> startLine) . fromHpcPos -maxBy :: Ord b => (a -> b) -> a -> a -> a+maxBy :: (Ord b) => (a -> b) -> a -> a -> a maxBy f a b = maximumBy (comparing f) [a, b]