You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.5 KiB

Development Notes

Code Formatting

The project has been formatted with for the HTML, JavaScript, CSS, and Markdown files. See the configuration file .prettierrc.json and the ignore file .prettierignore for details. If prettier is installed globally, there's no need to provide the various npm-type dependencies in the project. Various editors may provide plugins that can use this configuration without having to install npm and prettier manually.

Manual Usage:

> npx prettier --write .

The C source and header files have been formatted with clang-format. There's no easy way to manually execute the formatter on all of the C files at the same time. The clang format is based off of the 'Google' style with ajdustments to make the changes not as disruptive. See .clang-format file for the formatting rules. Various editors should be able to automatically format the source on save.

The only files formatted are the non-third party library files.

Manual Usage:

> clang-format -i -style=file <filename>

Manually formatted files:

  • http_server.c
  • http_server.h
  • json_encode.h
  • mpd_client.c
  • mpd_client.h
  • ympd.c

For help with the rules, see Clang Format Configurator for an interactive tool and ClangFormat for the rules reference.