Skip to content

Commit 82467ae

Browse files
authored
Merge pull request #52 from aviaviavi/multiline-comments
Multiline comments
2 parents 8202994 + 4d591b7 commit 82467ae

14 files changed

+724
-297
lines changed

.toodles.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
ignore:
44
- test.js
55
- stack-work
6+
- Spec.hs
67
# `flags` specify other keywords you might want to scan other than TODO
78
# Hardcoded ones include TODO, FIXME, and XXX
89
flags:

README.md

+2-15
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ These languages will be scanned for any TODO's:
5959

6060
- C/C++
6161
- C#
62+
- CSS/SASS
6263
- Elixir
6364
- Erlang
6465
- Go
6566
- Haskell
67+
- HTML
6668
- Java
6769
- Javascript
6870
- Kotlin
@@ -131,21 +133,6 @@ $ docker run -it -v $(pwd):/repo -p 9001:9001 toodles
131133

132134
```
133135

134-
### Current Limitations
135-
136-
Due to the parser's current simplicity, Toodles won't see TODO's in multiline
137-
initiated comment. For instance in javascript
138-
139-
```javascript
140-
// TODO(#bug) this would be parsed
141-
142-
/*
143-
144-
TODO(#bug) this will _not_ be picked up by toodles
145-
146-
*/
147-
```
148-
149136
### Background
150137

151138
I work at a small startup called DotDashPay and over time the TODOs in our code

app/Main.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ main = do
2727
run webPort $ app $ ToodlesState ref dataDir
2828

2929
prettyFormat :: TodoEntry -> String
30-
prettyFormat (TodoEntryHead _ l a p n entryPriority f _ _ _) =
30+
prettyFormat (TodoEntryHead _ l a p n entryPriority f _ _ _ _ _ _) =
3131
printf
3232
"Assignee: %s\n%s%s:%d\n%s - %s"
3333
(fromMaybe "None" a)
@@ -36,4 +36,4 @@ prettyFormat (TodoEntryHead _ l a p n entryPriority f _ _ _) =
3636
n
3737
(show f)
3838
(unlines $ map T.unpack l)
39-
prettyFormat (TodoBodyLine _) = error "Invalid type for prettyFormat"
39+
prettyFormat a = error "Invalid type for prettyFormat: " ++ show a

app/Parse.hs

-220
This file was deleted.

package.yaml

+66-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: toodles
2-
version: 0.1.4
2+
version: 1.0.0
33
github: "aviaviavi/toodles"
44
license: MIT
55
author: "Avi Press"
@@ -34,17 +34,81 @@ ghc-options:
3434
dependencies:
3535
- base >= 4.0 && < 5
3636

37+
# TODO (avi|p=3|#dependencies) - dependencies need to be relaxed and
38+
# fixed to include other ghc versions
39+
library:
40+
source-dirs: src
41+
exposed-modules:
42+
- Parse
43+
- Types
44+
- Config
45+
- ToodlesApi
46+
- Server
47+
dependencies:
48+
- hspec >= 2.4.4
49+
- hspec-expectations >=0.8.2
50+
- MissingH >=1.4.0.1
51+
- aeson ==1.3.1.1
52+
- blaze-html ==0.9.1.1
53+
- cmdargs ==0.10.20
54+
- directory ==1.3.1.5
55+
- megaparsec ==6.5.0
56+
- regex-posix ==0.95.2
57+
- servant ==0.14.1
58+
- servant-blaze ==0.8
59+
- servant-server ==0.14.1
60+
- strict ==0.3.2
61+
- text ==1.2.3.1
62+
- wai ==3.2.1.2
63+
- warp ==3.2.25
64+
- yaml ==0.8.32
65+
3766
executables:
3867
toodles:
3968
main: Main.hs
40-
source-dirs: app
69+
source-dirs:
70+
- app
71+
- src
4172
ghc-options:
4273
- -threaded
4374
- -rtsopts
4475
- -O3
4576
- -Wall
4677
- -with-rtsopts=-N
4778
dependencies:
79+
- hspec >= 2.4.4
80+
- hspec-expectations >=0.8.2
81+
- MissingH >=1.4.0.1
82+
- aeson ==1.3.1.1
83+
- blaze-html ==0.9.1.1
84+
- cmdargs ==0.10.20
85+
- directory ==1.3.1.5
86+
- megaparsec ==6.5.0
87+
- regex-posix ==0.95.2
88+
- servant ==0.14.1
89+
- servant-blaze ==0.8
90+
- servant-server ==0.14.1
91+
- strict ==0.3.2
92+
- text ==1.2.3.1
93+
- wai ==3.2.1.2
94+
- warp ==3.2.25
95+
- yaml ==0.8.32
96+
97+
tests:
98+
toodles-test:
99+
main: Spec.hs
100+
source-dirs:
101+
- test
102+
- src
103+
ghc-options:
104+
- -threaded
105+
- -rtsopts
106+
- -with-rtsopts=-N
107+
- -w
108+
dependencies:
109+
- toodles
110+
- hspec >= 2.4.4
111+
- hspec-expectations >=0.8.2
48112
- MissingH >=1.4.0.1
49113
- aeson ==1.3.1.1
50114
- blaze-html ==0.9.1.1

app/Config.hs src/Config.hs

File renamed without changes.

src/Lib.hs

-6
This file was deleted.

0 commit comments

Comments
 (0)