summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvmchale <>2017-10-12 04:28:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-10-12 04:28:00 (GMT)
commita32a7d1aaaa4ff131835edf134d9e023490f693c (patch)
treea219ae5e137fd71c6b952326cd063ff72ddeef18
parentd5924a2704d95e4b5d559ec0e04868216240e0f6 (diff)
version 0.1.0.10.1.0.1
-rw-r--r--.travis.yml11
-rw-r--r--Justfile29
-rw-r--r--README.md30
-rw-r--r--app/Main.hs2
-rw-r--r--src/Toml/Checker.hs (renamed from src/Lib.hs)2
-rw-r--r--stack.yaml2
-rw-r--r--tomlcheck.cabal7
7 files changed, 73 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml
index 7f974e7..7a0b907 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,8 +39,16 @@ script:
- stack --no-terminal build --haddock --no-haddock-deps
- hlint .
- weeder .
- - export BINPATH="$(find -name tomlcheck -executable | tail -n2 | head -n1)"
+ - |
+ 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
deploy:
api_key:
@@ -53,5 +61,4 @@ deploy:
branches:
only:
- - master
- /\d+\.\d+\.\d+\.\d+.*$/
diff --git a/Justfile b/Justfile
new file mode 100644
index 0000000..147afaf
--- /dev/null
+++ b/Justfile
@@ -0,0 +1,29 @@
+clean:
+ sn c .
+ rm -f lol.html
+
+lol:
+ bench "sn help" "tomlcheck --file data/example.toml" --output lol.html
+
+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
+
+bench:
+ bench "tomlcheck --file data/example.toml" "tomlcheck --file data/good.toml"
+
+upload:
+ rm -rf dist/
+ cabal sdist
+ cabal upload $(fd '.tar.gz$' -IH) --publish
+
+install:
+ cabal new-build
+ 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
+ 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
diff --git a/README.md b/README.md
index 42fe415..a51c057 100644
--- a/README.md
+++ b/README.md
@@ -11,14 +11,40 @@ You can find a vim plugin [here](https://github.com/vmchale/tomlcheck-vim).
### Binaries
-Head over to the [release page](link goes here) to see if your platform has
+Head over to the [release page](https://github.com/vmchale/tomlcheck/releases) to see if your platform has
binaries. Simply put it somewhere on your path.
### Cabal
-Install [GHC & cabal](https://www.haskell.org/downloads#minimal), then
+Install [GHC](https://www.haskell.org/ghc/download.html) along with
+[cabal](https://www.haskell.org/downloads#minimal), then
```bash
$ cabal update
$ cabal install tomlcheck
```
+
+## Known Deficiencies
+
+ * No Windows binaries
+ * Slow on large files (>7000 lines)
+
+## Cool Facts
+
+ * It's really fast
+ * It uses laziness to make checking schnell yet robust
+
+```
+-------------------------------------------------------------------------------
+ Language Files Lines Code Comments Blanks
+-------------------------------------------------------------------------------
+ Cabal 1 58 53 1 4
+ Haskell 3 40 28 4 8
+ Justfile 1 21 16 0 5
+ Markdown 2 42 42 0 0
+ TOML 3 87 78 0 9
+ YAML 1 9 9 0 0
+-------------------------------------------------------------------------------
+ Total 11 257 226 5 26
+-------------------------------------------------------------------------------
+```
diff --git a/app/Main.hs b/app/Main.hs
index 6ca9623..4464589 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -1,6 +1,6 @@
module Main where
-import Lib (exec)
+import Toml.Checker (exec)
main :: IO ()
main = exec
diff --git a/src/Lib.hs b/src/Toml/Checker.hs
index 0275dcd..f5d3596 100644
--- a/src/Lib.hs
+++ b/src/Toml/Checker.hs
@@ -3,7 +3,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
-module Lib
+module Toml.Checker
( exec
) where
diff --git a/stack.yaml b/stack.yaml
index 442f5be..86673c2 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -3,7 +3,7 @@ packages:
- './'
extra-deps:
- megaparsec-6.2.0
- - htoml-megaparsec-1.0.1.0
+ - htoml-megaparsec-1.0.1.1
- composition-prelude-0.1.1.0
flags: {}
extra-package-dbs: []
diff --git a/tomlcheck.cabal b/tomlcheck.cabal
index b85f309..56eb21a 100644
--- a/tomlcheck.cabal
+++ b/tomlcheck.cabal
@@ -1,5 +1,5 @@
name: tomlcheck
-version: 0.1.0.0
+version: 0.1.0.1
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
@@ -16,6 +16,7 @@ extra-source-files: cabal.project.local
, stack.yaml
cabal-version: >=1.18
Data-files: .travis.yml
+ , Justfile
Extra-doc-files: README.md
Flag development {
@@ -26,9 +27,9 @@ Flag development {
library
hs-source-dirs: src
- exposed-modules: Lib
+ exposed-modules: Toml.Checker
build-depends: base >= 4.8 && < 5
- , htoml-megaparsec >= 1.0.1.0
+ , htoml-megaparsec >= 1.0.1.1
, optparse-generic
, megaparsec >= 6.0
, text