packages feed

tomlcheck 0.1.0.19 → 0.1.0.23

raw patch · 10 files changed

+83/−268 lines, 10 filesdep −tomlcheckdep ~base

Dependencies removed: tomlcheck

Dependency ranges changed: base

Files

− .travis.yml
@@ -1,67 +0,0 @@------sudo: false-language: default-cache:-  directories:-    - $HOME/.stack-addons:-  apt:-    packages:-      - libgmp3-dev-matrix:-  include:--    # Linux-    - env: TARGET=x86_64-unkown-linux-gnu--    # OS X-    - env: TARGET=x86_64-apple-darwin-      os: osx--before_install:-  - mkdir -p ~/.local/bin-  - export PATH=$HOME/.local/bin:$PATH-  - |-    if [ `uname` = "Darwin" ]-    then-      curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin-    else-      curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'-    fi-  - chmod a+x ~/.local/bin/stack--install:-  - stack --no-terminal --install-ghc test --only-dependencies-  - stack install hlint weeder--script:-  - stack update-  - stack --no-terminal build --haddock --no-haddock-deps-  - hlint .-  - weeder .-  - |-    if [ `uname` = "Darwin" ]-    then-      export BINPATH="$(find . -name tomlcheck -perm 755 | tail -n1)"-    else-      export BINPATH="$(find -name tomlcheck -executable | tail -n2 | head -n1)"-    fi-  - echo $BINPATH-  - mv $BINPATH tomlcheck-$TARGET-  - ls tomlcheck-$TARGET-  - curl -sL https://raw.githubusercontent.com/vmchale/tomlcheck/master/sh/check | sh -s--deploy:-  api_key:-    secure: "j9WeKTBKsnRmrUqBEVfX1itilQ2bfrBb7yIVir4BsBksmwkozc7eNpBFvBi+nAVyZrEouJUi3RSU4UMoO3otIqKPsRpC1pV5+GlNV1Q0yrVQn9+Xi4wzrinzWJuLrFUn3c1yhUAue/XTTBDS7IZHUYRus9Fukr+QAIHjTWxXXX53n1r1OaKR/rcsN84yTFG71UjL60hV/99YE6GLtXvcOCaOgkrkK6N2xutvVYUyTB6U9n2UW8GruiWzB18gvC0TBYg3Sn/311U1gcmxCE0OUdD07grRTaTHnbC3btpaAEWnw8CAZeBQDbulEIFcmtoBeXN9rtx5Q+u6MRzQxGAh9p2ZbItdlm9Bg7PkCTWbPR+soNcw599CGTVLXipfnmkAExT+oo08MIp4qKj4IohHQhMRaUGr0z3aeubrRiVZA85KKB2SzQdYYY6vRDeisduCszlZ90odygvJ9DVcH9YtFY75nj8Vbdpgldzh7IjIgO1WaAizxy9IZZysh9NSRXdfzwixtwJ8p9qskwrg0qapa7t+tOk4GqFJFhcHhjDorFACsDSfayoJ50kbPCwMD3ZsXNFnPtFtQjOLgj8tXVz1EovrMIuj6oFXu6wFK9He5CUa8S9fgmR+GWOKE+GgGgWziC8CSZO3xr9KtwIUYT4Jw7zdX1ODDmJW39Hm6Mi+8AQ="-  file: tomlcheck-$TARGET-  on:-    tags: true-  provider: releases-  skip_cleanup: true--branches:-  only:-    - master-    - /\d+\.\d+\.\d+\.\d+.*$/
− Justfile
@@ -1,32 +0,0 @@-tokei:-    @tokei -e README.md -e TODO.md -e data/ -e Justfile . .travis.yml--clean:-    sn c .--next:-    @export VERSION=$(cat tomlcheck.cabal | grep -P -o '\d+\.\d+\.\d+\.\d+' tomlcheck.cabal | head -n1 | awk -F. '{$NF+=1; print $0}' | sed 's/ /\./g') && echo $VERSION && sed -i "2s/[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/$VERSION/" tomlcheck.cabal && sed -i "4,8s/[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/$VERSION/" sh/check-    git commit -am "for release"--bench:-    bench "tomlcheck --file data/sample.toml"--upload:-    rm -rf dist/-    cabal sdist-    cabal upload $(fd '.tar.gz$' -IH) --publish--install:-    cabal new-build -O2-    cp $(fd -IH 'tomlcheck$' | tail -n1) ~/.local/bin--release:-    git tag "$(grep -P -o '\d+\.\d+\.\d+\.\d+' tomlcheck.cabal | head -n1)"-    git push origin --tags-    git tag -d "$(grep -P -o '\d+\.\d+\.\d+\.\d+' tomlcheck.cabal | head -n1)"--name:-    github-release edit -s $(cat .git-token) -u vmchale -r tomlcheck -n "$(madlang run ~/programming/madlang/releases/releases.mad)" -t "$(grep -P -o '\d+\.\d+\.\d+\.\d+' tomlcheck.cabal | head -n1)"--check:-    git diff master origin/master
README.md view
@@ -32,5 +32,5 @@ Add the following your `.travis.yml` file to check a `.toml` file:  ```yaml-  - curl -sL https://raw.githubusercontent.com/vmchale/tomlcheck/master/sh/check | sh -s+  - curl -sL https://raw.githubusercontent.com/vmchale/tomlcheck/master/sh/check | sh -s Config.toml ```
app/Main.hs view
@@ -1,6 +1,36 @@-module Main where+{-# LANGUAGE DataKinds         #-}+{-# LANGUAGE DeriveGeneric     #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeOperators     #-} -import Toml.Checker (exec)+module Main+    ( main+    ) where +import           Control.Monad   (zipWithM)+import qualified Data.Text.IO    as TIO+import           GHC.Generics    (Generic)+import           Options.Generic+import           System.Exit     (ExitCode (..), exitWith)+import           Text.Megaparsec (parseErrorPretty)+import           Text.Toml       (parseTomlDoc)++newtype Program = Program { file :: [FilePath] <?> "Path to file to be checked." }+    deriving (Generic)++programModifiers :: Modifiers+programModifiers = defaultModifiers { shortNameModifier = firstLetter }++instance ParseRecord Program where+    parseRecord = parseRecordWithModifiers programModifiers+ main :: IO ()-main = exec+main = do+    x <- getRecord "Command-line wrapper around htoml"+    let paths = unHelpful $ file x+    contents <- traverse TIO.readFile paths+    case zipWithM parseTomlDoc paths contents of+        Right _ -> pure ()+        Left e  -> do+            putStrLn $ parseErrorPretty e+            exitWith (ExitFailure 1)
− appveyor.yml
@@ -1,36 +0,0 @@------build: off--before_test:-  - set PATH=C:\Program Files\Git\mingw64\bin;%PATH%--  - curl -sS -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386-  - 7z x stack.zip stack.exe--clone_folder: "c:\\stack"-environment:-  global:-    STACK_ROOT: "c:\\sr"--test_script:-  - stack setup > nul-  - stack update-  - echo "" | stack --no-terminal install-  - ps: Get-ChildItem . -name -recurse tomlcheck.exe-  - ps: Copy-Item c:\stack\.stack-work\install\e6126bd7\bin\tomlcheck.exe tomlcheck-x86_64-pc-windows.exe-  - ps: Push-AppveyorArtifact tomlcheck-x86_64-pc-windows.exe--deploy:-  artifacts: tomlcheck-x86_64-pc-windows.exe-  provider: GitHub-  on:-    appveyor_repo_tag: true-  auth_token:-    secure: 0qzMr6xmEwRoj/9TJOgDuW/LXWfGVM/4A7kvAXGe0BAwWCF13AWE2SARrYkyc3ji--branches:-  only:-    # Release tags-    - master-    - /\d+\.\d+\.\d+\.\d+.*$/
cabal.project.local view
@@ -1,2 +1,2 @@-optimization: 1-constraints: tomlcheck +development +optimize+optimization: 2+constraints: tomlcheck +development
− sh/check
@@ -1,11 +0,0 @@-#!/usr/bin/env sh-if [ "$(uname)" = "Darwin" ]-then-    wget https://github.com/vmchale/tomlcheck/releases/download/0.1.0.19/tomlcheck-x86_64-apple-darwin -O tomlcheck-    chmod a+x tomlcheck-    ./tomlcheck --file data/sample.toml-else-    wget https://github.com/vmchale/tomlcheck/releases/download/0.1.0.19/tomlcheck-x86_64-unkown-linux-gnu -O tomlcheck-    chmod a+x tomlcheck-    ./tomlcheck --file data/sample.toml-fi
− src/Toml/Checker.hs
@@ -1,36 +0,0 @@-{-# LANGUAGE DataKinds         #-}-{-# LANGUAGE DeriveGeneric     #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeOperators     #-}--module Toml.Checker-    ( exec-    ) where--import           Control.Monad   (zipWithM)-import qualified Data.Text.IO    as TIO-import           GHC.Generics    (Generic)-import           Options.Generic-import           System.Exit     (ExitCode (..), exitWith)-import           Text.Megaparsec (parseErrorPretty)-import           Text.Toml       (parseTomlDoc)--newtype Program = Program { file :: [FilePath] <?> "Path to file to be checked." }-    deriving (Generic)--programModifiers :: Modifiers-programModifiers = defaultModifiers { shortNameModifier = firstLetter }--instance ParseRecord Program where-    parseRecord = parseRecordWithModifiers programModifiers--exec :: IO ()-exec = do-    x <- getRecord "Command-line wrapper around htoml"-    let paths = unHelpful $ file x-    contents <- traverse TIO.readFile paths-    case zipWithM parseTomlDoc paths contents of-        Right _ -> pure ()-        Left e  -> do-            putStrLn $ parseErrorPretty e-            exitWith (ExitFailure 1)
stack.yaml view
@@ -1,11 +1,8 @@-resolver: nightly-2017-10-13+---+resolver: lts-11.4 packages:   - './' extra-deps:-  - megaparsec-6.2.0-  - htoml-megaparsec-1.0.1.11-  - composition-prelude-0.1.1.0-flags:-  tomlcheck:-    optimize: true+  - htoml-megaparsec-1.1.0.3+  - composition-prelude-1.3.0.8 extra-package-dbs: []
tomlcheck.cabal view
@@ -1,77 +1,47 @@-name:                tomlcheck-version:             0.1.0.19-synopsis:            Command-line tool to check syntax of TOML files-description:         This is a command-line wrapper around htoml-megaparsec.-                     It is intended to be used as a syntax checker that can be-                     called by your text editor.-homepage:            https://github.com/vmchale/tomlcheck#readme-license:             BSD3-license-file:        LICENSE-author:              Vanessa McHale-maintainer:          vanessa.mchale@reconfigure.io-copyright:           Copyright: (c) 2017 Vanessa McHale-category:            Toml, Data-build-type:          Simple-extra-source-files:  cabal.project.local-                   , stack.yaml-cabal-version:       >=1.18-Data-files:          .travis.yml-                   , appveyor.yml-                   , Justfile-                   , sh/check-Extra-doc-files:     README.md--Flag optimize {-  Description: Optimize with -O2-  default: False-}--Flag native {-  Description: Target current CPU-  manual: True-  default: False-}+cabal-version: 1.18+name: tomlcheck+version: 0.1.0.23+license: BSD3+license-file: LICENSE+copyright: Copyright: (c) 2017-2018 Vanessa McHale+maintainer: vamchale@gmail.com+author: Vanessa McHale+synopsis: Command-line tool to check syntax of TOML files+description:+    This is a command-line wrapper around htoml-megaparsec.+    It is intended to be used as a syntax checker that can be+    called by your text editor.+category: Toml, Data+build-type: Simple+extra-source-files:+    cabal.project.local+    stack.yaml+extra-doc-files: README.md -Flag development {-  Description: Enable `-Werror`-  manual: True-  default: False-}+source-repository head+    type: git+    location: https://github.com/vmchale/tomlcheck -library-  hs-source-dirs:      src-  exposed-modules:     Toml.Checker-  build-depends:       base >= 4.8 && < 5-                     , htoml-megaparsec >= 1.0.1.11-                     , optparse-generic-                     , megaparsec >= 6.0-                     , text-  default-language:    Haskell2010-  if flag(native)-    ghc-options:       -opta-mtune=native -optc-mtune=native-  if flag(development) && impl(ghc >= 8.0)-    ghc-options:       -Werror-  if impl(ghc >= 8.0)-    ghc-options:       -Wincomplete-uni-patterns -Wincomplete-record-updates -Wcompat-  ghc-options:         -Wall+flag development+    description:+        Enable `-Werror`+    default: False+    manual: True  executable tomlcheck-  hs-source-dirs:      app-  main-is:             Main.hs-  -- ghc-options:         -threaded -rtsopts -with-rtsopts=-N-  build-depends:       base-                     , tomlcheck-  default-language:    Haskell2010-  if flag(native)-    ghc-options:       -opta-mtune=native -optc-mtune=native-  if flag(optimize)-    ghc-options:       -O2-  if flag(development)-    ghc-options:       -Werror-  if impl(ghc >= 8.0)-    ghc-options:       -Wincomplete-uni-patterns -Wincomplete-record-updates -Wcompat-  ghc-options:         -Wall--source-repository head-  type:     git-  location: https://github.com/vmchale/tomlcheck+    main-is: Main.hs+    hs-source-dirs: app+    default-language: Haskell2010+    ghc-options: -Wall+    build-depends:+        base >=4.8 && <5,+        htoml-megaparsec >=1.0.1.11,+        optparse-generic -any,+        megaparsec >=6.0,+        text -any+    +    if flag(development)+        ghc-options: -Werror+    +    if impl(ghc >=8.0)+        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates