Commit Graph

3 Commits

Author SHA1 Message Date
Yedidya Feldblum
eaa582d1be Cut FOR_EACH_KV
Summary: [Folly] Cut the FOR_EACH_KV macro, which may be replaced by a combination of range-for and structured bindings.

Differential Revision: D21826182

fbshipit-source-id: ce4712afd3d0d7806eb1fca8c97009da117f982e
2020-06-10 19:29:43 -07:00
Yedidya Feldblum
2332fc1625 Cut FOR_EACH_ENUMERATE
Summary: [Folly] Cut the `FOR_EACH_ENUMERATE` macro, which may be replaced by a combination of range-for, `ranges::view::enumerate`, and structured bindings.

Reviewed By: markisaa

Differential Revision: D21813019

fbshipit-source-id: fc9ac09a4e2f72f1433d0a518f03d5cd69a59c55
2020-06-01 13:51:19 -07:00
Xavier Deguillard
2da5fa967a add .clang-format
Summary:
For a while now, `arc lint` wouldn't properly format the code on Windows, the reason is due to the fact that the default sparse profile doesn't include fbcode/.clang-format.

However, adding this file to the sparse profile wouldn't help as it is a symbolink link to fbsource/tools/clang-format/clang-format.ini, and as we all know, Mercurial will not create symbolic links on Windows, instead a plain file is created and its content is the link destination. The main issue with this is that clang-format simply doesn't understand what this means, and thus fails to format any code :(.

Now, it turns out with recent enough version of Windows (every Windows version we support at FB do support it) being an administrator is not a requirement to create symlinks (D21258136), once this lands. I believe that once this lands, and Mercurial is taught to properly create symlinks on Windows, this change will no longer be necessary and we can revert it. In the short term, let's make our life slightly easier by copying the fbsource clang-format configuration.

Reviewed By: simpkins

Differential Revision: D21258015

fbshipit-source-id: 21b4fda3a28bd397244b0fc9ca730ced775e96f0
2020-04-28 08:42:03 -07:00