https://github.com/Kitware/CMake
Raw File
Tip revision: 4771c4e447c88a0e6a361d98c2c6f44ac7746ad3 authored by Brad King on 10 December 2019, 14:40:28 UTC
CMake 3.16.1
Tip revision: 4771c4e
pseudo_tidy.c
#include <stdio.h>
#include <string.h>

int main(int argc, char* argv[])
{
  int i;
  for (i = 1; i < argc; ++i) {
    if (strcmp(argv[i], "-bad") == 0) {
      fprintf(stdout, "stdout from bad command line arg '-bad'\n");
      fprintf(stderr, "stderr from bad command line arg '-bad'\n");
      return 1;
    }
    if (argv[i][0] != '-') {
      fprintf(stdout, "%s:0:0: warning: message [checker]\n", argv[i]);
      break;
    }
  }
  fprintf(stderr, "1 warning generated.\n");
  return 0;
}
back to top