Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial version of miss_hit #741

Merged
merged 9 commits into from
Dec 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean make
  • Loading branch information
mvanzulli committed Dec 15, 2024
commit cf9dc9d6d5b98b760518715e2e5835ddb326193e
12 changes: 0 additions & 12 deletions utils/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Variables
POETRY := poetry run
MISS_HIT_STYLE := $(POETRY) mh_style
MISS_HIT_LINT := $(POETRY) mh_lint
Expand All @@ -7,48 +6,38 @@ MISS_HIT_METRIC := $(POETRY) mh_metric
# Directories to analyze
DIRECTORIES := ./../docs/ ./../test/
# TODO: Add docs examples and src
CONFIG_FILE := ./miss_hit.cfg

# Default target (runs all checks)
.PHONY: all
all: check

# Install project dependencies using Poetry
.PHONY: install
install:
@echo "Installing dependencies..."
poetry install

jorgepz marked this conversation as resolved.
Show resolved Hide resolved
# Format code using mh_style with --fix to apply changes
.PHONY: format
format:
@echo "Formatting code in $(DIRECTORIES)..."
$(MISS_HIT_STYLE) $(DIRECTORIES) --fix

# Check code formatting without applying changes
.PHONY: format_check
format_check:
@echo "Checking code formatting in $(DIRECTORIES)..."
$(MISS_HIT_STYLE) $(DIRECTORIES)

# Run lint checks using mh_lint
.PHONY: lint
lint:
@echo "Running lint checks on $(DIRECTORIES)..."
$(MISS_HIT_LINT) $(DIRECTORIES)

# Run code metrics check with CI mode
.PHONY: metric
metric:
@echo "Running code metrics for $(DIRECTORIES)..."
$(MISS_HIT_METRIC) $(DIRECTORIES) --ci

# Run all checks: format_check, lint, and metric
.PHONY: check
check: format lint metric
@echo "All checks passed successfully."

# Help target to display available commands
.PHONY: help
help:
@echo "Usage: make [target]"
Expand All @@ -60,5 +49,4 @@ help:
@echo " lint Run lint checks on the specified directories"
@echo " metric Run code metrics in CI mode"
@echo " check Run all checks (format_check, lint, metric)"
@echo " clean Clean up temporary files (if applicable)"
@echo " help Display this help message"
Loading