Skip to content

Add a top-level Makefile in dotnet-sdk to simplify running tests and linters #138

@SoulPancake

Description

@SoulPancake

Checklist

Describe the problem you'd like to have solved

Contributors currently need to know the exact dotnet incantations (including multi-TFM testing) and CI nuances to run tests and formatting locally.
a standard Makefile with test, lint, and fmt targets will make local workflows consistent and reduce onboarding friction.

Describe the ideal solution

Add a Makefile at the root of the dotnet-sdk repository with the following structure:

.PHONY: test lint fmt check

# Run tests for all supported frameworks
test:
	dotnet test --framework net48
	dotnet test --framework net8.0
	dotnet test --framework net9.0

# Verify code formatting and analyzers
lint:
	dotnet format --verify-no-changes --severity info || true

# Apply formatting fixes
fmt:
	@echo "Applying code formatting..."
	@dotnet format ./OpenFga. Sdk.sln
	@echo " Code formatting applied successfully!"

This allows contributors to simply run:


make test   # run all unit tests
make lint   # verify code style and analyzers
make fmt    # apply formatting
make check  # run all of the above

Alternatives and current workarounds

No response

References

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions