Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No consistancy style enforced in [code] #702

Open
TApplencourt opened this issue Jan 29, 2025 · 3 comments
Open

No consistancy style enforced in [code] #702

TApplencourt opened this issue Jan 29, 2025 · 3 comments
Labels
editorial Some purely editorial problem

Comments

@TApplencourt
Copy link
Contributor

TApplencourt commented Jan 29, 2025

We use template <backend Backend> class backend_traits { and template<auto& SpecName> aka SpaceAfterTemplateKeyword in clang format

applenco@aurora-uan-0012:~/SYCL-Docs> rg "template<" | wc -l
418
applenco@aurora-uan-0012:~/SYCL-Docs> rg "template <" | wc -l
463

Also, sometimes function arguments are in their own line, sometime we try to fill everything up to 80 chars and split, sometimes one per line (named BinPackParameters in clang-format)

  template <typename DeviceSelector>
  explicit queue(const context& syclContext,
                 const DeviceSelector& deviceSelector,
                 const property_list& propList = {});
template <typename T, access::address_space AddressSpace>
T atomic_fetch_xor(atomic<T, AddressSpace> object, T operand,
                   memory_order memoryOrder = memory_order::relaxed);
  exception(context ctx, std::error_code ec, const std::string& what_arg);

I don't really care; we should just be consistent. I have a script that can reformat everything. We should just pick the correct option for clang-format.

Then, we ran rust clang-format in the CI and live happily long after.

@TApplencourt TApplencourt changed the title No consistancy style used in [code] No consistancy style enforced in [code] Jan 29, 2025
@TApplencourt TApplencourt added the editorial Some purely editorial problem label Jan 29, 2025
@TApplencourt
Copy link
Contributor Author

First try in #709

@Pennycook
Copy link
Contributor

@TApplencourt - Can this be closed now that #709 has been merged?

@TApplencourt
Copy link
Contributor Author

TApplencourt commented Feb 25, 2025

Not yet, the next step is to do the same for the inline code block if you don't mind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Some purely editorial problem
Projects
None yet
Development

No branches or pull requests

2 participants