punchlist 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) 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 +2 -49
  26. data/bin/bump +29 -0
  27. data/bin/overcommit +29 -0
  28. data/bin/rake +29 -0
  29. data/bin/rubocop +27 -0
  30. data/bin/solargraph +27 -0
  31. data/bin/yard +27 -0
  32. data/config/env.1p +0 -0
  33. data/docs/.gitignore +3 -0
  34. data/docs/cookiecutter_input.json +16 -0
  35. data/feature/expected/mixed_types_of_source_files_results.txt +2 -0
  36. data/feature/expected/no_files_results.txt +0 -0
  37. data/feature/expected/non_source_file_with_pis_results.txt +0 -0
  38. data/feature/expected/one_source_file_with_cis_results.txt +1 -0
  39. data/feature/expected/scala_file_to_be_ignored_results.txt +1 -0
  40. data/feature/expected/source_file_with_no_items_results.txt +0 -0
  41. data/feature/feature_helper.rb +41 -0
  42. data/feature/pronto_punchlist_use_spec.rb +26 -0
  43. data/feature/punchlist_cli_spec.rb +63 -0
  44. data/feature/samples/mixed_types_of_source_files/lib/bar.scala +1 -0
  45. data/feature/samples/mixed_types_of_source_files/lib/foo.rb +4 -0
  46. data/feature/samples/no_files/.ignore +0 -0
  47. data/feature/samples/non_source_file_with_pis/foo.doc +5 -0
  48. data/feature/samples/one_source_file_with_cis/app/foo.rb +4 -0
  49. data/feature/samples/scala_file_to_be_ignored/lib/bar.scala +1 -0
  50. data/feature/samples/scala_file_to_be_ignored/lib/foo.rb +4 -0
  51. data/feature/samples/source_file_with_no_items/foo.rb +3 -0
  52. data/fix.sh +411 -0
  53. data/lib/punchlist/inspector.rb +27 -7
  54. data/lib/punchlist/version.rb +1 -1
  55. data/lib/punchlist.rb +1 -0
  56. data/metrics/brakeman_high_water_mark +1 -0
  57. data/metrics/flake8_high_water_mark +1 -0
  58. data/metrics/jscs_high_water_mark +1 -0
  59. data/metrics/punchlist_high_water_mark +1 -0
  60. data/metrics/pycodestyle_high_water_mark +1 -0
  61. data/metrics/rails_best_practices_high_water_mark +1 -0
  62. data/metrics/scalastyle_high_water_mark +1 -0
  63. data/metrics/shellcheck_high_water_mark +1 -0
  64. data/package.json +9 -0
  65. data/punchlist.gemspec +25 -31
  66. data/rakelib/citest.rake +4 -0
  67. data/rakelib/clear_metrics.rake +9 -0
  68. data/rakelib/console.rake +6 -0
  69. data/rakelib/default.rake +4 -0
  70. data/rakelib/doc.rake +6 -0
  71. data/rakelib/feature.rake +10 -0
  72. data/rakelib/gem_tasks.rake +3 -0
  73. data/rakelib/localtest.rake +4 -0
  74. data/rakelib/overcommit.rake +6 -0
  75. data/rakelib/quality.rake +4 -0
  76. data/rakelib/repl.rake +4 -0
  77. data/rakelib/spec.rake +9 -0
  78. data/rakelib/undercover.rake +8 -0
  79. data/requirements_dev.txt +2 -0
  80. metadata +88 -115
  81. data/License.txt +0 -20
@@ -0,0 +1,133 @@
1
+
2
+ # Contributor Covenant Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ We as members, contributors, and leaders pledge to make participation in our
7
+ community a harassment-free experience for everyone, regardless of age, body
8
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
9
+ identity and expression, level of experience, education, socio-economic status,
10
+ nationality, personal appearance, race, caste, color, religion, or sexual identity
11
+ and orientation.
12
+
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
15
+
16
+ ## Our Standards
17
+
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
20
+
21
+ * Demonstrating empathy and kindness toward other people
22
+ * Being respectful of differing opinions, viewpoints, and experiences
23
+ * Giving and gracefully accepting constructive feedback
24
+ * Accepting responsibility and apologizing to those affected by our mistakes,
25
+ and learning from the experience
26
+ * Focusing on what is best not just for us as individuals, but for the
27
+ overall community
28
+
29
+ Examples of unacceptable behavior include:
30
+
31
+ * The use of sexualized language or imagery, and sexual attention or
32
+ advances of any kind
33
+ * Trolling, insulting or derogatory comments, and personal or political attacks
34
+ * Public or private harassment
35
+ * Publishing others' private information, such as a physical or email
36
+ address, without their explicit permission
37
+ * Other conduct which could reasonably be considered inappropriate in a
38
+ professional setting
39
+
40
+ ## Enforcement Responsibilities
41
+
42
+ Community leaders are responsible for clarifying and enforcing our standards of
43
+ acceptable behavior and will take appropriate and fair corrective action in
44
+ response to any behavior that they deem inappropriate, threatening, offensive,
45
+ or harmful.
46
+
47
+ Community leaders have the right and responsibility to remove, edit, or reject
48
+ comments, commits, code, wiki edits, issues, and other contributions that are
49
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
50
+ decisions when appropriate.
51
+
52
+ ## Scope
53
+
54
+ This Code of Conduct applies within all community spaces, and also applies when
55
+ an individual is officially representing the community in public spaces.
56
+ Examples of representing our community include using an official e-mail address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
59
+
60
+ ## Enforcement
61
+
62
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
+ reported to the community leaders responsible for enforcement at
64
+ [INSERT CONTACT METHOD].
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
85
+
86
+ **Community Impact**: A violation through a single incident or series
87
+ of actions.
88
+
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or
94
+ permanent ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
106
+
107
+ ### 4. Permanent Ban
108
+
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within
114
+ the community.
115
+
116
+ ## Attribution
117
+
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.0, available at
120
+ [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121
+
122
+ Community Impact Guidelines were inspired by
123
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
+
125
+ For answers to common questions about this code of conduct, see the FAQ at
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127
+ at [https://www.contributor-covenant.org/translations][translations].
128
+
129
+ [homepage]: https://www.contributor-covenant.org
130
+ [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131
+ [Mozilla CoC]: https://github.com/mozilla/diversity
132
+ [FAQ]: https://www.contributor-covenant.org/faq
133
+ [translations]: https://www.contributor-covenant.org/translations
data/CONTRIBUTING.rst ADDED
@@ -0,0 +1,75 @@
1
+ ============
2
+ Contributing
3
+ ============
4
+
5
+ Contributions are welcome, and they are greatly appreciated! Every little bit
6
+ helps, and credit will always be given.
7
+
8
+ You can contribute in many ways:
9
+
10
+ Types of Contributions
11
+ ----------------------
12
+
13
+ Report Bugs
14
+ ~~~~~~~~~~~
15
+
16
+ Report bugs at https://github.com/apiology/punchlist/issues
17
+
18
+ If you are reporting a bug, please include:
19
+
20
+ * Your operating system name and version.
21
+ * Any details about your local setup that might be helpful in troubleshooting.
22
+ * Detailed steps to reproduce the bug.
23
+
24
+ Fix Bugs
25
+ ~~~~~~~~
26
+
27
+ Look through the GitHub issues for bugs. Anything tagged with "bug"
28
+ and "help wanted" is open to whoever wants to implement a fix for it.
29
+
30
+ Implement Features
31
+ ~~~~~~~~~~~~~~~~~~
32
+
33
+ Look through the GitHub issues for features. Anything tagged with "enhancement"
34
+ and "help wanted" is open to whoever wants to implement it.
35
+
36
+ If you have a new feature in mind, please start it by filing an issue
37
+ so we can discuss the need and approach before you invest time into
38
+ coding it.
39
+
40
+ Write Documentation
41
+ ~~~~~~~~~~~~~~~~~~~
42
+
43
+ Punchlist could always use more documentation, whether as part of
44
+ the official Punchlist docs, in docstrings, or even on the web in blog posts, articles,
45
+ and such.
46
+
47
+ Submit Feedback
48
+ ~~~~~~~~~~~~~~~
49
+
50
+ The best way to send feedback is to file an issue at
51
+ https://github.com/apiology/punchlist/issues.
52
+
53
+ If you are proposing a new feature:
54
+
55
+ * Explain in detail how it would work.
56
+ * Keep the scope as narrow as possible, to make it easier to implement.
57
+ * Remember that this is a volunteer-driven project, and that contributions
58
+ are welcome :)
59
+
60
+ Get Started!
61
+ ------------
62
+
63
+ Ready to contribute? See DEVELOPMENT.md in this directory for details
64
+ on how to set yourself up for local development.
65
+
66
+ Pull Request Guidelines
67
+ -----------------------
68
+
69
+ Before you submit a pull request, check that it meets these guidelines:
70
+
71
+ 1. The pull request should include tests.
72
+
73
+ 2. If the pull request adds functionality, the docs should be updated. Put your
74
+ new functionality into a function with a docstring, and add the feature to
75
+ the list in README.md.
data/ChangeLog.md ADDED
@@ -0,0 +1,8 @@
1
+ ## Changes since Punchlist 0.0.1
2
+
3
+ # Fix extra newlines in output
4
+
5
+ ## Changes since Punchlist 0.0.1
6
+
7
+ # Add --regexp argument
8
+
data/DEVELOPMENT.md ADDED
@@ -0,0 +1,31 @@
1
+ # Development
2
+
3
+ ## fix.sh
4
+
5
+ If you want to use rbenv/pyenv/etc to manage versions of tools,
6
+ there's a `fix.sh` script which may be what you'd like to install
7
+ dependencies.
8
+
9
+ ## Overcommit
10
+
11
+ This project uses [overcommit](https://github.com/sds/overcommit) for
12
+ quality checks. `bundle exec overcommit --install` will install it.
13
+
14
+ ## direnv
15
+
16
+ This project uses direnv to manage environment variables used during
17
+ development. See the `.envrc` file for detail.
18
+
19
+ ## Publishing
20
+
21
+ To publish new version as a maintainer:
22
+
23
+ ```sh
24
+ git checkout main && git pull
25
+ git log "v$(bump current)..."
26
+ # Set type_of_bump to patch, minor, or major
27
+ bump --tag --tag-prefix=v ${type_of_bump:?}
28
+ rake release
29
+ git push
30
+ git push --tags
31
+ ```
data/Gemfile ADDED
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in punchlist.gemspec
6
+ gemspec
7
+
8
+ gem 'bump'
9
+ gem 'bundler'
10
+ gem 'fakeweb'
11
+ gem 'mdl'
12
+ gem 'overcommit', ['>=0.61.0', '<0.62.0']
13
+ gem 'pry'
14
+ gem 'rake', '~> 13.0'
15
+ gem 'rspec', '>=3.4'
16
+ gem 'rubocop', ['~> 1.52']
17
+ gem 'rubocop-rake'
18
+ # ensure version with RSpec/VerifiedDoubleReference
19
+ gem 'rubocop-rspec', ['>=2.10.0']
20
+ # ensure version with branch coverage
21
+ gem 'simplecov', ['>=0.18.0']
22
+ gem 'simplecov-lcov'
23
+ gem 'solargraph', ['>=0.50.0']
24
+ gem 'undercover'
25
+ gem 'webmock'
26
+ gem 'yard'
data/Gemfile.lock ADDED
@@ -0,0 +1,186 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ punchlist (1.3.1)
5
+ source_finder (>= 2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.8.7)
11
+ public_suffix (>= 2.0.2, < 7.0)
12
+ ast (2.4.2)
13
+ backport (1.2.0)
14
+ benchmark (0.3.0)
15
+ bigdecimal (3.1.8)
16
+ bump (0.10.0)
17
+ chef-utils (18.5.0)
18
+ concurrent-ruby
19
+ childprocess (4.1.0)
20
+ coderay (1.1.3)
21
+ concurrent-ruby (1.3.4)
22
+ crack (1.0.0)
23
+ bigdecimal
24
+ rexml
25
+ diff-lcs (1.5.1)
26
+ docile (1.4.1)
27
+ e2mmap (0.1.0)
28
+ fakeweb (1.3.0)
29
+ hashdiff (1.1.1)
30
+ imagen (0.2.0)
31
+ parser (>= 2.5, != 2.5.1.1)
32
+ iniparse (1.5.0)
33
+ jaro_winkler (1.6.0)
34
+ json (2.7.2)
35
+ kramdown (2.4.0)
36
+ rexml
37
+ kramdown-parser-gfm (1.1.0)
38
+ kramdown (~> 2.0)
39
+ language_server-protocol (3.17.0.3)
40
+ mdl (0.13.0)
41
+ kramdown (~> 2.3)
42
+ kramdown-parser-gfm (~> 1.1)
43
+ mixlib-cli (~> 2.1, >= 2.1.1)
44
+ mixlib-config (>= 2.2.1, < 4)
45
+ mixlib-shellout
46
+ method_source (1.1.0)
47
+ mixlib-cli (2.1.8)
48
+ mixlib-config (3.0.27)
49
+ tomlrb
50
+ mixlib-shellout (3.2.8)
51
+ chef-utils
52
+ nokogiri (1.16.7-aarch64-linux)
53
+ racc (~> 1.4)
54
+ nokogiri (1.16.7-arm-linux)
55
+ racc (~> 1.4)
56
+ nokogiri (1.16.7-arm64-darwin)
57
+ racc (~> 1.4)
58
+ nokogiri (1.16.7-x86-linux)
59
+ racc (~> 1.4)
60
+ nokogiri (1.16.7-x86_64-darwin)
61
+ racc (~> 1.4)
62
+ nokogiri (1.16.7-x86_64-linux)
63
+ racc (~> 1.4)
64
+ overcommit (0.61.0)
65
+ childprocess (>= 0.6.3, < 5)
66
+ iniparse (~> 1.4)
67
+ rexml (~> 3.2)
68
+ parallel (1.26.3)
69
+ parser (3.3.5.0)
70
+ ast (~> 2.4.1)
71
+ racc
72
+ pry (0.14.2)
73
+ coderay (~> 1.1)
74
+ method_source (~> 1.0)
75
+ public_suffix (6.0.1)
76
+ racc (1.8.1)
77
+ rainbow (3.1.1)
78
+ rake (13.2.1)
79
+ rbs (2.8.4)
80
+ regexp_parser (2.9.2)
81
+ reverse_markdown (2.1.1)
82
+ nokogiri
83
+ rexml (3.3.8)
84
+ rspec (3.13.0)
85
+ rspec-core (~> 3.13.0)
86
+ rspec-expectations (~> 3.13.0)
87
+ rspec-mocks (~> 3.13.0)
88
+ rspec-core (3.13.1)
89
+ rspec-support (~> 3.13.0)
90
+ rspec-expectations (3.13.3)
91
+ diff-lcs (>= 1.2.0, < 2.0)
92
+ rspec-support (~> 3.13.0)
93
+ rspec-mocks (3.13.2)
94
+ diff-lcs (>= 1.2.0, < 2.0)
95
+ rspec-support (~> 3.13.0)
96
+ rspec-support (3.13.1)
97
+ rubocop (1.66.1)
98
+ json (~> 2.3)
99
+ language_server-protocol (>= 3.17.0)
100
+ parallel (~> 1.10)
101
+ parser (>= 3.3.0.2)
102
+ rainbow (>= 2.2.2, < 4.0)
103
+ regexp_parser (>= 2.4, < 3.0)
104
+ rubocop-ast (>= 1.32.2, < 2.0)
105
+ ruby-progressbar (~> 1.7)
106
+ unicode-display_width (>= 2.4.0, < 3.0)
107
+ rubocop-ast (1.32.3)
108
+ parser (>= 3.3.1.0)
109
+ rubocop-rake (0.6.0)
110
+ rubocop (~> 1.0)
111
+ rubocop-rspec (3.1.0)
112
+ rubocop (~> 1.61)
113
+ ruby-progressbar (1.13.0)
114
+ rugged (1.7.2)
115
+ simplecov (0.22.0)
116
+ docile (~> 1.1)
117
+ simplecov-html (~> 0.11)
118
+ simplecov_json_formatter (~> 0.1)
119
+ simplecov-html (0.13.1)
120
+ simplecov-lcov (0.8.0)
121
+ simplecov_json_formatter (0.1.4)
122
+ solargraph (0.50.0)
123
+ backport (~> 1.2)
124
+ benchmark
125
+ bundler (~> 2.0)
126
+ diff-lcs (~> 1.4)
127
+ e2mmap
128
+ jaro_winkler (~> 1.5)
129
+ kramdown (~> 2.3)
130
+ kramdown-parser-gfm (~> 1.1)
131
+ parser (~> 3.0)
132
+ rbs (~> 2.0)
133
+ reverse_markdown (~> 2.0)
134
+ rubocop (~> 1.38)
135
+ thor (~> 1.0)
136
+ tilt (~> 2.0)
137
+ yard (~> 0.9, >= 0.9.24)
138
+ source_finder (3.2.1)
139
+ thor (1.3.2)
140
+ tilt (2.4.0)
141
+ tomlrb (2.0.3)
142
+ undercover (0.5.0)
143
+ bigdecimal
144
+ imagen (>= 0.1.8)
145
+ rainbow (>= 2.1, < 4.0)
146
+ rugged (>= 0.27, < 1.8)
147
+ unicode-display_width (2.6.0)
148
+ webmock (3.24.0)
149
+ addressable (>= 2.8.0)
150
+ crack (>= 0.3.2)
151
+ hashdiff (>= 0.4.0, < 2.0.0)
152
+ yard (0.9.37)
153
+
154
+ PLATFORMS
155
+ aarch64-linux
156
+ arm-linux
157
+ arm64-darwin
158
+ arm64-darwin-23
159
+ x86-linux
160
+ x86_64-darwin
161
+ x86_64-darwin-23
162
+ x86_64-linux
163
+ x86_64-linux-musl
164
+
165
+ DEPENDENCIES
166
+ bump
167
+ bundler
168
+ fakeweb
169
+ mdl
170
+ overcommit (>= 0.61.0, < 0.62.0)
171
+ pry
172
+ punchlist!
173
+ rake (~> 13.0)
174
+ rspec (>= 3.4)
175
+ rubocop (~> 1.52)
176
+ rubocop-rake
177
+ rubocop-rspec (>= 2.10.0)
178
+ simplecov (>= 0.18.0)
179
+ simplecov-lcov
180
+ solargraph (>= 0.50.0)
181
+ undercover
182
+ webmock
183
+ yard
184
+
185
+ BUNDLED WITH
186
+ 2.3.27
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024, Vince Broz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/Makefile ADDED
@@ -0,0 +1,104 @@
1
+ .PHONY: clean clean-typecheck feature help localtest quality repl rubocop spec test
2
+ .DEFAULT_GOAL := default
3
+
4
+ define PRINT_HELP_PYSCRIPT
5
+ import re, sys
6
+
7
+ for line in sys.stdin:
8
+ match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
9
+ if match:
10
+ target, help = match.groups()
11
+ print("%-20s %s" % (target, help))
12
+ endef
13
+ export PRINT_HELP_PYSCRIPT
14
+
15
+ help:
16
+ @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
17
+
18
+ default: clean-coverage test coverage clean-typecoverage typecheck typecoverage quality ## run default typechecking, tests and quality
19
+
20
+ clean-typecheck: ## Refresh information that type checking depends on
21
+ bundle install
22
+ bundle exec solargraph clear
23
+ rm -fr .yardoc/
24
+ bundle exec yard gems
25
+ bundle exec solargraph scan
26
+ echo all clear
27
+
28
+ typecheck: ## validate types in code and configuration
29
+
30
+ citypecheck: typecheck ## Run type check from CircleCI
31
+
32
+ typecoverage: typecheck ## Run type checking and then ratchet coverage in metrics/
33
+
34
+ clean-typecoverage: ## Clean out type-related coverage previous results to avoid flaky results
35
+
36
+ citypecoverage: typecoverage ## Run type checking, ratchet coverage, and then complain if ratchet needs to be committed
37
+
38
+ requirements_dev.txt.installed: requirements_dev.txt
39
+ pip install -q --disable-pip-version-check -r requirements_dev.txt
40
+ touch requirements_dev.txt.installed
41
+
42
+ pip_install: requirements_dev.txt.installed ## Install Python dependencies
43
+
44
+ # bundle install doesn't get run here so that we can catch it below in
45
+ # fresh-checkout and fresh-rbenv cases
46
+ Gemfile.lock: Gemfile
47
+
48
+ # Ensure any Gemfile.lock changes ensure a bundle is installed.
49
+ Gemfile.lock.installed: Gemfile.lock
50
+ bundle install
51
+ touch Gemfile.lock.installed
52
+
53
+ bundle_install: Gemfile.lock.installed ## Install Ruby dependencies
54
+
55
+ clear_metrics: ## remove or reset result artifacts created by tests and quality tools
56
+ bundle exec rake clear_metrics
57
+
58
+ clean: clear_metrics ## remove all built artifacts
59
+
60
+ test: spec ## run tests quickly
61
+
62
+ citest: test ## Run unit tests from CircleCI
63
+
64
+ overcommit: ## run precommit quality checks
65
+ bundle exec overcommit --run
66
+
67
+ quality: overcommit ## run precommit quality checks
68
+
69
+ spec: ## Run lower-level tests
70
+ @bundle exec rake spec
71
+
72
+ feature: ## Run higher-level tests
73
+ @bundle exec rake feature
74
+
75
+ localtest: ## run default local actions
76
+ @bundle exec rake localtest
77
+
78
+ repl: ## Load up punchlist in pry
79
+ @bundle exec rake repl
80
+
81
+ clean-coverage:
82
+ @bundle exec rake clear_metrics
83
+
84
+ coverage: test report-coverage ## check code coverage
85
+ @bundle exec rake undercover
86
+
87
+ report-coverage: test ## Report summary of coverage to stdout, and generate HTML, XML coverage report
88
+
89
+ cicoverage: coverage ## check code coverage
90
+
91
+ update_from_cookiecutter: ## Bring in changes from template project used to create this repo
92
+ bundle exec overcommit --uninstall
93
+ cookiecutter_project_upgrader --help >/dev/null
94
+ IN_COOKIECUTTER_PROJECT_UPGRADER=1 cookiecutter_project_upgrader || true
95
+ git checkout cookiecutter-template && git push && git checkout main
96
+ git checkout main && git pull && git checkout -b update-from-cookiecutter-$$(date +%Y-%m-%d-%H%M)
97
+ git merge cookiecutter-template || true
98
+ bundle exec overcommit --install
99
+ @echo
100
+ @echo "Please resolve any merge conflicts below and push up a PR with:"
101
+ @echo
102
+ @echo ' gh pr create --title "Update from cookiecutter" --body "Automated PR to update from cookiecutter boilerplate"'
103
+ @echo
104
+ @echo
data/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # Punchlist
2
+
3
+ [![CircleCI](https://circleci.com/gh/apiology/punchlist.svg?style=svg)](https://circleci.com/gh/apiology/punchlist)
4
+
5
+ Counts the number of 'todo' comments in your code ('Comment
6
+ annotations'). Use in combination with the 'quality' gem in your CI
7
+ to keep the number of these 'punchlist' items under control.
8
+
9
+ https://github.com/apiology/quality
10
+
11
+ To test quality:
12
+ rake localtest
13
+
14
+ To run tests alone:
15
+ rake spec
16
+
17
+ ## Contributions
18
+
19
+ This project, as with all others, rests on the shoulders of a broad
20
+ ecosystem supported by many volunteers doing thankless work, along
21
+ with specific contributors.
22
+
23
+ In particular I'd like to call out:
24
+
25
+ * [Audrey Roy Greenfeld](https://github.com/audreyfeldroy) for the
26
+ cookiecutter tool and associated examples, which keep my many
27
+ projects building with shared boilerplate with a minimum of fuss.
data/Rakefile CHANGED
@@ -1,51 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
- require 'quality/rake/task'
6
-
7
- task :pronto do
8
- formatter = '-f github_pr' if ENV.key? 'PRONTO_GITHUB_ACCESS_TOKEN'
9
- if ENV.key? 'TRAVIS_PULL_REQUEST'
10
- ENV['PRONTO_PULL_REQUEST_ID'] = ENV['TRAVIS_PULL_REQUEST']
11
- elsif ENV.key? 'CIRCLE_PULL_REQUEST'
12
- ENV['PRONTO_PULL_REQUEST_ID'] = ENV['CIRCLE_PULL_REQUEST'].split('/').last
13
- end
14
- puts "PRONTO_PULL_REQUEST_ID is #{ENV['PRONTO_PULL_REQUEST_ID']}"
15
- sh "pronto run #{formatter} -c origin/master --no-exit-code --unstaged "\
16
- '|| true'
17
- sh "pronto run #{formatter} -c origin/master --no-exit-code --staged || true"
18
- sh "pronto run #{formatter} -c origin/master --no-exit-code || true"
19
- end
20
-
21
- Quality::Rake::Task.new do |task|
22
- task.skip_tools = %w[reek shellcheck]
23
- task.output_dir = 'metrics'
24
- # Add 'xit ' to the standard list, finding disabled tests
25
- task.punchlist_regexp = 'XXX|TODO|FIXME|OPTIMIZE|HACK|REVIEW|LATER|FIXIT|xit '
26
- end
27
-
28
- task quality: %i[pronto]
29
-
30
- desc 'Run specs'
31
- RSpec::Core::RakeTask.new(:spec) do |task|
32
- task.pattern = 'spec/**/*_spec.rb'
33
- task.rspec_opts = '--format doc'
34
- end
35
-
36
- desc 'Run features'
37
- RSpec::Core::RakeTask.new(:feature) do |task|
38
- task.pattern = 'feature/**/*_spec.rb'
39
- task.rspec_opts = '--format doc'
40
- end
41
-
42
- task :clear_metrics do |_t|
43
- ret =
44
- system('git checkout coverage/.last_run.json metrics/*_high_water_mark')
45
- raise unless ret
46
- end
47
-
48
- desc 'Default: Run specs and check quality.'
49
- task localtest: %i[clear_metrics spec feature quality]
50
- task test: %i[spec feature]
51
- task default: [:localtest]
3
+ # Add your own tasks in files placed in rakelib/ ending in .rake,
4
+ # for example rakelib/capistrano.rake, and they will automatically be available to Rake.