[style] Consistent header guards HEIR_LIB_* vs LIB_*
asraa opened this issue · comments
asraa commented
This is just a style / formatting issue. It seems like half our headers and TD files use HEIR_LIB_*
and half use LIB_*
. I suspect that we had two periods of externalizing code / copybara header guard transforms and also moving the include/ dir into the lib/ dir that probably caused some confusion.
Jeremy Kun commented
Here's the macro I have in my neovim config, which creates/updates the include guard automatically. It does not include the HEIR_
prefix.
local function build_include_guard()
-- project relative filepath
local abs_path = vim.fn.expand("%")
local rel_path = vim.fn.fnamemodify(abs_path, ":~:.")
-- screaming case
local upper = string.upper(rel_path)
-- underscore separated
local underscored = string.gsub(upper, "[./]", "_")
-- trailing underscore
return underscored .. "_"
end
asraa commented
Looks like the tests/ folder is also still including THIRD_PARTY_HEIR_TESTS_ -
https://github.com/search?q=repo%3Agoogle%2Fheir%20THIRD_PARTY_HEIR_&type=code