C

The C badge, lettered “Fifty Years Before the Mast · Since 1972” round its band
Files
.c .h
Formats as
clang-format
Lints
Every rule that reads its code
In ur.toml
[format.c]

Formatted

cart.c, as written
#include <stddef.h>
/* What a cart costs. */
struct item { const char *name; int price; int quantity; };
int subtotal(const struct item *items, size_t count)
{
    int sum=0;
    for(size_t i=0;i<count;i++) sum+=items[i].price*items[i].quantity;
    return sum;
}
ur format --style clang-format cart.c
#include <stddef.h>
/* What a cart costs. */
struct item {
  const char *name;
  int price;
  int quantity;
};
int subtotal(const struct item *items, size_t count) {
  int sum = 0;
  for (size_t i = 0; i < count; i++)
    sum += items[i].price * items[i].quantity;
  return sum;
}

Try it in the playground →

Versions

Ur reads C as the profiles below name it. Name the versions a project targets in target; without it, Ur reads c-17.

ProfileDialect
c-89GNU
c-99GNU
c-11GNU
c-17GNU
c-23GNU