glyptodont 1.0.0 → 1.1.0
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/.github/workflows/publish-gem.yml +3 -3
- data/.glyptodont.yaml +15 -8
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/README.md +5 -0
- data/docs/index.html +5 -1
- data/lib/glyptodont/checker.rb +2 -1
- data/lib/glyptodont/configuration.rb +4 -0
- data/lib/glyptodont/todo_researcher.rb +13 -3
- data/lib/glyptodont/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7e18bcfa3a3f046b7b675c1612f35086438674024367463433cb60066cb008eb
|
|
4
|
+
data.tar.gz: 9cd7f2d0fe5ba7a0b947461164a48cd5875a4de539cd86cb26a1c7c2e5121898
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ebbbc04a10fc604c99bb9e6cee6757e5cfe21ed615f82177e1bf35e76ffaef4c201345c40f643d9fe81489d17457a06c85e0fdec389f572b16a0930580efa4c
|
|
7
|
+
data.tar.gz: b169d17d00ee585261e7d8dac21b5bb356365fc72de151593f1f77d9acda3ddce32d7e1f53d0f58743aa9d54f4928086ef433c8c0f80bcbf6b03f6beb1f95447
|
data/.glyptodont.yaml
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
threshold: 1
|
|
3
3
|
max_age_in_days: 1
|
|
4
|
+
documentation_files:
|
|
5
|
+
- README.md
|
|
6
|
+
- CHANGELOG.md
|
|
7
|
+
- docs/index.html
|
|
4
8
|
ignore:
|
|
5
|
-
-
|
|
6
|
-
-
|
|
9
|
+
- lib/glyptodont/checker.rb:18
|
|
10
|
+
- lib/glyptodont/checker.rb:19
|
|
11
|
+
- lib/glyptodont/checker.rb:20
|
|
12
|
+
- lib/glyptodont/checker.rb:21
|
|
7
13
|
- lib/glyptodont/checkers/counter.rb:30
|
|
8
14
|
- lib/glyptodont/checkers/counter.rb:32
|
|
9
|
-
- lib/glyptodont/
|
|
10
|
-
- lib/glyptodont/
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- spec/
|
|
14
|
-
- spec/
|
|
15
|
+
- lib/glyptodont/options.rb:52
|
|
16
|
+
- lib/glyptodont/options.rb:54
|
|
17
|
+
- spec/glyptodont/checkers/counter_spec.rb:20
|
|
18
|
+
- spec/glyptodont/checkers/counter_spec.rb:28
|
|
19
|
+
- spec/glyptodont/todo_researcher_spec.rb:10
|
|
20
|
+
- spec/glyptodont/todo_researcher_spec.rb:33
|
|
21
|
+
- spec/glyptodont/todo_researcher_spec.rb:34
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.1.0](https://github.com/johnsyweb/glyptodont/compare/v1.0.0...v1.1.0) (2026-03-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* support documentation_files in configuration ([b6d2745](https://github.com/johnsyweb/glyptodont/commit/b6d27453f9ccb8198a20d45043335511f0d9e49a))
|
|
14
|
+
|
|
8
15
|
## [1.0.0](https://github.com/johnsyweb/glyptodont/compare/v0.3.0...v1.0.0) (2026-03-11)
|
|
9
16
|
|
|
10
17
|
|
data/README.md
CHANGED
|
@@ -72,6 +72,11 @@ gem install glyptodont
|
|
|
72
72
|
For usage, command-line options, configuration (`.glyptodont.yaml`), and CI
|
|
73
73
|
examples (GitHub Actions, Buildkite, Docker), see the [documentation](https://www.johnsy.com/glyptodont/).
|
|
74
74
|
|
|
75
|
+
To avoid TODO-style comments in documentation and changelogs causing noise, you
|
|
76
|
+
can list whole documentation files in the `documentation_files` key in
|
|
77
|
+
`.glyptodont.yaml` (e.g. `CHANGELOG.md`, `docs/index.html`). Those files will
|
|
78
|
+
be skipped entirely, while source files continue to be checked.
|
|
79
|
+
|
|
75
80
|
## Requirements
|
|
76
81
|
|
|
77
82
|
- [Mise](https://mise.jdx.dev/) — install once; `script/setup` uses it to install
|
data/docs/index.html
CHANGED
|
@@ -172,6 +172,7 @@
|
|
|
172
172
|
<li><strong>max_age_in_days</strong> — Maximum number of days to allow TODOs to stay. Overridable by <code>--max-age</code>.</li>
|
|
173
173
|
<li><strong>ignore</strong> — List of <code>file_name:line_number</code> pairs to ignore (e.g. Spanish text or frequent mentions of TODOs).</li>
|
|
174
174
|
<li><strong>keywords</strong> — List of synonyms for TODO in your project.</li>
|
|
175
|
+
<li><strong>documentation_files</strong> — List of documentation files to skip entirely when scanning for TODOs (e.g. <code>CHANGELOG.md</code>, <code>docs/index.html</code>).</li>
|
|
175
176
|
</ul>
|
|
176
177
|
<p>Example:</p>
|
|
177
178
|
<pre><code>---
|
|
@@ -181,7 +182,10 @@ ignore:
|
|
|
181
182
|
- README.md:11
|
|
182
183
|
- lib/glyptodont/checkers/counter.rb:30
|
|
183
184
|
- lib/glyptodont/todo_researcher.rb:33
|
|
184
|
-
- spec/checkers/counter_spec.rb:20
|
|
185
|
+
- spec/checkers/counter_spec.rb:20
|
|
186
|
+
documentation_files:
|
|
187
|
+
- CHANGELOG.md
|
|
188
|
+
- docs/index.html</code></pre>
|
|
185
189
|
|
|
186
190
|
<h3 id="command-line-options">Command-line options</h3>
|
|
187
191
|
<pre><code>Usage: glyptodont [options]
|
data/lib/glyptodont/checker.rb
CHANGED
|
@@ -27,7 +27,7 @@ module Glyptodont
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def check?
|
|
30
|
-
todos = TodoResearcher.new(directory, ignore, keywords).research
|
|
30
|
+
todos = TodoResearcher.new(directory, ignore, keywords, documentation_files).research
|
|
31
31
|
|
|
32
32
|
checks = [
|
|
33
33
|
Checkers::Counter.new(todos: todos, threshold: threshold),
|
|
@@ -44,6 +44,7 @@ module Glyptodont
|
|
|
44
44
|
extend Forwardable
|
|
45
45
|
|
|
46
46
|
def_delegator :@configuration, :ignore
|
|
47
|
+
def_delegator :@configuration, :documentation_files
|
|
47
48
|
def_delegators :@options, :directory
|
|
48
49
|
|
|
49
50
|
def threshold
|
|
@@ -6,20 +6,24 @@ require "rugged"
|
|
|
6
6
|
module Glyptodont
|
|
7
7
|
# Finds all the TODOs in a directory managed by Git, who last touched them and when.
|
|
8
8
|
class TodoResearcher
|
|
9
|
-
def initialize(directory, ignore, keywords)
|
|
9
|
+
def initialize(directory, ignore, keywords, documentation_files = [])
|
|
10
10
|
@directory = directory
|
|
11
11
|
@ignore = ignore
|
|
12
12
|
@keywords = Array(keywords)
|
|
13
|
+
@documentation_files = Array(documentation_files)
|
|
13
14
|
@annotator = {}
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
def research
|
|
17
|
-
|
|
18
|
+
todos = extract_details(git.grep(keyword_rexexp))
|
|
19
|
+
todos = exclude_documentation_files(todos)
|
|
20
|
+
todos = exclude_ignored(todos)
|
|
21
|
+
annotate(todos)
|
|
18
22
|
end
|
|
19
23
|
|
|
20
24
|
private
|
|
21
25
|
|
|
22
|
-
attr_reader :directory, :ignore, :keywords
|
|
26
|
+
attr_reader :directory, :ignore, :keywords, :documentation_files
|
|
23
27
|
|
|
24
28
|
def git
|
|
25
29
|
Git.open(directory)
|
|
@@ -42,6 +46,12 @@ module Glyptodont
|
|
|
42
46
|
end
|
|
43
47
|
end
|
|
44
48
|
|
|
49
|
+
def exclude_documentation_files(todos)
|
|
50
|
+
return todos if documentation_files.empty?
|
|
51
|
+
|
|
52
|
+
todos.reject { |todo| documentation_files.include?(todo[:file]) }
|
|
53
|
+
end
|
|
54
|
+
|
|
45
55
|
def exclude_ignored(todos)
|
|
46
56
|
todos.reject { |todo| ignore.include?(todo.slice(:file, :line)) }
|
|
47
57
|
end
|
data/lib/glyptodont/version.rb
CHANGED