]> git.cameronkatri.com Git - opendircolors.git/commitdiff
Add format rule
authorCameron Katri <me@cameronkatri.com>
Wed, 5 May 2021 12:56:43 +0000 (08:56 -0400)
committerCameron Katri <me@cameronkatri.com>
Wed, 5 May 2021 12:56:43 +0000 (08:56 -0400)
Makefile
dirconvert.c
opendircolors.c

index cc2c299f15ea612a64fcc04315cbaf66fcda4eff..7a0c5d5722b8856e854077c2cd5101031771f4aa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,4 +9,7 @@ SYMLINKS+=      opendircolors.1.gz ${MANDIR}1/dircolors.1.gz
 
 MAKEOBJDIR=obj
 
+format:
+       find ${.CURDIR} -type f -name '*.c' -exec clang-format -i {} \;
+
 .include <bsd.progs.mk>
index 3cafd517f6a723f7e79613c2c34ed1531ea4d6fd..41982c14ce57235cc3f9d4f83549aaf22b2459bb 100644 (file)
@@ -96,6 +96,7 @@ usage(const char *progname)
        char *path;
        path = strdup(progname);
 
-       (void)fprintf(stderr, "usage: %s LSCOLORS | LS_COLORS\n", basename(path));
+       (void)fprintf(
+           stderr, "usage: %s LSCOLORS | LS_COLORS\n", basename(path));
        exit(EX_USAGE);
 }
index bda00dcfd3fa3e7fa2ac8cd79f53956abbb10bea..21855baacc53ec21c217bbb20eb84118f12fdf0d 100644 (file)
@@ -119,7 +119,6 @@ main(int argc, char **argv)
                if (*line == '.') {
                        sprintf(out + strlen(out), "*%s=%s:", fmttype, val);
                        continue;
-                       ;
                } else if (*line == '*') {
                        sprintf(out + strlen(out), "%s=%s:", fmttype, val);
                        continue;