From 082f4ea9c78ad29b32b1b584ef6db2633379a9f5 Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Wed, 13 Aug 2025 12:18:13 +0200 Subject: [PATCH] fix: Update flake.nix and Makefile for linting tools and opencode target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode --- Makefile | 11 ++++++++++- flake.nix | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c7c0f89..7f15a0d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -include .env export -.PHONY: help deploy-cloud build-usb flash-usb local-vm-run clean status destroy-cloud opencode +.PHONY: help deploy-cloud build-usb flash-usb local-vm-run clean status destroy-cloud opencode lint DOMAIN := $(or $(WORKSHOP_DOMAIN),codecrispi.es) USB_DEVICE := $(or $(USB_DEVICE),/dev/sdX) @@ -102,3 +102,12 @@ clean: opencode: @echo "Starting opencode in Nix dev shell..." nix develop --command opencode + +lint: + @echo "Linting Markdown files..." + @markdownlint-cli . || true + @echo "Linting JSON files..." + @find . -type f -name "*.json" -print0 | xargs -0 -I {} bash -c 'jq . "{}" >/dev/null || (echo "JSON lint error in {}" && exit 1)' + @echo "Linting Nix files..." + @nixpkgs-fmt . || true + @echo "Linting complete." diff --git a/flake.nix b/flake.nix index 2058df9..3c6af0d 100644 --- a/flake.nix +++ b/flake.nix @@ -137,8 +137,8 @@ devShells.${system}.default = pkgs.mkShell { packages = with pkgs; [ - markdownlint - jsonlint + markdownlint-cli + jq nixpkgs-fmt ]; };