punchlist 1.2.0 → 1.3.1

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.
Files changed (86) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +132 -0
  3. data/.envrc +4 -0
  4. data/.git-hooks/pre_commit/circle_ci.rb +25 -0
  5. data/.git-hooks/pre_commit/punchlist.rb +51 -0
  6. data/.git-hooks/pre_commit/solargraph_typecheck.rb +64 -0
  7. data/.gitattributes +6 -0
  8. data/.gitignore +60 -0
  9. data/.markdownlint_style.rb +3 -0
  10. data/.mdlrc +1 -0
  11. data/.overcommit.yml +87 -0
  12. data/.pronto.yml +2 -0
  13. data/.rubocop.yml +148 -0
  14. data/.solargraph.yml +26 -0
  15. data/.yamllint.yml +8 -0
  16. data/CODE_OF_CONDUCT.md +133 -0
  17. data/CONTRIBUTING.rst +75 -0
  18. data/ChangeLog.md +8 -0
  19. data/DEVELOPMENT.md +31 -0
  20. data/Gemfile +26 -0
  21. data/Gemfile.lock +186 -0
  22. data/LICENSE +22 -0
  23. data/Makefile +104 -0
  24. data/README.md +27 -0
  25. data/Rakefile +3 -29
  26. data/bin/bump +29 -0
  27. data/bin/overcommit +29 -0
  28. data/bin/punchlist +1 -0
  29. data/bin/rake +29 -0
  30. data/bin/rubocop +27 -0
  31. data/bin/solargraph +27 -0
  32. data/bin/yard +27 -0
  33. data/config/env.1p +0 -0
  34. data/docs/.gitignore +3 -0
  35. data/docs/cookiecutter_input.json +16 -0
  36. data/feature/expected/mixed_types_of_source_files_results.txt +2 -0
  37. data/feature/expected/no_files_results.txt +0 -0
  38. data/feature/expected/non_source_file_with_pis_results.txt +0 -0
  39. data/feature/expected/one_source_file_with_cis_results.txt +1 -0
  40. data/feature/expected/scala_file_to_be_ignored_results.txt +1 -0
  41. data/feature/expected/source_file_with_no_items_results.txt +0 -0
  42. data/feature/feature_helper.rb +41 -0
  43. data/feature/pronto_punchlist_use_spec.rb +26 -0
  44. data/feature/punchlist_cli_spec.rb +63 -0
  45. data/feature/samples/mixed_types_of_source_files/lib/bar.scala +1 -0
  46. data/feature/samples/mixed_types_of_source_files/lib/foo.rb +4 -0
  47. data/feature/samples/no_files/.ignore +0 -0
  48. data/feature/samples/non_source_file_with_pis/foo.doc +5 -0
  49. data/feature/samples/one_source_file_with_cis/app/foo.rb +4 -0
  50. data/feature/samples/scala_file_to_be_ignored/lib/bar.scala +1 -0
  51. data/feature/samples/scala_file_to_be_ignored/lib/foo.rb +4 -0
  52. data/feature/samples/source_file_with_no_items/foo.rb +3 -0
  53. data/fix.sh +411 -0
  54. data/lib/punchlist/config.rb +27 -0
  55. data/lib/punchlist/inspector.rb +51 -0
  56. data/lib/punchlist/offense.rb +23 -0
  57. data/lib/punchlist/{options.rb → option_parser.rb} +9 -14
  58. data/lib/punchlist/renderer.rb +18 -0
  59. data/lib/punchlist/version.rb +3 -1
  60. data/lib/punchlist.rb +12 -45
  61. data/metrics/brakeman_high_water_mark +1 -0
  62. data/metrics/flake8_high_water_mark +1 -0
  63. data/metrics/jscs_high_water_mark +1 -0
  64. data/metrics/punchlist_high_water_mark +1 -0
  65. data/metrics/pycodestyle_high_water_mark +1 -0
  66. data/metrics/rails_best_practices_high_water_mark +1 -0
  67. data/metrics/scalastyle_high_water_mark +1 -0
  68. data/metrics/shellcheck_high_water_mark +1 -0
  69. data/package.json +9 -0
  70. data/punchlist.gemspec +27 -30
  71. data/rakelib/citest.rake +4 -0
  72. data/rakelib/clear_metrics.rake +9 -0
  73. data/rakelib/console.rake +6 -0
  74. data/rakelib/default.rake +4 -0
  75. data/rakelib/doc.rake +6 -0
  76. data/rakelib/feature.rake +10 -0
  77. data/rakelib/gem_tasks.rake +3 -0
  78. data/rakelib/localtest.rake +4 -0
  79. data/rakelib/overcommit.rake +6 -0
  80. data/rakelib/quality.rake +4 -0
  81. data/rakelib/repl.rake +4 -0
  82. data/rakelib/spec.rake +9 -0
  83. data/rakelib/undercover.rake +8 -0
  84. data/requirements_dev.txt +2 -0
  85. metadata +97 -92
  86. data/License.txt +0 -20
@@ -0,0 +1 @@
1
+ 0
@@ -0,0 +1 @@
1
+ 11
data/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "remarkConfig": {
3
+ "settings": {
4
+ "bullet": "*",
5
+ "listItemIndent": "one"
6
+ },
7
+ "plugins": []
8
+ }
9
+ }
data/punchlist.gemspec CHANGED
@@ -1,36 +1,33 @@
1
- # ; -*-Ruby-*-
2
- # -*- encoding: utf-8 -*-
3
- $LOAD_PATH.push File.join(File.dirname(__FILE__), 'lib')
1
+ # coding: ascii
2
+ # frozen_string_literal: true
3
+
4
+ lib = File.expand_path('lib', __dir__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
6
  require 'punchlist/version'
5
7
 
6
- Gem::Specification.new do |s|
7
- s.name = 'punchlist'
8
- s.version = Punchlist::VERSION
8
+ Gem::Specification.new do |spec|
9
+ spec.name = 'punchlist'
10
+ spec.version = Punchlist::VERSION
11
+ spec.authors = ["Vince Broz"]
12
+ spec.email = ['vince@broz.cc']
13
+ spec.summary = "Counts the number of 'todo' comments in your code"
14
+ spec.homepage = 'https://github.com/apiology/punchlist'
15
+ spec.license = 'MIT license'
16
+ spec.required_ruby_version = '>= 3.0'
9
17
 
10
- s.authors = ['Vince Broz']
11
- s.description =
12
- "punchlist lists your annotation comments--things like 'LATER/HACK/FIXIT'"
13
- s.email = ['vince@broz.cc']
14
- s.executables = ['punchlist']
15
- # s.extra_rdoc_files = ["CHANGELOG", "License.txt"]
16
- s.license = 'MIT'
17
- s.files = Dir['License.txt', 'README.md',
18
- 'Rakefile',
19
- 'bin/punchlist',
20
- '{lib}/**/*',
21
- 'punchlist.gemspec'] & `git ls-files -z`.split("\0")
22
- # s.rdoc_options = ["--main", "README.md"]
23
- s.require_paths = ['lib']
24
- s.homepage = 'http://github.com/apiology/punchlist'
25
- # s.rubyforge_project = %q{punchlist}
26
- s.rubygems_version = '1.3.6'
27
- s.summary = 'Finds largest source files in a project'
18
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
+ `git ls-files -z`.split("\x0").reject do |f|
20
+ f.match(%r{^(test|spec|features)/})
21
+ end
22
+ end
23
+ spec.bindir = 'exe'
24
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
+ spec.require_paths = ['lib']
28
26
 
29
- s.add_dependency('source_finder', ['>=2'])
27
+ spec.add_dependency('source_finder', ['>=2'])
28
+ # spec.add_runtime_dependency 'activesupport'
30
29
 
31
- s.add_development_dependency('bundler')
32
- s.add_development_dependency('rake')
33
- s.add_development_dependency('quality', ['>=16'])
34
- s.add_development_dependency('rspec')
35
- s.add_development_dependency('simplecov')
30
+ spec.metadata = {
31
+ 'rubygems_mfa_required' => 'true',
32
+ }
36
33
  end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Run tasks to be done during a continuous integration (CI) build'
4
+ task citest: %i[clear_metrics spec feature undercover]
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Ensure that any locally ratcheted coverage metrics are cleared back ' \
4
+ 'to git baseline'
5
+ task :clear_metrics do |_t|
6
+ # Without this old lines which are removed are still counted,
7
+ # leading to inconsistent coverage percentages between runs.
8
+ raise unless system('rm -fr coverage/')
9
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Load up punchlist in pry'
4
+ task :console do |_t|
5
+ exec 'pry -I lib -r punchlist'
6
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Standard build'
4
+ task default: :localtest
data/rakelib/doc.rake ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Push documentation updates to Dropbox'
4
+ task :doc do
5
+ sh 'yard -p yard_templates -o docs/ --no-private'
6
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rspec/core/rake_task'
4
+
5
+ desc 'Run features'
6
+ RSpec::Core::RakeTask.new(:feature) do |task|
7
+ task.pattern = 'feature/**/*_spec.rb'
8
+ task.rspec_opts = '--format doc --default-path feature ' \
9
+ '--require feature_helper'
10
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Standard build when running on a workstation'
4
+ task localtest: %i[clear_metrics spec feature undercover quality]
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Run overcommit on current code'
4
+ task :overcommit do
5
+ sh 'overcommit --run'
6
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Run quality checks'
4
+ task quality: :overcommit
data/rakelib/repl.rake ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Load up punchlist in pry'
4
+ task repl: [:console]
data/rakelib/spec.rake ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rspec/core/rake_task'
4
+
5
+ desc 'Run specs'
6
+ RSpec::Core::RakeTask.new(:spec) do |task|
7
+ task.pattern = 'spec/**/*_spec.rb'
8
+ task.rspec_opts = '--format doc --require spec_helper'
9
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Ensure PR changes are fully covered by tests'
4
+ task :undercover do |_t|
5
+ ret =
6
+ system('if git branch -r | grep origin/main; then undercover --compare origin/main; fi')
7
+ raise unless ret
8
+ end
@@ -0,0 +1,2 @@
1
+ pip==23.3.1
2
+ yamllint==1.35.1
metadata CHANGED
@@ -1,136 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: punchlist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz
8
- autorequire:
9
- bindir: bin
8
+ autorequire:
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-13 00:00:00.000000000 Z
11
+ date: 2024-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: source_finder
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: quality
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '>='
60
- - !ruby/object:Gem::Version
61
- version: '16'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '>='
67
- - !ruby/object:Gem::Version
68
- version: '16'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '>='
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '>='
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- description: punchlist lists your annotation comments--things like 'LATER/HACK/FIXIT'
27
+ description:
98
28
  email:
99
29
  - vince@broz.cc
100
- executables:
101
- - punchlist
30
+ executables: []
102
31
  extensions: []
103
32
  extra_rdoc_files: []
104
33
  files:
105
- - License.txt
34
+ - ".circleci/config.yml"
35
+ - ".envrc"
36
+ - ".git-hooks/pre_commit/circle_ci.rb"
37
+ - ".git-hooks/pre_commit/punchlist.rb"
38
+ - ".git-hooks/pre_commit/solargraph_typecheck.rb"
39
+ - ".gitattributes"
40
+ - ".gitignore"
41
+ - ".markdownlint_style.rb"
42
+ - ".mdlrc"
43
+ - ".overcommit.yml"
44
+ - ".pronto.yml"
45
+ - ".rubocop.yml"
46
+ - ".solargraph.yml"
47
+ - ".yamllint.yml"
48
+ - CODE_OF_CONDUCT.md
49
+ - CONTRIBUTING.rst
50
+ - ChangeLog.md
51
+ - DEVELOPMENT.md
52
+ - Gemfile
53
+ - Gemfile.lock
54
+ - LICENSE
55
+ - Makefile
56
+ - README.md
106
57
  - Rakefile
58
+ - bin/bump
59
+ - bin/overcommit
107
60
  - bin/punchlist
61
+ - bin/rake
62
+ - bin/rubocop
63
+ - bin/solargraph
64
+ - bin/yard
65
+ - config/env.1p
66
+ - docs/.gitignore
67
+ - docs/cookiecutter_input.json
68
+ - feature/expected/mixed_types_of_source_files_results.txt
69
+ - feature/expected/no_files_results.txt
70
+ - feature/expected/non_source_file_with_pis_results.txt
71
+ - feature/expected/one_source_file_with_cis_results.txt
72
+ - feature/expected/scala_file_to_be_ignored_results.txt
73
+ - feature/expected/source_file_with_no_items_results.txt
74
+ - feature/feature_helper.rb
75
+ - feature/pronto_punchlist_use_spec.rb
76
+ - feature/punchlist_cli_spec.rb
77
+ - feature/samples/mixed_types_of_source_files/lib/bar.scala
78
+ - feature/samples/mixed_types_of_source_files/lib/foo.rb
79
+ - feature/samples/no_files/.ignore
80
+ - feature/samples/non_source_file_with_pis/foo.doc
81
+ - feature/samples/one_source_file_with_cis/app/foo.rb
82
+ - feature/samples/scala_file_to_be_ignored/lib/bar.scala
83
+ - feature/samples/scala_file_to_be_ignored/lib/foo.rb
84
+ - feature/samples/source_file_with_no_items/foo.rb
85
+ - fix.sh
108
86
  - lib/punchlist.rb
109
- - lib/punchlist/options.rb
87
+ - lib/punchlist/config.rb
88
+ - lib/punchlist/inspector.rb
89
+ - lib/punchlist/offense.rb
90
+ - lib/punchlist/option_parser.rb
91
+ - lib/punchlist/renderer.rb
110
92
  - lib/punchlist/version.rb
93
+ - metrics/brakeman_high_water_mark
94
+ - metrics/flake8_high_water_mark
95
+ - metrics/jscs_high_water_mark
96
+ - metrics/punchlist_high_water_mark
97
+ - metrics/pycodestyle_high_water_mark
98
+ - metrics/rails_best_practices_high_water_mark
99
+ - metrics/scalastyle_high_water_mark
100
+ - metrics/shellcheck_high_water_mark
101
+ - package.json
111
102
  - punchlist.gemspec
112
- homepage: http://github.com/apiology/punchlist
103
+ - rakelib/citest.rake
104
+ - rakelib/clear_metrics.rake
105
+ - rakelib/console.rake
106
+ - rakelib/default.rake
107
+ - rakelib/doc.rake
108
+ - rakelib/feature.rake
109
+ - rakelib/gem_tasks.rake
110
+ - rakelib/localtest.rake
111
+ - rakelib/overcommit.rake
112
+ - rakelib/quality.rake
113
+ - rakelib/repl.rake
114
+ - rakelib/spec.rake
115
+ - rakelib/undercover.rake
116
+ - requirements_dev.txt
117
+ homepage: https://github.com/apiology/punchlist
113
118
  licenses:
114
- - MIT
115
- metadata: {}
116
- post_install_message:
119
+ - MIT license
120
+ metadata:
121
+ rubygems_mfa_required: 'true'
122
+ post_install_message:
117
123
  rdoc_options: []
118
124
  require_paths:
119
125
  - lib
120
126
  required_ruby_version: !ruby/object:Gem::Requirement
121
127
  requirements:
122
- - - '>='
128
+ - - ">="
123
129
  - !ruby/object:Gem::Version
124
- version: '0'
130
+ version: '3.0'
125
131
  required_rubygems_version: !ruby/object:Gem::Requirement
126
132
  requirements:
127
- - - '>='
133
+ - - ">="
128
134
  - !ruby/object:Gem::Version
129
135
  version: '0'
130
136
  requirements: []
131
- rubyforge_project:
132
- rubygems_version: 2.4.6
133
- signing_key:
137
+ rubygems_version: 3.4.10
138
+ signing_key:
134
139
  specification_version: 4
135
- summary: Finds largest source files in a project
140
+ summary: Counts the number of 'todo' comments in your code
136
141
  test_files: []
data/License.txt DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2015 Vincent Broz
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.