Skip to content

Commit

Permalink
Merge pull request #52 from aviaviavi/multiline-comments
Browse files Browse the repository at this point in the history
Multiline comments
  • Loading branch information
aviaviavi authored Nov 24, 2018
2 parents 8202994 + 4d591b7 commit 82467ae
Show file tree
Hide file tree
Showing 14 changed files with 724 additions and 297 deletions.
1 change: 1 addition & 0 deletions .toodles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
ignore:
- test.js
- stack-work
- Spec.hs
# `flags` specify other keywords you might want to scan other than TODO
# Hardcoded ones include TODO, FIXME, and XXX
flags:
Expand Down
17 changes: 2 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ These languages will be scanned for any TODO's:

- C/C++
- C#
- CSS/SASS
- Elixir
- Erlang
- Go
- Haskell
- HTML
- Java
- Javascript
- Kotlin
Expand Down Expand Up @@ -131,21 +133,6 @@ $ docker run -it -v $(pwd):/repo -p 9001:9001 toodles

```

### Current Limitations

Due to the parser's current simplicity, Toodles won't see TODO's in multiline
initiated comment. For instance in javascript

```javascript
// TODO(#bug) this would be parsed

/*
TODO(#bug) this will _not_ be picked up by toodles
*/
```

### Background

I work at a small startup called DotDashPay and over time the TODOs in our code
Expand Down
4 changes: 2 additions & 2 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ main = do
run webPort $ app $ ToodlesState ref dataDir

prettyFormat :: TodoEntry -> String
prettyFormat (TodoEntryHead _ l a p n entryPriority f _ _ _) =
prettyFormat (TodoEntryHead _ l a p n entryPriority f _ _ _ _ _ _) =
printf
"Assignee: %s\n%s%s:%d\n%s - %s"
(fromMaybe "None" a)
Expand All @@ -36,4 +36,4 @@ prettyFormat (TodoEntryHead _ l a p n entryPriority f _ _ _) =
n
(show f)
(unlines $ map T.unpack l)
prettyFormat (TodoBodyLine _) = error "Invalid type for prettyFormat"
prettyFormat a = error "Invalid type for prettyFormat: " ++ show a
220 changes: 0 additions & 220 deletions app/Parse.hs

This file was deleted.

68 changes: 66 additions & 2 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: toodles
version: 0.1.4
version: 1.0.0
github: "aviaviavi/toodles"
license: MIT
author: "Avi Press"
Expand Down Expand Up @@ -34,17 +34,81 @@ ghc-options:
dependencies:
- base >= 4.0 && < 5

# TODO (avi|p=3|#dependencies) - dependencies need to be relaxed and
# fixed to include other ghc versions
library:
source-dirs: src
exposed-modules:
- Parse
- Types
- Config
- ToodlesApi
- Server
dependencies:
- hspec >= 2.4.4
- hspec-expectations >=0.8.2
- MissingH >=1.4.0.1
- aeson ==1.3.1.1
- blaze-html ==0.9.1.1
- cmdargs ==0.10.20
- directory ==1.3.1.5
- megaparsec ==6.5.0
- regex-posix ==0.95.2
- servant ==0.14.1
- servant-blaze ==0.8
- servant-server ==0.14.1
- strict ==0.3.2
- text ==1.2.3.1
- wai ==3.2.1.2
- warp ==3.2.25
- yaml ==0.8.32

executables:
toodles:
main: Main.hs
source-dirs: app
source-dirs:
- app
- src
ghc-options:
- -threaded
- -rtsopts
- -O3
- -Wall
- -with-rtsopts=-N
dependencies:
- hspec >= 2.4.4
- hspec-expectations >=0.8.2
- MissingH >=1.4.0.1
- aeson ==1.3.1.1
- blaze-html ==0.9.1.1
- cmdargs ==0.10.20
- directory ==1.3.1.5
- megaparsec ==6.5.0
- regex-posix ==0.95.2
- servant ==0.14.1
- servant-blaze ==0.8
- servant-server ==0.14.1
- strict ==0.3.2
- text ==1.2.3.1
- wai ==3.2.1.2
- warp ==3.2.25
- yaml ==0.8.32

tests:
toodles-test:
main: Spec.hs
source-dirs:
- test
- src
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -w
dependencies:
- toodles
- hspec >= 2.4.4
- hspec-expectations >=0.8.2
- MissingH >=1.4.0.1
- aeson ==1.3.1.1
- blaze-html ==0.9.1.1
Expand Down
File renamed without changes.
6 changes: 0 additions & 6 deletions src/Lib.hs

This file was deleted.

Loading

0 comments on commit 82467ae

Please sign in to comment.