cabal-audit (empty) → 0.1.0.0
raw patch · 4 files changed
+68/−0 lines, 4 filesdep +Cabaldep +HTTPdep +basesetup-changed
Dependencies added: Cabal, HTTP, base, directory, filepath, optparse-applicative
Files
- LICENSE +21/−0
- Setup.hs +2/−0
- cabal-audit.cabal +26/−0
- src/Main.hs +19/−0
+ LICENSE view
@@ -0,0 +1,21 @@+The MIT License (MIT)++Copyright (c) 2013 Joel Taylor++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+THE SOFTWARE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ cabal-audit.cabal view
@@ -0,0 +1,26 @@+name: cabal-audit+version: 0.1.0.0+synopsis: Check how up-to-date your .cabal dependencies are.+description: Check how up-to-date your .cabal dependencies are.+homepage: https://github.com/joelteon/cabal-audit.git+license: MIT+license-file: LICENSE+author: Joel Taylor+maintainer: me@joelt.io+category: Distribution+build-type: Simple+cabal-version: >=1.8++executable cabal-audit+ hs-source-dirs: src+ main-is: Main.hs+ build-depends: base ==4.6.*,+ Cabal == 1.16.*,+ directory == 1.2.*,+ filepath == 1.3.*,+ HTTP == 4000.2.*,+ optparse-applicative == 0.5.*++source-repository head+ type: git+ location: https://github.com/joelteon/cabal-audit.git
+ src/Main.hs view
@@ -0,0 +1,19 @@+import Audit+import Audit.Options+import Audit.Panic+import Data.List+import System.Directory+import System.FilePath++locateCabalFiles :: Opts -> IO [FilePath]+locateCabalFiles (Opts cf) = case cf of Nothing -> guess+ Just f -> return [f]+ where guess = do cont <- getDirectoryContents "."+ return $ filter (\f -> takeExtension f == ".cabal") cont++main :: IO ()+main = do opts <- execParser fullOpts+ file <- locateCabalFiles opts+ case file of [f] -> audit f+ [] -> panic "No .cabal file found! Please specify one using -f FILE"+ xs -> panic $ "Multiple cabal files found: " ++ intercalate ", " xs ++ ". Please specify one using -f FILE"