From 5b0dfa471fc885bc6800d77c66b849716fb7711d Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Mon, 20 Nov 2017 02:58:26 -0800 Subject: [PATCH] Use internal clang format settings Summary: Use internal linting rules instead of the custom once. Differential Revision: D6284667 fbshipit-source-id: 65aae336f1d7f14dfefed7391b0f5b89b333495e --- CONTRIBUTING.md | 3 --- README.md | 5 ----- format.sh | 38 -------------------------------------- 3 files changed, 46 deletions(-) delete mode 100755 format.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 07c37f21..7667b705 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,9 +25,6 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue. -## Coding Style -* format.sh - ## License By contributing to yoga, you agree that your contributions will be licensed under its BSD license. diff --git a/README.md b/README.md index 4c80d5d1..7a8833b8 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,6 @@ You may need to install the latest watir-webdriver gem (`gem install watir-webdr ### .NET .NET testing is not integrated in buck yet, you might need to set up .NET testing environment. We have a script which to launch C# test on macOS, `csharp/tests/Facebook.Yoga/test_macos.sh`. -## Code style -For the main C implementation of Yoga clang-format is used to ensure a consistent code style. Please run `bash format.sh` before submitting a pull request. For other languages just try to follow the current code style. - ## Benchmarks Benchmarks are located in `benchmark/YGBenchmark.c` and can be run with `buck run //benchmark:benchmark`. If you think your change has affected performance please run this before and after your change to validate that nothing has regressed. Benchmarks are run on every commit in CI. @@ -59,5 +56,3 @@ This will now only run the standalone webpack build upon install. | node | Builds node js version. | | standalone | Runs webpack. | | none | Does nothing. You can use the prepackaged libs. | - - diff --git a/format.sh b/format.sh deleted file mode 100755 index ee4d91f9..00000000 --- a/format.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -BASEDIR="$(dirname "$0")" -FILES=$(find "$BASEDIR" \( -path "$BASEDIR/buck-out" -o -path "$BASEDIR/lib" \) -prune -o \ - \( -name \*.h ! -name YGEnums.h -o -name \*.c -o -name \*.cpp \) -print) - -for f in $FILES "$@"; do - clang-format \ - -style="{ \ - AlignAfterOpenBracket: Align, \ - AlignEscapedNewlinesLeft: true, \ - AlignOperands: true, \ - AllowAllParametersOfDeclarationOnNextLine: false, \ - AllowShortBlocksOnASingleLine: false, \ - AllowShortCaseLabelsOnASingleLine: false, \ - AllowShortFunctionsOnASingleLine: false, \ - AllowShortIfStatementsOnASingleLine: false, \ - AllowShortLoopsOnASingleLine: false, \ - BinPackArguments: false, \ - BinPackParameters: false, \ - BreakBeforeBraces: Attach, \ - ColumnLimit: 100, \ - ContinuationIndentWidth: 4, \ - IndentCaseLabels: true, \ - IndentWidth: 2, \ - KeepEmptyLinesAtTheStartOfBlocks: false, \ - Language: Cpp, \ - PenaltyBreakBeforeFirstCallParameter: 100, \ - PenaltyBreakString: 1000, \ - PenaltyExcessCharacter: 100, \ - PenaltyReturnTypeOnItsOwnLine: 100, \ - PointerAlignment: Right, \ - SortIncludes: true, \ - SpaceAfterCStyleCast: true, \ - UseTab: Never, \ - ObjCSpaceAfterProperty: true, \ - }" -i "$f" -done