pgrouting icon indicating copy to clipboard operation
pgrouting copied to clipboard

Clang tidy does not work

Open cvvergara opened this issue 1 year ago • 0 comments

While trying to use clang-tidy Tidying headers:

$ clang-tidy -header-filter=./include include/a*/*.h* --  -I/home/path/to/repo/include -isystem /usr/include/postgresql/15/server -I/usr/include/boost/ -I/usr/include
2 errors generated.
Error while processing /home/path/to/repo/include/alphaShape/pgr_alphaShape.h.
2 errors generated.
Error while processing /home/path/to/repo/include/astar/astar.hpp.
/home/path/to/repo/include/alphaShape/pgr_alphaShape.h:34:2: error: This is C++ header file [clang-diagnostic-error]
#error This is C++ header file
 ^
/home/path/to/repo/include/alphaShape/pgr_alphaShape.h:37:10: error: 'vector' file not found [clang-diagnostic-error]
#include <vector>
         ^~~~~~~~
Found compiler error(s). 

The reason for this failure is that pgr_alphaShape.h should be an hpp file

Renaming of h to hpp is needed on files like this one

TODO

List of directories containing .h files that probably need to be changed to .hpp files

  • [x] alphaShape
  • [x] bellman_ford
  • [x] breadthFirstSearch
  • [x] c_common
  • [x] c_types
  • [x] chinese
  • [x] circuits
  • [x] coloring
  • [x] components
  • [x] contraction
  • [x] cpp_common
  • [x] dijkstra
  • [x] dominator
  • [x] drivers
  • [x] lineGraph
  • [x] max_flow
  • [x] ordering
  • [x] planar
  • [x] spanningTree
  • [x] transitiveClosure
  • [x] trsp
  • [x] tsp
  • [x] visitors
  • [x] vrp
  • [x] withPoints
  • [x] yen

cvvergara avatar Feb 11 '24 19:02 cvvergara