Skip to content

Commit dc03c80

Browse files
committed
sim-ln/enhance: Makefile add format, FMT_CMD, CLIPPY_CMD
1 parent b105f7b commit dc03c80

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

Makefile

+23-23
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ mount-volume:
1212

1313
help:
1414
@echo "Makefile commands:"
15-
@echo " build-docker Builds the Docker image."
16-
@echo " mount-volume Mounts the specified volume."
17-
@echo " run-docker Runs the Docker container in detached mode."
18-
@echo " run-interactive Runs the Docker container in interactive mode."
19-
@echo " stop-docker Stops the Docker container."
20-
@echo " check Runs code formatting and linting checks."
21-
@echo " check-code Runs code formatting and linting without stability check."
22-
@echo " format Fixes both formatting and linting issues in one go."
23-
@echo " stable-output Checks for unstaged/uncommitted changes after checks."
24-
@echo " install Installs the simulation CLI."
25-
@echo " dev-install Installs the simulation CLI with development features."
15+
@echo "build-docker Builds the Docker image."
16+
@echo "mount-volume Mounts the specified volume."
17+
@echo "run-docker Runs the Docker container in detached mode."
18+
@echo "run-interactive Runs the Docker container in interactive mode."
19+
@echo "stop-docker Stops the Docker container."
20+
@echo "check Runs code formatting and linting checks."
21+
@echo "check-code Runs code formatting and linting without stability check."
22+
@echo "format Fixes both formatting and linting issues in one go."
23+
@echo "stable-output Checks for unstaged/uncommitted changes after checks."
24+
@echo "install Installs the simulation CLI."
25+
@echo "dev-install Installs the simulation CLI with development features."
2626
@echo ""
2727
@echo "Variables:"
28-
@echo " SIMFILE_PATH Path to the sim.json file."
29-
@echo " LOG_LEVEL Set the logging level (default: info) e.g. <make run-docker LOG_LEVEL=debug>."
30-
@echo " HELP Set to true to print the help message (default: false) e.g. <make run-docker HELP=true>."
31-
@echo " PRINT_BATCH_SIZE Set the batch size for printing the results e.g. <make run-docker PRINT_BATCH_SIZE=100>."
32-
@echo " TOTAL_TIME Set the total time for the simulation e.g. <make run-docker TOTAL_TIME=1000>."
33-
@echo " DATA_DIR Set the data directory for the simulation containing simulation files and results e.g. <make run-docker DATA_DIR=\"/Users/anon/data_dir>\"."
28+
@echo "SIMFILE_PATH Path to the sim.json file."
29+
@echo "LOG_LEVEL Set the logging level (default: info) e.g. <make run LOG_LEVEL=debug>."
30+
@echo "HELP Set to true to print the help message (default: false) e.g. <make run HELP=true>."
31+
@echo "PRINT_BATCH_SIZE Set the batch size for printing the results e.g. <make run PRINT_BATCH_SIZE=100>."
32+
@echo "TOTAL_TIME Set the total time for the simulation e.g. <make run TOTAL_TIME=1000>."
33+
@echo "DATA_DIR Set the data directory for the simulation containing simulation files and results e.g. <make run-docker DATA_DIR="/Users/anon/data_dir>"."
3434

3535
run-docker:
3636
docker run -d --rm --name sim-ln --init -v simln-data:${DEFAULT_DATA_DIR} -e SIMFILE_PATH=${DEFAULT_SIMFILE_PATH} -e LOG_LEVEL=$(LOG_LEVEL) -e HELP=${HELP} -e PRINT_BATCH_SIZE=${PRINT_BATCH_SIZE} -e TOTAL_TIME=${TOTAL_TIME} sim-ln
@@ -47,8 +47,8 @@ check-code:
4747

4848
stable-output:
4949
@if [ -n "$$(git status --porcelain)" ]; then \
50-
echo "Error: There are unstaged or uncommitted changes after running 'make check-code'."; \
51-
exit 1; \
50+
echo "Error: There are unstaged or uncommitted changes after running 'make check-code'."; \
51+
exit 1; \
5252
else \
5353
echo "No unstaged or uncommitted changes found."; \
5454
fi
@@ -58,9 +58,9 @@ check: check-code stable-output
5858
install:
5959
cargo install --locked --path sim-cli
6060

61+
dev-install:
62+
RUSTFLAGS="--cfg tokio_unstable" cargo install --locked --path sim-cli --features dev
63+
6164
format:
6265
$(FMT_CMD)
63-
$(CLIPPY_CMD) --fix --allow-dirty --allow-staged -- -D warnings
64-
65-
dev-install:
66-
RUSTFLAGS="--cfg tokio_unstable" cargo install --locked --path sim-cli --features dev
66+
$(CLIPPY_CMD) --fix --allow-dirty --allow-staged -- -D warnings

0 commit comments

Comments
 (0)