gtdlint 0.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONFIGURE.md +1 -1
- data/README.md +4 -12
- data/lib/gtdlint.rb +20 -18
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d591322656c0fe0cea4f051ca0176534cd6149f9
|
4
|
+
data.tar.gz: 5179179da2f3d4215093a646559b41d3bb6bd909
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d83c3e1e4f2b240f06ad740fb9e836ceb50baa3229f169de2cfd3868ae108bf7f8f9146c1aecb41b0c4ec46cf3ef0d2d1214796fa0b61c7ac100111c860db6f
|
7
|
+
data.tar.gz: 3cf111bdfbe47896ece72539ba0b71c9c7d3e5ddfeea6bf931e553865b9ff2d133f5f182800b7ebc1801eda99a2310ae3f8ef77aa6bd8e0bfb32d170f080cf43
|
data/CONFIGURE.md
CHANGED
data/README.md
CHANGED
@@ -13,18 +13,8 @@ https://rubygems.org/gems/gtdlint
|
|
13
13
|
Gtdlint is a command line program for finding TODO tasks in a project, such as `// TODO` code comments. By default, gtdlint is case-insensitve, and looks for:
|
14
14
|
|
15
15
|
* `todo`
|
16
|
-
* `
|
17
|
-
* `to-do`
|
18
|
-
* `TODO`
|
19
|
-
* `TO DO`
|
20
|
-
* `TO-DO`
|
21
|
-
* `ToDo`
|
22
|
-
* `To Do`
|
23
|
-
* `To-Do`
|
16
|
+
* `pending`
|
24
17
|
* `hack`
|
25
|
-
* `Hack`
|
26
|
-
* `HACK`
|
27
|
-
* ...
|
28
18
|
|
29
19
|
gtdlint can be customized with a `-p` command line flag and/or a `.gtdlintrc.yml` configuration file. For example, gtdlint can be configured to look for `pte`/`hack` in Spanish projects.
|
30
20
|
|
@@ -43,14 +33,16 @@ examples/hello.c:1:// TODO: Add copyright
|
|
43
33
|
examples/hello.c:6: // TODO: Add proper line ending
|
44
34
|
examples/hello.c:9: putc(10, stdout); // hack
|
45
35
|
examples/spanish/phrases.txt:1:PTE: Agregar más frases.
|
36
|
+
examples/spec/int_spec.rb:3: pending('mathematical revolution')
|
46
37
|
|
47
38
|
$ cat examples/hello.c | bin/gtdlint
|
48
39
|
stdin:1:// TODO: Add copyright
|
49
40
|
stdin:6: // TODO: Add proper line ending
|
50
41
|
stdin:9: putc(10, stdout); // hack
|
51
42
|
|
52
|
-
$ gtdlint -i
|
43
|
+
$ gtdlint -i '\.c' examples/
|
53
44
|
examples/spanish/phrases.txt:1:PTE: Agregar más frases.
|
45
|
+
examples/spec/int_spec.rb:3: pending('mathematical revolution')
|
54
46
|
|
55
47
|
$ gtdlint -p pte examples/spanish/
|
56
48
|
examples/spanish/phrases.txt:1:PTE: Agregar más frases.
|
data/lib/gtdlint.rb
CHANGED
@@ -7,27 +7,27 @@ $stdout.sync = true
|
|
7
7
|
require 'version'
|
8
8
|
|
9
9
|
DEFAULT_IGNORES = %w(
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
\.hg/
|
11
|
+
\.svn/
|
12
|
+
\.git/
|
13
|
+
\.git
|
14
|
+
\.gtdlintignore
|
15
|
+
\.gtdlintrc\.yml
|
16
16
|
node_modules/
|
17
|
-
|
17
|
+
\.vagrant/
|
18
18
|
Gemfile.lock
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
-min
|
19
|
+
\.exe
|
20
|
+
\.bin
|
21
|
+
\.png
|
22
|
+
\.jpg
|
23
|
+
\.jpeg
|
24
|
+
\.svg
|
25
|
+
\.min.js
|
26
|
+
-min\.js
|
27
27
|
)
|
28
28
|
|
29
29
|
# Grep format, case insensitive
|
30
|
-
DEFAULT_GTD_PATTERN = "\'todo\\|to do\\|to-do\\|hack\'"
|
30
|
+
DEFAULT_GTD_PATTERN = "\'todo\\|to do\\|to-do\\|pending\\|hack\'"
|
31
31
|
|
32
32
|
DEFAULT_LINES_BEFORE = 0
|
33
33
|
DEFAULT_LINES_AFTER = 0
|
@@ -98,7 +98,8 @@ def self.check_stdin(configuration = DEFAULT_CONFIGURATION)
|
|
98
98
|
-B #{lines_before} \
|
99
99
|
-A #{lines_after} \
|
100
100
|
-n \
|
101
|
-
-i
|
101
|
+
-i \
|
102
|
+
-w #{gtd_pattern} \
|
102
103
|
\"#{filename}\"
|
103
104
|
`
|
104
105
|
|
@@ -118,7 +119,8 @@ def self.check(filename, configuration = DEFAULT_CONFIGURATION)
|
|
118
119
|
-B #{lines_before} \
|
119
120
|
-A #{lines_after} \
|
120
121
|
-n \
|
121
|
-
-i
|
122
|
+
-i \
|
123
|
+
-w #{gtd_pattern} \
|
122
124
|
\"#{filename}\"
|
123
125
|
`
|
124
126
|
|
data/lib/version.rb
CHANGED