Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/facebook/react-native.git. Pull mirroring updated .
  1. Apr 16, 2024
  2. Sep 05, 2023
  3. Aug 31, 2023
    • Nick Gerleman's avatar
      Remove extra QualifierAlignment · 6d05aa54
      Nick Gerleman authored
      Summary: Accidentally left erroneously
      
      Reviewed By: shwanton
      
      Differential Revision: D48851833
      
      fbshipit-source-id: a7f4436e9283148585f9b2b1596f4afc64c4f4b5
      6d05aa54
    • Nick Gerleman's avatar
      Consistent QualifierAlignment (#39217) · 759cfaae
      Nick Gerleman authored
      Summary:
      Pull Request resolved: https://github.com/facebook/react-native/pull/39217
      
      React Native uses an inconsistent mix of "west const" and "east const". E.g. `const auto &` in 74 files, but `auto const &` in 60. Sometimes they are mixed from one line to the next:  {F1079102436}
      
      Clang format 14 adds a QualifierAlignment option, but fbsource is still on 12, so we cannot use it in our config until the [world is updated]()https://fb.workplace.com/groups/toolchain.fndn/posts/24006558685624673/?comment_id=24009214565359085&reply_comment_id=24009455088668366. This diff just runs a local version of Clang format locally first to fix QualifierAlignment, then reformats with the fbsource version, to fix any other output differences unrelated to that. This will not continually enforce a style, but will make the world more consistent, and hopefully encourage a consistent style until we can set it.
      
      West const seems more popular in `//xplat` so I just picked left alignment somewhat arbitrarily, but we could also maybe take a poll on this.
      
      Changelog: [Internal]
      
      Reviewed By: rshest
      
      Differential Revision: D48761722
      
      fbshipit-source-id: 06ec2ceddc495b7fed63ce752c1f31de05af5873
      759cfaae
  4. Feb 12, 2019
    • Valentin Shergin's avatar
      Moving ObjC specific clang-format rules to the common config · 64d6ea8b
      Valentin Shergin authored
      Summary: I found that clang-format config file allows to specify rules on a per-language basis, so I moved Objective-C specific rules to the unified config. Now we have only one clang-format file. Yay!
      
      Reviewed By: JoshuaGross
      
      Differential Revision: D14018902
      
      fbshipit-source-id: 45c1e185b8f2b8151ea202b3d9a68a3886597198
      64d6ea8b
  5. Feb 07, 2019
  6. Oct 10, 2018
  7. Oct 06, 2018
    • Valentin Shergin's avatar
      Fabric: Enabling clang-format for half of Fabric modules · 3ad5c9e0
      Valentin Shergin authored
      Summary:
      All code styles are terribly ugly. We have the only choise - choise something and embrace it.
      This particular code style was borrowed from a neibour Fabric-friendly project because it follows established Facebook guides and respects client-side traditions.
      
      Reviewed By: mdvacca
      
      Differential Revision: D10218598
      
      fbshipit-source-id: 8c4cf6713c07768566dadef479191661c79988f0
      3ad5c9e0