-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (33 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.DEFAULT_GOAL := help # Sets default action to be help
define PRINT_HELP_PYSCRIPT # start of Python section
import re, sys
output = []
# Loop through the lines in this file
for line in sys.stdin:
# if the line has a command and a comment start with
# two pound signs, add it to the output
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
output.append("%-10s %s" % (target, help))
# Sort the output in alphanumeric order
output.sort()
# Print the help result
print('\n'.join(output))
endef
export PRINT_HELP_PYSCRIPT # End of python section
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
all: parlour test lint ## Regenerate RBIs, run tests and all lints
test: ## Run the tests
bundle exec rspec
lint: rubocop sorbet ## Run all linters
rubocop: ## Run style checking
bundle exec rubocop
sorbet: ## Typecheck the project
bundle exec srb tc
regen: ## Regenerate gem RBIs
bin/tapioca gem
parlour: ## Regenerate public RBI file
bundle exec parlour
.PHONY: test lint rubocop sorbet