Merge pull request #313 from Xyene/lint-ci

Add clang-format lint step to CI
master
karl 6 years ago committed by GitHub
commit c99741d870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      .github/workflows/build-mac.yml
  2. 21
      .github/workflows/build.yml
  3. 5
      config.h
  4. 4
      debug.h
  5. 4
      iniparser/src/dictionary.h
  6. 5
      iniparser/src/iniparser.h
  7. 1
      input/alsa.h
  8. 1
      input/pulse.h
  9. 4
      output/raw.h
  10. 8
      output/terminal_ncurses.h
  11. 3
      output/terminal_noncurses.h

@ -1,17 +0,0 @@
name: build-mac
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
brew install fftw ncurses libtool automake portaudio iniparser
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
- name: Generate configure
run: ./autogen.sh
- name: Run ./configure
run: LDFLAGS="-L/usr/local/opt/ncurses/lib" CPPFLAGS="-I/usr/local/opt/ncurses/include" ./configure
- name: Run make
run: make

@ -1,7 +1,12 @@
name: build
on: [push, pull_request]
jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: DoozyX/clang-format-lint-action@v0.5
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
@ -15,3 +20,17 @@ jobs:
run: CPPFLAGS=-I/usr/include/iniparser ./configure
- name: Run make
run: make
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
brew install fftw ncurses libtool automake portaudio iniparser
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
- name: Generate configure
run: ./autogen.sh
- name: Run ./configure
run: LDFLAGS="-L/usr/local/opt/ncurses/lib" CPPFLAGS="-I/usr/local/opt/ncurses/include" ./configure
- name: Run make
run: make

@ -1,5 +1,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdio.h>
bool load_config(char configPath[255], char supportedInput[255], void* p, bool colorsOnly, void* error);
bool load_config(char configPath[255], char supportedInput[255], void *p, bool colorsOnly,
void *error);

@ -1,7 +1,9 @@
#include <stdio.h>
#ifdef NDEBUG
#define debug(...) do { } while (0)
#define debug(...) \
do { \
} while (0)
#else
#define debug(...) fprintf(stderr, __VA_ARGS__)
#endif

@ -31,7 +31,6 @@ extern "C" {
New types
---------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
/**
@brief Dictionary object
@ -50,7 +49,6 @@ typedef struct _dictionary_ {
unsigned *hash; /** List of hash values for keys */
} dictionary;
/*---------------------------------------------------------------------------
Function prototypes
---------------------------------------------------------------------------*/
@ -109,7 +107,6 @@ void dictionary_del(dictionary * vd);
/*--------------------------------------------------------------------------*/
const char *dictionary_get(const dictionary *d, const char *key, const char *def);
/*-------------------------------------------------------------------------*/
/**
@brief Set a value in a dictionary.
@ -151,7 +148,6 @@ int dictionary_set(dictionary * vd, const char * key, const char * val);
/*--------------------------------------------------------------------------*/
void dictionary_unset(dictionary *d, const char *key);
/*-------------------------------------------------------------------------*/
/**
@brief Dump a dictionary to an opened file pointer.

@ -52,7 +52,6 @@ extern "C" {
int iniparser_getnsec(const dictionary *d);
/*-------------------------------------------------------------------------*/
/**
@brief Get name for section n in a dictionary.
@ -70,7 +69,6 @@ int iniparser_getnsec(const dictionary * d);
const char *iniparser_getsecname(const dictionary *d, int n);
/*-------------------------------------------------------------------------*/
/**
@brief Save a dictionary to a loadable ini file
@ -143,7 +141,6 @@ int iniparser_getsecnkeys(const dictionary * d, const char * s);
/*--------------------------------------------------------------------------*/
const char **iniparser_getseckeys(const dictionary *d, const char *s, const char **keys);
/*-------------------------------------------------------------------------*/
/**
@brief Get the string associated to a key
@ -239,7 +236,6 @@ double iniparser_getdouble(const dictionary * d, const char * key, double notfou
/*--------------------------------------------------------------------------*/
int iniparser_getboolean(const dictionary *d, const char *key, int notfound);
/*-------------------------------------------------------------------------*/
/**
@brief Set an entry in a dictionary.
@ -255,7 +251,6 @@ int iniparser_getboolean(const dictionary * d, const char * key, int notfound);
/*--------------------------------------------------------------------------*/
int iniparser_set(dictionary *ini, const char *entry, const char *val);
/*-------------------------------------------------------------------------*/
/**
@brief Delete an entry in a dictionary

@ -1,4 +1,3 @@
// header file for alsa, part of cava.
void *input_alsa(void *data);

@ -2,4 +2,3 @@
void *input_pulse(void *data);
void getPulseDefaultSink();

@ -1,2 +1,2 @@
int print_raw_out(int bars_count, int fd, int is_binary, int bit_format,
int ascii_range, char bar_delim, char frame_delim, int const f[200]);
int print_raw_out(int bars_count, int fd, int is_binary, int bit_format, int ascii_range,
char bar_delim, char frame_delim, int const f[200]);

@ -1,8 +1,8 @@
void init_terminal_ncurses(char* const fg_color_string,
char* const bg_color_string, int predef_fg_color, int predef_bg_color, int gradient,
void init_terminal_ncurses(char *const fg_color_string, char *const bg_color_string,
int predef_fg_color, int predef_bg_color, int gradient,
int gradient_count, char **gradient_colors, int *width, int *height);
void get_terminal_dim_ncurses(int *width, int *height);
int draw_terminal_ncurses(int is_tty, int terminal_height, int terminal_width,
int bars_count, int bar_width, int bar_spacing, int rest, const int f[200],
int draw_terminal_ncurses(int is_tty, int terminal_height, int terminal_width, int bars_count,
int bar_width, int bar_spacing, int rest, const int f[200],
int flastd[200], int gradient);
void cleanup_terminal_ncurses(void);

@ -1,4 +1,5 @@
int init_terminal_noncurses(int col, int bgcol, int w, int h, int bw);
void get_terminal_dim_noncurses(int *w, int *h);
int draw_terminal_noncurses(int virt, int height, int width, int bars, int bw, int bs, int rest, int f[200], int flastd[200]);
int draw_terminal_noncurses(int virt, int height, int width, int bars, int bw, int bs, int rest,
int f[200], int flastd[200]);
void cleanup_terminal_noncurses(void);

Loading…
Cancel
Save