A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: add distro agnostic shebang and clang-format check to `clang-format-fix` (#840)

## Summary

**What is the goal of this PR?** (e.g., Implements the new feature for
file uploading.)

Minor development tooling fix for nonstandard environments (NixOS,
FreeBSD, Guix, etc.)

**What changes are included?**

- environment relative shebang in `clang-format-fix`
- clang-format check in `clang-format-fix`
---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**NO**_

authored by

ThatCrispyToast and committed by
GitHub
1a308269 50e6ef9b

+9 -1
+9 -1
bin/clang-format-fix
··· 1 - #!/bin/bash 1 + #!/usr/bin/env bash 2 + 3 + # Check if clang-format is availible 4 + command -v clang-format >/dev/null 2>&1 || { 5 + printf "'clang-format' not found in current environment\n" 6 + printf "install 'clang', 'clang-tools', or 'clang-format' depending on your distro/os and tooling requirements\n" 7 + exit 1 8 + } 2 9 3 10 GIT_LS_FILES_FLAGS="" 4 11 if [[ "$1" == "-g" ]]; then 5 12 GIT_LS_FILES_FLAGS="--modified" 6 13 fi 14 + 7 15 8 16 # --- Main Logic --- 9 17